From 780fac72c5f6b49e1f5deab8f366f214f709581d Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 14:25:29 -0800 Subject: [PATCH 01/24] Artwork Cleanup: Release All Containers takes apart every group, clipping mask and compound path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Object › Plug-ins › Artwork Cleanup › Release All Containers… (addon.cleanup.releaseAll) takes apart every container in the selection, the objects named by ids or the whole document, at every level of nesting, as one undo step, so that only the objects they held are left. Groups are ungrouped, clipping groups are ungrouped and layers stop clipping (their clipping paths stay as plain paths), and compound paths and paths of several subpaths become one path per subpath. Each kind can be turned off; at least one must be on. Objects keep the opacity of the groups and compound paths they were in, and a compound path's paths take its paint. Live objects kept as groups or compound paths (compound shapes, Live Paint groups, graphs, dimensions, Objects on Path, generated art and others) and objects with an opacity mask stay whole, and the clipping path of a clipping group or layer that stays is left as it is. From the selection or the document, locked and hidden objects and objects on a locked artboard stay whole; named by ids, locked and hidden containers are taken apart too, as Deep Ungroup does. Nothing released records no undo step. The dialog previews on the canvas and turns OK off when no kind is ticked or when Selection is chosen with nothing selected. Docs: docs/mcp.md, docs/target-app-parity.md. --- crates/engine/src/cmd/addons/cleanup.rs | 8 +- .../engine/src/cmd/addons/cleanup/release.rs | 344 ++++++++++++++++ .../src/cmd/addons/cleanup/release/tests.rs | 371 ++++++++++++++++++ crates/engine/src/cmd/plugin_call/reviewed.rs | 1 + .../engine/src/tests/ids_without_selection.rs | 1 + crates/engine/tests/command_sweep.rs | 1 + crates/ui-egui/src/addons/cleanup.rs | 7 +- crates/ui-egui/src/addons/cleanup/release.rs | 57 +++ .../src/addons/cleanup/release/tests.rs | 99 +++++ crates/ui-egui/src/addons/dialogs.rs | 3 +- docs/mcp.md | 19 + docs/target-app-parity.md | 6 + docs/ui-parity.md | 2 +- 13 files changed, 912 insertions(+), 7 deletions(-) create mode 100644 crates/engine/src/cmd/addons/cleanup/release.rs create mode 100644 crates/engine/src/cmd/addons/cleanup/release/tests.rs create mode 100644 crates/ui-egui/src/addons/cleanup/release.rs create mode 100644 crates/ui-egui/src/addons/cleanup/release/tests.rs diff --git a/crates/engine/src/cmd/addons/cleanup.rs b/crates/engine/src/cmd/addons/cleanup.rs index d5f241b4ee..8f4def2dcd 100644 --- a/crates/engine/src/cmd/addons/cleanup.rs +++ b/crates/engine/src/cmd/addons/cleanup.rs @@ -1,9 +1,10 @@ //! Artwork Cleanup (`addon.cleanup.*`), a built-in add-on: Simplify Anchors (Keep Shape), the -//! Document Health Check (check, show and fix the issues it finds), Deep Ungroup and Rejoin Path -//! Pieces, and its text tools ([`text`]). Its panel and its submenu, Object › Plug-ins › Artwork -//! Cleanup, are the UI's. +//! Document Health Check (check, show and fix the issues it finds), Deep Ungroup, Release All +//! Containers ([`release`]) and Rejoin Path Pieces, and its text tools ([`text`]). Its panel and +//! its submenu, Object › Plug-ins › Artwork Cleanup, are the UI's. mod checks; +mod release; #[cfg(test)] mod tests; mod text; @@ -87,6 +88,7 @@ pub fn specs() -> Vec { rejoin ), ]; + v.extend(release::specs()); v.extend(text::specs()); v } diff --git a/crates/engine/src/cmd/addons/cleanup/release.rs b/crates/engine/src/cmd/addons/cleanup/release.rs new file mode 100644 index 0000000000..924803cd32 --- /dev/null +++ b/crates/engine/src/cmd/addons/cleanup/release.rs @@ -0,0 +1,344 @@ +//! Artwork Cleanup's Release All Containers (`addon.cleanup.releaseAll`): every group, clipping +//! mask and compound path in the selection, the objects named or the whole document, taken apart +//! at every level of nesting as one undo step, so that only the objects they held are left. + +#[cfg(test)] +mod tests; + +use std::collections::{HashMap, HashSet}; + +use serde_json::{Value, json}; +use vectorcraft_doc::{Document, Node, NodeId, NodeKind}; +use vectorcraft_geom::PathData; +use vectorcraft_tools::builder::is_live_paint; + +use super::checks::{MAX_OBJECTS, Scope}; +use super::{named, retain_targets, scope_of}; +use crate::cmd::{CommandSpec, bad, checked_ids_or_selection, cmd, has_doc, switch_or}; +use crate::{EngineError, Result, Session}; + +/// The command. +const COMMAND: &str = "addon.cleanup.releaseAll"; + +pub(super) fn specs() -> Vec { + vec![cmd!( + "addon.cleanup.releaseAll", + "Release All Containers…", + ["Object", "Plug-ins", "Artwork Cleanup"], + None, + "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping, their clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or layer that stays is left as it is, also when it is selected or named itself; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", + has_doc, + release_all + )] +} + +/// The kinds of container a request takes apart. +#[derive(Clone, Copy)] +struct Kinds { + groups: bool, + clips: bool, + compounds: bool, +} + +impl Kinds { + /// Whether a group is taken apart: a clipping group (`clip`) with `clips`, another with `groups`. + fn takes_group(self, clip: bool) -> bool { + if clip { self.clips } else { self.groups } + } +} + +/// One run over the objects: what it takes apart and what it found. +struct Release<'a> { + kinds: Kinds, + /// Locked and hidden objects are taken apart too. + named: bool, + /// The containers on a locked artboard, which stay whole. + held: &'a HashSet, + /// Groups, clipping groups and layers, and compound paths released. + counts: [usize; 3], + /// Objects made from the containers taken apart. + made: usize, + /// Each container taken apart and the objects left in its place. + left: HashMap>, +} + +/// Whether `n` stays whole whatever is asked: a live object kept as a group or compound path +/// (a compound shape, Live Paint group, graph, dimension, flare, Objects on Path, generated art, +/// Shaper Group, Image Trace object, a clipping path's painted pieces) or one with an opacity mask, +/// whose contents would lose what it does to them. +fn live(n: &Node) -> bool { + let x = n.extras(); + x.mask.is_some() + || x.shaper.is_some() + || x.trace.is_some() + || x.graph.is_some() + || x.dimension.is_some() + || x.flare.is_some() + || x.objects_on_path.is_some() + || x.generated.is_some() + || x.live_paint_gaps.is_some() + || x.clip_pieces + || n.is_compound_shape() + || is_live_paint(n) +} + +/// The containers under `roots` that a run could take apart, into `out`. +fn candidates(n: &Node, out: &mut Vec) { + match &n.kind { + NodeKind::Layer { children, .. } | NodeKind::Group { children, .. } | NodeKind::Compound { children, .. } => { + if !n.is_layer() { + out.push(n.id); + } + children.iter().for_each(|c| candidates(c, out)); + } + NodeKind::Path { path, .. } if path.subpaths.len() > 1 => out.push(n.id), + _ => {} + } +} + +impl Release<'_> { + fn total(&self) -> usize { + self.counts.iter().sum() + } + + /// Whether `n` is left as it is: locked or hidden (unless named), on a locked artboard, or live. + fn keeps(&self, n: &Node) -> bool { + (!self.named && (n.locked || !n.visible)) || self.held.contains(&n.id) || live(n) + } + + /// `n` with the containers in it released, into `out`; `member` counts what a container left. + fn node(&mut self, d: &mut Document, n: Node, member: bool, out: &mut Vec) -> Result<()> { + if self.keeps(&n) { + if member { + self.made(1)?; + } + out.push(n); + return Ok(()); + } + match &n.kind { + NodeKind::Group { clip, .. } if self.kinds.takes_group(*clip) => { + let clip = *clip; + self.counts[usize::from(clip)] += 1; + self.take_apart(d, n, clip, false, out) + } + NodeKind::Compound { .. } if self.kinds.compounds => { + self.counts[2] += 1; + self.take_apart(d, n, false, true, out) + } + NodeKind::Path { path, clipping: false, guide: false, .. } if self.kinds.compounds && path.subpaths.len() > 1 => { + self.counts[2] += 1; + self.split(d, n, out) + } + NodeKind::Group { .. } | NodeKind::Layer { .. } => self.keep(d, n, member, out), + _ => { + if member { + self.made(1)?; + } + out.push(n); + Ok(()) + } + } + } + + /// Group or compound path `n` replaced by its members, released in turn. Members take on the + /// container's opacity, are hidden when it was hidden and locked when it was locked; a + /// compound path's take its paint; a clipping group's clipping path becomes a plain path. + fn take_apart(&mut self, d: &mut Document, n: Node, clip: bool, compound: bool, out: &mut Vec) -> Result<()> { + let Some(children) = n.children() else { return Ok(()) }; + let mut parts = vec![]; + for (k, c) in children.iter().enumerate() { + let mut c = (**c).clone(); + if clip + && k == 0 + && let NodeKind::Path { clipping, .. } = &mut c.kind + { + *clipping = false; + } + if compound { + c.appearance = n.appearance.clone(); + if n.extras().pixel_aligned { + c.extras_mut().pixel_aligned = true; + } + } + c.opacity *= n.opacity; + c.visible &= n.visible; + c.locked |= n.locked; + self.node(d, c, true, &mut parts)?; + } + self.left.insert(n.id, parts.iter().map(|p| p.id).collect()); + out.extend(parts); + Ok(()) + } + + /// Path `n` of several subpaths as one path per subpath with its paint, in the same stacking + /// order; the first keeps its id. + fn split(&mut self, d: &mut Document, n: Node, out: &mut Vec) -> Result<()> { + let Some(path) = n.path_data() else { return Ok(()) }; + if self.made.saturating_add(path.subpaths.len()) > MAX_OBJECTS { + return Err(EngineError::Other("Release All Containers: too many objects to release at once".into())); + } + let mut template = n.clone(); + if let NodeKind::Path { path, live, .. } = &mut template.kind { + (*path, *live) = (PathData::single(Default::default()), None); + } + let mut parts = Vec::with_capacity(path.subpaths.len()); + for (k, sp) in path.subpaths.iter().enumerate() { + let mut c = if k == 0 { template.clone() } else { d.reid(&template) }; + if let NodeKind::Path { path, live, .. } = &mut c.kind { + (*path, *live) = (PathData::single(sp.clone()), None); + } + parts.push(c); + } + self.made(parts.len())?; + self.left.insert(n.id, parts.iter().map(|p| p.id).collect()); + out.extend(parts); + Ok(()) + } + + /// Group or layer `n` kept, with the containers in it released. A layer stops clipping when + /// clipping groups are released; the clipping path of a group or layer that still clips is + /// left as it is. Unchanged, `n` itself goes to `out`. + fn keep(&mut self, d: &mut Document, mut n: Node, member: bool, out: &mut Vec) -> Result<()> { + if member { + self.made(1)?; + } + let before = self.total(); + let mut clips = n.clips(); + if clips && n.is_layer() && self.kinds.clips { + self.counts[1] += 1; + n.set_clips(false); + clips = false; + if let Some(first) = n.children_mut().and_then(|c| c.first_mut()) + && let NodeKind::Path { clipping, .. } = &mut std::sync::Arc::make_mut(first).kind + { + *clipping = false; + } + } + let Some(children) = n.children().cloned() else { + out.push(n); + return Ok(()); + }; + let mut kept = Vec::with_capacity(children.len()); + for (k, c) in children.into_iter().enumerate() { + if clips && k == 0 { + if member { + self.made(1)?; + } + kept.push((*c).clone()); + } else { + self.node(d, (*c).clone(), member, &mut kept)?; + } + } + if self.total() != before + && let Some(ch) = n.children_mut() + { + *ch = kept.into_iter().map(std::sync::Arc::new).collect(); + } + out.push(n); + Ok(()) + } + + /// Counts the objects made, refusing a run that makes too many. + fn made(&mut self, count: usize) -> Result<()> { + self.made += count; + if self.made > MAX_OBJECTS { + return Err(EngineError::Other("Release All Containers: too many objects to release at once".into())); + } + Ok(()) + } + + /// `id`, or the objects left in its place when it was taken apart. + fn replaced(&self, id: NodeId, into: &mut Vec) { + match self.left.get(&id) { + Some(ids) => into.extend(ids), + None => into.push(id), + } + } +} + +/// Whether `id` is the clipping path of the clipping group or layer it is in. +fn clips_its_parent(d: &Document, id: NodeId) -> bool { + d.parent_of(id).and_then(|p| d.node(p)).is_some_and(|p| p.clips() && p.children().and_then(|c| c.first()).is_some_and(|c| c.id == id)) +} + +fn release_all(s: &mut Session, p: &Value) -> Result { + let kinds = Kinds { + groups: switch_or(p, "groups", true, COMMAND)?, + clips: switch_or(p, "clipGroups", true, COMMAND)?, + compounds: switch_or(p, "compoundPaths", true, COMMAND)?, + }; + if !(kinds.groups || kinds.clips || kinds.compounds) { + return Err(bad(COMMAND, "`groups`, `clipGroups` and `compoundPaths` are all false: there is nothing to release")); + } + let named = named(p); + if named && p.get("scope").is_some_and(|v| !v.is_null()) { + return Err(bad(COMMAND, "give `scope` or `ids`, not both")); + } + let (roots, name) = if named { + let mut roots = checked_ids_or_selection(s, p, COMMAND)?; + retain_targets(&s.doc()?.doc, &mut roots, true, |id| *id); + (roots, "ids") + } else { + match scope_of(s, p, COMMAND)? { + (Scope::Document, name) => (s.doc()?.doc.layers.iter().map(|l| l.id).collect(), name), + (Scope::Objects(mut roots), name) => { + retain_targets(&s.doc()?.doc, &mut roots, false, |id| *id); + (roots, name) + } + } + }; + let st = s.doc()?; + let (mut d, mut sel) = ((*st.doc).clone(), st.selection.clone()); + // The containers on a locked artboard, found while nothing is changed yet. + let held: HashSet = if d.artboards.iter().any(|a| a.locked) { + let mut found = vec![]; + for n in roots.iter().filter_map(|id| d.node(*id)) { + candidates(n, &mut found); + } + let locks = d.locked_artboards(); + found.into_iter().filter(|id| locks.holds_id(*id)).collect() + } else { + HashSet::new() + }; + let mut run = Release { kinds, named, held: &held, counts: [0; 3], made: 0, left: HashMap::new() }; + let mut items = vec![]; + for id in roots { + // A clipping path picked inside the clipping group or layer it clips stays as it is, as it + // does when that group or layer is released in. + if clips_its_parent(&d, id) { + continue; + } + let Some(n) = d.node(id).cloned() else { continue }; + let before = run.total(); + let mut out = vec![]; + run.node(&mut d, n, false, &mut out)?; + if run.total() != before { + items.push((id, out)); + } + } + let [groups, clips, compounds] = run.counts; + // With nothing to release, the document, the selection and the undo history stay as they are. + if run.total() == 0 { + let ids: Vec = sel.objects.iter().map(|i| i.0).collect(); + return Ok(json!({ "scope": name, "ids": ids, "groups": 0, "clipGroups": 0, "compoundPaths": 0 })); + } + d.insert_beside(items, true)?; + let mut ids = vec![]; + for id in sel.objects.iter() { + run.replaced(*id, &mut ids); + } + // Locked and hidden objects, and those in locked or hidden groups, are not selected. + { + let editable = d.editable(); + ids.retain(|id| editable(*id)); + } + sel.set(ids.iter().copied()); + sel.prune(&d); + let ids: Vec = sel.objects.iter().map(|i| i.0).collect(); + s.edit("Release All Containers", |doc, selection| { + *doc = d; + *selection = sel; + Ok(()) + })?; + Ok(json!({ "scope": name, "ids": ids, "groups": groups, "clipGroups": clips, "compoundPaths": compounds })) +} diff --git a/crates/engine/src/cmd/addons/cleanup/release/tests.rs b/crates/engine/src/cmd/addons/cleanup/release/tests.rs new file mode 100644 index 0000000000..b04ff4dd46 --- /dev/null +++ b/crates/engine/src/cmd/addons/cleanup/release/tests.rs @@ -0,0 +1,371 @@ +//! Release All Containers: every level taken apart as one undo step, the kinds asked for only, +//! the selection, the document and named objects, clipping layers, what stays whole, and refusals. + +use serde_json::{Value, json}; +use vectorcraft_color::{Color, Paint}; +use vectorcraft_doc::{Appearance, Node, NodeId, NodeKind}; + +use crate::Session; + +const C: &str = "addon.cleanup.releaseAll"; + +fn session() -> Session { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + s +} + +fn id_of(v: &Value) -> NodeId { + NodeId(v["id"].as_u64().unwrap()) +} + +fn rect(s: &mut Session, x: f64, y: f64) -> NodeId { + id_of(&s.execute("shape.rectangle", &json!({"x": x, "y": y, "width": 20, "height": 20})).unwrap()) +} + +fn node(s: &Session, id: NodeId) -> Option { + s.doc().unwrap().doc.node(id).cloned() +} + +fn change(s: &mut Session, id: NodeId, f: impl FnOnce(&mut Node)) { + s.edit("t", |d, _| { + f(d.node_mut(id).unwrap()); + Ok(()) + }) + .unwrap(); +} + +fn select(s: &mut Session, ids: &[NodeId]) { + s.select(|_, sel| sel.set(ids.iter().copied())).unwrap(); +} + +fn selected(s: &Session) -> Vec { + s.doc().unwrap().selection.objects.to_vec() +} + +fn undo_steps(s: &Session) -> usize { + s.doc().unwrap().history.undo.len() +} + +/// The objects directly in layer `k`. +fn layer(s: &Session, k: usize) -> Vec { + s.doc().unwrap().doc.layers[k].children().unwrap().iter().map(|n| n.id).collect() +} + +fn group(s: &mut Session, ids: &[NodeId]) -> NodeId { + select(s, ids); + id_of(&s.execute("object.group", &json!({})).unwrap()) +} + +fn compound(s: &mut Session, ids: &[NodeId]) -> NodeId { + select(s, ids); + id_of(&s.execute("object.compoundPath.make", &json!({})).unwrap()) +} + +/// A clipping group of `ids`, the last of them the clipping path. +fn clip_group(s: &mut Session, ids: &[NodeId]) -> NodeId { + select(s, ids); + id_of(&s.execute("object.clippingMask.make", &json!({})).unwrap()) +} + +fn counts(r: &Value) -> (u64, u64, u64) { + (r["groups"].as_u64().unwrap(), r["clipGroups"].as_u64().unwrap(), r["compoundPaths"].as_u64().unwrap()) +} + +fn plain(s: &Session, id: NodeId) -> bool { + matches!(node(s, id).unwrap().kind, NodeKind::Path { clipping: false, ref path, .. } if path.subpaths.len() == 1) +} + +fn red() -> Appearance { + Appearance::basic(Paint::solid(Color::rgb(1.0, 0.0, 0.0)), Paint::None, 1.0) +} + +#[test] +fn release_all_takes_apart_every_level_as_one_step() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let p = rect(&mut s, 70.0, 10.0); + let q = rect(&mut s, 75.0, 15.0); + let holes = compound(&mut s, &[p, q]); + change(&mut s, holes, |n| n.appearance = red().into()); + let inner = group(&mut s, &[b, holes]); + change(&mut s, inner, |n| n.opacity = 0.5); + let clipped = rect(&mut s, 110.0, 10.0); + let clip = rect(&mut s, 105.0, 5.0); + let masked = clip_group(&mut s, &[clipped, clip]); + let outer = group(&mut s, &[a, inner, masked]); + select(&mut s, &[outer]); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!(counts(&r), (2, 1, 1), "{r}"); + assert_eq!(r["scope"], "selection"); + assert_eq!(undo_steps(&s), steps + 1, "one undo step"); + assert_eq!(s.doc().unwrap().history.undo.last().unwrap().label, "Release All Containers"); + assert_eq!(layer(&s, 0), [a, b, p, q, clip, clipped], "only paths are left, in their stacking order"); + assert!([a, b, p, q, clip, clipped].iter().all(|id| plain(&s, *id)), "the clipping path is a plain path"); + assert!(node(&s, outer).is_none() && node(&s, inner).is_none() && node(&s, holes).is_none() && node(&s, masked).is_none()); + assert_eq!((node(&s, b).unwrap().opacity, node(&s, p).unwrap().opacity), (0.5, 0.5), "members keep their groups' opacity"); + assert_eq!(*node(&s, q).unwrap().appearance, red(), "a compound path's paths take its paint"); + assert_eq!(selected(&s), [a, b, p, q, clip, clipped], "what the selected group left is selected"); + assert_eq!(r["ids"], json!([a.0, b.0, p.0, q.0, clip.0, clipped.0])); + s.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(layer(&s, 0), [outer]); +} + +#[test] +fn release_all_counts_each_object_left_once() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let c = rect(&mut s, 70.0, 10.0); + let p = rect(&mut s, 100.0, 10.0); + let second = node(&s, p).unwrap().path_data().unwrap().subpaths[0].clone(); + change(&mut s, p, |n| { + if let NodeKind::Path { path, .. } = &mut n.kind { + path.subpaths.push(second); + } + }); + let inner = group(&mut s, &[a, b, c, p]); + change(&mut s, inner, |n| n.set_clips(true)); + let middle = group(&mut s, &[inner]); + let outer = group(&mut s, &[middle]); + let held = std::collections::HashSet::new(); + for clips in [true, false] { + let mut d = (*s.doc().unwrap().doc).clone(); + let n = d.node(outer).unwrap().clone(); + let mut run = super::Release { + kinds: super::Kinds { groups: true, clips, compounds: true }, + named: false, + held: &held, + counts: [0; 3], + made: 0, + left: std::collections::HashMap::new(), + }; + let mut out = vec![]; + run.node(&mut d, n, false, &mut out).unwrap(); + if clips { + assert_eq!(out.len(), 5); + assert_eq!(run.made, out.len(), "each path is counted once"); + } else { + assert_eq!(out.len(), 1); + let children = out[0].children().unwrap(); + assert_eq!(children.len(), 5); + assert_eq!(run.made, out.len() + children.len(), "the kept group and its paths are counted once"); + } + } +} + +#[test] +fn release_all_takes_only_the_kinds_asked_for() { + let mut s = session(); + let p = rect(&mut s, 10.0, 10.0); + let q = rect(&mut s, 15.0, 15.0); + let holes = compound(&mut s, &[p, q]); + let clipped = rect(&mut s, 110.0, 10.0); + let e = rect(&mut s, 105.0, 5.0); + let f = rect(&mut s, 108.0, 8.0); + let clip = compound(&mut s, &[e, f]); + let masked = clip_group(&mut s, &[clipped, clip]); + let outer = group(&mut s, &[holes, masked]); + // Without groups, the group stays and what is inside it is still released, but for the + // clipping path of the clipping group that stays. + select(&mut s, &[outer]); + let r = s.execute(C, &json!({"groups": false, "clipGroups": false})).unwrap(); + assert_eq!(counts(&r), (0, 0, 1), "{r}"); + let d = &s.doc().unwrap().doc; + assert_eq!(d.parent_of(p), Some(outer)); + assert!(d.node(holes).is_none() && d.node(clip).is_some() && d.node(masked).is_some()); + assert_eq!(selected(&s), [outer]); + // Without compound paths, the groups go and the compound path stays. + let r = s.execute(C, &json!({"compoundPaths": false})).unwrap(); + assert_eq!(counts(&r), (1, 1, 0), "{r}"); + assert_eq!(layer(&s, 0), [p, q, clip, clipped]); + assert!(matches!(node(&s, clip).unwrap().kind, NodeKind::Compound { .. })); + // Then only compound paths: the clipping path's paths, unpainted as it was. + select(&mut s, &[clip]); + let r = s.execute(C, &json!({"groups": false, "clipGroups": false})).unwrap(); + assert_eq!(counts(&r), (0, 0, 1), "{r}"); + assert_eq!(layer(&s, 0), [p, q, e, f, clipped]); +} + +#[test] +fn release_all_splits_paths_of_several_subpaths() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let second = node(&s, b).unwrap().path_data().unwrap().subpaths[0].clone(); + change(&mut s, a, |n| { + if let NodeKind::Path { path, .. } = &mut n.kind { + path.subpaths.push(second); + } + }); + s.edit("t", |d, _| Ok(d.remove_many(&[b])?)).unwrap(); + select(&mut s, &[a]); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!(counts(&r), (0, 0, 1), "{r}"); + let left = layer(&s, 0); + assert_eq!(left.len(), 2); + assert_eq!(left[0], a, "the first subpath keeps the path's id"); + assert!(left.iter().all(|id| plain(&s, *id))); + assert_eq!(selected(&s), left); + assert_eq!(node(&s, left[1]).unwrap().appearance, node(&s, a).unwrap().appearance, "each part keeps the path's paint"); +} + +#[test] +fn release_all_runs_on_the_document_while_nothing_is_selected() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let c = rect(&mut s, 70.0, 10.0); + let e = rect(&mut s, 100.0, 10.0); + let plain_group = group(&mut s, &[a]); + let locked = group(&mut s, &[b]); + change(&mut s, locked, |n| n.locked = true); + let hidden = group(&mut s, &[c]); + change(&mut s, hidden, |n| n.visible = false); + // A second layer that clips its art by its first path. + let second = id_of(&s.execute("layer.new", &json!({})).unwrap()); + let mask = rect(&mut s, 0.0, 100.0); + let art = rect(&mut s, 10.0, 110.0); + let art_group = group(&mut s, &[art]); + s.edit("t", |d, _| { + let layer = d.node_mut(second).unwrap(); + layer.set_clips(true); + if let Some(NodeKind::Path { clipping, .. }) = layer.children_mut().unwrap().first_mut().map(|c| &mut std::sync::Arc::make_mut(c).kind) { + *clipping = true; + } + Ok(()) + }) + .unwrap(); + select(&mut s, &[]); + assert!(s.execute(C, &json!({"scope": "selection"})).is_err(), "nothing selected"); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!(r["scope"], "document"); + assert_eq!(counts(&r), (2, 1, 0), "{r}"); + assert_eq!(undo_steps(&s), steps + 1); + assert_eq!(layer(&s, 0), [a, locked, hidden, e], "locked and hidden groups stay whole"); + assert!(node(&s, plain_group).is_none() && node(&s, art_group).is_none()); + let d = &s.doc().unwrap().doc; + assert!(!d.node(second).unwrap().clips(), "the layer stays and stops clipping"); + assert!(plain(&s, mask), "its clipping path is a plain path"); + assert_eq!(layer(&s, 1), [mask, art]); + assert!(selected(&s).is_empty(), "nothing was selected"); + // Asked for the document with a selection, the selection keeps what it held. + let g = group(&mut s, &[e]); + select(&mut s, &[g]); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (1, 0, 0), "{r}"); + assert_eq!(selected(&s), [e]); +} + +#[test] +fn release_all_takes_named_locked_and_hidden_containers() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let locked = group(&mut s, &[a]); + change(&mut s, locked, |n| n.locked = true); + let hidden = group(&mut s, &[b]); + change(&mut s, hidden, |n| n.visible = false); + select(&mut s, &[locked, hidden]); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps), "from the selection, they stay whole"); + let r = s.execute(C, &json!({"ids": [locked.0, hidden.0]})).unwrap(); + assert_eq!(r["scope"], "ids"); + assert_eq!(counts(&r), (2, 0, 0), "{r}"); + assert_eq!(undo_steps(&s), steps + 1); + let (na, nb) = (node(&s, a).unwrap(), node(&s, b).unwrap()); + assert!(na.locked && na.visible && !nb.visible && !nb.locked, "their objects become locked or hidden as they were"); + assert!(selected(&s).is_empty(), "locked and hidden objects are not selected"); + // On a locked artboard, a named group stays whole. + let c = rect(&mut s, 10.0, 200.0); + let on_board = group(&mut s, &[c]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({"ids": [on_board.0]})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps)); + assert!(node(&s, on_board).is_some()); + // Nor does one inside a named layer. + let layer_id = s.doc().unwrap().doc.layers[0].id; + let r = s.execute(C, &json!({"ids": [layer_id.0]})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps)); +} + +#[test] +fn release_all_leaves_masked_groups_whole_and_changes_nothing_without_a_container() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 15.0, 15.0); + let held = group(&mut s, &[a, b]); + let m = rect(&mut s, 0.0, 0.0); + s.execute("transparency.makeOpacityMask", &json!({"ids": [held.0, m.0]})).unwrap(); + let masked = layer(&s, 0)[0]; + assert!(node(&s, masked).unwrap().extras().mask.is_some()); + let c = rect(&mut s, 100.0, 10.0); + select(&mut s, &[masked, c]); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps), "no step when nothing is released"); + assert_eq!(r["ids"], json!([masked.0, c.0]), "the selection stays"); + assert_eq!(layer(&s, 0), [masked, c]); + // A compound shape is a group that stays whole too. + let e = rect(&mut s, 200.0, 10.0); + let f = rect(&mut s, 210.0, 15.0); + select(&mut s, &[e, f]); + s.execute("object.compoundShape.make", &json!({})).unwrap(); + let shape = selected(&s)[0]; + assert!(node(&s, shape).unwrap().is_compound_shape()); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps)); + assert!(node(&s, shape).unwrap().is_compound_shape()); +} + +#[test] +fn release_all_leaves_a_picked_clipping_path_of_a_clipping_group_that_stays() { + let mut s = session(); + let clipped = rect(&mut s, 10.0, 10.0); + let e = rect(&mut s, 5.0, 5.0); + let f = rect(&mut s, 8.0, 8.0); + let clip = compound(&mut s, &[e, f]); + let masked = clip_group(&mut s, &[clipped, clip]); + let steps = undo_steps(&s); + for p in [json!({"ids": [clip.0]}), json!({"ids": [clip.0], "clipGroups": false})] { + let r = s.execute(C, &p).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps), "{p}"); + } + select(&mut s, &[clip]); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps)); + let d = &s.doc().unwrap().doc; + assert_eq!(d.parent_of(clip), Some(masked)); + assert!(matches!(d.node(clip).unwrap().kind, NodeKind::Compound { .. })); +} + +#[test] +fn release_all_refuses_bad_params() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let g = group(&mut s, &[a]); + select(&mut s, &[g]); + let steps = undo_steps(&s); + for bad in [ + json!({"groups": false, "clipGroups": false, "compoundPaths": false}), + json!({"groups": "yes"}), + json!({"compoundPaths": 1}), + json!({"scope": "layer"}), + json!({"scope": "document", "ids": [g.0]}), + json!({"ids": [999_999]}), + ] { + assert!(s.execute(C, &bad).is_err(), "{bad}"); + } + assert_eq!(undo_steps(&s), steps); + assert!(node(&s, g).is_some()); +} diff --git a/crates/engine/src/cmd/plugin_call/reviewed.rs b/crates/engine/src/cmd/plugin_call/reviewed.rs index 75074c6c3c..704f940639 100644 --- a/crates/engine/src/cmd/plugin_call/reviewed.rs +++ b/crates/engine/src/cmd/plugin_call/reviewed.rs @@ -20,6 +20,7 @@ pub(super) const ALLOWED: &[&str] = &[ "addon.cleanup.fix", "addon.cleanup.joinText", "addon.cleanup.rejoin", + "addon.cleanup.releaseAll", "addon.cleanup.removeBreaks", "addon.cleanup.replaceFonts", "addon.cleanup.resetTextTransform", diff --git a/crates/engine/src/tests/ids_without_selection.rs b/crates/engine/src/tests/ids_without_selection.rs index 9a48655468..a314878bd0 100644 --- a/crates/engine/src/tests/ids_without_selection.rs +++ b/crates/engine/src/tests/ids_without_selection.rs @@ -521,6 +521,7 @@ fn ids_null_takes_the_selection_in_every_command_that_falls_back_to_it() { ("addon.arrange.sort", json!({"by": "area", "apply": "x"}), both), ("addon.cleanup.simplify", json!({}), rect), ("addon.cleanup.deepUngroup", json!({}), rect), + ("addon.cleanup.releaseAll", json!({}), rect), ("addon.cleanup.rejoin", json!({}), rect), ("addon.color.nearestSwatch", json!({}), rect), ("addon.pathtools.cornerSet", json!({"radius": 2}), rect), diff --git a/crates/engine/tests/command_sweep.rs b/crates/engine/tests/command_sweep.rs index c98cd9278e..a336a478aa 100644 --- a/crates/engine/tests/command_sweep.rs +++ b/crates/engine/tests/command_sweep.rs @@ -377,6 +377,7 @@ const NOT_LOCATIONS: &[&str] = &[ "emptyTextPaths", "sortPaths", "alterPaths", + "compoundPaths", "includeLinkedFiles", "linksFolder", ]; diff --git a/crates/ui-egui/src/addons/cleanup.rs b/crates/ui-egui/src/addons/cleanup.rs index 8ce1aa6812..08efc7e9d4 100644 --- a/crates/ui-egui/src/addons/cleanup.rs +++ b/crates/ui-egui/src/addons/cleanup.rs @@ -2,7 +2,10 @@ //! Document Health Check on the selection, or the document while nothing is selected, lists what it //! found, and shows or fixes the issues picked in the list (Fix All: every issue listed), each fix //! one undo step. Below, the add-on's one-click tools open their options as their menu items do, -//! and its text tools, which the panel can hide, act on the selected type. +//! and its text tools, which the panel can hide, act on the selected type. Release All +//! Containers… opens its own dialog ([`release`]). + +pub mod release; use craft::behavior::{DisplayOrder, ItemSource, Selection}; use craft::keymap::Mods; @@ -97,7 +100,7 @@ fn modified(id: &str, mut p: Value, held: Mods) -> Value { pub fn menu() -> Vec { let mut items = vec![cp("Document Health Check", "window.panel", json!({ "panel": ID })), Sep]; items.extend(tools().into_iter().map(|(label, id, p)| cp(label, id, p))); - items.extend([Sep, c("Fix All Issues", "addon.cleanup.fix"), Sep]); + items.extend([c("Release All Containers…", release::COMMAND), Sep, c("Fix All Issues", "addon.cleanup.fix"), Sep]); let by = |b: &str| json!({ "by": b }); let align = |a: &str| json!({ "align": a }); items.extend([ diff --git a/crates/ui-egui/src/addons/cleanup/release.rs b/crates/ui-egui/src/addons/cleanup/release.rs new file mode 100644 index 0000000000..78d7652ea2 --- /dev/null +++ b/crates/ui-egui/src/addons/cleanup/release.rs @@ -0,0 +1,57 @@ +//! Release All Containers in the interface: its dialog (where to release, the selection or the +//! whole document, and which containers: groups, clipping masks and compound paths), which +//! previews on the canvas and runs `addon.cleanup.releaseAll` on OK, one undo step. It opens on the +//! selection, or the document while nothing is selected, with every kind ticked. + +use craft::ui::contract::Bind; +use craft::ui::patterns::form_dialogs::{DialogFields, Param, ParamDialog, ParamKind}; +use serde_json::{Value, json}; + +use crate::VectorcraftApp; +use crate::addons::dialogs::{self, Spec}; +use crate::dialogs::form; + +/// The command. +pub const COMMAND: &str = "addon.cleanup.releaseAll"; +/// Where it releases, as the command's `scope` names it, and the labels. +const SCOPES: [(&str, &str); 2] = [("selection", "Selection"), ("document", "Document")]; +/// The kinds of container, as the command names them, and their labels. +const KINDS: [(&str, &str); 3] = [("groups", "Groups"), ("clipGroups", "Clipping Masks"), ("compoundPaths", "Compound Paths")]; + +/// How the dialog's values reach the command. +pub(crate) static SPEC: Spec = Spec { command: COMMAND, params, found: None }; + +/// The dialog's rows. +fn rows() -> Vec { + let scopes = SCOPES.iter().map(|&(id, label)| (id.to_string(), tl!(label).into())).collect(); + let mut rows = vec![Param::new("scope", tl!("Release In:"), ParamKind::choice(scopes, Some(SCOPES[0].0.into())))]; + rows.extend(KINDS.iter().map(|&(key, label)| Param::new(key, tl!(label), ParamKind::bool(true)))); + rows +} + +/// The command's parameters from the dialog's fields. +pub(crate) fn params(fields: &DialogFields) -> Value { + Value::Object(form::json_of(&rows(), fields)) +} + +/// Opens the dialog on the selection, or the document while nothing is selected, with every kind +/// of container ticked. +pub(crate) fn open(app: &mut VectorcraftApp) -> Result { + let selected = !app.session.active().ok_or("no document open")?.selection.is_empty(); + let scope = if selected { "selection" } else { "document" }; + let opening = json!({ "scope": scope, "groups": true, "clipGroups": true, "compoundPaths": true }); + let fields = form::fields_of(&rows(), opening.as_object().ok_or("no options")?); + dialogs::open(app, &SPEC, fields, move |fields| { + let any = KINDS.iter().any(|(key, _)| fields.bool(key).unwrap_or(true)); + let somewhere = selected || fields.text("scope") != Some("selection"); + let reason = if any { tl!("Nothing is selected.") } else { tl!("Tick at least one kind of container.") }; + ParamDialog::new(COMMAND, tl!("Release All Containers"), rows()) + .previews(true) + .ok_enabled(any && somewhere) + .ok_reason(reason.into()) + .values(Bind::bound(fields)) + }) +} + +#[cfg(test)] +mod tests; diff --git a/crates/ui-egui/src/addons/cleanup/release/tests.rs b/crates/ui-egui/src/addons/cleanup/release/tests.rs new file mode 100644 index 0000000000..2d3acdf274 --- /dev/null +++ b/crates/ui-egui/src/addons/cleanup/release/tests.rs @@ -0,0 +1,99 @@ +use serde_json::json; +use vectorcraft_doc::{NodeId, NodeKind}; +use vectorcraft_engine::Session; + +use crate::VectorcraftApp; +use crate::addons::dialogs::tests as host; +use crate::tests::panel_harness::Panel as Harness; + +/// An app with a window and a selected group holding a rectangle and a compound path of two; the +/// group, the rectangle and the compound path. +fn app() -> (VectorcraftApp, NodeId, NodeId, NodeId) { + let mut app = crate::testing::windowed(VectorcraftApp::new(Session::new(), Default::default())); + app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); + let mut rect = |x| NodeId(app.run("shape.rectangle", json!({"x": x, "y": 10, "width": 20, "height": 20})).unwrap()["id"].as_u64().unwrap()); + let (a, p, q) = (rect(10), rect(50), rect(55)); + app.run("select.set", json!({"ids": [p.0, q.0]})).unwrap(); + let holes = NodeId(app.run("object.compoundPath.make", json!({})).unwrap()["id"].as_u64().unwrap()); + app.run("select.set", json!({"ids": [a.0, holes.0]})).unwrap(); + let group = NodeId(app.run("object.group", json!({})).unwrap()["id"].as_u64().unwrap()); + (app, group, a, holes) +} + +/// The objects directly in the first layer. +fn top(app: &VectorcraftApp) -> Vec { + app.session.doc().unwrap().doc.layers[0].children().unwrap().iter().map(|n| n.id).collect() +} + +fn undo_len(app: &VectorcraftApp) -> usize { + app.session.doc().unwrap().history.undo.len() +} + +#[test] +fn release_all_previews_keyboard_choices_cancels_and_commits_one_step() { + let (app, group, a, holes) = app(); + let mut panel = Harness::new(app, crate::tests::picks::dialogs); + let undo = undo_len(&panel.app()); + host::open_item(&mut panel.app(), "Artwork Cleanup", "Release All Containers…"); + panel.frame(); + let id = host::dialog_id(&panel.app()); + assert_eq!(host::read(&panel.app(), id, |f| f.text("scope").map(str::to_string)), Some("selection".into()), "opens on the selection"); + assert_eq!(top(&panel.app()).len(), 3, "the preview shows the rectangle and the compound path's two paths"); + // Compound Paths unticked with the keyboard: the compound path stays in the preview. + panel.focus("Compound Paths"); + panel.key(egui::Key::Space, egui::Modifiers::NONE); + panel.frame(); + assert_eq!(host::read(&panel.app(), id, |f| f.bool("compoundPaths")), Some(false)); + assert_eq!(top(&panel.app()), [a, holes], "the group is released and the compound path stays"); + panel.click("Cancel"); + panel.frame(); + assert_eq!(top(&panel.app()), [group], "rolled back"); + assert_eq!(undo_len(&panel.app()), undo); + host::open_item(&mut panel.app(), "Artwork Cleanup", "Release All Containers…"); + panel.frame(); + panel.click("OK"); + panel.frame(); + let app = panel.app(); + assert!(!app.any_dialog_open()); + assert_eq!(undo_len(&app), undo + 1, "one undo step"); + let left = top(&app); + assert_eq!(left.len(), 3); + let doc = &app.session.doc().unwrap().doc; + assert!(left.iter().all(|id| matches!(doc.node(*id).unwrap().kind, NodeKind::Path { .. })), "only paths are left"); +} + +#[test] +fn release_all_turns_ok_off_with_nothing_to_release_in() { + let (app, group, ..) = app(); + let mut panel = Harness::new(app, crate::tests::picks::dialogs); + host::open_item(&mut panel.app(), "Artwork Cleanup", "Release All Containers…"); + panel.frame(); + for label in ["Groups", "Clipping Masks", "Compound Paths"] { + panel.focus(label); + panel.key(egui::Key::Space, egui::Modifiers::NONE); + panel.frame(); + } + assert!(!panel.enabled("OK"), "no kind of container ticked"); + assert_eq!(top(&panel.app()), [group], "nothing previewed"); + panel.focus("Groups"); + panel.key(egui::Key::Space, egui::Modifiers::NONE); + panel.frame(); + assert!(panel.enabled("OK")); + panel.click("Cancel"); + panel.frame(); + // With nothing selected, it opens on the document, and Selection turns OK off. + panel.app().run("select.set", json!({"ids": []})).unwrap(); + host::open_item(&mut panel.app(), "Artwork Cleanup", "Release All Containers…"); + panel.frame(); + let id = host::dialog_id(&panel.app()); + assert_eq!(host::read(&panel.app(), id, |f| f.text("scope").map(str::to_string)), Some("document".into())); + assert!(panel.enabled("OK")); + host::set(&panel.app(), id, "scope", json!("selection")); + panel.frame(); + assert!(!panel.enabled("OK"), "nothing is selected"); + host::set(&panel.app(), id, "scope", json!("document")); + panel.frame(); + panel.click("OK"); + panel.frame(); + assert_eq!(top(&panel.app()).len(), 3, "the document's containers are released"); +} diff --git a/crates/ui-egui/src/addons/dialogs.rs b/crates/ui-egui/src/addons/dialogs.rs index e58443e259..07e9ac27b0 100644 --- a/crates/ui-egui/src/addons/dialogs.rs +++ b/crates/ui-egui/src/addons/dialogs.rs @@ -98,8 +98,9 @@ pub(crate) fn open( /// The dialog the menu item of command `id` opens, with no params; `None` for another command. pub(crate) fn open_from_menu(app: &mut VectorcraftApp, id: &str) -> Option> { - use super::{color, pathtools, select, typetools}; + use super::{cleanup, color, pathtools, select, typetools}; let open: fn(&mut VectorcraftApp) -> Result = match id { + cleanup::release::COMMAND => cleanup::release::open, pathtools::set_corners::COMMAND => pathtools::set_corners::open, pathtools::dashes::COMMAND => pathtools::dashes::open, pathtools::bridge::COMMAND => pathtools::bridge::open, diff --git a/docs/mcp.md b/docs/mcp.md index d984e7b92d..bb9c3711c7 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16581,6 +16581,25 @@ apart the locked and hidden groups the ids name and the groups inside the groups stays a layer), but not groups on a locked artboard; an object of a hidden group becomes hidden, and an object of a locked group becomes locked. Locked and hidden objects stay locked or hidden and are left out of the selection. +`addon.cleanup.releaseAll {scope?, ids?, groups?, clipGroups?, compoundPaths?}` (Object › Plug-ins › Artwork Cleanup › +Release All Containers…) takes apart every container at every level of nesting as one undo step, so that only the +objects they held are left. `scope` is `"selection"` or `"document"`; by default it is the selection, or the document +while nothing is selected. `ids` names the objects, groups and layers to release in instead of `scope`; giving both is +an error. `groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping (their +clipping paths stay as plain paths), and `compoundPaths` turns compound paths, and paths of several subpaths, into one +path per subpath. Each is true by default, and at least one must be true. Layers stay. Objects keep the opacity of +the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with an opacity +mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, +Image Trace objects, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or +layer that stays is left as it is, also when it is selected or named itself. From the selection or the document, locked and hidden objects +and objects on a locked artboard stay whole. With `ids`, the locked and hidden containers it names, or that are in what +it names, are taken apart too and their objects become locked or hidden as the containers were, but containers on a +locked artboard stay whole. The selection keeps what it held, with each object taken apart replaced by the objects +left in its place, and locked and hidden objects left out. With nothing to release, the document, the selection and the +undo history stay as they are. It replies `{scope ("selection", "document" or "ids"), ids, groups, clipGroups, +compoundPaths}`, the last three counting what it released. The dialog previews on the canvas and turns OK off when no +kind is ticked, or when Selection is chosen with nothing selected. + `addon.cleanup.rejoin {gap?, ids?}` welds the selected open paths whose ends lie within `gap` (0 to 6 pt, 0.1 by default) back into paths. Each end joins one other end: where several are in reach, the one the path turns least to go on into. Pieces may run either way, and a chain whose ends meet closes. Each new path takes the place and paint of its diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index ee49042298..b82d3f3537 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -2998,6 +2998,12 @@ alike in being hidden and in being locked, and the objects of a group Deep Ungro state. Tests: `simplify_named_locked_and_hidden_paths`, `deep_ungroup_named_locked_and_hidden_groups` and `rejoin_named_locked_and_hidden_pieces` in `cmd::addons::cleanup::tests`. +Release All Containers… (`addon.cleanup.releaseAll`) takes apart every group, clipping group and compound path in the +selection, the objects named or the whole document, at every level of nesting, as one undo step; layers stay and stop +clipping, and paths of several subpaths split into one path per subpath. Its dialog previews on the canvas and picks +where to release and which kinds (VectorCraft's own tool). Tests: `cmd::addons::cleanup::release::tests` in +`vectorcraft-engine` and `addons::cleanup::release::tests` in `vectorcraft-ui-egui`. + ## Path Precision Tools add-on (2026-10-30) A VectorCraft addition, not a feature of the reference app, so no area score moves. Object › Plug-ins › Path Precision Tools, diff --git a/docs/ui-parity.md b/docs/ui-parity.md index ac20453f86..721097d178 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -592,7 +592,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po | Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools selects its six tools (Anchor Eraser Brush, Extend Path, Measure & Inspect, Parametric Shape, Corner Tool, Slide Anchor Along Path), which the All Tools drawer lists under their own heading but neither toolbar shows as shipped, opens the Anchor Inspector panel (the selected anchor's X/Y and handle lengths and angles as fields; Make Smooth, Make Corner, Equalize Handles, Remove Points Keep Shape, Add Points, the three ways to close) and the Parametric Shape panel (kind, count, W/H, rotation, the kind's own values and corner radius of the selected parametric shape, or of the tool's next one), and runs Add Points at / Split at Crossings and Convert to Parametric Shape; the Parametric Shape Tool draws ten re-editable kinds from the centre (↑/↓ and ←/→ change their numbers while dragging) and edits a selected one with handles; the Corner Tool cuts editable corners on any path (hover shows the anchor, a click uses its radius and kind, a drag sizes the corner, Shift whole values; a corner's marker selects it and loads its values, drags to resize, to 0 or double-clicked removes it; never past what fits; Alt-marquee cuts every anchor inside) with a Corners section in the Anchor Inspector (radius, kind, selected count, Apply to Selected Anchors); Slide Anchor Along Path drags an anchor along its curve with the segments beside it refitted, Shift snapping where the tangent is a multiple of 45°; a double-click on the brush or Extend Path tool opens its options | done | `addon.pathtools.*`, `crates/tools/src/addons/`, `crates/ui-egui/src/addons/pathtools.rs`, `crates/ui-egui/src/addons/pathtools/` and their tests; not a feature of the reference app, so it is not scored | | Smart Pen add-on (VectorCraft addition): Object › Plug-ins › Smart Pen selects the Smart Pen Tool (also in the Pen tool's group in both shipped toolbars, after the Quick Pen; the All Tools drawer lists it under Draw; a toolbar edited before keeps its saved layout until Reset Toolbar; no shortcut), and opens the Smart Pen panel (next segment straight or curved; Remove Points Keep Shape, Make Smooth, Make Corner, Retract Handles, Close or Join). The tool draws (click: straight or curved segment, a curve after a straight one tangent; drag: smooth anchor, Alt breaks the handle, Shift 45°, Space moves it; Tab switches a segment; rubber band; close, join, continue) and edits without switching tools (click selects a point, drag moves it, Alt-click removes it keeping the shape, Shift+Alt-click deletes it, double-click toggles smooth/corner; handle drags with Shift and Alt; segment drags reshape, Alt-click adds a point); an Alt-drag away from paths selects the points inside a marquee | done | `addon.pen.*`, `crates/tools/src/addons/smart_pen.rs`, `crates/ui-egui/src/addons/pen.rs` and their tests; not a feature of the reference app, so it is not scored | | Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools selects its three tools (Anchor Eraser Brush, Extend Path, Measure & Inspect), which the All Tools drawer lists under their own heading but neither toolbar shows as shipped, opens the Anchor Inspector panel (the selected anchor's X/Y and handle lengths and angles as fields; Make Smooth, Make Corner, Equalize Handles, Remove Points Keep Shape, Add Points, the three ways to close) and runs Add Points at / Split at Crossings; a double-click on the brush or Extend Path tool opens its options | done | `addon.pathtools.*`, `crates/tools/src/addons/`, `crates/ui-egui/src/addons/pathtools.rs` and their tests; not a feature of the reference app, so it is not scored | -| Artwork Cleanup add-on (VectorCraft addition): Object › Plug-ins › Artwork Cleanup opens its panel, which checks the selection or the document for 16 kinds of issue, lists them with counts, and shows or fixes the picked rows or all of them, each fix one undo step; Simplify Anchors (Keep Shape), Rejoin Path Pieces and Deep Ungroup open their options first | done | `addon.cleanup.*`, `crates/ui-egui/src/addons/cleanup.rs` and its tests; not a feature of the reference app, so it is not scored | +| Artwork Cleanup add-on (VectorCraft addition): Object › Plug-ins › Artwork Cleanup opens its panel, which checks the selection or the document for 16 kinds of issue, lists them with counts, and shows or fixes the picked rows or all of them, each fix one undo step; Simplify Anchors (Keep Shape), Rejoin Path Pieces and Deep Ungroup open their options first; Release All Containers… takes apart every group, clipping mask and compound path in the selection or the document as one undo step | done | `addon.cleanup.*`, `crates/ui-egui/src/addons/cleanup.rs` and its tests; not a feature of the reference app, so it is not scored | | Artwork Cleanup add-on text tools (VectorCraft addition): the panel's Text row, which the panel can hide, and Object › Plug-ins › Artwork Cleanup set the alignment of point type keeping its place, break type into lines (Shift-click: paragraphs), words or glyphs, split type at the cursor, reset a text transform (Alt-click: and its horizontal scale), combine point type, remove line or paragraph breaks and replace missing fonts, each one undo step | done | `addon.cleanup.*` text commands, `crates/ui-egui/src/addons/cleanup.rs` and its tests; a VectorCraft addition, so it is not scored | | Color Effects add-on (VectorCraft addition): live Exposure, Desaturate and Invert Colors in Effect › Color Effects and Object › Plug-ins › Color Effects; its panel picks a colour adjustment and its values and adds it as a live effect or applies it as a filter, into the colours, as one undo step; Select by Color Kind selects the objects that use spot colours, carry colour effects, or are RGB, CMYK or grayscale images; Vector Halftone draws an object as halftone dots live (the dots Object › Vector Halftone makes), which Expand Appearance and the exporters write as paths; Duotone prints each colour's tone with one to four inks (a tint of a spot tone's swatch, or the CMYK mix of several), live or as a filter, its dialog a row per tone and the picked tone's curve; Print Ink Fixes (a CMYK document's ink limit, white overprint removed, black overprint set) opens its options from the submenu and the panel's Inks | done | `addon.color.*`, `crates/ui-egui/src/addons/color.rs` and its tests; not a feature of the reference app, so it is not scored | | Color Effects add-on (VectorCraft addition): Object › Plug-ins › Color Effects › Find Nearest Swatch… picks a Library (Document Swatches, a built-in library, or a library or colour book the user saved or loaded) and Fill and Stroke, lists each colour of the selection with its three closest swatches (chip, name, ΔE 2000), and Apply gives each colour its nearest swatch (global and spot swatches linked; a library's swatches added to the document first), one undo step | done | #4923; `addon.color.nearestSwatch`, `addon.color.applyNearestSwatch`, `crates/engine/src/cmd/addons/color/nearest.rs`, `crates/ui-egui/src/addons/color/nearest.rs` and their tests; not a feature of the reference app, so it is not scored | From 2116be3cf6bf35ef7bb78a35714be69c4b6d0d72 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 16:59:18 -0800 Subject: [PATCH 02/24] Artwork Cleanup: Release All Containers keeps paths with Live Corners whole A path of several subpaths with Live Corners was split into one path per subpath, and each part lost its editable corners. Such a path now stays whole, as other live objects do. A plain path of several subpaths still splits. The Artwork Cleanup entries in docs/target-app-parity.md and docs/ui-parity.md now say that only containers of the kinds asked for are released, and name what stays whole. docs/mcp.md and the command help name paths with Live Corners among the objects that stay whole. --- .../engine/src/cmd/addons/cleanup/release.rs | 12 ++++--- .../src/cmd/addons/cleanup/release/tests.rs | 33 ++++++++++++++++++- docs/mcp.md | 4 +-- docs/target-app-parity.md | 7 ++-- docs/ui-parity.md | 2 +- 5 files changed, 46 insertions(+), 12 deletions(-) diff --git a/crates/engine/src/cmd/addons/cleanup/release.rs b/crates/engine/src/cmd/addons/cleanup/release.rs index 924803cd32..6901e6edf0 100644 --- a/crates/engine/src/cmd/addons/cleanup/release.rs +++ b/crates/engine/src/cmd/addons/cleanup/release.rs @@ -8,7 +8,7 @@ mod tests; use std::collections::{HashMap, HashSet}; use serde_json::{Value, json}; -use vectorcraft_doc::{Document, Node, NodeId, NodeKind}; +use vectorcraft_doc::{Document, LiveShape, Node, NodeId, NodeKind}; use vectorcraft_geom::PathData; use vectorcraft_tools::builder::is_live_paint; @@ -26,7 +26,7 @@ pub(super) fn specs() -> Vec { "Release All Containers…", ["Object", "Plug-ins", "Artwork Cleanup"], None, - "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping, their clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or layer that stays is left as it is, also when it is selected or named itself; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", + "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping, their clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or layer that stays is left as it is, also when it is selected or named itself; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", has_doc, release_all )] @@ -64,11 +64,13 @@ struct Release<'a> { /// Whether `n` stays whole whatever is asked: a live object kept as a group or compound path /// (a compound shape, Live Paint group, graph, dimension, flare, Objects on Path, generated art, -/// Shaper Group, Image Trace object, a clipping path's painted pieces) or one with an opacity mask, -/// whose contents would lose what it does to them. +/// Shaper Group, Image Trace object, a clipping path's painted pieces), a path with Live Corners, +/// whose parts would lose their editable corners, or one with an opacity mask, whose contents +/// would lose what it does to them. fn live(n: &Node) -> bool { let x = n.extras(); - x.mask.is_some() + matches!(&n.kind, NodeKind::Path { live: Some(l), .. } if matches!(**l, LiveShape::Path { .. })) + || x.mask.is_some() || x.shaper.is_some() || x.trace.is_some() || x.graph.is_some() diff --git a/crates/engine/src/cmd/addons/cleanup/release/tests.rs b/crates/engine/src/cmd/addons/cleanup/release/tests.rs index b04ff4dd46..bb92cf8a8b 100644 --- a/crates/engine/src/cmd/addons/cleanup/release/tests.rs +++ b/crates/engine/src/cmd/addons/cleanup/release/tests.rs @@ -3,7 +3,7 @@ use serde_json::{Value, json}; use vectorcraft_color::{Color, Paint}; -use vectorcraft_doc::{Appearance, Node, NodeId, NodeKind}; +use vectorcraft_doc::{Appearance, LiveShape, Node, NodeId, NodeKind}; use crate::Session; @@ -212,6 +212,37 @@ fn release_all_splits_paths_of_several_subpaths() { assert_eq!(node(&s, left[1]).unwrap().appearance, node(&s, a).unwrap().appearance, "each part keeps the path's paint"); } +#[test] +fn release_all_keeps_a_path_of_several_subpaths_with_live_corners_whole() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let plain_path = rect(&mut s, 80.0, 10.0); + let second = node(&s, b).unwrap().path_data().unwrap().subpaths[0].clone(); + for id in [a, plain_path] { + let second = second.clone(); + change(&mut s, id, |n| { + if let NodeKind::Path { path, live, .. } = &mut n.kind { + path.subpaths.push(second); + *live = None; + } + }); + } + change(&mut s, a, |n| { + if let NodeKind::Path { path, live, .. } = &mut n.kind { + let base = path.clone(); + *live = Some(Box::new(LiveShape::Path { base, radii: vec![4.0], kinds: vec![], radii_relative: false })); + } + }); + s.edit("t", |d, _| Ok(d.remove_many(&[b])?)).unwrap(); + select(&mut s, &[a, plain_path]); + let r = s.execute(C, &json!({})).unwrap(); + assert_eq!(counts(&r), (0, 0, 1), "only the plain path is split: {r}"); + let kept = node(&s, a).unwrap(); + assert!(matches!(kept.kind, NodeKind::Path { live: Some(_), ref path, .. } if path.subpaths.len() == 2), "Live Corners stay"); + assert_eq!(layer(&s, 0).len(), 3); +} + #[test] fn release_all_runs_on_the_document_while_nothing_is_selected() { let mut s = session(); diff --git a/docs/mcp.md b/docs/mcp.md index bb9c3711c7..96633957ac 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16590,8 +16590,8 @@ clipping paths stay as plain paths), and `compoundPaths` turns compound paths, a path per subpath. Each is true by default, and at least one must be true. Layers stay. Objects keep the opacity of the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, -Image Trace objects, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or -layer that stays is left as it is, also when it is selected or named itself. From the selection or the document, locked and hidden objects +Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping +path of a clipping group or layer that stays is left as it is, also when it is selected or named itself. From the selection or the document, locked and hidden objects and objects on a locked artboard stay whole. With `ids`, the locked and hidden containers it names, or that are in what it names, are taken apart too and their objects become locked or hidden as the containers were, but containers on a locked artboard stay whole. The selection keeps what it held, with each object taken apart replaced by the objects diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index b82d3f3537..817d8290d6 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -2998,9 +2998,10 @@ alike in being hidden and in being locked, and the objects of a group Deep Ungro state. Tests: `simplify_named_locked_and_hidden_paths`, `deep_ungroup_named_locked_and_hidden_groups` and `rejoin_named_locked_and_hidden_pieces` in `cmd::addons::cleanup::tests`. -Release All Containers… (`addon.cleanup.releaseAll`) takes apart every group, clipping group and compound path in the -selection, the objects named or the whole document, at every level of nesting, as one undo step; layers stay and stop -clipping, and paths of several subpaths split into one path per subpath. Its dialog previews on the canvas and picks +Release All Containers… (`addon.cleanup.releaseAll`) takes apart the groups, clipping groups and compound paths of the +kinds asked for in the selection, the objects named or the whole document, at every level of nesting, as one undo step; +layers stay, and stop clipping when clipping groups are released; paths of several subpaths split into one path per +subpath. Objects with an opacity mask, live objects and paths with Live Corners stay whole. Its dialog previews on the canvas and picks where to release and which kinds (VectorCraft's own tool). Tests: `cmd::addons::cleanup::release::tests` in `vectorcraft-engine` and `addons::cleanup::release::tests` in `vectorcraft-ui-egui`. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 721097d178..84498acbe3 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -592,7 +592,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po | Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools selects its six tools (Anchor Eraser Brush, Extend Path, Measure & Inspect, Parametric Shape, Corner Tool, Slide Anchor Along Path), which the All Tools drawer lists under their own heading but neither toolbar shows as shipped, opens the Anchor Inspector panel (the selected anchor's X/Y and handle lengths and angles as fields; Make Smooth, Make Corner, Equalize Handles, Remove Points Keep Shape, Add Points, the three ways to close) and the Parametric Shape panel (kind, count, W/H, rotation, the kind's own values and corner radius of the selected parametric shape, or of the tool's next one), and runs Add Points at / Split at Crossings and Convert to Parametric Shape; the Parametric Shape Tool draws ten re-editable kinds from the centre (↑/↓ and ←/→ change their numbers while dragging) and edits a selected one with handles; the Corner Tool cuts editable corners on any path (hover shows the anchor, a click uses its radius and kind, a drag sizes the corner, Shift whole values; a corner's marker selects it and loads its values, drags to resize, to 0 or double-clicked removes it; never past what fits; Alt-marquee cuts every anchor inside) with a Corners section in the Anchor Inspector (radius, kind, selected count, Apply to Selected Anchors); Slide Anchor Along Path drags an anchor along its curve with the segments beside it refitted, Shift snapping where the tangent is a multiple of 45°; a double-click on the brush or Extend Path tool opens its options | done | `addon.pathtools.*`, `crates/tools/src/addons/`, `crates/ui-egui/src/addons/pathtools.rs`, `crates/ui-egui/src/addons/pathtools/` and their tests; not a feature of the reference app, so it is not scored | | Smart Pen add-on (VectorCraft addition): Object › Plug-ins › Smart Pen selects the Smart Pen Tool (also in the Pen tool's group in both shipped toolbars, after the Quick Pen; the All Tools drawer lists it under Draw; a toolbar edited before keeps its saved layout until Reset Toolbar; no shortcut), and opens the Smart Pen panel (next segment straight or curved; Remove Points Keep Shape, Make Smooth, Make Corner, Retract Handles, Close or Join). The tool draws (click: straight or curved segment, a curve after a straight one tangent; drag: smooth anchor, Alt breaks the handle, Shift 45°, Space moves it; Tab switches a segment; rubber band; close, join, continue) and edits without switching tools (click selects a point, drag moves it, Alt-click removes it keeping the shape, Shift+Alt-click deletes it, double-click toggles smooth/corner; handle drags with Shift and Alt; segment drags reshape, Alt-click adds a point); an Alt-drag away from paths selects the points inside a marquee | done | `addon.pen.*`, `crates/tools/src/addons/smart_pen.rs`, `crates/ui-egui/src/addons/pen.rs` and their tests; not a feature of the reference app, so it is not scored | | Path Precision Tools add-on (VectorCraft addition): Object › Plug-ins › Path Precision Tools selects its three tools (Anchor Eraser Brush, Extend Path, Measure & Inspect), which the All Tools drawer lists under their own heading but neither toolbar shows as shipped, opens the Anchor Inspector panel (the selected anchor's X/Y and handle lengths and angles as fields; Make Smooth, Make Corner, Equalize Handles, Remove Points Keep Shape, Add Points, the three ways to close) and runs Add Points at / Split at Crossings; a double-click on the brush or Extend Path tool opens its options | done | `addon.pathtools.*`, `crates/tools/src/addons/`, `crates/ui-egui/src/addons/pathtools.rs` and their tests; not a feature of the reference app, so it is not scored | -| Artwork Cleanup add-on (VectorCraft addition): Object › Plug-ins › Artwork Cleanup opens its panel, which checks the selection or the document for 16 kinds of issue, lists them with counts, and shows or fixes the picked rows or all of them, each fix one undo step; Simplify Anchors (Keep Shape), Rejoin Path Pieces and Deep Ungroup open their options first; Release All Containers… takes apart every group, clipping mask and compound path in the selection or the document as one undo step | done | `addon.cleanup.*`, `crates/ui-egui/src/addons/cleanup.rs` and its tests; not a feature of the reference app, so it is not scored | +| Artwork Cleanup add-on (VectorCraft addition): Object › Plug-ins › Artwork Cleanup opens its panel, which checks the selection or the document for 16 kinds of issue, lists them with counts, and shows or fixes the picked rows or all of them, each fix one undo step; Simplify Anchors (Keep Shape), Rejoin Path Pieces and Deep Ungroup open their options first; Release All Containers… takes apart the groups, clipping masks and compound paths of the kinds asked for in the selection or the document as one undo step, leaving objects with an opacity mask, live objects and paths with Live Corners whole | done | `addon.cleanup.*`, `crates/ui-egui/src/addons/cleanup.rs` and its tests; not a feature of the reference app, so it is not scored | | Artwork Cleanup add-on text tools (VectorCraft addition): the panel's Text row, which the panel can hide, and Object › Plug-ins › Artwork Cleanup set the alignment of point type keeping its place, break type into lines (Shift-click: paragraphs), words or glyphs, split type at the cursor, reset a text transform (Alt-click: and its horizontal scale), combine point type, remove line or paragraph breaks and replace missing fonts, each one undo step | done | `addon.cleanup.*` text commands, `crates/ui-egui/src/addons/cleanup.rs` and its tests; a VectorCraft addition, so it is not scored | | Color Effects add-on (VectorCraft addition): live Exposure, Desaturate and Invert Colors in Effect › Color Effects and Object › Plug-ins › Color Effects; its panel picks a colour adjustment and its values and adds it as a live effect or applies it as a filter, into the colours, as one undo step; Select by Color Kind selects the objects that use spot colours, carry colour effects, or are RGB, CMYK or grayscale images; Vector Halftone draws an object as halftone dots live (the dots Object › Vector Halftone makes), which Expand Appearance and the exporters write as paths; Duotone prints each colour's tone with one to four inks (a tint of a spot tone's swatch, or the CMYK mix of several), live or as a filter, its dialog a row per tone and the picked tone's curve; Print Ink Fixes (a CMYK document's ink limit, white overprint removed, black overprint set) opens its options from the submenu and the panel's Inks | done | `addon.color.*`, `crates/ui-egui/src/addons/color.rs` and its tests; not a feature of the reference app, so it is not scored | | Color Effects add-on (VectorCraft addition): Object › Plug-ins › Color Effects › Find Nearest Swatch… picks a Library (Document Swatches, a built-in library, or a library or colour book the user saved or loaded) and Fill and Stroke, lists each colour of the selection with its three closest swatches (chip, name, ΔE 2000), and Apply gives each colour its nearest swatch (global and spot swatches linked; a library's swatches added to the document first), one undo step | done | #4923; `addon.color.nearestSwatch`, `addon.color.applyNearestSwatch`, `crates/engine/src/cmd/addons/color/nearest.rs`, `crates/ui-egui/src/addons/color/nearest.rs` and their tests; not a feature of the reference app, so it is not scored | From eb780d9a06663884bc48f32da6156c87bdbcaa26 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 18:00:25 -0800 Subject: [PATCH 03/24] Artwork Cleanup: Release All Containers keeps live objects, locked-artboard masks and selection details - A container named inside a live object, such as a Live Paint group's sources, is left whole. - A layer keeps its clipping mask when the mask clips artwork on a locked artboard. - Unchanged siblings are reused instead of copied when a layer is rebuilt. - Anchor, segment and guide selections on untouched artwork are kept. --- .../engine/src/cmd/addons/cleanup/release.rs | 82 +++++++------ .../src/cmd/addons/cleanup/release/tests.rs | 114 +++++++++++++++++- docs/mcp.md | 7 +- 3 files changed, 165 insertions(+), 38 deletions(-) diff --git a/crates/engine/src/cmd/addons/cleanup/release.rs b/crates/engine/src/cmd/addons/cleanup/release.rs index 6901e6edf0..b09994fc4a 100644 --- a/crates/engine/src/cmd/addons/cleanup/release.rs +++ b/crates/engine/src/cmd/addons/cleanup/release.rs @@ -6,6 +6,7 @@ mod tests; use std::collections::{HashMap, HashSet}; +use std::sync::Arc; use serde_json::{Value, json}; use vectorcraft_doc::{Document, LiveShape, Node, NodeId, NodeKind}; @@ -26,7 +27,7 @@ pub(super) fn specs() -> Vec { "Release All Containers…", ["Object", "Plug-ins", "Artwork Cleanup"], None, - "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping, their clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or layer that stays is left as it is, also when it is selected or named itself; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", + "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless they clip artwork on a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or layer that stays is left as it is, also when it is selected or named itself; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", has_doc, release_all )] @@ -52,7 +53,7 @@ struct Release<'a> { kinds: Kinds, /// Locked and hidden objects are taken apart too. named: bool, - /// The containers on a locked artboard, which stay whole. + /// The artwork on a locked artboard, which stays whole. held: &'a HashSet, /// Groups, clipping groups and layers, and compound paths released. counts: [usize; 3], @@ -84,17 +85,19 @@ fn live(n: &Node) -> bool { || is_live_paint(n) } -/// The containers under `roots` that a run could take apart, into `out`. -fn candidates(n: &Node, out: &mut Vec) { - match &n.kind { - NodeKind::Layer { children, .. } | NodeKind::Group { children, .. } | NodeKind::Compound { children, .. } => { - if !n.is_layer() { - out.push(n.id); - } - children.iter().for_each(|c| candidates(c, out)); - } - NodeKind::Path { path, .. } if path.subpaths.len() > 1 => out.push(n.id), - _ => {} +/// The artwork under `n` is added to `out`. +fn candidates(n: &Node, clips: bool, out: &mut Vec) { + let candidate = match &n.kind { + NodeKind::Layer { .. } => false, + NodeKind::Group { .. } | NodeKind::Compound { .. } => true, + NodeKind::Path { path, .. } => clips || path.subpaths.len() > 1, + _ => clips, + }; + if candidate { + out.push(n.id); + } + if let Some(children) = n.children() { + children.iter().for_each(|c| candidates(c, clips, out)); } } @@ -109,7 +112,7 @@ impl Release<'_> { } /// `n` with the containers in it released, into `out`; `member` counts what a container left. - fn node(&mut self, d: &mut Document, n: Node, member: bool, out: &mut Vec) -> Result<()> { + fn node(&mut self, d: &mut Document, n: Arc, member: bool, out: &mut Vec>) -> Result<()> { if self.keeps(&n) { if member { self.made(1)?; @@ -129,7 +132,7 @@ impl Release<'_> { } NodeKind::Path { path, clipping: false, guide: false, .. } if self.kinds.compounds && path.subpaths.len() > 1 => { self.counts[2] += 1; - self.split(d, n, out) + self.split(d, (*n).clone(), out) } NodeKind::Group { .. } | NodeKind::Layer { .. } => self.keep(d, n, member, out), _ => { @@ -145,7 +148,7 @@ impl Release<'_> { /// Group or compound path `n` replaced by its members, released in turn. Members take on the /// container's opacity, are hidden when it was hidden and locked when it was locked; a /// compound path's take its paint; a clipping group's clipping path becomes a plain path. - fn take_apart(&mut self, d: &mut Document, n: Node, clip: bool, compound: bool, out: &mut Vec) -> Result<()> { + fn take_apart(&mut self, d: &mut Document, n: Arc, clip: bool, compound: bool, out: &mut Vec>) -> Result<()> { let Some(children) = n.children() else { return Ok(()) }; let mut parts = vec![]; for (k, c) in children.iter().enumerate() { @@ -165,7 +168,7 @@ impl Release<'_> { c.opacity *= n.opacity; c.visible &= n.visible; c.locked |= n.locked; - self.node(d, c, true, &mut parts)?; + self.node(d, Arc::new(c), true, &mut parts)?; } self.left.insert(n.id, parts.iter().map(|p| p.id).collect()); out.extend(parts); @@ -174,7 +177,7 @@ impl Release<'_> { /// Path `n` of several subpaths as one path per subpath with its paint, in the same stacking /// order; the first keeps its id. - fn split(&mut self, d: &mut Document, n: Node, out: &mut Vec) -> Result<()> { + fn split(&mut self, d: &mut Document, n: Node, out: &mut Vec>) -> Result<()> { let Some(path) = n.path_data() else { return Ok(()) }; if self.made.saturating_add(path.subpaths.len()) > MAX_OBJECTS { return Err(EngineError::Other("Release All Containers: too many objects to release at once".into())); @@ -189,7 +192,7 @@ impl Release<'_> { if let NodeKind::Path { path, live, .. } = &mut c.kind { (*path, *live) = (PathData::single(sp.clone()), None); } - parts.push(c); + parts.push(Arc::new(c)); } self.made(parts.len())?; self.left.insert(n.id, parts.iter().map(|p| p.id).collect()); @@ -200,46 +203,51 @@ impl Release<'_> { /// Group or layer `n` kept, with the containers in it released. A layer stops clipping when /// clipping groups are released; the clipping path of a group or layer that still clips is /// left as it is. Unchanged, `n` itself goes to `out`. - fn keep(&mut self, d: &mut Document, mut n: Node, member: bool, out: &mut Vec) -> Result<()> { + fn keep(&mut self, d: &mut Document, mut n: Arc, member: bool, out: &mut Vec>) -> Result<()> { if member { self.made(1)?; } let before = self.total(); let mut clips = n.clips(); - if clips && n.is_layer() && self.kinds.clips { + if clips && n.is_layer() && self.kinds.clips && !n.children().is_some_and(|children| children.iter().skip(1).any(|c| self.holds_art(c))) { self.counts[1] += 1; + let n = Arc::make_mut(&mut n); n.set_clips(false); clips = false; if let Some(first) = n.children_mut().and_then(|c| c.first_mut()) - && let NodeKind::Path { clipping, .. } = &mut std::sync::Arc::make_mut(first).kind + && let NodeKind::Path { clipping, .. } = &mut Arc::make_mut(first).kind { *clipping = false; } } - let Some(children) = n.children().cloned() else { + let Some(children) = n.children() else { out.push(n); return Ok(()); }; let mut kept = Vec::with_capacity(children.len()); - for (k, c) in children.into_iter().enumerate() { + for (k, c) in children.iter().enumerate() { if clips && k == 0 { if member { self.made(1)?; } - kept.push((*c).clone()); + kept.push(Arc::clone(c)); } else { - self.node(d, (*c).clone(), member, &mut kept)?; + self.node(d, Arc::clone(c), member, &mut kept)?; } } if self.total() != before - && let Some(ch) = n.children_mut() + && let Some(ch) = Arc::make_mut(&mut n).children_mut() { - *ch = kept.into_iter().map(std::sync::Arc::new).collect(); + *ch = kept; } out.push(n); Ok(()) } + fn holds_art(&self, n: &Node) -> bool { + self.held.contains(&n.id) || n.children().is_some_and(|children| children.iter().any(|c| self.holds_art(c))) + } + /// Counts the objects made, refusing a run that makes too many. fn made(&mut self, count: usize) -> Result<()> { self.made += count; @@ -291,11 +299,11 @@ fn release_all(s: &mut Session, p: &Value) -> Result { }; let st = s.doc()?; let (mut d, mut sel) = ((*st.doc).clone(), st.selection.clone()); - // The containers on a locked artboard, found while nothing is changed yet. + // The artwork on a locked artboard, found while nothing is changed yet. let held: HashSet = if d.artboards.iter().any(|a| a.locked) { let mut found = vec![]; for n in roots.iter().filter_map(|id| d.node(*id)) { - candidates(n, &mut found); + candidates(n, kinds.clips, &mut found); } let locks = d.locked_artboards(); found.into_iter().filter(|id| locks.holds_id(*id)).collect() @@ -307,15 +315,17 @@ fn release_all(s: &mut Session, p: &Value) -> Result { for id in roots { // A clipping path picked inside the clipping group or layer it clips stays as it is, as it // does when that group or layer is released in. - if clips_its_parent(&d, id) { + let protected = + d.ancestry(id).is_some_and(|chain| chain.iter().take(chain.len().saturating_sub(1)).filter_map(|id| d.node(*id)).any(|n| run.keeps(n))); + if clips_its_parent(&d, id) || protected { continue; } - let Some(n) = d.node(id).cloned() else { continue }; + let Some(n) = d.node_arc(id).cloned() else { continue }; let before = run.total(); let mut out = vec![]; run.node(&mut d, n, false, &mut out)?; if run.total() != before { - items.push((id, out)); + items.push((id, out.into_iter().map(Arc::unwrap_or_clone).collect())); } } let [groups, clips, compounds] = run.counts; @@ -334,7 +344,11 @@ fn release_all(s: &mut Session, p: &Value) -> Result { let editable = d.editable(); ids.retain(|id| editable(*id)); } - sel.set(ids.iter().copied()); + let kept: HashSet = ids.iter().copied().collect(); + let removed: Vec = sel.objects.iter().copied().filter(|id| run.left.contains_key(id) || !kept.contains(id)).collect(); + sel.remove_all(removed); + let mut seen = HashSet::new(); + sel.objects = ids.into_iter().filter(|id| seen.insert(*id)).collect(); sel.prune(&d); let ids: Vec = sel.objects.iter().map(|i| i.0).collect(); s.edit("Release All Containers", |doc, selection| { diff --git a/crates/engine/src/cmd/addons/cleanup/release/tests.rs b/crates/engine/src/cmd/addons/cleanup/release/tests.rs index bb92cf8a8b..2b1b4a23a2 100644 --- a/crates/engine/src/cmd/addons/cleanup/release/tests.rs +++ b/crates/engine/src/cmd/addons/cleanup/release/tests.rs @@ -133,7 +133,7 @@ fn release_all_counts_each_object_left_once() { let held = std::collections::HashSet::new(); for clips in [true, false] { let mut d = (*s.doc().unwrap().doc).clone(); - let n = d.node(outer).unwrap().clone(); + let n = d.node_arc(outer).unwrap().clone(); let mut run = super::Release { kinds: super::Kinds { groups: true, clips, compounds: true }, named: false, @@ -380,6 +380,118 @@ fn release_all_leaves_a_picked_clipping_path_of_a_clipping_group_that_stays() { assert!(matches!(d.node(clip).unwrap().kind, NodeKind::Compound { .. })); } +#[test] +fn release_all_keeps_a_directly_named_descendant_of_a_live_object() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let inner = group(&mut s, &[a]); + let sources = group(&mut s, &[inner]); + change(&mut s, sources, |n| n.name = Some("Live Paint Sources".into())); + let live = group(&mut s, &[sources]); + change(&mut s, live, |n| n.name = Some("Live Paint Group".into())); + change(&mut s, sources, |n| n.visible = false); + assert!(vectorcraft_tools::builder::is_live_paint(&node(&s, live).unwrap())); + let steps = undo_steps(&s); + for id in [sources, inner] { + let r = s.execute(C, &json!({"ids": [id.0]})).unwrap(); + assert_eq!((counts(&r), undo_steps(&s)), ((0, 0, 0), steps)); + assert!(vectorcraft_tools::builder::is_live_paint(&node(&s, live).unwrap())); + assert_eq!(s.doc().unwrap().doc.parent_of(inner), Some(sources)); + assert_eq!(s.doc().unwrap().doc.parent_of(a), Some(inner)); + } +} + +#[test] +fn release_all_keeps_a_layer_mask_over_locked_artboard_artwork() { + for named in [false, true] { + let mut s = session(); + let mask = rect(&mut s, 0.0, 0.0); + let art = rect(&mut s, 10.0, 10.0); + let outside = rect(&mut s, 500.0, 10.0); + let g = group(&mut s, &[outside]); + let layer_id = s.doc().unwrap().doc.layers[0].id; + change(&mut s, layer_id, |n| n.set_clips(true)); + change(&mut s, mask, |n| { + if let NodeKind::Path { clipping, .. } = &mut n.kind { + *clipping = true; + } + }); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let p = if named { json!({"ids": [layer_id.0]}) } else { json!({"scope": "document"}) }; + let r = s.execute(C, &p).unwrap(); + assert_eq!(counts(&r), (1, 0, 0), "{p}: {r}"); + assert!(node(&s, layer_id).unwrap().clips()); + assert!(matches!(node(&s, mask).unwrap().kind, NodeKind::Path { clipping: true, .. })); + assert_eq!(layer(&s, 0), [mask, art, outside]); + assert!(node(&s, g).is_none()); + } +} + +#[test] +fn release_all_reuses_unchanged_siblings_when_rebuilding_a_layer() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let g = group(&mut s, &[b]); + let original = s.doc().unwrap().doc.node_arc(a).unwrap().clone(); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (1, 0, 0)); + assert!(node(&s, g).is_none()); + assert!(std::sync::Arc::ptr_eq(&original, s.doc().unwrap().doc.node_arc(a).unwrap())); +} + +#[test] +fn release_all_keeps_selection_details_for_untouched_artwork() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let c = rect(&mut s, 70.0, 10.0); + let g = group(&mut s, &[c]); + s.execute("guide.add", &json!({"vertical": true, "pos": 150})).unwrap(); + let guide = s.doc().unwrap().doc.ruler_guides()[0].id.unwrap(); + s.select(|_, sel| { + sel.set([a, b, g]); + sel.anchors.insert(a, [(0, 0), (0, 2)].into_iter().collect()); + sel.anchors.insert(b, [(0, 0), (0, 1)].into_iter().collect()); + sel.segments.insert(b, [(0, 0)].into_iter().collect()); + sel.guides.push(guide); + sel.key_anchor = Some((a, (0, 0))); + }) + .unwrap(); + let before = s.doc().unwrap().selection.clone(); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (1, 0, 0)); + let after = &s.doc().unwrap().selection; + assert_eq!(after.objects, [a, b, c]); + assert_eq!(after.anchors, before.anchors); + assert_eq!(after.segments, before.segments); + assert_eq!(after.guides, before.guides); + assert_eq!(after.key_anchor, before.key_anchor); + assert!(!after.objects.contains(&g)); + change(&mut s, c, |n| { + if let NodeKind::Path { path, live, .. } = &mut n.kind { + path.subpaths.push(path.subpaths[0].clone()); + *live = None; + } + }); + s.select(|_, sel| { + sel.anchors.insert(c, [(0, 0), (0, 1)].into_iter().collect()); + sel.segments.insert(c, [(0, 0)].into_iter().collect()); + }) + .unwrap(); + let r = s.execute(C, &json!({"ids": [c.0]})).unwrap(); + assert_eq!(counts(&r), (0, 0, 1)); + let after = &s.doc().unwrap().selection; + assert_eq!(after.anchors, before.anchors); + assert_eq!(after.segments, before.segments); + assert_eq!(after.guides, before.guides); +} + #[test] fn release_all_refuses_bad_params() { let mut s = session(); diff --git a/docs/mcp.md b/docs/mcp.md index 96633957ac..abe55ce765 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16585,9 +16585,10 @@ locked group becomes locked. Locked and hidden objects stay locked or hidden and Release All Containers…) takes apart every container at every level of nesting as one undo step, so that only the objects they held are left. `scope` is `"selection"` or `"document"`; by default it is the selection, or the document while nothing is selected. `ids` names the objects, groups and layers to release in instead of `scope`; giving both is -an error. `groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping (their -clipping paths stay as plain paths), and `compoundPaths` turns compound paths, and paths of several subpaths, into one -path per subpath. Each is true by default, and at least one must be true. Layers stay. Objects keep the opacity of +an error. `groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping unless they +clip artwork on a locked artboard (released clipping paths stay as plain paths), and `compoundPaths` turns compound +paths, and paths of several subpaths, into one path per subpath. Each is true by default, and at least one must be true. +Layers stay. Objects keep the opacity of the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping From 52b52c55242a2d725a5722e7d061378067fdb741 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 21:31:15 -0800 Subject: [PATCH 04/24] Artwork Cleanup: Release All Containers keeps blend keys and compound clipping masks whole and rejects null and duplicate options - A directly named descendant of a blend, envelope, repeat or intertwine stays whole. - A target anywhere inside the clipping mask of a clipping group or layer that stays is left as it is. - Explicit null options and duplicate ids are parameter errors and leave the artwork unchanged. --- .../engine/src/cmd/addons/cleanup/release.rs | 43 ++++++-- .../src/cmd/addons/cleanup/release/tests.rs | 98 +++++++++++++++++++ docs/mcp.md | 8 +- 3 files changed, 137 insertions(+), 12 deletions(-) diff --git a/crates/engine/src/cmd/addons/cleanup/release.rs b/crates/engine/src/cmd/addons/cleanup/release.rs index b09994fc4a..9a4caccfbc 100644 --- a/crates/engine/src/cmd/addons/cleanup/release.rs +++ b/crates/engine/src/cmd/addons/cleanup/release.rs @@ -27,7 +27,7 @@ pub(super) fn specs() -> Vec { "Release All Containers…", ["Object", "Plug-ins", "Artwork Cleanup"], None, - "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless they clip artwork on a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping path of a clipping group or layer that stays is left as it is, also when it is selected or named itself; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", + "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`; duplicate ids are an error), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless they clip artwork on a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three; defaults apply only to omitted values, and explicit null values are errors} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants; the entire clipping mask subtree of a clipping group or layer that stays is left as it is, including directly selected or named descendants; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", has_doc, release_all )] @@ -70,7 +70,8 @@ struct Release<'a> { /// would lose what it does to them. fn live(n: &Node) -> bool { let x = n.extras(); - matches!(&n.kind, NodeKind::Path { live: Some(l), .. } if matches!(**l, LiveShape::Path { .. })) + matches!(&n.kind, NodeKind::Blend { .. } | NodeKind::Envelope { .. } | NodeKind::Repeat(_) | NodeKind::Intertwine { .. }) + || matches!(&n.kind, NodeKind::Path { live: Some(l), .. } if matches!(**l, LiveShape::Path { .. })) || x.mask.is_some() || x.shaper.is_some() || x.trace.is_some() @@ -266,12 +267,37 @@ impl Release<'_> { } } -/// Whether `id` is the clipping path of the clipping group or layer it is in. -fn clips_its_parent(d: &Document, id: NodeId) -> bool { - d.parent_of(id).and_then(|p| d.node(p)).is_some_and(|p| p.clips() && p.children().and_then(|c| c.first()).is_some_and(|c| c.id == id)) +/// Whether `id` is in the clipping mask subtree of a clipping group or layer. +fn in_clipping_mask(d: &Document, id: NodeId) -> bool { + d.ancestry(id).is_some_and(|chain| { + chain + .windows(2) + .any(|pair| d.node(pair[0]).is_some_and(|p| p.clips() && p.children().and_then(|c| c.first()).is_some_and(|c| c.id == pair[1]))) + }) } fn release_all(s: &mut Session, p: &Value) -> Result { + if !p.is_object() { + return Err(bad(COMMAND, "parameters must be an object")); + } + for key in ["groups", "clipGroups", "compoundPaths"] { + if p.get(key).is_some_and(|v| !v.is_boolean()) { + return Err(bad(COMMAND, format!("`{key}` must be true or false"))); + } + } + if p.get("scope").is_some_and(|v| !matches!(v.as_str(), Some("selection" | "document"))) { + return Err(bad(COMMAND, "`scope` must be \"selection\" or \"document\"")); + } + if let Some(ids) = p.get("ids") { + let ids = ids.as_array().ok_or_else(|| bad(COMMAND, "`ids` must be an array of non-negative integer object ids"))?; + let mut seen = HashSet::new(); + for id in ids { + let id = id.as_u64().ok_or_else(|| bad(COMMAND, "`ids` must contain non-negative integer object ids"))?; + if !seen.insert(id) { + return Err(bad(COMMAND, format!("duplicate object id {id} in `ids`"))); + } + } + } let kinds = Kinds { groups: switch_or(p, "groups", true, COMMAND)?, clips: switch_or(p, "clipGroups", true, COMMAND)?, @@ -281,7 +307,7 @@ fn release_all(s: &mut Session, p: &Value) -> Result { return Err(bad(COMMAND, "`groups`, `clipGroups` and `compoundPaths` are all false: there is nothing to release")); } let named = named(p); - if named && p.get("scope").is_some_and(|v| !v.is_null()) { + if named && p.get("scope").is_some() { return Err(bad(COMMAND, "give `scope` or `ids`, not both")); } let (roots, name) = if named { @@ -313,11 +339,10 @@ fn release_all(s: &mut Session, p: &Value) -> Result { let mut run = Release { kinds, named, held: &held, counts: [0; 3], made: 0, left: HashMap::new() }; let mut items = vec![]; for id in roots { - // A clipping path picked inside the clipping group or layer it clips stays as it is, as it - // does when that group or layer is released in. + // Direct targets inside a live object or clipping mask stay whole. let protected = d.ancestry(id).is_some_and(|chain| chain.iter().take(chain.len().saturating_sub(1)).filter_map(|id| d.node(*id)).any(|n| run.keeps(n))); - if clips_its_parent(&d, id) || protected { + if in_clipping_mask(&d, id) || protected { continue; } let Some(n) = d.node_arc(id).cloned() else { continue }; diff --git a/crates/engine/src/cmd/addons/cleanup/release/tests.rs b/crates/engine/src/cmd/addons/cleanup/release/tests.rs index 2b1b4a23a2..6d54c9d054 100644 --- a/crates/engine/src/cmd/addons/cleanup/release/tests.rs +++ b/crates/engine/src/cmd/addons/cleanup/release/tests.rs @@ -492,6 +492,104 @@ fn release_all_keeps_selection_details_for_untouched_artwork() { assert_eq!(after.guides, before.guides); } +#[test] +fn release_all_keeps_a_directly_named_blend_key() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let key = group(&mut s, &[a, b]); + let c = rect(&mut s, 100.0, 10.0); + select(&mut s, &[key, c]); + let blend = id_of(&s.execute("object.blend.make", &json!({})).unwrap()); + assert_eq!(s.doc().unwrap().doc.parent_of(key), Some(blend)); + let before = s.doc().unwrap().doc.clone(); + let selection = selected(&s); + let steps = undo_steps(&s); + let r = s.execute(C, &json!({"ids": [key.0]})).unwrap(); + assert_eq!(counts(&r), (0, 0, 0)); + assert!(std::sync::Arc::ptr_eq(&before, &s.doc().unwrap().doc)); + assert_eq!(selected(&s), selection); + assert_eq!(undo_steps(&s), steps); +} + +#[test] +fn release_all_keeps_a_direct_target_inside_a_compound_clipping_mask() { + for clipping_layer in [false, true] { + let mut s = session(); + let art = rect(&mut s, 10.0, 10.0); + let a = rect(&mut s, 5.0, 5.0); + let b = rect(&mut s, 8.0, 8.0); + change(&mut s, a, |n| { + if let NodeKind::Path { path, live, .. } = &mut n.kind { + path.subpaths.push(path.subpaths[0].clone()); + *live = None; + } + }); + let mask = compound(&mut s, &[a, b]); + let container = if clipping_layer { + let id = s.doc().unwrap().doc.layers[0].id; + change(&mut s, id, |n| { + n.children_mut().unwrap().swap(0, 1); + n.set_clips(true); + }); + id + } else { + clip_group(&mut s, &[art, mask]) + }; + assert_eq!(node(&s, container).unwrap().children().unwrap()[0].id, mask); + let before = s.doc().unwrap().doc.clone(); + let steps = undo_steps(&s); + for named in [false, true] { + select(&mut s, &[a]); + let p = if named { json!({"ids": [a.0]}) } else { json!({"clipGroups": false}) }; + let r = s.execute(C, &p).unwrap(); + assert_eq!(counts(&r), (0, 0, 0), "{p}"); + assert!(std::sync::Arc::ptr_eq(&before, &s.doc().unwrap().doc)); + assert_eq!(selected(&s), [a]); + assert_eq!(undo_steps(&s), steps); + } + } +} + +#[test] +fn release_all_rejects_null_options_without_editing_artwork() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let g = group(&mut s, &[a]); + for selection in [vec![], vec![g]] { + select(&mut s, &selection); + let before = s.doc().unwrap().doc.clone(); + let steps = undo_steps(&s); + for key in ["ids", "scope", "groups", "clipGroups", "compoundPaths"] { + let mut p = json!({}); + p[key] = Value::Null; + let error = s.execute(C, &p).unwrap_err(); + assert!(matches!(error, crate::EngineError::BadParams { ref cmd, .. } if cmd == C), "{p}: {error}"); + assert!(std::sync::Arc::ptr_eq(&before, &s.doc().unwrap().doc)); + assert_eq!(selected(&s), selection); + assert_eq!(undo_steps(&s), steps); + } + } +} + +#[test] +fn release_all_rejects_duplicate_ids_before_traversal() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let g = group(&mut s, &[a]); + let b = rect(&mut s, 50.0, 10.0); + select(&mut s, &[g]); + let before = s.doc().unwrap().doc.clone(); + let steps = undo_steps(&s); + for ids in [vec![g.0, g.0], vec![b.0, b.0], vec![g.0, a.0, a.0]] { + let error = s.execute(C, &json!({"ids": ids})).unwrap_err(); + assert!(matches!(error, crate::EngineError::BadParams { ref cmd, ref msg } if cmd == C && msg.contains("duplicate")), "{error}"); + assert!(std::sync::Arc::ptr_eq(&before, &s.doc().unwrap().doc)); + assert_eq!(selected(&s), [g]); + assert_eq!(undo_steps(&s), steps); + } +} + #[test] fn release_all_refuses_bad_params() { let mut s = session(); diff --git a/docs/mcp.md b/docs/mcp.md index abe55ce765..68f83dcaeb 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16585,14 +16585,16 @@ locked group becomes locked. Locked and hidden objects stay locked or hidden and Release All Containers…) takes apart every container at every level of nesting as one undo step, so that only the objects they held are left. `scope` is `"selection"` or `"document"`; by default it is the selection, or the document while nothing is selected. `ids` names the objects, groups and layers to release in instead of `scope`; giving both is -an error. `groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping unless they +an error. Duplicate IDs are an error. Defaults apply only to omitted values; explicit null values are errors. +`groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping unless they clip artwork on a locked artboard (released clipping paths stay as plain paths), and `compoundPaths` turns compound paths, and paths of several subpaths, into one path per subpath. Each is true by default, and at least one must be true. Layers stay. Objects keep the opacity of the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, -Image Trace objects, paths with Live Corners, blends, envelopes and other live objects stay whole, and the clipping -path of a clipping group or layer that stays is left as it is, also when it is selected or named itself. From the selection or the document, locked and hidden objects +Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, +including directly selected or named descendants. The entire clipping mask subtree of a clipping group or layer that +stays is left as it is, including directly selected or named descendants. From the selection or the document, locked and hidden objects and objects on a locked artboard stay whole. With `ids`, the locked and hidden containers it names, or that are in what it names, are taken apart too and their objects become locked or hidden as the containers were, but containers on a locked artboard stay whole. The selection keeps what it held, with each object taken apart replaced by the objects From bcdf0b28452be5b5c42a0aaeebff9b580794795f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 22:45:25 -0800 Subject: [PATCH 05/24] Artwork Cleanup: Release All Containers keeps objects with live effects and layer masks on locked artboards - A group or other container with live effects on its appearance, or on its fill and stroke rows, stays whole with everything in it. - A layer keeps clipping when its clipping path alone overlaps a locked artboard. - A null \ids\ takes the selection, as in every other command that falls back to it. --- .../engine/src/cmd/addons/cleanup/release.rs | 12 +-- .../src/cmd/addons/cleanup/release/tests.rs | 79 ++++++++++++++++++- docs/mcp.md | 14 ++-- 3 files changed, 93 insertions(+), 12 deletions(-) diff --git a/crates/engine/src/cmd/addons/cleanup/release.rs b/crates/engine/src/cmd/addons/cleanup/release.rs index 9a4caccfbc..62b9c4c836 100644 --- a/crates/engine/src/cmd/addons/cleanup/release.rs +++ b/crates/engine/src/cmd/addons/cleanup/release.rs @@ -27,7 +27,7 @@ pub(super) fn specs() -> Vec { "Release All Containers…", ["Object", "Plug-ins", "Artwork Cleanup"], None, - "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`; duplicate ids are an error), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless they clip artwork on a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three; defaults apply only to omitted values, and explicit null values are errors} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants; the entire clipping mask subtree of a clipping group or layer that stays is left as it is, including directly selected or named descendants; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", + "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`; duplicate ids are an error), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless their clipping path or clipped artwork overlaps a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three true; `scope` and the three are never null} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with live effects on their appearance or fill and stroke rows, objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants; the entire clipping mask subtree of a clipping group or layer that stays is left as it is, including directly selected or named descendants; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", has_doc, release_all )] @@ -66,12 +66,14 @@ struct Release<'a> { /// Whether `n` stays whole whatever is asked: a live object kept as a group or compound path /// (a compound shape, Live Paint group, graph, dimension, flare, Objects on Path, generated art, /// Shaper Group, Image Trace object, a clipping path's painted pieces), a path with Live Corners, -/// whose parts would lose their editable corners, or one with an opacity mask, whose contents -/// would lose what it does to them. +/// whose parts would lose their editable corners, or one with an opacity mask or live effects +/// on its appearance or fill and stroke rows. fn live(n: &Node) -> bool { let x = n.extras(); matches!(&n.kind, NodeKind::Blend { .. } | NodeKind::Envelope { .. } | NodeKind::Repeat(_) | NodeKind::Intertwine { .. }) || matches!(&n.kind, NodeKind::Path { live: Some(l), .. } if matches!(**l, LiveShape::Path { .. })) + || !n.appearance.effects.is_empty() + || n.appearance.items.iter().any(|item| !item.effects().is_empty()) || x.mask.is_some() || x.shaper.is_some() || x.trace.is_some() @@ -210,7 +212,7 @@ impl Release<'_> { } let before = self.total(); let mut clips = n.clips(); - if clips && n.is_layer() && self.kinds.clips && !n.children().is_some_and(|children| children.iter().skip(1).any(|c| self.holds_art(c))) { + if clips && n.is_layer() && self.kinds.clips && !n.children().is_some_and(|children| children.iter().any(|c| self.holds_art(c))) { self.counts[1] += 1; let n = Arc::make_mut(&mut n); n.set_clips(false); @@ -288,7 +290,7 @@ fn release_all(s: &mut Session, p: &Value) -> Result { if p.get("scope").is_some_and(|v| !matches!(v.as_str(), Some("selection" | "document"))) { return Err(bad(COMMAND, "`scope` must be \"selection\" or \"document\"")); } - if let Some(ids) = p.get("ids") { + if let Some(ids) = p.get("ids").filter(|v| !v.is_null()) { let ids = ids.as_array().ok_or_else(|| bad(COMMAND, "`ids` must be an array of non-negative integer object ids"))?; let mut seen = HashSet::new(); for id in ids { diff --git a/crates/engine/src/cmd/addons/cleanup/release/tests.rs b/crates/engine/src/cmd/addons/cleanup/release/tests.rs index 6d54c9d054..f0b95941a1 100644 --- a/crates/engine/src/cmd/addons/cleanup/release/tests.rs +++ b/crates/engine/src/cmd/addons/cleanup/release/tests.rs @@ -401,6 +401,49 @@ fn release_all_keeps_a_directly_named_descendant_of_a_live_object() { } } +#[test] +fn release_all_keeps_appearance_effects_and_directly_targeted_descendants() { + for item in [None, Some(0), Some(1)] { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 15.0, 15.0); + let inner = compound(&mut s, &[a, b]); + let c = rect(&mut s, 20.0, 20.0); + select(&mut s, &[inner, c]); + let applied = s.execute("effect.apply", &json!({"effect": "pathfinder.add"})).unwrap(); + assert_eq!(applied["grouped"], true); + let live = selected(&s)[0]; + assert!(matches!(node(&s, live).unwrap().kind, NodeKind::Group { clip: false, .. })); + assert!(!node(&s, live).unwrap().is_compound_shape()); + assert_eq!(node(&s, live).unwrap().appearance.effects[0].id, "pathfinder.add"); + if let Some(item) = item { + change(&mut s, live, |n| { + let effects = n.appearance.effects.clone(); + *n.appearance = red(); + *n.appearance.effects_mut(Some(item)).unwrap() = effects; + }); + } + let before = s.doc().unwrap().doc.clone(); + let steps = undo_steps(&s); + for (target, params) in [ + (live, json!({})), + (live, json!({"scope": "document"})), + (live, json!({"ids": [live.0]})), + (inner, json!({})), + (inner, json!({"ids": [inner.0]})), + ] { + select(&mut s, &[target]); + let r = s.execute(C, ¶ms).unwrap(); + assert_eq!(counts(&r), (0, 0, 0), "{item:?}: {params}: {r}"); + assert!(std::sync::Arc::ptr_eq(&before, &s.doc().unwrap().doc)); + assert_eq!(selected(&s), [target]); + assert_eq!(undo_steps(&s), steps); + assert_eq!(s.doc().unwrap().doc.parent_of(inner), Some(live)); + assert_eq!(s.doc().unwrap().doc.parent_of(a), Some(inner)); + } + } +} + #[test] fn release_all_keeps_a_layer_mask_over_locked_artboard_artwork() { for named in [false, true] { @@ -432,6 +475,40 @@ fn release_all_keeps_a_layer_mask_over_locked_artboard_artwork() { } } +#[test] +fn release_all_keeps_a_layer_mask_that_alone_overlaps_a_locked_artboard() { + for named in [false, true] { + let mut s = session(); + let mask = rect(&mut s, 0.0, 0.0); + let outside = rect(&mut s, 500.0, 10.0); + let g = group(&mut s, &[outside]); + let layer_id = s.doc().unwrap().doc.layers[0].id; + change(&mut s, layer_id, |n| n.set_clips(true)); + change(&mut s, mask, |n| { + if let NodeKind::Path { clipping, .. } = &mut n.kind { + *clipping = true; + } + }); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let original_mask = s.doc().unwrap().doc.node_arc(mask).unwrap().clone(); + let steps = undo_steps(&s); + let p = if named { json!({"ids": [layer_id.0]}) } else { json!({"scope": "document"}) }; + let r = s.execute(C, &p).unwrap(); + assert_eq!(counts(&r), (1, 0, 0), "{p}: {r}"); + assert_eq!(undo_steps(&s), steps + 1); + assert!(node(&s, layer_id).unwrap().clips()); + assert!(matches!(node(&s, mask).unwrap().kind, NodeKind::Path { clipping: true, .. })); + assert!(std::sync::Arc::ptr_eq(&original_mask, s.doc().unwrap().doc.node_arc(mask).unwrap())); + assert_eq!(layer(&s, 0), [mask, outside]); + assert!(node(&s, g).is_none()); + } +} + #[test] fn release_all_reuses_unchanged_siblings_when_rebuilding_a_layer() { let mut s = session(); @@ -560,7 +637,7 @@ fn release_all_rejects_null_options_without_editing_artwork() { select(&mut s, &selection); let before = s.doc().unwrap().doc.clone(); let steps = undo_steps(&s); - for key in ["ids", "scope", "groups", "clipGroups", "compoundPaths"] { + for key in ["scope", "groups", "clipGroups", "compoundPaths"] { let mut p = json!({}); p[key] = Value::Null; let error = s.execute(C, &p).unwrap_err(); diff --git a/docs/mcp.md b/docs/mcp.md index 68f83dcaeb..85abb148a5 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16585,13 +16585,15 @@ locked group becomes locked. Locked and hidden objects stay locked or hidden and Release All Containers…) takes apart every container at every level of nesting as one undo step, so that only the objects they held are left. `scope` is `"selection"` or `"document"`; by default it is the selection, or the document while nothing is selected. `ids` names the objects, groups and layers to release in instead of `scope`; giving both is -an error. Duplicate IDs are an error. Defaults apply only to omitted values; explicit null values are errors. -`groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping unless they -clip artwork on a locked artboard (released clipping paths stay as plain paths), and `compoundPaths` turns compound -paths, and paths of several subpaths, into one path per subpath. Each is true by default, and at least one must be true. +an error. Duplicate IDs are an error. A null `ids` takes the selection as an omitted one does; a null `scope`, `groups`, `clipGroups` or `compoundPaths` is an error. +`groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping unless +their clipping path or clipped artwork overlaps a locked artboard (released clipping paths stay as plain paths), and +`compoundPaths` turns compound paths, and paths of several subpaths, into one path per subpath. Each is true by default, +and at least one must be true. Layers stay. Objects keep the opacity of -the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with an opacity -mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, +the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with live effects +on their appearance or fill and stroke rows, objects with an opacity mask, compound shapes, Live Paint groups, graphs, +dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants. The entire clipping mask subtree of a clipping group or layer that stays is left as it is, including directly selected or named descendants. From the selection or the document, locked and hidden objects From bd72609eda7433abe4604c83c129a3cecc03ef7e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 06:53:23 -0800 Subject: [PATCH 06/24] MCP: ui.menuDialog lists addon.cleanup.releaseAll Main's 1662723c made ui.menuDialog's params text cover the add-on dialogs and the test menu_dialog_params_text_lists_every_command_whose_dialog_it_opens checks every dialog it opens is listed. The Release All Containers dialog this branch adds opens through ui.menuDialog but was missing from the list, so the test failed after main was merged in. --- crates/ui-egui/src/menus/ui_commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index 3e4a834cb8..fe0d6bf09a 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -1544,7 +1544,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "ui.menuDialog", "Menu Dialog", "", - "{command: object.move|object.rotate|object.scale|object.reflect|object.shear|object.transformEach|path.average|path.averageJoin|object.path.offsetPath|object.path.simplify|object.path.smooth|object.path.splitIntoGrid|object.vectorHalftone|object.stepAndRepeat|artboard.rearrange|artboard.rename|object.envelope.makeWithWarp|object.envelope.resetWithWarp|object.envelope.makeWithMesh|object.envelope.resetWithMesh|object.envelope.options|addon.arrange.grid|addon.arrange.offset|addon.arrange.replace|addon.arrange.size|addon.arrange.match|addon.arrange.groupRows|addon.packaging.setFoldAngle|addon.pathtools.cornerSet|addon.pathtools.divideDashes|addon.pathtools.bridge|addon.pathtools.commonTangents|addon.pathtools.tangentCircle|addon.type.textTweaker|addon.type.numbers|addon.color.swatchLegend|addon.arrange.randomizeOpacity|addon.arrange.sort|addon.arrange.markBounds|addon.color.applyNearestSwatch|addon.color.randomFill|addon.select.byArtboards|addon.select.editPointsOnly|type.smartPunctuation|variable.define|variable.rename|variable.bind|dataset.new|dataset.set|dataset.rename|dataset.select} open the dialog that command's menu item opens (its `key` in ui.inspect is the command id, except `transformEach` for object.transformEach, `envelopeWarp` for object.envelope.makeWithWarp and object.envelope.resetWithWarp, `envelopeMesh` for object.envelope.makeWithMesh and object.envelope.resetWithMesh, `variables` for variable.define and variable.rename and variable.bind and dataset.new and dataset.set and dataset.rename and dataset.select, `envelopeOptions` for object.envelope.options, `addon.pathtools.commonTangents` for addon.pathtools.bridge, `smoothSlider` for object.path.smooth, and `simplifySlider` for object.path.simplify; the dialogs of addon.color.applyNearestSwatch and addon.select.byArtboards have no `key`; smoothSlider and simplifySlider are the sliders over the canvas, with field `level`, and object.path.simplify opens its dialog `object.path.simplify` instead once OK in that dialog keeps the settings (`retain`); Set Fold Angle's `angle` is the selected fold lines' angle, and it is refused while the selection has no fold line it can change; Scale and Transform Each have `corners` and `strokes`, from the preferences, which OK updates; Transform Each opens on the values it was last confirmed with (not `copy`), and its Copy button confirms with `copy: true`; the envelope dialogs start from the selected envelope, Make opens as Reset (`reset: true`) while one is selected; variable.rename opens only while the document has a variable, and dataset.set and dataset.rename only while it has a data set, and otherwise the status bar says why; ui.dialog.set, ui.dialog.confirm and ui.dialog.cancel take the dialog's `id` from ui.inspect, or `top`, not its `key`)", + "{command: object.move|object.rotate|object.scale|object.reflect|object.shear|object.transformEach|path.average|path.averageJoin|object.path.offsetPath|object.path.simplify|object.path.smooth|object.path.splitIntoGrid|object.vectorHalftone|object.stepAndRepeat|artboard.rearrange|artboard.rename|object.envelope.makeWithWarp|object.envelope.resetWithWarp|object.envelope.makeWithMesh|object.envelope.resetWithMesh|object.envelope.options|addon.arrange.grid|addon.arrange.offset|addon.arrange.replace|addon.arrange.size|addon.arrange.match|addon.arrange.groupRows|addon.packaging.setFoldAngle|addon.pathtools.cornerSet|addon.pathtools.divideDashes|addon.pathtools.bridge|addon.pathtools.commonTangents|addon.pathtools.tangentCircle|addon.type.textTweaker|addon.type.numbers|addon.color.swatchLegend|addon.arrange.randomizeOpacity|addon.arrange.sort|addon.arrange.markBounds|addon.color.applyNearestSwatch|addon.color.randomFill|addon.select.byArtboards|addon.select.editPointsOnly|addon.cleanup.releaseAll|type.smartPunctuation|variable.define|variable.rename|variable.bind|dataset.new|dataset.set|dataset.rename|dataset.select} open the dialog that command's menu item opens (its `key` in ui.inspect is the command id, except `transformEach` for object.transformEach, `envelopeWarp` for object.envelope.makeWithWarp and object.envelope.resetWithWarp, `envelopeMesh` for object.envelope.makeWithMesh and object.envelope.resetWithMesh, `variables` for variable.define and variable.rename and variable.bind and dataset.new and dataset.set and dataset.rename and dataset.select, `envelopeOptions` for object.envelope.options, `addon.pathtools.commonTangents` for addon.pathtools.bridge, `smoothSlider` for object.path.smooth, and `simplifySlider` for object.path.simplify; the dialogs of addon.color.applyNearestSwatch and addon.select.byArtboards have no `key`; smoothSlider and simplifySlider are the sliders over the canvas, with field `level`, and object.path.simplify opens its dialog `object.path.simplify` instead once OK in that dialog keeps the settings (`retain`); Set Fold Angle's `angle` is the selected fold lines' angle, and it is refused while the selection has no fold line it can change; Scale and Transform Each have `corners` and `strokes`, from the preferences, which OK updates; Transform Each opens on the values it was last confirmed with (not `copy`), and its Copy button confirms with `copy: true`; the envelope dialogs start from the selected envelope, Make opens as Reset (`reset: true`) while one is selected; variable.rename opens only while the document has a variable, and dataset.set and dataset.rename only while it has a data set, and otherwise the status bar says why; ui.dialog.set, ui.dialog.confirm and ui.dialog.cancel take the dialog's `id` from ui.inspect, or `top`, not its `key`)", ), ( "ui.widthPointEdit", From 7534049a6da71620ede27605d8e8ecc3d18ad0be Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 07:57:11 -0800 Subject: [PATCH 07/24] MCP: regenerate ui_catalog for addon.cleanup.releaseAll bd72609 added addon.cleanup.releaseAll to ui.menuDialog's params text in crates/ui-egui/src/menus/ui_commands.rs without regenerating the MCP mirror, so CI's ui-commands step failed. This is the output of cargo xtask ui-commands. --- crates/mcp/src/ui_catalog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index 8dfdfd28e3..d269e6c9bc 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -1543,7 +1543,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "ui.menuDialog", "Menu Dialog", "", - "{command: object.move|object.rotate|object.scale|object.reflect|object.shear|object.transformEach|path.average|path.averageJoin|object.path.offsetPath|object.path.simplify|object.path.smooth|object.path.splitIntoGrid|object.vectorHalftone|object.stepAndRepeat|artboard.rearrange|artboard.rename|object.envelope.makeWithWarp|object.envelope.resetWithWarp|object.envelope.makeWithMesh|object.envelope.resetWithMesh|object.envelope.options|addon.arrange.grid|addon.arrange.offset|addon.arrange.replace|addon.arrange.size|addon.arrange.match|addon.arrange.groupRows|addon.packaging.setFoldAngle|addon.pathtools.cornerSet|addon.pathtools.divideDashes|addon.pathtools.bridge|addon.pathtools.commonTangents|addon.pathtools.tangentCircle|addon.type.textTweaker|addon.type.numbers|addon.color.swatchLegend|addon.arrange.randomizeOpacity|addon.arrange.sort|addon.arrange.markBounds|addon.color.applyNearestSwatch|addon.color.randomFill|addon.select.byArtboards|addon.select.editPointsOnly|type.smartPunctuation|variable.define|variable.rename|variable.bind|dataset.new|dataset.set|dataset.rename|dataset.select} open the dialog that command's menu item opens (its `key` in ui.inspect is the command id, except `transformEach` for object.transformEach, `envelopeWarp` for object.envelope.makeWithWarp and object.envelope.resetWithWarp, `envelopeMesh` for object.envelope.makeWithMesh and object.envelope.resetWithMesh, `variables` for variable.define and variable.rename and variable.bind and dataset.new and dataset.set and dataset.rename and dataset.select, `envelopeOptions` for object.envelope.options, `addon.pathtools.commonTangents` for addon.pathtools.bridge, `smoothSlider` for object.path.smooth, and `simplifySlider` for object.path.simplify; the dialogs of addon.color.applyNearestSwatch and addon.select.byArtboards have no `key`; smoothSlider and simplifySlider are the sliders over the canvas, with field `level`, and object.path.simplify opens its dialog `object.path.simplify` instead once OK in that dialog keeps the settings (`retain`); Set Fold Angle's `angle` is the selected fold lines' angle, and it is refused while the selection has no fold line it can change; Scale and Transform Each have `corners` and `strokes`, from the preferences, which OK updates; Transform Each opens on the values it was last confirmed with (not `copy`), and its Copy button confirms with `copy: true`; the envelope dialogs start from the selected envelope, Make opens as Reset (`reset: true`) while one is selected; variable.rename opens only while the document has a variable, and dataset.set and dataset.rename only while it has a data set, and otherwise the status bar says why; ui.dialog.set, ui.dialog.confirm and ui.dialog.cancel take the dialog's `id` from ui.inspect, or `top`, not its `key`)", + "{command: object.move|object.rotate|object.scale|object.reflect|object.shear|object.transformEach|path.average|path.averageJoin|object.path.offsetPath|object.path.simplify|object.path.smooth|object.path.splitIntoGrid|object.vectorHalftone|object.stepAndRepeat|artboard.rearrange|artboard.rename|object.envelope.makeWithWarp|object.envelope.resetWithWarp|object.envelope.makeWithMesh|object.envelope.resetWithMesh|object.envelope.options|addon.arrange.grid|addon.arrange.offset|addon.arrange.replace|addon.arrange.size|addon.arrange.match|addon.arrange.groupRows|addon.packaging.setFoldAngle|addon.pathtools.cornerSet|addon.pathtools.divideDashes|addon.pathtools.bridge|addon.pathtools.commonTangents|addon.pathtools.tangentCircle|addon.type.textTweaker|addon.type.numbers|addon.color.swatchLegend|addon.arrange.randomizeOpacity|addon.arrange.sort|addon.arrange.markBounds|addon.color.applyNearestSwatch|addon.color.randomFill|addon.select.byArtboards|addon.select.editPointsOnly|addon.cleanup.releaseAll|type.smartPunctuation|variable.define|variable.rename|variable.bind|dataset.new|dataset.set|dataset.rename|dataset.select} open the dialog that command's menu item opens (its `key` in ui.inspect is the command id, except `transformEach` for object.transformEach, `envelopeWarp` for object.envelope.makeWithWarp and object.envelope.resetWithWarp, `envelopeMesh` for object.envelope.makeWithMesh and object.envelope.resetWithMesh, `variables` for variable.define and variable.rename and variable.bind and dataset.new and dataset.set and dataset.rename and dataset.select, `envelopeOptions` for object.envelope.options, `addon.pathtools.commonTangents` for addon.pathtools.bridge, `smoothSlider` for object.path.smooth, and `simplifySlider` for object.path.simplify; the dialogs of addon.color.applyNearestSwatch and addon.select.byArtboards have no `key`; smoothSlider and simplifySlider are the sliders over the canvas, with field `level`, and object.path.simplify opens its dialog `object.path.simplify` instead once OK in that dialog keeps the settings (`retain`); Set Fold Angle's `angle` is the selected fold lines' angle, and it is refused while the selection has no fold line it can change; Scale and Transform Each have `corners` and `strokes`, from the preferences, which OK updates; Transform Each opens on the values it was last confirmed with (not `copy`), and its Copy button confirms with `copy: true`; the envelope dialogs start from the selected envelope, Make opens as Reset (`reset: true`) while one is selected; variable.rename opens only while the document has a variable, and dataset.set and dataset.rename only while it has a data set, and otherwise the status bar says why; ui.dialog.set, ui.dialog.confirm and ui.dialog.cancel take the dialog's `id` from ui.inspect, or `top`, not its `key`)", ), ( "ui.widthPointEdit", From 7ee191182dce282ebe0c62dc9fdfe45c4b4549cb Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 12:31:14 -0800 Subject: [PATCH 08/24] MCP: say a null ids on addon.cleanup.releaseAll falls back as an omitted one does A null `ids` counts as left out: `scope` applies, and without `scope` the command uses the selection, or the document while nothing is selected. --- docs/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp.md b/docs/mcp.md index ccd07e7276..cb89029b26 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -16910,7 +16910,7 @@ locked group becomes locked. Locked and hidden objects stay locked or hidden and Release All Containers…) takes apart every container at every level of nesting as one undo step, so that only the objects they held are left. `scope` is `"selection"` or `"document"`; by default it is the selection, or the document while nothing is selected. `ids` names the objects, groups and layers to release in instead of `scope`; giving both is -an error. Duplicate IDs are an error. A null `ids` takes the selection as an omitted one does; a null `scope`, `groups`, `clipGroups` or `compoundPaths` is an error. +an error. Duplicate IDs are an error. A null `ids` counts as left out: `scope` applies, and without `scope` the command uses the selection, or the document while nothing is selected; a null `scope`, `groups`, `clipGroups` or `compoundPaths` is an error. `groups` ungroups groups, `clipGroups` ungroups clipping groups and makes layers stop clipping unless their clipping path or clipped artwork overlaps a locked artboard (released clipping paths stay as plain paths), and `compoundPaths` turns compound paths, and paths of several subpaths, into one path per subpath. Each is true by default, From 209df6ab02226fec79f3725037ae64d1d158926c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 15:18:14 -0800 Subject: [PATCH 09/24] Scripts: retracing and releasing refuse a tracing with added opacity mask art Retracing and releasing a tracing discard every object the trace did not make, and refuse when there is one. The check walked only the tracing's children, so the art of an opacity mask given to the tracing or to an object the trace made was discarded without the refusal. The check now also walks that mask art. The source image's own mask is left out, since both keep the image whole. The refusal came with #9077 (a1b8b013). --- crates/engine/src/script/dom/tracing.rs | 27 +++++--- crates/engine/src/tests/script_dom_tracing.rs | 63 +++++++++++++++++++ docs/mcp.md | 3 +- 3 files changed, 85 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/script/dom/tracing.rs b/crates/engine/src/script/dom/tracing.rs index a37a062849..04fac60a66 100644 --- a/crates/engine/src/script/dom/tracing.rs +++ b/crates/engine/src/script/dom/tracing.rs @@ -199,15 +199,24 @@ pub(super) fn remember_source(h: &Host, uid: u64, group: &Node) { } h.dom.tracing.descendants.borrow_mut().entry((uid, group.id.0)).or_insert_with(|| { let mut ids = HashSet::new(); - group.walk(&mut |n| { - if n.id != group.id { - ids.insert(n.id); + // The source image is kept whole, so the art of its own opacity mask is not looked at. + let source = group.children().and_then(|c| c.first()).map(|n| n.id); + let mut todo: Vec<&Node> = members(group).collect(); + while let Some(n) = todo.pop() { + ids.insert(n.id); + if Some(n.id) != source { + todo.extend(members(n)); } - }); + } ids }); } +/// The objects `n` holds: its children and the art of its opacity mask. +fn members(n: &Node) -> impl Iterator { + n.children().into_iter().flatten().map(|c| &**c).chain(n.extras().mask.as_deref().map(|m| &*m.art)) +} + pub(super) fn same_source(h: &Host, uid: u64, original: NodeId, group: &Node) -> bool { let source = h.dom.tracing.sources.borrow().get(&(uid, original.0)).copied(); source.is_some_and(|source| group.children().and_then(|c| c.first()).is_some_and(|n| n.id == source)) @@ -321,7 +330,8 @@ fn replace(h: &Host, item: Item, id: &str, params: &Value, key: &str) -> Result< }) } -/// Throws `refusal` when the Image Trace object of `item` holds an object its trace did not make, +/// Throws `refusal` when the Image Trace object of `item` holds an object its trace did not make +/// (the art of an opacity mask on it or on one of its objects other than the source image included), /// and "Cannot edit page item" when it holds a locked object other than its source image, which /// the replacement would discard. The objects looked at are charged to the run either way. fn refuse_added(h: &Host, item: Item, refusal: &str) -> Result<(), HostError> { @@ -338,7 +348,8 @@ fn refuse_added(h: &Host, item: Item, refusal: &str) -> Result<(), HostError> { let source = group.children().and_then(|c| c.first()).map(|n| n.id); let mut visited = 0u64; let mut locked = None; - let mut todo: Vec<&Arc> = group.children().map(|c| c.iter().collect()).unwrap_or_default(); + // The tracing's own opacity mask goes with it too; the source image is kept whole. + let mut todo: Vec<&Node> = members(group).collect(); while let Some(n) = todo.pop() { visited += 1; let added = match (&made, ids) { @@ -353,7 +364,9 @@ fn refuse_added(h: &Host, item: Item, refusal: &str) -> Result<(), HostError> { if n.locked && Some(n.id) != source && locked.is_none() { locked = Some(n.id); } - todo.extend(n.children().into_iter().flatten()); + if Some(n.id) != source { + todo.extend(members(n)); + } } Ok((visited, locked.map_or(Ok(()), |id| Err(HostError::Error(format!("Cannot edit page item {}", id.0)))))) })?; diff --git a/crates/engine/src/tests/script_dom_tracing.rs b/crates/engine/src/tests/script_dom_tracing.rs index 24223785dd..e6e3f4dfa1 100644 --- a/crates/engine/src/tests/script_dom_tracing.rs +++ b/crates/engine/src/tests/script_dom_tracing.rs @@ -1253,6 +1253,69 @@ fn retrace_and_release_refuse_locked_traced_artwork() { let _ = std::fs::remove_dir_all(base); } +/// The art of an opacity mask given to the tracing or to an object the trace made is added artwork +/// too: retracing and releasing discard it, so both refuse, before the document changes. +#[test] +fn retrace_and_release_refuse_added_opacity_mask_art() { + let base = folder("mask-art"); + for on_group in [false, true] { + for (action, refusal) in [ + ("p.tracing.tracingOptions.threshold = 90;", "Cannot retrace a tracing containing added artwork"), + ("p.tracing.releaseTracing();", "Cannot release a tracing containing added artwork"), + ] { + let (mut s, image) = session(&base, false); + let r = s.execute("imageTrace.make", &json!({"id": image.0})).unwrap(); + let group = NodeId(r["id"].as_u64().unwrap()); + let made = s.active().unwrap().doc.node(group).unwrap().children().unwrap()[1].id; + let masked = if on_group { group } else { made }; + s.edit("Mask traced artwork", |d, _| { + let art = crate::doc::Node::group(d.alloc_id(), vec![]); + d.node_mut(masked).unwrap().extras_mut().mask = Some(Box::new(vectorcraft_doc::OpacityMask::new(art, true))); + Ok(()) + }) + .unwrap(); + let before = vectorcraft_format::save(&s.active().unwrap().doc, false); + let steps = undo_steps(&s); + let out = log( + &mut s, + &base, + &format!("var p = app.activeDocument.pageItems[0], m = ''; try {{ {action} }} catch (e) {{ m = e.message; }} vc.log(m);"), + ); + assert_eq!(out, [json!(refusal)], "{on_group} {action}"); + assert_eq!(vectorcraft_format::save(&s.active().unwrap().doc, false), before, "{on_group} {action}"); + assert_eq!(undo_steps(&s), steps, "{on_group} {action}"); + } + } + let _ = std::fs::remove_dir_all(base); +} + +/// The source image keeps its opacity mask through retracing and releasing, so its mask art is +/// not added artwork. +#[test] +fn retrace_and_release_take_a_source_image_with_an_opacity_mask() { + let base = folder("source-mask"); + for action in ["p.tracing.tracingOptions.threshold = 90;", "p.tracing.releaseTracing();"] { + let (mut s, image) = session(&base, false); + s.edit("Mask the image", |d, _| { + let art = crate::doc::Node::group(d.alloc_id(), vec![]); + d.node_mut(image).unwrap().extras_mut().mask = Some(Box::new(vectorcraft_doc::OpacityMask::new(art, true))); + Ok(()) + }) + .unwrap(); + let mask = s.active().unwrap().doc.node(image).unwrap().extras().mask.clone(); + s.execute("imageTrace.make", &json!({"id": image.0})).unwrap(); + assert_eq!(s.active().unwrap().doc.node(image).unwrap().extras().mask, mask, "imageTrace.make: {action}"); + let out = log( + &mut s, + &base, + &format!("var p = app.activeDocument.pageItems[0], m = ''; try {{ {action} }} catch (e) {{ m = e.message; }} vc.log(m);"), + ); + assert_eq!(out, [json!("")], "{action}"); + assert_eq!(s.active().unwrap().doc.node(image).unwrap().extras().mask, mask, "{action}"); + } + let _ = std::fs::remove_dir_all(base); +} + /// The `TracingOptions` and `TracingObject` members that are not implemented are left out of /// `hasOwnProperty` and `reflect`, and still throw when read. #[test] diff --git a/docs/mcp.md b/docs/mcp.md index e716a1a08e..4f76bea4f6 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3365,7 +3365,8 @@ through `$`: `viewVector` does not trace again: it runs `imageTrace.setView`. The `PluginItem`, `TracingObject` and `TracingOptions` follow the new object, and a run traces again at most 10,000 times. Tracing again throws `Cannot retrace a tracing containing added artwork`, with nothing changed, when the tracing holds an object its trace - did not make, whether this run, an earlier run or a command added it, and `releaseTracing()` throws + did not make, whether this run, an earlier run or a command added it (the art of an opacity mask on the tracing or on an + object the trace made counts; the source image's own mask does not, since both keep the image whole), and `releaseTracing()` throws `Cannot release a tracing containing added artwork` in the same case. When no object was added, both throw `Cannot edit page item `, with nothing changed, when an object the trace made is locked. `imageTrace.make` records the objects it made in the tracing's `trace` settings as `made`, ranges of ids `[[first, last], ...]`, and a copy of the tracing records From fbe16e8143a4a05463521544eabf5b4ebddbecff Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 16:31:36 -0800 Subject: [PATCH 10/24] Scripts: retracing and releasing refuse any opacity mask on traced artwork The check for added artwork compared mask art by id. A mask made with Make Opacity Mask from two traced paths keeps the art's id, which the tracing records as made, and a tracing saved without that record took a mask it already held as part of its own objects. Retracing or releasing then discarded the mask without the refusal. An opacity mask on the tracing or on any object in it other than the source image now makes retracing and releasing refuse, whatever the ids of its art. The source image keeps its own mask as before. --- crates/engine/src/script/dom/tracing.rs | 30 ++++---- crates/engine/src/tests/script_dom_tracing.rs | 69 +++++++++++++++++++ docs/mcp.md | 8 ++- docs/target-app-parity.md | 2 +- 4 files changed, 92 insertions(+), 17 deletions(-) diff --git a/crates/engine/src/script/dom/tracing.rs b/crates/engine/src/script/dom/tracing.rs index 04fac60a66..e423ec8511 100644 --- a/crates/engine/src/script/dom/tracing.rs +++ b/crates/engine/src/script/dom/tracing.rs @@ -199,14 +199,12 @@ pub(super) fn remember_source(h: &Host, uid: u64, group: &Node) { } h.dom.tracing.descendants.borrow_mut().entry((uid, group.id.0)).or_insert_with(|| { let mut ids = HashSet::new(); - // The source image is kept whole, so the art of its own opacity mask is not looked at. - let source = group.children().and_then(|c| c.first()).map(|n| n.id); - let mut todo: Vec<&Node> = members(group).collect(); + // Only children are recorded: an opacity mask is refused whatever its art, so the art of + // one held now must not become an object the trace made if the mask is later undone. + let mut todo: Vec<&Node> = group.children().into_iter().flatten().map(|c| &**c).collect(); while let Some(n) = todo.pop() { ids.insert(n.id); - if Some(n.id) != source { - todo.extend(members(n)); - } + todo.extend(n.children().into_iter().flatten().map(|c| &**c)); } ids }); @@ -330,8 +328,8 @@ fn replace(h: &Host, item: Item, id: &str, params: &Value, key: &str) -> Result< }) } -/// Throws `refusal` when the Image Trace object of `item` holds an object its trace did not make -/// (the art of an opacity mask on it or on one of its objects other than the source image included), +/// Throws `refusal` when the Image Trace object of `item` holds an object its trace did not make, +/// or has an opacity mask on it or on one of its objects other than the source image, whatever its art, /// and "Cannot edit page item" when it holds a locked object other than its source image, which /// the replacement would discard. The objects looked at are charged to the run either way. fn refuse_added(h: &Host, item: Item, refusal: &str) -> Result<(), HostError> { @@ -348,15 +346,21 @@ fn refuse_added(h: &Host, item: Item, refusal: &str) -> Result<(), HostError> { let source = group.children().and_then(|c| c.first()).map(|n| n.id); let mut visited = 0u64; let mut locked = None; + // An opacity mask on the tracing or on an object other than the source image is added + // artwork whatever the ids of its art: a mask made from traced objects keeps their ids. + if group.extras().mask.is_some() { + return Ok((visited, Err(HostError::Error(refusal.into())))); + } // The tracing's own opacity mask goes with it too; the source image is kept whole. let mut todo: Vec<&Node> = members(group).collect(); while let Some(n) = todo.pop() { visited += 1; - let added = match (&made, ids) { - (Some(m), _) => !m.contains(n.id), - (None, Some(ids)) => !ids.contains(&n.id), - (None, None) => false, - }; + let added = (Some(n.id) != source && n.extras().mask.is_some()) + || match (&made, ids) { + (Some(m), _) => !m.contains(n.id), + (None, Some(ids)) => !ids.contains(&n.id), + (None, None) => false, + }; // Added artwork is reported before a locked object, whichever comes first. if added { return Ok((visited, Err(HostError::Error(refusal.into())))); diff --git a/crates/engine/src/tests/script_dom_tracing.rs b/crates/engine/src/tests/script_dom_tracing.rs index e6e3f4dfa1..0ab4469719 100644 --- a/crates/engine/src/tests/script_dom_tracing.rs +++ b/crates/engine/src/tests/script_dom_tracing.rs @@ -1289,6 +1289,75 @@ fn retrace_and_release_refuse_added_opacity_mask_art() { let _ = std::fs::remove_dir_all(base); } +/// An opacity mask made from two objects the trace made keeps the mask art's id, which the tracing +/// records as made, but retracing and releasing still discard it, so both refuse. +#[test] +fn retrace_and_release_refuse_an_opacity_mask_made_from_traced_paths() { + let base = folder("traced-mask"); + for (action, refusal) in [ + ("p.tracing.tracingOptions.threshold = 90;", "Cannot retrace a tracing containing added artwork"), + ("p.tracing.releaseTracing();", "Cannot release a tracing containing added artwork"), + ] { + let (mut s, image) = session(&base, false); + let r = s.execute("imageTrace.make", &json!({"id": image.0})).unwrap(); + let group = NodeId(r["id"].as_u64().unwrap()); + let kids: Vec = s.active().unwrap().doc.node(group).unwrap().children().unwrap().iter().map(|n| n.id).collect(); + assert!(kids.len() > 2, "{kids:?}"); + s.execute("select.set", &json!({"ids": [kids[1].0, kids[2].0]})).unwrap(); + s.execute("transparency.makeOpacityMask", &json!({})).unwrap(); + let g = s.active().unwrap().doc.node(group).unwrap(); + assert!(g.children().unwrap().iter().any(|n| n.extras().mask.is_some()), "a traced path holds the mask"); + let before = vectorcraft_format::save(&s.active().unwrap().doc, false); + let steps = undo_steps(&s); + let out = log( + &mut s, + &base, + &format!("var p = app.activeDocument.pageItems[0], m = ''; try {{ {action} }} catch (e) {{ m = e.message; }} vc.log(m);"), + ); + assert_eq!(out, [json!(refusal)], "{action}"); + assert_eq!(vectorcraft_format::save(&s.active().unwrap().doc, false), before, "{action}"); + assert_eq!(undo_steps(&s), steps, "{action}"); + } + let _ = std::fs::remove_dir_all(base); +} + +/// A tracing saved without the record of what its trace made is checked against what it held when +/// the run first saw it; an opacity mask it already held then still counts as added artwork. +#[test] +fn retrace_and_release_refuse_a_mask_on_a_tracing_without_its_record() { + let base = folder("unrecorded-mask"); + for (action, refusal) in [ + ("p.tracing.tracingOptions.threshold = 90;", "Cannot retrace a tracing containing added artwork"), + ("p.tracing.releaseTracing();", "Cannot release a tracing containing added artwork"), + ] { + let (mut s, image) = session(&base, false); + let r = s.execute("imageTrace.make", &json!({"id": image.0})).unwrap(); + let group = NodeId(r["id"].as_u64().unwrap()); + let made = s.active().unwrap().doc.node(group).unwrap().children().unwrap()[1].id; + s.edit("Mask traced artwork of an older tracing", |d, _| { + if let Some(t) = d.node_mut(group).unwrap().extras_mut().trace.as_deref_mut().and_then(Value::as_object_mut) { + t.remove(vectorcraft_doc::trace::TRACE_MADE); + } + let art = crate::doc::Node::group(d.alloc_id(), vec![]); + d.node_mut(made).unwrap().extras_mut().mask = Some(Box::new(vectorcraft_doc::OpacityMask::new(art, true))); + Ok(()) + }) + .unwrap(); + assert!(s.active().unwrap().doc.node(group).unwrap().trace_made().is_none()); + let before = vectorcraft_format::save(&s.active().unwrap().doc, false); + let steps = undo_steps(&s); + let out = log( + &mut s, + &base, + &format!("var p = app.activeDocument.pageItems[0], m = ''; try {{ {action} }} catch (e) {{ m = e.message; }} vc.log(m);"), + ); + assert_eq!(out, [json!(refusal)], "{action}"); + assert_eq!(vectorcraft_format::save(&s.active().unwrap().doc, false), before, "{action}"); + assert_eq!(undo_steps(&s), steps, "{action}"); + } + let _ = std::fs::remove_dir_all(base); +} + /// The source image keeps its opacity mask through retracing and releasing, so its mask art is /// not added artwork. #[test] diff --git a/docs/mcp.md b/docs/mcp.md index 4f76bea4f6..9deeedb43c 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3365,12 +3365,14 @@ through `$`: `viewVector` does not trace again: it runs `imageTrace.setView`. The `PluginItem`, `TracingObject` and `TracingOptions` follow the new object, and a run traces again at most 10,000 times. Tracing again throws `Cannot retrace a tracing containing added artwork`, with nothing changed, when the tracing holds an object its trace - did not make, whether this run, an earlier run or a command added it (the art of an opacity mask on the tracing or on an - object the trace made counts; the source image's own mask does not, since both keep the image whole), and `releaseTracing()` throws + did not make, whether this run, an earlier run or a command added it (any opacity mask on the tracing or on an object + the trace made counts, whether or not the trace made its art; the source image's own mask does not, since both keep + the image whole), and `releaseTracing()` throws `Cannot release a tracing containing added artwork` in the same case. When no object was added, both throw `Cannot edit page item `, with nothing changed, when an object the trace made is locked. `imageTrace.make` records the objects it made in the tracing's `trace` settings as `made`, ranges of ids `[[first, last], ...]`, and a copy of the tracing records - their copies. A tracing saved without `made` is checked only for objects added in the same run. `threshold` takes a whole + their copies. A tracing saved without `made` is checked only for objects added in the same run, but an opacity + mask counts with or without `made`, even one it held before the run. `threshold` takes a whole number from 0 to 255, `maxColors` from 2 to 256 and `minArea` (the Noise setting, in pixels) from 0 to the largest image the tracer reads; `fills` and `strokes` cannot both be `false`; `palette` is `""` (automatic), `"Limited"`, `"Full Tone"` or `"Document Library"`; `viewRaster` and `viewVector` take only the pairs that match an Image Trace diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 144759bf00..b50a826dff 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1115,7 +1115,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - The control server writes each reply through a 64 KiB buffer. On Windows 11 it sends the 17 MB `document.inspect` reply of a document with 50,000 objects on one layer to a client over loopback in 0.09 s instead of 34 s. - Scripts: File › Scripts › Other Script… and `script.run` run a JavaScript file against the open documents as one transaction with one undo step for each changed document. A failed or stopped run puts every document back. `crates/engine/src/tests/script_run.rs`. - Scripts: `Document.placedItems` and `Document.rasterItems` list a document's linked and embedded images; `placedItems.add()` with a `File` assigned to `file` places an image linked, and `PlacedItem.relink(file)` and `embed()` relink and embed it, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PlacedItems/, https://ai-scripting.docsforadobe.dev/jsobjref/PlacedItem/, https://ai-scripting.docsforadobe.dev/jsobjref/RasterItems/ and https://ai-scripting.docsforadobe.dev/jsobjref/RasterItem/ describe them. A raster item's bits per channel, channels, color space and transparency come from its encoded pixels' header. Only files the script may read, of at most 256 MiB and holding an image, are placed or relinked. Rasterizing and capturing are not there yet. `crates/engine/src/tests/script_dom_images.rs`. - - Scripts: `PlacedItem.trace()` and `RasterItem.trace()` make an Image Trace object and return it as a `PluginItem` whose `tracing` gives its path, anchor and color counts, the source image's resolution, `expandTracing()`, `releaseTracing()` and its `TracingOptions`; assigning an option or loading a preset traces it again, except that the view options (`viewRaster` and `viewVector`) only change the view, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PluginItem/, https://ai-scripting.docsforadobe.dev/jsobjref/TracingObject/ and https://ai-scripting.docsforadobe.dev/jsobjref/TracingOptions/ describe them. Option values are checked for type and range before any trace, a script cannot save a preset, and the options without a VectorCraft setting throw. The source image of a traced item is left out of `pageItems`, `placedItems` and `rasterItems`; a script reaches it through `PluginItem.tracing.sourceArt`. Renaming an ordinary group that holds an image first to `Image Trace`, or moving or duplicating an image to the bottom of an ordinary group with that name, throws an error. `crates/engine/src/tests/script_dom_tracing.rs`. + - Scripts: `PlacedItem.trace()` and `RasterItem.trace()` make an Image Trace object and return it as a `PluginItem` whose `tracing` gives its path, anchor and color counts, the source image's resolution, `expandTracing()`, `releaseTracing()` and its `TracingOptions`; assigning an option or loading a preset traces it again, except that the view options (`viewRaster` and `viewVector`) only change the view, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PluginItem/, https://ai-scripting.docsforadobe.dev/jsobjref/TracingObject/ and https://ai-scripting.docsforadobe.dev/jsobjref/TracingOptions/ describe them. Option values are checked for type and range before any trace, a script cannot save a preset, and the options without a VectorCraft setting throw. Tracing again and `releaseTracing()` throw, with nothing changed, when the tracing holds added artwork, an opacity mask on the tracing or on an object the trace made included; the source image keeps its own mask. The source image of a traced item is left out of `pageItems`, `placedItems` and `rasterItems`; a script reaches it through `PluginItem.tracing.sourceArt`. Renaming an ordinary group that holds an image first to `Image Trace`, or moving or duplicating an image to the bottom of an ordinary group with that name, throws an error. `crates/engine/src/tests/script_dom_tracing.rs`. - Scripts: `Document.pathItems` lists the paths and makes rectangles, rounded rectangles, ellipses, polygons, stars and empty paths with the defaults the help page https://ai-scripting.docsforadobe.dev/jsobjref/PathItems/ gives; each path's points, closed state, fill rule, area, length, guide state, selected points, fill and stroke colors, stroke options and transforms read and change as https://ai-scripting.docsforadobe.dev/jsobjref/PathItem/, https://ai-scripting.docsforadobe.dev/jsobjref/PathPoints/ and https://ai-scripting.docsforadobe.dev/jsobjref/PathPoint/ describe them, and `RGBColor`, `CMYKColor`, `GrayColor`, `LabColor` and `NoColor` make colors (`docs/mcp.md`). `pathItems["name"]` reads a path by name as `pageItems` does, and `removeAll()` deletes nothing and throws when any path is on a locked artboard. The transforms move gradients with the art: `changeFillGradients` false throws an error, as do `changeFillPatterns` and `changeStrokePattern` given as different values, and `transform` is not there yet (`docs/mcp.md` lists these limits). Gradient stops are not there yet. A `PathPoint` of a path in an Objects on Path group goes stale when an edit of another path in the group moves it. `crates/engine/src/tests/script_dom_paths.rs`. - Scripts: a document's `default*` members (https://ai-scripting.docsforadobe.dev/jsobjref/Document/) read and set the fill, stroke and stroke options of the next object drawn through `appearance.setNewArt`, leaving the selection and its art as they were, and `scaleFactor` reads 1 (`docs/mcp.md`). `crates/engine/src/tests/script_dom_defaults.rs`. - Scripts: `app.undo()` and `app.redo()` undo and redo the edits the run made, and each document open before and after the run that it changed gets one undo step. `crates/engine/src/tests/script_dom.rs`. From a70c687ee0b5029fe1f9acdd7d6ce70682f2bee7 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 17:58:23 -0800 Subject: [PATCH 11/24] Docs: a tracing saved without `made` is checked only for artwork added in the run The Scripts line for Image Trace now says that retracing or releasing a tracing saved without `made` can discard artwork added before the run, and that the opacity mask check applies with or without `made`. --- docs/target-app-parity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index b117989989..3279b91ff8 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1118,7 +1118,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Scripts: `app.preferences` reads, stores and removes values by key with the type they were set as, keeps them across runs and restarts, and turns the warning before a picked script on with the key `ShowExternalJSXWarning`, and off only after the person answers Yes to a confirm (https://ai-scripting.docsforadobe.dev/jsobjref/Preferences/; the confirm is VectorCraft's own rule); `app` makes, joins, inverts and compares `Matrix` records (https://ai-scripting.docsforadobe.dev/jsobjref/Matrix/), rounding each joined value once from its exact sum of products, and runs Copy, Cut and Paste on the active document inside the run's transaction (https://ai-scripting.docsforadobe.dev/jsobjref/Application/). `crates/engine/src/tests/script_dom_prefs.rs`. - Scripts: `Document.pathItems` lists the paths and makes rectangles, rounded rectangles, ellipses, polygons, stars and empty paths with the defaults the help page https://ai-scripting.docsforadobe.dev/jsobjref/PathItems/ gives; each path's points, closed state, fill rule, area, length, guide state, selected points, fill and stroke colors, stroke options and transforms read and change as https://ai-scripting.docsforadobe.dev/jsobjref/PathItem/, https://ai-scripting.docsforadobe.dev/jsobjref/PathPoints/ and https://ai-scripting.docsforadobe.dev/jsobjref/PathPoint/ describe them, and `RGBColor`, `CMYKColor`, `GrayColor`, `LabColor` and `NoColor` make colors (`docs/mcp.md`). `pathItems["name"]` reads a path by name as `pageItems` does, and `removeAll()` deletes nothing and throws when any path is on a locked artboard. A path takes the page item transforms, and `resize` also sets its stroke weight to a `changeLineWidths` percent from 0 to 100000 (at most 1000 points; a member of a compound sets the compound's stroke); gradients move with positions, so a `changeFillGradients` different from `changePositions` throws an error, as do `changeFillPatterns` and `changeStrokePattern` given as different values (`docs/mcp.md` lists these limits). Gradient stops are not there yet. A `PathPoint` of a path in an Objects on Path group goes stale when an edit of another path in the group moves it. `crates/engine/src/tests/script_dom_paths.rs`. - Scripts: `Document.placedItems` and `Document.rasterItems` list a document's linked and embedded images; `placedItems.add()` with a `File` assigned to `file` places an image linked, and `PlacedItem.relink(file)` and `embed()` relink and embed it, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PlacedItems/, https://ai-scripting.docsforadobe.dev/jsobjref/PlacedItem/, https://ai-scripting.docsforadobe.dev/jsobjref/RasterItems/ and https://ai-scripting.docsforadobe.dev/jsobjref/RasterItem/ describe them. A raster item's bits per channel, channels, color space and transparency come from its encoded pixels' header. Only files the script may read, of at most 256 MiB and holding an image, are placed or relinked. Rasterizing and capturing are not there yet. `crates/engine/src/tests/script_dom_images.rs`. - - Scripts: `PlacedItem.trace()` and `RasterItem.trace()` make an Image Trace object and return it as a `PluginItem` whose `tracing` gives its path, anchor and color counts, the source image's resolution, `expandTracing()`, `releaseTracing()` and its `TracingOptions`; assigning an option or loading a preset traces it again, except that the view options (`viewRaster` and `viewVector`) only change the view, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PluginItem/, https://ai-scripting.docsforadobe.dev/jsobjref/TracingObject/ and https://ai-scripting.docsforadobe.dev/jsobjref/TracingOptions/ describe them. Option values are checked for type and range before any trace, a script cannot save a preset, and the options without a VectorCraft setting throw. Tracing again and `releaseTracing()` throw, with nothing changed, when the tracing holds added artwork, an opacity mask on the tracing or on an object the trace made included; the source image keeps its own mask. The source image of a traced item is left out of `pageItems`, `placedItems` and `rasterItems`; a script reaches it through `PluginItem.tracing.sourceArt`. Renaming an ordinary group that holds an image first to `Image Trace`, or moving or duplicating an image to the bottom of an ordinary group with that name, throws an error. `crates/engine/src/tests/script_dom_tracing.rs`. + - Scripts: `PlacedItem.trace()` and `RasterItem.trace()` make an Image Trace object and return it as a `PluginItem` whose `tracing` gives its path, anchor and color counts, the source image's resolution, `expandTracing()`, `releaseTracing()` and its `TracingOptions`; assigning an option or loading a preset traces it again, except that the view options (`viewRaster` and `viewVector`) only change the view, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PluginItem/, https://ai-scripting.docsforadobe.dev/jsobjref/TracingObject/ and https://ai-scripting.docsforadobe.dev/jsobjref/TracingOptions/ describe them. Option values are checked for type and range before any trace, a script cannot save a preset, and the options without a VectorCraft setting throw. Tracing again and `releaseTracing()` throw, with nothing changed, when the tracing holds added artwork, an opacity mask on the tracing or on an object the trace made included; the source image keeps its own mask. A tracing saved without `made` is checked only for artwork added during the same run, so tracing it again or releasing it discards artwork that was added before the run without an error, and the opacity mask check applies with or without `made`. The source image of a traced item is left out of `pageItems`, `placedItems` and `rasterItems`; a script reaches it through `PluginItem.tracing.sourceArt`. Renaming an ordinary group that holds an image first to `Image Trace`, or moving or duplicating an image to the bottom of an ordinary group with that name, throws an error. `crates/engine/src/tests/script_dom_tracing.rs`. - Scripts: a document's `default*` members (https://ai-scripting.docsforadobe.dev/jsobjref/Document/) read and set the fill, stroke and stroke options of the next object drawn through `appearance.setNewArt`, leaving the selection and its art as they were, and `scaleFactor` reads 1 (`docs/mcp.md`). `crates/engine/src/tests/script_dom_defaults.rs`. - Scripts: `app.undo()` and `app.redo()` undo and redo the edits the run made, and each document open before and after the run that it changed gets one undo step. `crates/engine/src/tests/script_dom.rs`. - Scripts: `document.textFrames` makes point type, area type and type on a path, and each text frame gives its kind, its contents, its text as text ranges with their characters, words and paragraphs (which can add text), their character attributes (size, leading, tracking, baseline shift, scales, rotation, underline, strikethrough, font) and paragraph attributes (alignment, indents, space before and after), outlines and point and area conversion; `app.textFonts` lists the fonts, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItems/, https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItem/, https://ai-scripting.docsforadobe.dev/jsobjref/TextRange/ and https://ai-scripting.docsforadobe.dev/jsobjref/TextFonts/ describe them (`docs/mcp.md`). Offsets count UTF-16 units, VectorCraft's own rule. Lines, tab stops and colors are not there yet. `crates/engine/src/tests/script_text.rs`. From dbffe7a76c8cb5f2360b086106cb9164a28b12f3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 01:43:30 -0800 Subject: [PATCH 12/24] Dependencies: move the craft-libs pin to 0582d506 Move every craft-libs dependency from 77ade517 to 0582d506, which is craft-libs main at 13198740 (with storytold/craft-libs#5272) plus storytold/craft-libs#5281. Take the egui fork at 399fc6e0 and the winit fork at 3fd7ae64, the revisions craft-libs pins. The winit fork no longer pulls in wayland-protocols-plasma. Adjust VectorCraft to the new framework behavior: - The Unsaved Changes question opens on the dialog host as a HostedUnsavedChangesDialog. - The drag session now resolves a release against the targets of the release pass and delivers the drop in the next pass. The canvas no longer drops art released over a pane itself in that pass, which copied the art twice. - Files the person drops in a pass that carries injected input stay confined to the automation roots in the pass that delivers them. - Dragging art over another document's tab and back to its own canvas moves it again: craft-libs#5281 keeps the drag session running when the source canvas shows again. --- Cargo.lock | 215 ++++++++---------- Cargo.toml | 102 ++++----- apps/vectorcraft-web/Cargo.toml | 2 +- crates/ui-egui/src/app.rs | 20 +- crates/ui-egui/src/app/tests.rs | 6 +- crates/ui-egui/src/canvas/drops.rs | 28 +-- crates/ui-egui/src/canvas/panes.rs | 15 -- crates/ui-egui/src/canvas/tool_adapter.rs | 15 +- crates/ui-egui/src/chrome/tests.rs | 2 +- crates/ui-egui/src/doc_windows.rs | 8 +- crates/ui-egui/src/lib.rs | 3 + .../src/panels/actions/tests_playback.rs | 6 +- crates/ui-egui/src/tests/automation.rs | 26 ++- crates/ui-egui/src/unsaved.rs | 14 +- xtask/src/pdf_deps.rs | 2 +- 15 files changed, 219 insertions(+), 245 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be4b734a08..88c3669dfb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1231,7 +1231,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-automation", "craft-behavior", @@ -1272,7 +1272,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "crc32fast", "flate2", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1295,7 +1295,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "rustix 1.1.6", ] @@ -1303,7 +1303,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1328,11 +1328,12 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "accesskit", "bitflags 2.13.2", "craft-host", + "craft-i18n", "craft-keymap", "craft-theme", "craft-tracked", @@ -1346,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-docpath", @@ -1364,7 +1365,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "crc32fast", "flate2", @@ -1373,7 +1374,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "egui", ] @@ -1381,7 +1382,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "md-5", "rayon", @@ -1390,12 +1391,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-cms", @@ -1415,7 +1416,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-control-protocol", "craft-platform", @@ -1426,7 +1427,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1436,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "rayon", ] @@ -1444,7 +1445,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1470,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "blake3", "craft-ecproj-format", @@ -1486,7 +1487,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "serde", ] @@ -1494,7 +1495,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1513,7 +1514,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-codepage", "encoding_rs", @@ -1525,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "serde", "serde_json", @@ -1535,12 +1536,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1555,7 +1556,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1574,7 +1575,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1583,7 +1584,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "cap-primitives", "craft-atomic", @@ -1606,12 +1607,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "gif", ] @@ -1619,7 +1620,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "flate2", ] @@ -1627,7 +1628,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1640,7 +1641,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1670,7 +1671,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-dds", "craft-jpeg", @@ -1697,7 +1698,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1715,7 +1716,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "thiserror 2.0.21", ] @@ -1723,7 +1724,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1734,7 +1735,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-host", "craft-i18n", @@ -1749,7 +1750,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-i18n", @@ -1763,7 +1764,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-host", @@ -1781,7 +1782,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1793,7 +1794,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "encoding_rs", "image", @@ -1804,7 +1805,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "chrono", "craft-codepage", @@ -1814,7 +1815,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "uds_windows", "winsafe", @@ -1823,7 +1824,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-keymap", @@ -1839,7 +1840,7 @@ dependencies = [ [[package]] name = "craft-pbr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-texture", "thiserror 2.0.21", @@ -1848,7 +1849,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "flate2", "serde", @@ -1859,7 +1860,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1871,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "async-channel", "async-io", @@ -1904,7 +1905,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1913,7 +1914,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-host", @@ -1937,7 +1938,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1948,7 +1949,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-eps", "flate2", @@ -1962,7 +1963,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "encoding_rs", "flate2", @@ -1973,7 +1974,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "dispatch2", "egui", @@ -1986,7 +1987,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2005,7 +2006,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-atomic", "craft-host", @@ -2022,7 +2023,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "fax", "hayro-ccitt", @@ -2033,7 +2034,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2054,7 +2055,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-keymap", @@ -2066,7 +2067,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2091,7 +2092,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "thiserror 2.0.21", ] @@ -2099,7 +2100,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2114,7 +2115,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-atomic", "craft-behavior", @@ -2129,7 +2130,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "serde", "thiserror 2.0.21", @@ -2139,7 +2140,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "serde", "thiserror 2.0.21", @@ -2148,7 +2149,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-keymap", @@ -2163,12 +2164,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2182,7 +2183,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2199,7 +2200,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "accesskit", "craft-behavior", @@ -2237,7 +2238,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2248,7 +2249,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-host", @@ -2266,7 +2267,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-host", @@ -2287,7 +2288,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-host", @@ -2308,7 +2309,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-behavior", "craft-host", @@ -2327,7 +2328,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "base64 0.22.1", "chrono", @@ -2359,7 +2360,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "flate2", "serde", @@ -2370,7 +2371,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2380,7 +2381,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "js-sys", "serde_json", @@ -2391,7 +2392,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "winsafe", ] @@ -2399,7 +2400,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "craft-appkit", "craft-atomic", @@ -2431,7 +2432,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2776,7 +2777,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "bytemuck", "emath", @@ -2809,7 +2810,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "ahash", "bytemuck", @@ -2844,7 +2845,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "accesskit", "ahash", @@ -2863,7 +2864,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "ahash", "bytemuck", @@ -2882,7 +2883,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "accesskit_winit", "arboard", @@ -2908,7 +2909,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "ahash", "egui", @@ -2922,7 +2923,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "bytemuck", "egui", @@ -2935,7 +2936,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "dify", "eframe", @@ -2961,7 +2962,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "bytemuck", ] @@ -3042,7 +3043,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "ahash", "bytemuck", @@ -3068,7 +3069,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6" +source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -3791,7 +3792,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3800,7 +3801,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3818,7 +3819,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3836,12 +3837,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "flate2", "hayro-ccitt", @@ -4824,7 +4825,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "base64 0.22.1", "bumpalo", @@ -4981,7 +4982,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" dependencies = [ "arrayvec", "kurbo 0.13.1", @@ -9559,19 +9560,6 @@ dependencies = [ "wayland-scanner", ] -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" -dependencies = [ - "bitflags 2.13.2", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - [[package]] name = "wayland-protocols-wlr" version = "0.3.12" @@ -10115,7 +10103,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" version = "0.30.13" -source = "git+https://github.com/storytold/winit.git?rev=0dfcec0eb62fda5904137a63a6dd0c3d83295f45#0dfcec0eb62fda5904137a63a6dd0c3d83295f45" +source = "git+https://github.com/storytold/winit.git?rev=3fd7ae64762f82a73b78bd24f453f82c4291067d#3fd7ae64762f82a73b78bd24f453f82c4291067d" dependencies = [ "ahash", "android-activity", @@ -10154,7 +10142,6 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols", - "wayland-protocols-plasma", "web-sys", "web-time", "windows-sys 0.52.0", diff --git a/Cargo.toml b/Cargo.toml index 7dab0c8895..04f8f61df2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,53 +10,53 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with. -craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -196,22 +196,22 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -ecolor = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -emath = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -epaint = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -egui = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -egui-winit = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -egui_glow = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -egui_extras = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } -winit = { git = "https://github.com/storytold/winit.git", rev = "0dfcec0eb62fda5904137a63a6dd0c3d83295f45" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +ecolor = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +emath = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +epaint = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +egui = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +egui-winit = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +egui_glow = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +egui_extras = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } +winit = { git = "https://github.com/storytold/winit.git", rev = "3fd7ae64762f82a73b78bd24f453f82c4291067d" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 70aae32f73..d643b63432 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -28,7 +28,7 @@ egui_extras = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 0448534fda..0d31ae0598 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -286,6 +286,7 @@ impl VectorcraftApp { prefs_changed: false, touch_screen: false, automation_roots: None, + confined_drop: None, pending_plugin_install: None, pending_profile_open: None, queued_profile_opens: Default::default(), @@ -343,9 +344,19 @@ impl VectorcraftApp { } /// The folders this pass may read and write: the automation roots while the pass carries - /// input the control channel injected, anywhere otherwise. + /// input the control channel injected, or delivers files the OS dropped in such a pass; + /// anywhere otherwise. fn automation_scope(&self, ctx: &egui::Context) -> Option> { - WindowHost::of(ctx).injected_pass().then(|| self.automation_roots.clone()).flatten() + let delivers = self.confined_drop.is_some_and(|last| ctx.cumulative_frame_nr_for(egui::ViewportId::ROOT) <= last); + (WindowHost::of(ctx).injected_pass() || delivers).then(|| self.automation_roots.clone()).flatten() + } + + /// Notes files the OS dropped in a pass that carries injected input: the drag session delivers + /// them in the next root frame, which [`Self::automation_scope`] confines too. + fn note_confined_drop(&mut self, ctx: &egui::Context) { + if WindowHost::of(ctx).injected_pass() && ctx.input(|i| !i.raw.dropped_files.is_empty()) { + self.confined_drop = Some(ctx.cumulative_frame_nr_for(egui::ViewportId::ROOT) + 1); + } } } @@ -688,10 +699,6 @@ impl VectorcraftApp { let Ok(mut app) = app.try_borrow_mut() else { return }; let app: &mut VectorcraftApp = &mut app; app.canvas.windows.area = Some(ui.available_rect_before_wrap()); - // Only the shown pass starts the frame's panes: a measuring run before it would drop the last frame's. - if !craft::ui::runtime::measure::active(ui.ctx()) { - app.canvas.windows.last_noted = std::mem::take(&mut app.canvas.windows.noted); - } let floats = crate::doc_windows::current_floats(app); // The current window's body is in its floating window, drawn after this pane: the pane's drop catcher // waits for it ([`crate::doc_windows::show`]). @@ -727,6 +734,7 @@ impl VectorcraftApp { self.perf.early_events_ms = 0.0; } self.adopt_context(&ctx); + self.note_confined_drop(&ctx); let confined = self.automation_scope(&ctx); if let Err(msg) = file_access::confine(confined.as_ref(), || { vectorcraft_engine::guard::catch_panic(|| { diff --git a/crates/ui-egui/src/app/tests.rs b/crates/ui-egui/src/app/tests.rs index 5fc18fc50a..a3682de34c 100644 --- a/crates/ui-egui/src/app/tests.rs +++ b/crates/ui-egui/src/app/tests.rs @@ -1,7 +1,7 @@ use std::cell::RefCell; use std::rc::Rc; -use craft::ui::dialog::UnsavedChangesDialog; +use craft::ui::dialog::HostedUnsavedChangesDialog; use craft::ui::shell::embed::{self, CloseDecision}; use craft::ui::testing::Fixture; use serde_json::json; @@ -57,9 +57,9 @@ fn close_frame(app: &mut VectorcraftApp, ctx: &egui::Context) -> Option bool { - app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::().is_some())) + app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::().is_some())) } /// The window's close asks about unsaved documents instead of closing the window: with a modified diff --git a/crates/ui-egui/src/canvas/drops.rs b/crates/ui-egui/src/canvas/drops.rs index 1200db46de..e110f3a85a 100644 --- a/crates/ui-egui/src/canvas/drops.rs +++ b/crates/ui-egui/src/canvas/drops.rs @@ -213,16 +213,11 @@ impl Component for CanvasDrops<'_> { /// the carry it catches: the pane's area is noted instead. pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut Ui, win: Win, kind: BodyKind) { let rect = ui.max_rect(); - if kind == BodyKind::Pane { - if let Some(later) = &mut app.canvas.panes.drops { - later.push((win, rect, ui.layer_id())); - return; - } - // A pane outside Tile (a floating window's, the main window's while the current window floats), as shown: a - // measuring run's area is not where it draws. - if !craft::ui::runtime::measure::active(ui.ctx()) { - app.canvas.windows.noted.push((win, rect)); - } + if kind == BodyKind::Pane + && let Some(later) = &mut app.canvas.panes.drops + { + later.push((win, rect, ui.layer_id())); + return; } let view = match kind { BodyKind::Live => app.canvas_view(), @@ -230,7 +225,7 @@ pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut Ui, win: Win, kind: BodyKi }; let (Some(view), Some((document, reverts))) = (view, app.session.documents().get(win.0).map(|d| (d.uid, d.reverts))) else { return }; let contents = app.session.documents().iter().map(|d| (d.uid, d.reverts)).collect(); - let sources = app.session.documents().iter().map(|d| (d.uid, d.revision)).chain(app.canvas.panes.released_from).collect(); + let sources = app.session.documents().iter().map(|d| (d.uid, d.revision)).collect(); // A tab rest leaves the art to the document it showed while that is the current one: any canvas or pane takes it // then, and nothing once that document was closed or left by other means. let current = app.session.active().map(|d| d.uid); @@ -280,17 +275,6 @@ pub(crate) fn drop_on_pane(app: &mut VectorcraftApp, win: Win, drop: &Dropped) { } } -/// Art carried off the canvas and released at `at` (screen) over a pane this pass noted, or a pane outside Tile the -/// last frame drew (the front one first), in the frame the pointer reached it, before the pane could take it as a drop: -/// the pane's window and the drop there. -pub(crate) fn released_on_pane(app: &VectorcraftApp, art: CarriedArt, at: Pos2, op: DropOperation) -> Option<(Win, Dropped)> { - let outside = app.canvas.windows.last_noted.iter().rev(); - let waiting = app.canvas.panes.drops.iter().flatten().rev().map(|(win, rect, _)| (*win, *rect)); - let (win, rect) = outside.copied().chain(waiting).find(|(_, rect)| rect.contains(at))?; - let view = pane_view(app, win, rect)?; - Some((win, Dropped { payload: Payload::Art(art), at: view.to_doc(at), zoom: view.zoom, op })) -} - /// Starts carrying the art of a Selection, Direct Selection or Group Selection move that left the canvas, handing it /// to the drag session. Moves of anchors or segments stay reshapes. `covered`: another window is over the canvas at the /// pointer. → whether a carry runs. diff --git a/crates/ui-egui/src/canvas/panes.rs b/crates/ui-egui/src/canvas/panes.rs index 2fff6194da..0a7b906a4c 100644 --- a/crates/ui-egui/src/canvas/panes.rs +++ b/crates/ui-egui/src/canvas/panes.rs @@ -101,11 +101,6 @@ pub struct Panes { /// panes drawn so far, by window, with their layers. Their drop catchers show after the current window's body /// ([`super::drops::show`]). pub(crate) drops: Option>, - /// Art released over a pane in the frame the pointer reached it, applied after the current window's body. - pub(crate) released: Option<(Win, super::drops::Dropped)>, - /// The `(uid, revision)` of the document whose carried art was released this pass, before the release gave up its - /// move: the drop catchers that run after the release still take that art. - pub(crate) released_from: Option<(u64, u64)>, } impl Panes { @@ -387,7 +382,6 @@ pub(crate) fn tiled_area(app: &mut VectorcraftApp, ui: &mut Ui) -> bool { show_body(app, ui, w, cell, BodyKind::Live); } catch_waiting(app, ui); - drop_released(app); note_fits(app, &areas, &unfitted); }); let activated = split.output.activated; @@ -400,15 +394,6 @@ pub(crate) fn tiled_area(app: &mut VectorcraftApp, ui: &mut Ui) -> bool { true } -/// Drops the art released over a pane in the frame the pointer reached it ([`super::drops::released_on_pane`]), once -/// the panes that could have taken it as a drop have drawn. -pub(crate) fn drop_released(app: &mut VectorcraftApp) { - app.canvas.panes.released_from = None; - if let Some((w, drop)) = app.canvas.panes.released.take() { - super::drops::drop_on_pane(app, w, &drop); - } -} - /// Shows the drop catchers of the panes that waited ([`super::drops::show`]) for the current window's body, whose tool /// may start the carry they catch. pub(crate) fn catch_waiting(app: &mut VectorcraftApp, ui: &mut Ui) { diff --git a/crates/ui-egui/src/canvas/tool_adapter.rs b/crates/ui-egui/src/canvas/tool_adapter.rs index 34ef127f95..58e735257e 100644 --- a/crates/ui-egui/src/canvas/tool_adapter.rs +++ b/crates/ui-egui/src/canvas/tool_adapter.rs @@ -3,7 +3,7 @@ use std::cell::{Cell, RefCell, RefMut}; -use craft::behavior::{CancelReason, CanvasView, Cursor, DropOperation, PointerKind as Device, PressPhase}; +use craft::behavior::{CancelReason, CanvasView, Cursor, PointerKind as Device, PressPhase}; use craft::keymap::{Chord, Key}; use craft::ui::canvas::ToolPath; use craft::ui::canvas::{ @@ -362,19 +362,14 @@ impl CanvasTool for SessionTool<'_> { // The press ends where it went up, with the keys held at its release. let up = self.at_release(pointer, pointer_event(PointerKind::Up, pointer, cx)); let covered = self.covered(pointer); - let carried = super::drops::carried(&self.app(), cx, pointer, covered); - self.app().canvas.panes.released_from = carried.as_ref().map(|art| (art.document, art.revision)); - let given_up = cx.over_drop_target() || carried.is_some(); + // Carried art released off the canvas goes to the target the drag session resolves in this pass, a pane drawn + // later in the pass included: the session delivers the drop in the next pass. + let carried = super::drops::carried(&self.app(), cx, pointer, covered).is_some(); + let given_up = cx.over_drop_target() || carried; if given_up { // The art goes to the drop target, or nowhere off the canvas: the move is given up where it started. let _ = self.app().session.cancel_interaction(); } - if let Some(art) = carried.filter(|_| !cx.over_drop_target()) { - // Released over a pane in the frame the pointer reached it: no target could take it yet. - let op = if up.mods.alt { DropOperation::Copy } else { DropOperation::Move }; - let mut app = self.app(); - app.canvas.panes.released = super::drops::released_on_pane(&app, art, pointer.pos, op); - } self.app().canvas.grab = None; // When the pointer moved or the keys changed since the drag's last move, the tool gets a move where the press went // up first, as it does while held: the last move of the release's pass still sizes the shape, and Shift pressed in diff --git a/crates/ui-egui/src/chrome/tests.rs b/crates/ui-egui/src/chrome/tests.rs index fb3032d235..f998f80668 100644 --- a/crates/ui-egui/src/chrome/tests.rs +++ b/crates/ui-egui/src/chrome/tests.rs @@ -528,7 +528,7 @@ fn the_title_bars_close_button_closes_the_window() { .textures_delta .clear(); assert_eq!(decision, Some(craft::ui::shell::embed::CloseDecision::Hold), "the modified document keeps the window open"); - let asks = app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::().is_some())); + let asks = app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::().is_some())); assert!(asks, "the close asks about the modified document"); } diff --git a/crates/ui-egui/src/doc_windows.rs b/crates/ui-egui/src/doc_windows.rs index eb4e0b6522..4a03a9e0ca 100644 --- a/crates/ui-egui/src/doc_windows.rs +++ b/crates/ui-egui/src/doc_windows.rs @@ -131,10 +131,6 @@ pub struct Windows { known: Vec, /// The documents' views beyond the one each shows ([`views`]). pub(crate) views: Views, - /// The panes drawn outside Tile in this frame so far (the floating windows', the main window's while the current - /// window floats), back to front, with the art area each takes drops in; and those of the last frame. - pub(crate) noted: Vec<(Win, egui::Rect)>, - pub(crate) last_noted: Vec<(Win, egui::Rect)>, /// The main window's density and the floating windows' ([`floating_ppi`]) when the views were /// last settled each frame ([`VectorcraftApp::settle_screen_ppi_if_changed`]). pub(crate) settled: Option<(crate::ScreenPpi, Vec)>, @@ -373,12 +369,10 @@ pub(crate) fn focus_main_window(app: &VectorcraftApp, ctx: &egui::Context) { } /// Draw the floating document windows, after the main window's canvas, then the drop catcher of the main window's -/// pane, which waited for the current window's body. Call once per frame from the main window. Art released over a -/// pane in the frame the pointer reached it drops there then. +/// pane, which waited for the current window's body. Call once per frame from the main window. pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut egui::Ui) { show_windows(app, ui); crate::canvas::panes::catch_waiting(app, ui); - crate::canvas::panes::drop_released(app); } /// [`show`]'s windows. diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 66583823b3..aa9d6b1715 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -343,6 +343,9 @@ pub struct VectorcraftApp { /// (`--automation-read-root`, `--automation-write-root`); `None`: anywhere. See /// [`Self::with_automation_roots`]. automation_roots: Option>, + /// The last root frame of a drop of files the OS made in a pass that carried injected input: the drag session + /// delivers that drop in the next frame, which [`Self::ui`] confines to the automation roots as well. + confined_drop: Option, /// The plug-in install the approval dialog asks about, kept out of the dialog's fields, which /// `ui.dialog.set` writes. pub(crate) pending_plugin_install: Option, diff --git a/crates/ui-egui/src/panels/actions/tests_playback.rs b/crates/ui-egui/src/panels/actions/tests_playback.rs index d81c005ef1..635e04c551 100644 --- a/crates/ui-egui/src/panels/actions/tests_playback.rs +++ b/crates/ui-egui/src/panels/actions/tests_playback.rs @@ -2,7 +2,7 @@ use super::tests_support::*; use super::*; use craft::automation::actions::{Action, ActionList, ActionStep}; use craft::quit::CloseAnswer; -use craft::ui::dialog::{DialogHost, UnsavedChangesDialog}; +use craft::ui::dialog::{DialogHost, HostedUnsavedChangesDialog}; use vectorcraft_engine::Session; /// The list index of the first action of the first set: the action the fixtures build and these tests edit. @@ -507,8 +507,8 @@ fn closing_the_playing_document_ends_a_paced_playback() { let close = |app: &mut VectorcraftApp, p: Value| { assert_eq!(app.run("file.close", p).unwrap(), json!({"pending": crate::unsaved::KIND})); on_host(app, |host, ctx| { - host.get_mut::().unwrap().set_answer(CloseAnswer::DontSave); - host.confirm::(ctx) + host.get_mut::().unwrap().set_answer(CloseAnswer::DontSave); + host.confirm::(ctx) }); }; // Step by Step, the only document closed: no document is active when the next step is due. diff --git a/crates/ui-egui/src/tests/automation.rs b/crates/ui-egui/src/tests/automation.rs index ac619939fe..b8798e6cfa 100644 --- a/crates/ui-egui/src/tests/automation.rs +++ b/crates/ui-egui/src/tests/automation.rs @@ -569,6 +569,21 @@ fn control_render_draws_the_trace_view_with_trace_views() { /// file the person drops outside them is refused in it, and opened in the passes after. #[test] fn a_pass_with_injected_input_runs_inside_the_roots() { + // A key is injected as a press and, in the next pass, its release. + drop_in_an_injected_pass_is_confined("ui.key", json!({"key": "Escape"})); +} + +/// Text is injected in one pass: the drag session delivers a drop of files made in that pass in the +/// next one, which carries no injected input, and the drop is still refused. +#[test] +fn a_drop_in_a_pass_with_one_step_of_injected_input_is_confined_when_delivered() { + drop_in_an_injected_pass_is_confined("ui.text", json!({"text": "a"})); +} + +/// Injects `method` with `params`, has the person drop a file outside the automation roots in the +/// same pass, and checks that the drop opens nothing, then that a later drop of the person's opens +/// the file. +fn drop_in_an_injected_pass_is_confined(method: &str, params: Value) { #[derive(Debug)] struct Dropped(PathBuf); impl egui::DroppedFile for Dropped { @@ -579,7 +594,7 @@ fn a_pass_with_injected_input_runs_inside_the_roots() { std::fs::read(&self.0).map_err(|e| e.to_string()) } } - let (mut app, tx, base) = confined("synthetic"); + let (mut app, tx, base) = confined(&format!("synthetic-{method}")); let ctx = crate::testing::ui_context(); let outside = base.join("outside/b.svg"); // The OS holds the file over the window in the pass before it drops it (`hovered`), as a desktop drag does. @@ -595,15 +610,18 @@ fn a_pass_with_injected_input_runs_inside_the_roots() { app.session.documents().len() }; pass(&mut app, true, false); - let (req, _reply) = ControlRequest::new("ui.key", json!({"key": "Escape"})); + let (req, _reply) = ControlRequest::new(method, params); tx.send(req).unwrap(); app.run_control(&ctx); - assert_eq!(pass(&mut app, false, true), 0, "the pass carrying the key is confined"); + pass(&mut app, false, true); + // The drag session delivers a drop of files in the pass after the one the OS dropped them in. + assert_eq!(pass(&mut app, false, false), 0, "{method}: the drop of the pass carrying the input is confined"); for _ in 0..4 { pass(&mut app, false, false); } pass(&mut app, true, false); - assert_eq!(pass(&mut app, false, true), 1, "the person's pass is not"); + pass(&mut app, false, true); + assert_eq!(pass(&mut app, false, false), 1, "{method}: the person's pass is not"); let _ = std::fs::remove_dir_all(base); } diff --git a/crates/ui-egui/src/unsaved.rs b/crates/ui-egui/src/unsaved.rs index 9d5a7230a0..b917483a72 100644 --- a/crates/ui-egui/src/unsaved.rs +++ b/crates/ui-egui/src/unsaved.rs @@ -3,13 +3,13 @@ //! question per document); Cancel stops the whole operation and a cancelled Save As keeps the //! document open. //! -//! The question is the framework's `UnsavedChangesDialog` on the dialog host, and a `CloseGuard` +//! The question is the framework's `HostedUnsavedChangesDialog` on the dialog host, and a `CloseGuard` //! (`VectorcraftApp::closing`) decides what comes next. Agents answer it like any other dialog: //! `ui.dialog.set {field: "choice", value: "dontSave"}` then `ui.dialog.confirm`, or //! `ui.dialog.cancel`. [`pump`] reads the answer each frame. use craft::quit::{CloseAnswer, CloseGuard, CloseScope, GuardStep}; -use craft::ui::dialog::UnsavedChangesDialog; +use craft::ui::dialog::{HostedUnsavedChangesDialog, UnsavedChangesDialog}; use serde_json::{Value, json}; use vectorcraft_engine::cmd::fileio::SaveMode; @@ -137,7 +137,7 @@ fn show_question(app: &mut VectorcraftApp, guard: &CloseGuard, uid: u64) -> // PLAN: assumed `VectorcraftApp::dialogs() -> Option` whose `with(|host: &mut DialogHost| ..)` runs on the host (wg.S1). let dialogs = app.dialogs().ok_or("no window")?; dialogs.with(|h| { - h.open(UnsavedChangesDialog::new(scope, name).remaining(remaining)); + h.open(HostedUnsavedChangesDialog::new(UnsavedChangesDialog::new(scope, name).remaining(remaining))); }); Ok(()) } @@ -190,7 +190,7 @@ pub(crate) fn pump(app: &mut VectorcraftApp, ctx: &egui::Context) { ctx.request_repaint(); return; } - let Some(result) = app.dialogs().and_then(|d| d.with(|h| h.take::())) else { return }; + let Some(result) = app.dialogs().and_then(|d| d.with(|h| h.take::())) else { return }; let Some(mut closing) = app.closing.take() else { return }; // Closed from outside: the same as Cancel. let (answer, all) = result.ok().map_or((CloseAnswer::Cancel, false), |a| (a.answer, a.apply_to_all)); @@ -334,14 +334,14 @@ mod tests { } fn question_open(app: &VectorcraftApp) -> bool { - app.dialogs().is_some_and(|d| d.with(|h| h.is_open::())) + app.dialogs().is_some_and(|d| d.with(|h| h.is_open::())) } /// Answers the open question on the host as its button would, then runs the pump. fn answer(app: &mut VectorcraftApp, ctx: &egui::Context, answer: CloseAnswer) { app.dialogs().unwrap().with(|h| { - h.get_mut::().unwrap().set_answer(answer); - assert!(h.confirm::(ctx), "a question is open"); + h.get_mut::().unwrap().set_answer(answer); + assert!(h.confirm::(ctx), "a question is open"); }); pump(app, ctx); } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 542a3e8c41..b366bd402e 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6"; +const REV: &str = "0582d506c494c7bf5280d952f36e60f325f85855"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 6b0ca1faea8e1f5473dad50f771df5f93a2ba27f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 10:04:00 -0800 Subject: [PATCH 13/24] Dependencies: move the craft-libs pin to craft-libs main (33966c68) Every craft-libs dependency moves from 0582d506, the head of storytold/craft-libs#5281, to craft-libs main at 33966c68. The egui and winit forks stay at the revisions craft-libs pins (399fc6e0, 3fd7ae64). - Art dragged off the canvas: craft-libs main still ends the drag session when the tool host cancels a press whose canvas was hidden for a pass, so art dragged over another document's tab and back to its own canvas was not moved. The canvas now starts that session again while the button is held. storytold/craft-libs#5281 keeps the session running; the canvas code goes with the pin bump that takes it. - Floating panels: with storytold/craft-libs#4739 in the pin, WindowHost::viewports_at skips minimized and hidden windows, so os_window_at drops its own minimized check. It keeps the check for an open dialog: the palette windows hide a few passes after the dialog opens. - Tests: the hidden-palette test waits the pass in which the palettes show again after the dialog closes. The Gradient panel's swatch-drop tests show the Gradient panel over the Swatches panel, which fills the room under it. --- Cargo.lock | 178 +++++++++--------- Cargo.toml | 78 ++++---- apps/vectorcraft-web/Cargo.toml | 2 +- crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/caches.rs | 3 + crates/ui-egui/src/canvas/tool_adapter.rs | 33 ++++ crates/ui-egui/src/panel_docking.rs | 12 +- .../ui-egui/src/panel_docking/native_tests.rs | 3 +- crates/ui-egui/src/panels/gradient/tests.rs | 5 +- xtask/src/pdf_deps.rs | 2 +- 10 files changed, 176 insertions(+), 141 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 481ddc46b4..bebe9fbea2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1231,7 +1231,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-automation", "craft-behavior", @@ -1273,7 +1273,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "crc32fast", "flate2", @@ -1294,7 +1294,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1306,7 +1306,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "rustix 1.1.6", ] @@ -1314,7 +1314,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-docpath", @@ -1376,7 +1376,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "crc32fast", "flate2", @@ -1385,7 +1385,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "egui", ] @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "md-5", "rayon", @@ -1402,12 +1402,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-cms", @@ -1427,7 +1427,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-ai-agents", "craft-atomic", @@ -1443,7 +1443,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "rayon", ] @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1487,7 +1487,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "blake3", "craft-ecproj-format", @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "serde", ] @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1530,7 +1530,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-codepage", "encoding_rs", @@ -1542,7 +1542,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "serde", "serde_json", @@ -1552,12 +1552,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" [[package]] name = "craft-flags" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-atomic", "dirs", @@ -1567,7 +1567,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1582,7 +1582,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1601,7 +1601,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1610,7 +1610,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "cap-primitives", "craft-atomic", @@ -1633,12 +1633,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "gif", ] @@ -1646,7 +1646,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "flate2", ] @@ -1654,7 +1654,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1667,7 +1667,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1697,7 +1697,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-dds", "craft-jpeg", @@ -1724,7 +1724,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1742,7 +1742,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "thiserror 2.0.21", ] @@ -1750,7 +1750,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1761,7 +1761,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-host", "craft-i18n", @@ -1776,7 +1776,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-i18n", @@ -1790,7 +1790,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-host", @@ -1808,7 +1808,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1820,7 +1820,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "encoding_rs", "image", @@ -1831,7 +1831,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "chrono", "craft-codepage", @@ -1841,7 +1841,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "uds_windows", "winsafe", @@ -1850,7 +1850,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-keymap", @@ -1866,7 +1866,7 @@ dependencies = [ [[package]] name = "craft-pbr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-texture", "thiserror 2.0.21", @@ -1875,7 +1875,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "flate2", "serde", @@ -1886,7 +1886,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1898,7 +1898,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "async-channel", "async-io", @@ -1931,7 +1931,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1940,7 +1940,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-host", @@ -1964,7 +1964,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1975,7 +1975,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-eps", "flate2", @@ -1989,7 +1989,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "encoding_rs", "flate2", @@ -2000,7 +2000,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "dispatch2", "egui", @@ -2013,7 +2013,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2032,7 +2032,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-atomic", "craft-host", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "fax", "hayro-ccitt", @@ -2060,7 +2060,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2081,7 +2081,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-keymap", @@ -2093,7 +2093,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2118,7 +2118,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "thiserror 2.0.21", ] @@ -2126,7 +2126,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2141,7 +2141,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-atomic", "craft-behavior", @@ -2156,7 +2156,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "serde", "thiserror 2.0.21", @@ -2166,7 +2166,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "serde", "thiserror 2.0.21", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-keymap", @@ -2190,12 +2190,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2209,7 +2209,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2226,7 +2226,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "accesskit", "craft-behavior", @@ -2264,7 +2264,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2275,7 +2275,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-host", @@ -2293,7 +2293,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-host", @@ -2314,7 +2314,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-host", @@ -2335,7 +2335,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-behavior", "craft-host", @@ -2354,7 +2354,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "base64 0.22.1", "chrono", @@ -2386,7 +2386,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "flate2", "serde", @@ -2397,7 +2397,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2407,7 +2407,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "js-sys", "serde_json", @@ -2418,7 +2418,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "winsafe", ] @@ -2426,7 +2426,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "craft-appkit", "craft-atomic", @@ -2458,7 +2458,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3818,7 +3818,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3827,7 +3827,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3845,7 +3845,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3863,12 +3863,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "flate2", "hayro-ccitt", @@ -4851,7 +4851,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "base64 0.22.1", "bumpalo", @@ -5008,7 +5008,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=0582d506c494c7bf5280d952f36e60f325f85855#0582d506c494c7bf5280d952f36e60f325f85855" +source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index 04f8f61df2..0b64d38e91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,53 +10,53 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with. -craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -196,13 +196,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } emath = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } epaint = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index d643b63432..7e941d727e 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -28,7 +28,7 @@ egui_extras = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "0582d506c494c7bf5280d952f36e60f325f85855", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index d100e8a79a..5868285c1c 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -167,6 +167,7 @@ impl VectorcraftApp { hover_object: None, grab: None, carry_target: None, + removed_press: false, last_drag: None, escaped_press: false, pressed_at: None, diff --git a/crates/ui-egui/src/caches.rs b/crates/ui-egui/src/caches.rs index d2809d5846..8d078b0864 100644 --- a/crates/ui-egui/src/caches.rs +++ b/crates/ui-egui/src/caches.rs @@ -126,6 +126,9 @@ pub struct CanvasCache { /// The uid of the document a tab rest showed while art carried off the canvas waits over it: only its canvas takes /// the art, so a target closed or left by other means carries nothing (`canvas::drops`). pub carry_target: Option, + /// The tool host ended the tool's press with a `Removed` cancel in this pass: the canvas was hidden for a pass, as + /// when art carried off it rests on another document's tab and comes back (`tool_adapter::resume_carry`). + pub removed_press: bool, /// The last drag the tool was sent and the screen point it was at: when the view scrolls under the held /// pointer, the drag goes on at that point in the scrolled view. pub last_drag: Option<(egui::Pos2, vectorcraft_tools::PointerEvent)>, diff --git a/crates/ui-egui/src/canvas/tool_adapter.rs b/crates/ui-egui/src/canvas/tool_adapter.rs index 58e735257e..ce5f9e808d 100644 --- a/crates/ui-egui/src/canvas/tool_adapter.rs +++ b/crates/ui-egui/src/canvas/tool_adapter.rs @@ -1,7 +1,9 @@ //! The document tool as the framework's `CanvasTool`: the pointer and key calls of the tool host go to the engine //! session, and what the session asks of the UI is applied here. +use std::any::Any; use std::cell::{Cell, RefCell, RefMut}; +use std::sync::Arc; use craft::behavior::{CancelReason, CanvasView, Cursor, PointerKind as Device, PressPhase}; use craft::keymap::{Chord, Key}; @@ -10,6 +12,9 @@ use craft::ui::canvas::{ Autoscroll, CanvasTool, Momentary, MomentaryCommands, MomentaryShift, ToolAction, ToolClaims, ToolContext, ToolHost, ToolHostResponse, ToolKey, ToolPass, ToolPointer, }; +use craft::ui::contract::DragPreview; +use craft::ui::runtime::drag; +use craft::ui::runtime::env::Env; use serde_json::json; use vectorcraft_engine::ViewInfo; use vectorcraft_geom::Point; @@ -412,6 +417,9 @@ impl CanvasTool for SessionTool<'_> { fn cancel(&mut self, reason: CancelReason, cx: &mut ToolContext<'_>) { let mut app = self.app(); + if reason == CancelReason::Removed { + app.canvas.removed_press = true; + } if app.ui.screen_mode == 3 { // The tool had no press of Presentation Mode's. app.canvas.last_drag = None; @@ -696,6 +704,8 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too app.canvas.keys_at = Some(ui.input(|i| i.time)); } let view_info = app.view_info(); + let carry = carried_session(ui.ctx()); + app.canvas.removed_press = false; let mut picked = ToolHostResponse::default(); let mut response = if crate::dialogs::recolor::edit_tab::with_theme_pick(app, |app, tool| picked = host_run(app, ui, pass, tool)) { picked @@ -728,6 +738,7 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too drop(tool); response }; + resume_carry(app, ui, pass, carry); // The framework ends a press at Escape; the engine's tool still takes the release that ends it. if app.canvas.escaped_press && !ui.input(|i| i.pointer.primary_down()) { app.canvas.escaped_press = false; @@ -776,6 +787,28 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too response } +/// The art a move carries off the canvas and what the panels see of it, while that drag session runs. +type Carry = (Arc, Arc); + +/// The drag session of art carried off the canvas, when one runs. +fn carried_session(ctx: &egui::Context) -> Option { + Some((drag::active::(ctx)?, drag::active::(ctx)?)) +} + +/// Starts the drag session `carry` again when the tool host ended it in this pass with the press's `Removed` cancel +/// while the button is still held. The canvas was hidden for a pass, as when the art rests on another document's tab +/// and comes back, and the release then drops the art where it lands. +// Workaround: storytold/craft-libs#5281 keeps the session running; remove this with the pin bump that takes it. +fn resume_carry(app: &mut VectorcraftApp, ui: &Ui, pass: &ToolPass, carry: Option) { + let removed = std::mem::take(&mut app.canvas.removed_press); + let Some((art, panel)) = carry else { return }; + if !removed || drag::active::(ui.ctx()).is_some() || !ui.input(|i| i.pointer.primary_down()) { + return; + } + let also: Arc = panel; + drag::start(ui.ctx(), pass.id, &Env::of(ui).view(), art, vec![also], DragPreview::None); +} + fn host_run_session(tool: &mut SessionTool<'_>, ui: &Ui, pass: &ToolPass) -> ToolHostResponse { let mut app = tool.app(); // The host borrows the tool and the app both through the cell, one call at a time. diff --git a/crates/ui-egui/src/panel_docking.rs b/crates/ui-egui/src/panel_docking.rs index 4ec0a72a0c..37090a916d 100644 --- a/crates/ui-egui/src/panel_docking.rs +++ b/crates/ui-egui/src/panel_docking.rs @@ -1326,19 +1326,15 @@ pub(crate) fn os_window_at(app: &VectorcraftApp, ctx: &egui::Context, pos: egui: if app.dock_rt.windows.is_empty() { return false; } - // Workaround for craft-libs#4739: `WindowHost::viewports_at` still lists palette windows that are minimized, or - // hidden while a dialog or popup shows. Remove these checks when the craft-libs pin includes craft-libs#4739. + // A dialog hides the palette windows a few passes after it opens, and `WindowHost::viewports_at` lists them until + // then: while a dialog is open, none counts. if app.any_dialog_open() { return false; } let origin = ctx.input(|i| i.raw.viewports.get(&i.raw.viewport_id).and_then(|v| v.inner_rect).map(|r| r.min.to_vec2())); let Some(origin) = origin else { return false }; - let host = craft::ui::runtime::windows::WindowHost::of(ctx); - let under = host.viewports_at(pos + origin); - // Workaround for craft-libs#4739 (see above). - let restored = - |viewport: &egui::ViewportId| host.facts(*viewport).is_some_and(|facts| facts.state != craft::host::target::WindowState::Minimized); - under.iter().filter(|viewport| restored(viewport)).any(|viewport| app.dock_rt.windows.iter().any(|(_, shown)| shown == viewport)) + let under = craft::ui::runtime::windows::WindowHost::of(ctx).viewports_at(pos + origin); + under.iter().any(|viewport| app.dock_rt.windows.iter().any(|(_, shown)| shown == viewport)) } /// Brings the OS window of the floating window holding `panel` forward, as it was last drawn. diff --git a/crates/ui-egui/src/panel_docking/native_tests.rs b/crates/ui-egui/src/panel_docking/native_tests.rs index 25c15f5182..9cdb058ada 100644 --- a/crates/ui-egui/src/panel_docking/native_tests.rs +++ b/crates/ui-egui/src/panel_docking/native_tests.rs @@ -677,7 +677,8 @@ fn a_hidden_palette_window_does_not_cover_the_canvas() { let id = h.app.dialogs().expect("a window").with(|host| host.open_dialogs().last().map(|d| d.id)).expect("a dialog is open"); assert!(h.app.dialogs().expect("a window").with(|host| host.cancel_by_id(&ctx, id)), "the dialog took the answer"); crate::dialogs::host::pump(&mut h.app, &ctx); - h.frames(2); + // The palettes show again in the pass after the one that saw the dialog gone, which that pass asks for. + h.frames(3); assert!(!h.app.any_dialog_open(), "the dialog closed"); assert!(os_window_at(&h.app, &h.ctx, middle), "the palette covers the canvas again once the dialog closes"); } diff --git a/crates/ui-egui/src/panels/gradient/tests.rs b/crates/ui-egui/src/panels/gradient/tests.rs index 0085caada8..00228d717a 100644 --- a/crates/ui-egui/src/panels/gradient/tests.rs +++ b/crates/ui-egui/src/panels/gradient/tests.rs @@ -543,11 +543,12 @@ fn cmd_click_on_the_gradient_fill_box_resets_only_the_selected_characters() { } // PLAN: assumed color-w10's Swatches panel: each swatch tile is named by its swatch's name and drags a `PanelDrag::Paint` with `params {swatch}` (wg.S7). -/// The Swatches panel over the Gradient panel: a swatch tile dragged onto the slider is a real drop. +/// The Gradient panel over the Swatches panel, which fills the room under it: a swatch tile dragged onto the slider is +/// a real drop. fn with_swatches(app: &mut VectorcraftApp, ui: &mut Ui) { Stack::new().show(ui, |ui, _| { - super::super::swatches::show(app, ui); show(app, ui); + super::super::swatches::show(app, ui); }); } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index b366bd402e..9e8912f736 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "0582d506c494c7bf5280d952f36e60f325f85855"; +const REV: &str = "33966c68a3aeaa1185a7226442113788cb127b44"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 1bbc32ff82988ed80c833b9918d10ccf76b25b04 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 12:52:13 -0800 Subject: [PATCH 14/24] Dependencies: move the craft-libs pin to craft-libs main (69c746e9) Every craft-libs dependency moves from 33966c68 to craft-libs main at 69c746e9, which adds the equal-spacing smart guides of a move (ToolContext::add_measures and ToolHostResponse::measures). The egui and winit forks stay at the revisions craft-libs pins (399fc6e0, 3fd7ae64). Cargo.lock changes only the sources of the craft-libs packages. --- Cargo.lock | 182 ++++++++++++++++---------------- Cargo.toml | 82 +++++++------- apps/vectorcraft-web/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 2 +- 4 files changed, 134 insertions(+), 134 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 505b1f503e..1414d4c698 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1256,7 +1256,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-automation", "craft-behavior", @@ -1298,7 +1298,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "crc32fast", "flate2", @@ -1319,7 +1319,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1331,7 +1331,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "rustix 1.1.6", ] @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1364,7 +1364,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-docpath", @@ -1401,7 +1401,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "crc32fast", "flate2", @@ -1410,7 +1410,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "egui", ] @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "md-5", "rayon", @@ -1427,12 +1427,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-cms", @@ -1452,7 +1452,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-ai-agents", "craft-atomic", @@ -1468,7 +1468,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1478,7 +1478,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "rayon", ] @@ -1486,7 +1486,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1512,7 +1512,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "blake3", "craft-ecproj-format", @@ -1528,7 +1528,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "serde", ] @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-dwg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "acadrust", "craft-dxf", @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-codepage", "encoding_rs", @@ -1577,7 +1577,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "serde", "serde_json", @@ -1587,12 +1587,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" [[package]] name = "craft-flags" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-atomic", "dirs", @@ -1602,7 +1602,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1617,7 +1617,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1636,7 +1636,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1645,7 +1645,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "cap-primitives", "craft-atomic", @@ -1668,12 +1668,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "gif", ] @@ -1681,7 +1681,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "flate2", ] @@ -1689,7 +1689,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1702,7 +1702,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1732,7 +1732,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-dds", "craft-jpeg", @@ -1759,7 +1759,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1777,7 +1777,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "thiserror 2.0.21", ] @@ -1785,7 +1785,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1796,7 +1796,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-host", "craft-i18n", @@ -1811,7 +1811,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-i18n", @@ -1825,7 +1825,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-host", @@ -1843,7 +1843,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1855,7 +1855,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "encoding_rs", "image", @@ -1866,7 +1866,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "chrono", "craft-codepage", @@ -1876,7 +1876,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "uds_windows", "winsafe", @@ -1885,7 +1885,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-keymap", @@ -1901,7 +1901,7 @@ dependencies = [ [[package]] name = "craft-pbr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-texture", "thiserror 2.0.21", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "flate2", "serde", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1933,7 +1933,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "async-channel", "async-io", @@ -1966,7 +1966,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1975,7 +1975,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -2010,7 +2010,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-eps", "flate2", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "encoding_rs", "flate2", @@ -2035,7 +2035,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "dispatch2", "egui", @@ -2048,7 +2048,7 @@ dependencies = [ [[package]] name = "craft-raster3d" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "rayon", "thiserror 2.0.21", @@ -2057,7 +2057,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2076,7 +2076,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-atomic", "craft-host", @@ -2093,7 +2093,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "fax", "hayro-ccitt", @@ -2104,7 +2104,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2125,7 +2125,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-keymap", @@ -2137,7 +2137,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "thiserror 2.0.21", ] @@ -2170,7 +2170,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2185,7 +2185,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-atomic", "craft-behavior", @@ -2200,7 +2200,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "serde", "thiserror 2.0.21", @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "serde", "thiserror 2.0.21", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-keymap", @@ -2234,12 +2234,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2253,7 +2253,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2270,7 +2270,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "accesskit", "craft-behavior", @@ -2308,7 +2308,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2319,7 +2319,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-host", @@ -2337,7 +2337,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-host", @@ -2358,7 +2358,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-host", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-behavior", "craft-host", @@ -2398,7 +2398,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "base64 0.22.1", "chrono", @@ -2430,7 +2430,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "flate2", "serde", @@ -2441,7 +2441,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "js-sys", "serde_json", @@ -2462,7 +2462,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "winsafe", ] @@ -2470,7 +2470,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "craft-appkit", "craft-atomic", @@ -2502,7 +2502,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3862,7 +3862,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3871,7 +3871,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3889,7 +3889,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3907,12 +3907,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "flate2", "hayro-ccitt", @@ -4895,7 +4895,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "base64 0.22.1", "bumpalo", @@ -5052,7 +5052,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=33966c68a3aeaa1185a7226442113788cb127b44#33966c68a3aeaa1185a7226442113788cb127b44" +source = "git+https://github.com/storytold/craft-libs?rev=69c746e9a8e2865d1664fe498b141790cf0da77b#69c746e9a8e2865d1664fe498b141790cf0da77b" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index 885c50bef7..4940feeaee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,57 +10,57 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # DWG to DXF bytes, in a child process on desktop builds (acadrust 0.6.6, MPL-2.0, unmodified). -craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with. -craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # The CPU rasterizer that draws a 3D effect's Render Settings › Rendered image: depth-buffered triangles, shadow maps. -craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -200,13 +200,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } emath = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } epaint = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 7e941d727e..9bbe64b66d 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -28,7 +28,7 @@ egui_extras = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "33966c68a3aeaa1185a7226442113788cb127b44", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "69c746e9a8e2865d1664fe498b141790cf0da77b", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 9e8912f736..3c90a6d403 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "33966c68a3aeaa1185a7226442113788cb127b44"; +const REV: &str = "69c746e9a8e2865d1664fe498b141790cf0da77b"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From b117e7fa9087c6385ef4731e554ceb7924aaa768 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 14:23:44 -0800 Subject: [PATCH 15/24] DXF export: Always Export Group as Block Reference DXF Options gets the check box Always Export Group as Block Reference, and document.exportDxf and document.export take groupBlocks. It is off by default, and the CNC / CAM preset does not set it. When it is on, each group is written as a block definition holding its contents, placed by one INSERT on the group's layer at the origin, unscaled, so its entities keep their coordinates. A group inside it becomes a block placed inside that block, and a group that writes no entity writes no block. Block names come from the group names ("Group" for an unnamed group), made unique with _2, _3 and so on, and follow each version's naming rules. It works in every version from R12 to 2018. The craft-libs revs move to 35709fdb (storytold/craft-libs#5381 on top of the current pin 77ade517), whose drawing writer writes block definitions and INSERT entities. A drawing without groups, or with the option off, is written as before. Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md. --- Cargo.lock | 182 +++++++++++----------- Cargo.toml | 82 +++++----- apps/vectorcraft-web/Cargo.toml | 2 +- crates/cad/src/lib.rs | 8 +- crates/cad/src/scene.rs | 58 +++++-- crates/cad/src/tests.rs | 2 + crates/cad/src/tests/blocks.rs | 125 +++++++++++++++ crates/engine/src/cmd/fileio/dxf.rs | 10 +- crates/engine/src/cmd/fileio/tests_dxf.rs | 23 +++ crates/ui-egui/src/dialogs/dxf_options.rs | 5 +- crates/ui-egui/src/dialogs/tests_dxf.rs | 23 +++ docs/control-protocol.md | 3 +- docs/mcp.md | 6 +- docs/target-app-parity.md | 1 + xtask/src/pdf_deps.rs | 2 +- 15 files changed, 380 insertions(+), 152 deletions(-) create mode 100644 crates/cad/src/tests/blocks.rs diff --git a/Cargo.lock b/Cargo.lock index b53df9115b..6e428cb199 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1255,7 +1255,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-automation", "craft-behavior", @@ -1297,7 +1297,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "crc32fast", "flate2", @@ -1318,7 +1318,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "rustix 1.1.6", ] @@ -1338,7 +1338,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1363,7 +1363,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1381,7 +1381,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-docpath", @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "crc32fast", "flate2", @@ -1408,7 +1408,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "egui", ] @@ -1416,7 +1416,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "md-5", "rayon", @@ -1425,12 +1425,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-cms", @@ -1450,7 +1450,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-ai-agents", "craft-atomic", @@ -1466,7 +1466,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1476,7 +1476,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "rayon", ] @@ -1484,7 +1484,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1510,7 +1510,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "blake3", "craft-ecproj-format", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "serde", ] @@ -1534,7 +1534,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1553,7 +1553,7 @@ dependencies = [ [[package]] name = "craft-dwg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "acadrust", "log", @@ -1562,7 +1562,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-codepage", "encoding_rs", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "serde", "serde_json", @@ -1584,12 +1584,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" [[package]] name = "craft-flags" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-atomic", "dirs", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1633,7 +1633,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1642,7 +1642,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "cap-primitives", "craft-atomic", @@ -1665,12 +1665,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "gif", ] @@ -1678,7 +1678,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "flate2", ] @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1699,7 +1699,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1729,7 +1729,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-dds", "craft-jpeg", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1774,7 +1774,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "thiserror 2.0.21", ] @@ -1782,7 +1782,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1793,7 +1793,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-host", "craft-i18n", @@ -1808,7 +1808,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-i18n", @@ -1822,7 +1822,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-host", @@ -1840,7 +1840,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1852,7 +1852,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "encoding_rs", "image", @@ -1863,7 +1863,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "chrono", "craft-codepage", @@ -1873,7 +1873,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "uds_windows", "winsafe", @@ -1882,7 +1882,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-keymap", @@ -1898,7 +1898,7 @@ dependencies = [ [[package]] name = "craft-pbr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-texture", "thiserror 2.0.21", @@ -1907,7 +1907,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "flate2", "serde", @@ -1918,7 +1918,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1930,7 +1930,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "async-channel", "async-io", @@ -1963,7 +1963,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1972,7 +1972,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-host", @@ -1996,7 +1996,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -2007,7 +2007,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-eps", "flate2", @@ -2021,7 +2021,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "encoding_rs", "flate2", @@ -2032,7 +2032,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "dispatch2", "egui", @@ -2045,7 +2045,7 @@ dependencies = [ [[package]] name = "craft-raster3d" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "rayon", "thiserror 2.0.21", @@ -2054,7 +2054,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2073,7 +2073,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-atomic", "craft-host", @@ -2090,7 +2090,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "fax", "hayro-ccitt", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2122,7 +2122,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-keymap", @@ -2134,7 +2134,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2159,7 +2159,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "thiserror 2.0.21", ] @@ -2167,7 +2167,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2182,7 +2182,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-atomic", "craft-behavior", @@ -2197,7 +2197,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "serde", "thiserror 2.0.21", @@ -2207,7 +2207,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "serde", "thiserror 2.0.21", @@ -2216,7 +2216,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-keymap", @@ -2231,12 +2231,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2250,7 +2250,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2267,7 +2267,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "accesskit", "craft-behavior", @@ -2305,7 +2305,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2316,7 +2316,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-host", @@ -2334,7 +2334,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-host", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-host", @@ -2376,7 +2376,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-behavior", "craft-host", @@ -2395,7 +2395,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "base64 0.22.1", "chrono", @@ -2427,7 +2427,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "flate2", "serde", @@ -2438,7 +2438,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2448,7 +2448,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "js-sys", "serde_json", @@ -2459,7 +2459,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "winsafe", ] @@ -2467,7 +2467,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "craft-appkit", "craft-atomic", @@ -2499,7 +2499,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3859,7 +3859,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3868,7 +3868,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3886,7 +3886,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3904,12 +3904,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "flate2", "hayro-ccitt", @@ -4892,7 +4892,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "base64 0.22.1", "bumpalo", @@ -5049,7 +5049,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=35709fdbe599b8e6309bafa8a18e20645e3602aa#35709fdbe599b8e6309bafa8a18e20645e3602aa" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index 89a8feda76..0f75bcd3d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,57 +10,57 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # DWG to DXF bytes, in a child process on desktop builds (acadrust 0.6.6, MPL-2.0, unmodified). -craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with. -craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # The CPU rasterizer that draws a 3D effect's Render Settings › Rendered image: depth-buffered triangles, shadow maps. -craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -200,13 +200,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } emath = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } epaint = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 70aae32f73..93f7c2048b 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -28,7 +28,7 @@ egui_extras = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "35709fdbe599b8e6309bafa8a18e20645e3602aa", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/crates/cad/src/lib.rs b/crates/cad/src/lib.rs index 73e30bd2a9..4e3f65f2d8 100644 --- a/crates/cad/src/lib.rs +++ b/crates/cad/src/lib.rs @@ -5,7 +5,8 @@ //! layer (hidden ones switched off, locked ones locked, non-printing ones not plotted), paths //! become polylines (straight segments) or cubic splines (curves), fills their outlines and solid //! hatches, type text entities or glyph outlines, and placed images image entities linked to PNG -//! or JPEG files the caller writes next to the drawing. Coordinates are y-up, in drawing units: `scale` units per +//! or JPEG files the caller writes next to the drawing; with [`DxfOptions::group_blocks`] groups +//! become blocks placed by INSERT entities. Coordinates are y-up, in drawing units: `scale` units per //! `unit` of the art, with the origin at the bottom-left corner of [`DxfOptions::region`]. //! [`export_drawings`] writes one such drawing for each of several regions, applying the live //! effects once for all of them. @@ -316,6 +317,10 @@ pub struct DxfOptions { pub alter_paths: bool, /// Type is written as glyph outlines (always with [`Preserve::Appearance`]). pub outline_text: bool, + /// Always Export Group as Block Reference: each group is written as a block definition of its + /// contents, placed by an INSERT entity on the group's layer (groups inside it are blocks + /// placed inside that block). Off: a group's contents are written as plain entities. + pub group_blocks: bool, /// The drawing's origin is this region's bottom-left corner (document space). pub region: Rect, /// Leave out objects entirely outside `region` (one drawing per artboard). @@ -336,6 +341,7 @@ impl Default for DxfOptions { preserve: Preserve::default(), alter_paths: false, outline_text: false, + group_blocks: false, region: Rect::ZERO, crop: false, } diff --git a/crates/cad/src/scene.rs b/crates/cad/src/scene.rs index 26025f2544..68beac7f8d 100644 --- a/crates/cad/src/scene.rs +++ b/crates/cad/src/scene.rs @@ -2,7 +2,8 @@ //! order. Fills are their outlines then solid hatches (the outlines alone in R12 or with //! hatches left out), placed images are linked image files unless left out, strokes //! polylines (with bulges for circular arcs) and cubic splines with a lineweight and dashes, or -//! filled outlines where the look needs them. +//! filled outlines where the look needs them. With [`DxfOptions::group_blocks`] each group is a +//! block, placed by an INSERT. use std::collections::HashMap; @@ -14,7 +15,7 @@ use vectorcraft_geom::{Affine, BezPath, FillRule, PathData, Point, Rect, Vec2}; use crate::aci::nearest_aci; use crate::{CAP_HEIGHT, ColorDepth, DxfImage, DxfOptions, DxfOutput, MAX_NEST, Preserve, RasterFormat}; -use craft_dxf::drawing::{Codes, Drawing, EntityStyle, Handle, ImageDef, Layer, LineType, STANDARD_STYLE, fixed}; +use craft_dxf::drawing::{Block, Codes, Drawing, EntityStyle, Handle, ImageDef, Layer, LineType, STANDARD_STYLE, fixed}; /// Curves are flattened to within this distance (points) where DXF needs straight segments /// (hatch boundaries, R12 polylines). @@ -503,8 +504,13 @@ pub(crate) struct Scene<'a> { to_dxf: Affine, /// Drawing units per point. k: f64, - /// The entities written so far. + /// The entities written so far: those of model space, or of the group block being written. e: Codes, + /// The owner of the entities in `e`: model space, or the group block's record. + owner: Handle, + /// Group blocks written so far ([`DxfOptions::group_blocks`]), each after the blocks it inserts. + blocks: Vec, + block_names: Names, next: u32, layers: Vec, layer_names: Names, @@ -544,6 +550,9 @@ impl<'a> Scene<'a> { to_dxf: Affine::new([k, 0.0, 0.0, -k, -r.x0 * k, r.y1 * k]), k, e: Codes::new(o.version.into()), + owner: fixed::MODEL_RECORD, + blocks: vec![], + block_names: Names::with(&["*Model_Space", "*Paper_Space"]), next: fixed::FIRST_FREE, layers: vec![], layer_names: Names::with(&["0", "Defpoints"]), @@ -586,6 +595,7 @@ impl<'a> Scene<'a> { linetypes: self.linetypes, styles: self.styles, images: self.images, + blocks: self.blocks, entities: self.e.into_string(), extents: self.extents.unwrap_or(limits), limits, @@ -660,6 +670,7 @@ impl<'a> Scene<'a> { self.children(children, *clip); (self.layer, self.flags) = outer; } + NodeKind::Group { children, clip } if self.o.group_blocks => self.group_block(n, children, *clip), NodeKind::Group { children, clip } => self.children(children, *clip), NodeKind::Path { path, rule, guide, .. } => { if !*guide { @@ -754,6 +765,27 @@ impl<'a> Scene<'a> { } } + /// Group `n` as a block of its children's entities and an INSERT that places it on the current + /// layer ([`DxfOptions::group_blocks`]). The block's base point is the drawing's origin, so its + /// entities keep their coordinates. A group that writes no entity writes no block. + fn group_block(&mut self, n: &Node, children: &[std::sync::Arc], clip: bool) { + let (record, begin, end, insert) = (self.handle(), self.handle(), self.handle(), self.handle()); + let outer = std::mem::replace(&mut self.e, Codes::new(self.o.version.into())); + let owner = std::mem::replace(&mut self.owner, record); + self.children(children, clip); + let entities = std::mem::replace(&mut self.e, outer).into_string(); + self.owner = owner; + if entities.is_empty() { + return; + } + let long = self.o.version.r2000(); + let base = symbol_name(n.name.as_deref().unwrap_or_default(), long); + let base = if base.is_empty() { symbol_name("Group", long) } else { base }; + let name = self.block_names.unique(&base, if long { 255 } else { 31 }); + self.e.insert(insert, self.owner, &self.layer, &name); + self.blocks.push(Block { name, record, begin, end, entities }); + } + /// Warn about what DXF can't hold in `n`'s look. fn note_losses(&mut self, n: &Node) { if n.blend != vectorcraft_color::BlendMode::Normal { @@ -959,7 +991,7 @@ impl<'a> Scene<'a> { } let h = self.handle(); let layer = self.layer.clone(); - self.e.entity("HATCH", h, fixed::MODEL_RECORD, &layer, style, "AcDbHatch"); + self.e.entity("HATCH", h, self.owner, &layer, style, "AcDbHatch"); self.e.xyz(10, 0.0, 0.0); self.e.normal(); self.e.raw(2, "SOLID"); @@ -1040,7 +1072,7 @@ impl<'a> Scene<'a> { let (a, b) = (self.pt(a), self.pt(b)); let layer = self.layer.clone(); let h = self.handle(); - self.e.entity("LINE", h, fixed::MODEL_RECORD, &layer, style, "AcDbLine"); + self.e.entity("LINE", h, self.owner, &layer, style, "AcDbLine"); self.e.xyz(10, a.x, a.y); self.e.xyz(11, b.x, b.y); } @@ -1058,7 +1090,7 @@ impl<'a> Scene<'a> { // Bit 128: a linetype runs on through the vertices instead of restarting at each one. let flags = i64::from(closed) | if style.linetype.is_some() { 128 } else { 0 }; if self.o.version.lwpolyline() { - self.e.entity("LWPOLYLINE", h, fixed::MODEL_RECORD, &layer, style, "AcDbPolyline"); + self.e.entity("LWPOLYLINE", h, self.owner, &layer, style, "AcDbPolyline"); self.e.int(90, pts.len() as i64); self.e.int(70, flags); if let Some(w) = width { @@ -1072,7 +1104,7 @@ impl<'a> Scene<'a> { } return; } - self.e.entity("POLYLINE", h, fixed::MODEL_RECORD, &layer, style, "AcDb2dPolyline"); + self.e.entity("POLYLINE", h, self.owner, &layer, style, "AcDb2dPolyline"); self.e.int(66, 1); self.e.xyz(10, 0.0, 0.0); self.e.int(70, flags); @@ -1134,7 +1166,7 @@ impl<'a> Scene<'a> { let layer = self.layer.clone(); let h = self.handle(); if sub.closed { - self.e.entity("CIRCLE", h, fixed::MODEL_RECORD, &layer, style, "AcDbCircle"); + self.e.entity("CIRCLE", h, self.owner, &layer, style, "AcDbCircle"); self.e.xyz(10, centre.x, centre.y); self.e.num(40, radius); self.e.normal(); @@ -1150,7 +1182,7 @@ impl<'a> Scene<'a> { if !on_ccw_arc(a0, a1, am) { std::mem::swap(&mut a0, &mut a1); } - self.e.entity("ARC", h, fixed::MODEL_RECORD, &layer, style, "AcDbCircle"); + self.e.entity("ARC", h, self.owner, &layer, style, "AcDbCircle"); self.e.xyz(10, centre.x, centre.y); self.e.num(40, radius); self.e.normal(); @@ -1197,7 +1229,7 @@ impl<'a> Scene<'a> { let layer = self.layer.clone(); let h = self.handle(); - self.e.entity("ELLIPSE", h, fixed::MODEL_RECORD, &layer, style, "AcDbEllipse"); + self.e.entity("ELLIPSE", h, self.owner, &layer, style, "AcDbEllipse"); self.e.xyz(10, centre.x, centre.y); self.e.xyz(11, axis.x, axis.y); self.e.normal(); @@ -1232,7 +1264,7 @@ impl<'a> Scene<'a> { let ctrl: Vec = ctrl.iter().map(|p| self.pt(*p)).collect(); let layer = self.layer.clone(); let h = self.handle(); - self.e.entity("SPLINE", h, fixed::MODEL_RECORD, &layer, style, "AcDbSpline"); + self.e.entity("SPLINE", h, self.owner, &layer, style, "AcDbSpline"); self.e.normal(); // Planar (bit 3) and, if the subpath is closed, also closed (bit 0). A geometrically // closed cut needs the closed flag set so CAM/CAM tools (e.g. VCarve) treat it as a @@ -1308,7 +1340,7 @@ impl<'a> Scene<'a> { let p = self.pt(t.xf * origin); let layer = self.layer.clone(); let h = self.handle(); - self.e.entity("TEXT", h, fixed::MODEL_RECORD, &layer, &style, "AcDbText"); + self.e.entity("TEXT", h, self.owner, &layer, &style, "AcDbText"); self.e.xyz(10, p.x, p.y); self.e.num(40, height); let s: String = s.chars().take(MAX_TEXT).collect(); @@ -1368,7 +1400,7 @@ impl<'a> Scene<'a> { let def = def.handle; let layer = self.layer.clone(); let style = EntityStyle { aci: 7, ..EntityStyle::default() }; - self.e.entity("IMAGE", handle, fixed::MODEL_RECORD, &layer, &style, "AcDbRasterImage"); + self.e.entity("IMAGE", handle, self.owner, &layer, &style, "AcDbRasterImage"); self.e.int(90, 0); self.e.xyz(10, at.x, at.y); self.e.xyz(11, u.x, u.y); diff --git a/crates/cad/src/tests.rs b/crates/cad/src/tests.rs index 16f4f97082..216dc1a088 100644 --- a/crates/cad/src/tests.rs +++ b/crates/cad/src/tests.rs @@ -8,6 +8,8 @@ use vectorcraft_geom::{Affine, ParamCurve, PathData, Point, Rect, Shape, shapes} use crate::*; +mod blocks; + type Pairs = Vec<(i32, String)>; /// The `(code, value)` pairs of a DXF file. diff --git a/crates/cad/src/tests/blocks.rs b/crates/cad/src/tests/blocks.rs new file mode 100644 index 0000000000..b0ac7a9fe4 --- /dev/null +++ b/crates/cad/src/tests/blocks.rs @@ -0,0 +1,125 @@ +//! Always Export Group as Block Reference: groups written as blocks placed by INSERT entities. + +use super::*; + +/// The user blocks of a drawing (not model or paper space): each its name and the entities +/// between its BLOCK and its ENDBLK. +fn blocks(out: &DxfOutput) -> Vec<(String, Vec)> { + let mut found: Vec<(String, Vec)> = vec![]; + let mut open = false; + for o in section(&pairs(&out.bytes), "BLOCKS") { + match kind(&o) { + "BLOCK" => { + found.push((get(&o, 2).unwrap_or_default().to_string(), vec![])); + open = true; + } + "ENDBLK" => open = false, + _ if open => found.last_mut().expect("a block").1.push(o), + _ => {} + } + } + found.retain(|(name, _)| !name.starts_with('*')); + found +} + +/// A filled square outside any group; the group `Frame` holding a stroked rectangle and the group +/// `Ring` holding a circle, on a second layer `Parts`. +fn grouped_doc() -> Document { + let mut d = doc_with(|d| vec![path(d, shapes::rectangle(Rect::new(150.0, 10.0, 170.0, 30.0)), Paint::solid(Color::BLACK), Paint::None, 0.0)]); + let parts = d.add_layer(Some("Parts")); + let rect = path(&mut d, shapes::rectangle(Rect::new(10.0, 10.0, 110.0, 60.0)), Paint::None, Paint::solid(Color::BLACK), 1.0); + let circle = path(&mut d, shapes::ellipse(Rect::new(40.0, 20.0, 70.0, 50.0)), Paint::None, Paint::solid(Color::rgb(0.0, 0.0, 1.0)), 1.0); + let mut ring = Node::group(d.alloc_id(), vec![Arc::new(circle)]); + ring.name = Some("Ring".into()); + let mut frame = Node::group(d.alloc_id(), vec![Arc::new(rect), Arc::new(ring)]); + frame.name = Some("Frame".into()); + d.insert(Some(parts), usize::MAX, frame).unwrap(); + d +} + +#[test] +fn groups_are_blocks_placed_by_inserts_in_every_version() { + let d = grouped_doc(); + for v in DxfVersion::ALL { + let out = export(&d, &DxfOptions { version: v, group_blocks: true, ..opts(&d) }).unwrap(); + let top = entities(&out); + let inserts: Vec<&Pairs> = top.iter().filter(|e| kind(e) == "INSERT").collect(); + assert_eq!(inserts.len(), 1, "{v:?}: the outer group alone is placed in model space"); + // Before 2000, names are capitals, letters, digits and $-_ only. + let long = v >= DxfVersion::R2000; + let (frame, ring, parts, first) = if long { ("Frame", "Ring", "Parts", "Layer 1") } else { ("FRAME", "RING", "PARTS", "LAYER_1") }; + assert_eq!((get(inserts[0], 2), get(inserts[0], 8)), (Some(frame), Some(parts)), "{v:?}"); + assert!(top.iter().any(|e| kind(e) != "INSERT" && get(e, 8) == Some(first)), "{v:?}: the loose square stays in model space"); + let found = blocks(&out); + let names: Vec<&str> = found.iter().map(|b| b.0.as_str()).collect(); + assert_eq!(names, [ring, frame], "{v:?}: the inner block comes first"); + let (ring_entities, frame_entities) = (&found[0].1, &found[1].1); + assert!(!ring_entities.is_empty() && ring_entities.iter().all(|e| kind(e) != "INSERT"), "{v:?}: the circle is in its group's block"); + let nested: Vec<&Pairs> = frame_entities.iter().filter(|e| kind(e) == "INSERT").collect(); + assert_eq!(nested.len(), 1, "{v:?}: the inner group is placed inside the outer block"); + assert_eq!(get(nested[0], 2), Some(ring), "{v:?}"); + assert!(frame_entities.iter().any(|e| kind(e) != "INSERT"), "{v:?}: the rectangle is in the outer block"); + if v >= DxfVersion::R13 { + // Each block's entities are owned by its BLOCK_RECORD, and the INSERTs by what holds them. + let records = table(&out, "BLOCK_RECORD"); + let record = |name: &str| records.iter().find(|r| get(r, 2) == Some(name)).and_then(|r| get(r, 5).map(str::to_string)); + for (name, ents) in &found { + let owner = record(name).unwrap_or_else(|| panic!("{v:?}: no BLOCK_RECORD for {name}")); + // A polyline's vertices and its SEQEND are owned by the polyline. + let owned: Vec<&Pairs> = ents.iter().filter(|e| !matches!(kind(e), "VERTEX" | "SEQEND")).collect(); + assert!(!owned.is_empty() && owned.iter().all(|e| get(e, 330) == Some(owner.as_str())), "{v:?}: {name}"); + } + assert_eq!(get(inserts[0], 330).map(str::to_string), record("*Model_Space"), "{v:?}: the outer INSERT is in model space"); + assert_eq!(get(nested[0], 330).map(str::to_string), record(frame), "{v:?}: the inner INSERT is in the outer block"); + } + } +} + +#[test] +fn without_the_option_groups_are_written_as_their_contents() { + let d = grouped_doc(); + let out = export(&d, &opts(&d)).unwrap(); + assert!(blocks(&out).is_empty()); + assert!(!kinds(&out).iter().any(|k| k == "INSERT")); + let with = export(&d, &DxfOptions { group_blocks: true, ..opts(&d) }).unwrap(); + // The same entities are written, moved into blocks. + let count = |o: &DxfOutput| { + let drawn = |ents: &[Pairs]| ents.iter().filter(|e| kind(e) != "INSERT").count(); + drawn(&entities(o)) + blocks(o).iter().map(|b| drawn(&b.1)).sum::() + }; + assert_eq!(count(&out), count(&with)); + assert_eq!(header(&pairs(&out.bytes), "$EXTMIN"), header(&pairs(&with.bytes), "$EXTMIN")); + assert_eq!(header(&pairs(&out.bytes), "$EXTMAX"), header(&pairs(&with.bytes), "$EXTMAX")); +} + +#[test] +fn blocks_read_back_at_the_place_their_group_was() { + let d = grouped_doc(); + let o = ImportOptions { unit: Some(Unit::Points), scale: Some(1.0), center: false, ..ImportOptions::default() }; + let plain = import(&export(&d, &opts(&d)).unwrap().bytes, &o).unwrap().document; + let blocked = import(&export(&d, &DxfOptions { group_blocks: true, ..opts(&d) }).unwrap().bytes, &o).unwrap().document; + let names: Vec<&str> = blocked.symbols.iter().map(|s| s.name.as_str()).collect(); + assert!(names.contains(&"Frame") && names.contains(&"Ring"), "{names:?}"); + let (a, b) = (plain.art_bounds().unwrap(), blocked.art_bounds().unwrap()); + assert!(close_to(&[a.x0, a.y0, a.x1, a.y1], &[b.x0, b.y0, b.x1, b.y1], 1e-6), "{a:?} against {b:?}"); +} + +#[test] +fn a_group_with_nothing_written_is_no_block_and_names_stay_unique() { + let mut d = Document::new(200.0, 100.0); + let layer = d.layers[0].id; + let mut hidden = path(&mut d, shapes::rectangle(Rect::new(0.0, 0.0, 5.0, 5.0)), Paint::solid(Color::BLACK), Paint::None, 0.0); + hidden.visible = false; + let empty = Node::group(d.alloc_id(), vec![Arc::new(hidden)]); + d.insert(Some(layer), usize::MAX, empty).unwrap(); + for name in [Some("Part"), Some("part"), None, Some("*Model_Space")] { + let p = path(&mut d, shapes::rectangle(Rect::new(10.0, 10.0, 20.0, 20.0)), Paint::solid(Color::BLACK), Paint::None, 0.0); + let mut g = Node::group(d.alloc_id(), vec![Arc::new(p)]); + g.name = name.map(str::to_string); + d.insert(Some(layer), usize::MAX, g).unwrap(); + } + let out = export(&d, &DxfOptions { group_blocks: true, ..opts(&d) }).unwrap(); + let names: Vec = blocks(&out).into_iter().map(|b| b.0).collect(); + assert_eq!(names, ["Part", "part_2", "Group", "_Model_Space"], "the hidden-only group writes no block"); + assert_eq!(kinds(&out).iter().filter(|k| *k == "INSERT").count(), 4); +} diff --git a/crates/engine/src/cmd/fileio/dxf.rs b/crates/engine/src/cmd/fileio/dxf.rs index c92d9b8ad0..b09118615c 100644 --- a/crates/engine/src/cmd/fileio/dxf.rs +++ b/crates/engine/src/cmd/fileio/dxf.rs @@ -22,7 +22,7 @@ pub fn specs() -> Vec { "Export DXF", [], None, - "{path?, dxfPreset?: custom (default)|cnc (CNC / CAM: version 2000, the oldest version that has both lightweight polylines and lineweights; unit mm, scale 1; colors 256, all 2000 holds; preserve editability and alterPaths false, so strokes stay center lines; outlineText true, so type is paths; includeImages and includeHatches false, so fills are their outlines and no image files are written; rasterFormat png; the options given override it), version?: R12|R13|R14|2000|2004|2007|2010|2013|2018 (default), unit?: mm (default; any unit name: pt, in, cm…), scale?: 1 (drawing units per unit), scaleLineweights?: false, colors?: 8|16|256|true (default; true colour needs 2004+, else 256), rasterFormat?: png (default)|jpeg (placed images, written next to the file), includeImages?: true (false: placed images and their files are left out), includeHatches?: true (false: fills are their outlines, without solid hatches), preserve?: appearance (default: type as outlines; strokes a CAD line can't draw as filled outlines; brush art)|editability (type as text; every stroke a line with its lineweight and dashes), alterPaths?: false (strokes a CAD line can't draw as their filled outlines, with editability too; also strokes wider than 2.11 mm, and every stroke in R13 and R14), outlineText?: false, selectedOnly?: false (the selected objects, in their layers), artboard?: 0 (the origin is its bottom-left corner), useArtboards?: true (one drawing per chosen artboard, artboards?/range?, holding the art over it: {stem}-{artboard}.dxf) | false (the origin at the art's bounds)} → {path, bytes, warnings, files?, linked?: [image files]}; no path → {dataBase64, …, linked?: [{name, dataBase64}]}. Layers become DXF layers (hidden: off; locked; non-printing: not plotted); paths become polylines and splines, fills their outlines (which laser and cutter software reads) and solid hatches. Same as document.export {format: dxf}. A key DXF doesn't take is refused", + "{path?, dxfPreset?: custom (default)|cnc (CNC / CAM: version 2000, the oldest version that has both lightweight polylines and lineweights; unit mm, scale 1; colors 256, all 2000 holds; preserve editability and alterPaths false, so strokes stay center lines; outlineText true, so type is paths; includeImages and includeHatches false, so fills are their outlines and no image files are written; rasterFormat png; the options given override it), version?: R12|R13|R14|2000|2004|2007|2010|2013|2018 (default), unit?: mm (default; any unit name: pt, in, cm…), scale?: 1 (drawing units per unit), scaleLineweights?: false, colors?: 8|16|256|true (default; true colour needs 2004+, else 256), rasterFormat?: png (default)|jpeg (placed images, written next to the file), includeImages?: true (false: placed images and their files are left out), includeHatches?: true (false: fills are their outlines, without solid hatches), preserve?: appearance (default: type as outlines; strokes a CAD line can't draw as filled outlines; brush art)|editability (type as text; every stroke a line with its lineweight and dashes), alterPaths?: false (strokes a CAD line can't draw as their filled outlines, with editability too; also strokes wider than 2.11 mm, and every stroke in R13 and R14), outlineText?: false, groupBlocks?: false (Always Export Group as Block Reference: each group a block of its contents, nested groups blocks inside it, placed by an INSERT on the group's layer), selectedOnly?: false (the selected objects, in their layers), artboard?: 0 (the origin is its bottom-left corner), useArtboards?: true (one drawing per chosen artboard, artboards?/range?, holding the art over it: {stem}-{artboard}.dxf) | false (the origin at the art's bounds)} → {path, bytes, warnings, files?, linked?: [image files]}; no path → {dataBase64, …, linked?: [{name, dataBase64}]}. Layers become DXF layers (hidden: off; locked; non-printing: not plotted); paths become polylines and splines, fills their outlines (which laser and cutter software reads) and solid hatches. Same as document.export {format: dxf}. A key DXF doesn't take is refused", has_doc, export_dxf )] @@ -86,6 +86,12 @@ pub(crate) const OPTIONS: &[FormatOption] = &[ description: "Alter Paths for Appearance: strokes a CAD line can't draw as their filled outlines, with editability too; also strokes wider than 2.11 mm, and every stroke in R13 and R14", }, FormatOption { name: "outlineText", ty: "boolean", default: "false", description: "type as glyph outlines (always with preserve: appearance)" }, + FormatOption { + name: "groupBlocks", + ty: "boolean", + default: "false", + description: "Always Export Group as Block Reference: each group is a block, placed by an INSERT on its layer", + }, FormatOption { name: "selectedOnly", ty: "boolean", default: "false", description: "only the selected objects, in their layers" }, ]; @@ -147,6 +153,7 @@ struct Params { preserve: Option, alter_paths: Option, outline_text: Option, + group_blocks: Option, } /// A string or number param as text (`2018` and `"2018"` alike). @@ -192,6 +199,7 @@ fn parse(p: &Value) -> Result<(DxfOptions, ArtboardPick)> { preserve: choice("preserve", q.preserve, Preserve::from_id, d.preserve, "appearance or editability")?, alter_paths: q.alter_paths.unwrap_or(d.alter_paths), outline_text: q.outline_text.unwrap_or(d.outline_text), + group_blocks: q.group_blocks.unwrap_or(d.group_blocks), ..d }; Ok((opts, q.boards)) diff --git a/crates/engine/src/cmd/fileio/tests_dxf.rs b/crates/engine/src/cmd/fileio/tests_dxf.rs index 7a04d93ddc..dfd5775bc1 100644 --- a/crates/engine/src/cmd/fileio/tests_dxf.rs +++ b/crates/engine/src/cmd/fileio/tests_dxf.rs @@ -174,6 +174,27 @@ fn placed_images_come_back_as_linked_files() { let _ = std::fs::remove_dir_all(dir); } +/// `groupBlocks` writes a group as an INSERT of a block holding its contents; off by default, and +/// not set by CNC / CAM. +#[test] +fn group_blocks_write_a_group_as_an_insert() { + let mut s = two_boards(); + s.execute("select.all", &json!({})).unwrap(); + s.execute("object.group", &json!({})).unwrap(); + let plain = s.execute("document.exportDxf", &json!({})).unwrap(); + assert_eq!(entities(&text(&plain)), ["LWPOLYLINE", "HATCH", "LWPOLYLINE", "HATCH"]); + for (cmd, p) in + [("document.exportDxf", json!({"groupBlocks": true})), ("document.export", json!({"format": "dxf", "dxfPreset": "cnc", "groupBlocks": true}))] + { + let dxf = text(&s.execute(cmd, &p).unwrap()); + assert_eq!(entities(&dxf), ["INSERT"], "{p}"); + let blocks = &dxf[dxf.find("\nBLOCKS\n").unwrap()..dxf.find("\nENTITIES\n").unwrap()]; + assert_eq!(blocks.matches("\nLWPOLYLINE\n").count(), 2, "{p}: the group's rectangles are in its block"); + } + let cnc = s.execute("document.exportDxf", &json!({"dxfPreset": "cnc"})).unwrap(); + assert!(!entities(&text(&cnc)).contains(&"INSERT".to_string())); +} + /// `includeImages` and `includeHatches` leave out placed images (with their files) and fill /// hatches, each on its own, through both commands, with and without a path; CNC / CAM leaves /// out both, and the options given override it. @@ -259,6 +280,7 @@ fn bad_dxf_options_are_refused() { json!({"alterPaths": "yes"}), json!({"includeImages": "no"}), json!({"includeHatches": 0}), + json!({"groupBlocks": "yes"}), ] { let e = s.execute("document.exportDxf", &p).unwrap_err().to_string(); assert!(e.contains("DXF"), "{p}: {e}"); @@ -286,6 +308,7 @@ fn formats_list_dxf_and_what_can_not_be_written() { "preserve", "alterPaths", "outlineText", + "groupBlocks", "selectedOnly", "useArtboards", ] { diff --git a/crates/ui-egui/src/dialogs/dxf_options.rs b/crates/ui-egui/src/dialogs/dxf_options.rs index a23a07e757..1a898a31a8 100644 --- a/crates/ui-egui/src/dialogs/dxf_options.rs +++ b/crates/ui-egui/src/dialogs/dxf_options.rs @@ -2,7 +2,8 @@ //! cutting software and shows Custom again once one is changed), version, scale (1 unit of the //! art = N drawing units) and lineweights, number of colours, the format of placed images and //! Include Placed Images, Preserve Appearance or Maximize Editability, and Export Selected Art -//! Only, Alter Paths for Appearance, Outline Text and Include Fill Hatches. +//! Only, Alter Paths for Appearance, Outline Text, Include Fill Hatches and Always Export Group as +//! Block Reference (not set by a preset). //! //! Fields: `document.export` params (`format: dxf`, `path?`, the artboard choice) and the DXF //! options of `document.exportDxf`. OK remembers the options for next time and writes the file @@ -37,6 +38,7 @@ fn defaults() -> Map { let mut m = preset_fields(DxfPreset::Custom); m.insert(PRESET.into(), json!(DxfPreset::Custom.id())); m.insert("selectedOnly".into(), json!(false)); + m.insert("groupBlocks".into(), json!(DxfPreset::Custom.options().group_blocks)); m } @@ -132,6 +134,7 @@ fn rows(selection: bool, has_selection: bool, note: bool) -> Vec { // Preserve Appearance always outlines type. check_param("outlineText", tl!("Outline Text")).enabled_when("preserve", FieldValue::Text(Preserve::Editability.id().into())), check_param("includeHatches", tl!("Include Fill Hatches")), + check_param("groupBlocks", tl!("Always Export Group as Block Reference")), ]); rows } diff --git a/crates/ui-egui/src/dialogs/tests_dxf.rs b/crates/ui-egui/src/dialogs/tests_dxf.rs index de20d0fde1..4d56fc911a 100644 --- a/crates/ui-egui/src/dialogs/tests_dxf.rs +++ b/crates/ui-egui/src/dialogs/tests_dxf.rs @@ -151,6 +151,29 @@ fn include_placed_images_and_fill_hatches_follow_the_preset_and_a_change_shows_c assert_eq!(shown(&app), ("custom".into(), true, true)); } +#[test] +fn always_export_group_as_block_reference_writes_an_insert_and_stays_through_a_preset() { + let (mut app, written) = app(1); + app.run("object.group", json!({})).unwrap(); + app.run("ui.dxfOptionsDialog", json!({"path": "/out/a.dxf"})).unwrap(); + frame(&mut app); + assert_eq!(fields(&app).bool("groupBlocks"), Some(false), "off by default"); + set(&mut app, "groupBlocks", json!(true)); + // A preset sets the fields it sets and leaves this one as it is. + set(&mut app, "dxfPreset", json!("cnc")); + frame(&mut app); + assert_eq!((show(&fields(&app), "dxfPreset"), fields(&app).bool("groupBlocks")), ("cnc".into(), Some(true))); + confirm(&mut app); + let dxf = text(&written.borrow()[0].1); + let start = dxf.find("\nENTITIES\n").unwrap(); + let entities = &dxf[start..start + dxf[start..].find("\nENDSEC\n").unwrap()]; + assert_eq!(entities.matches("\n 0\n").count(), 1, "the group alone, as one entity: {entities}"); + assert!(entities.contains("\n 0\nINSERT\n"), "{entities}"); + assert_eq!(app.ui.dxf_options["groupBlocks"].as_bool(), Some(true), "remembered for the next export"); + crate::menus::invoke(&mut app, "ui.dxfOptionsDialog", json!({})); + assert_eq!(fields(&app).bool("groupBlocks"), Some(true)); +} + #[test] fn bad_dxf_options_keep_the_dialog_open() { let (mut app, written) = app(1); diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 23ab4f671a..851372ac79 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -877,7 +877,8 @@ DXF Options: Export As… with the DXF format (`file.exportAs {format: "dxf"}`, `document.export` params: `dxfPreset` (`custom`, `cnc`), `version`, `unit` (a unit name such as `Millimeters`), `scale`, `scaleLineweights`, `colors` (`8`, `16`, `256`, `true`), `rasterFormat` (`png`, `jpeg`), `includeImages` (Include Placed Images), `preserve` (`appearance`, `editability`), `selectedOnly`, `alterPaths`, `outlineText`, `includeHatches` -(Include Fill Hatches), plus `path` and the artboard choice. Setting `dxfPreset` to +(Include Fill Hatches), `groupBlocks` (Always Export Group as Block Reference, which no preset sets), plus `path` and +the artboard choice. Setting `dxfPreset` to `cnc` sets the fields it sets (see `document.exportDxf`), and `dxfPreset` reads `custom` again once one of them is changed; setting it to `custom` puts back the defaults. `ui.dialog.confirm` checks them (a bad value, or Export Selected Art Only with nothing selected, keeps the dialog open), remembers them for the next DXF Options and diff --git a/docs/mcp.md b/docs/mcp.md index 2fd8648262..a0e64a6574 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -12658,7 +12658,11 @@ from the bottom-left corner of the first artboard (or `artboard`), in drawing un width profiles, arrowheads, dashes offset into their pattern) as filled outlines; `"editability"` keeps type as text and every stroke a line. `alterPaths` writes as filled outlines those strokes (with `"editability"` too), strokes wider than the widest lineweight (2.11 mm), and every stroke in R13 and R14, which have no lineweights; it keeps other -strokes as lines. `outlineText` outlines type, `selectedOnly` writes only the +strokes as lines. `outlineText` outlines type. `groupBlocks: true` (Always Export Group as Block Reference; default +`false`, and `dxfPreset` does not set it) writes each group as a block definition holding its contents, placed by one +INSERT on its layer at the origin, unscaled; a group inside it becomes a block placed inside that block, and a group +that writes nothing writes no block. Block names come from the group names (`Group` for an unnamed one), made unique +with `_2`, `_3`…. `selectedOnly` writes only the selected objects in their layers (every export takes it), and `useArtboards: true` writes one drawing per chosen artboard holding the art over it. `dxfPreset: "cnc"` (CNC / CAM; default `"custom"`) sets the options for cutting software that the call does not give: version `2000` (the oldest version that has both lightweight polylines and lineweights), `unit: diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 99255fa880..4471f01522 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -2566,6 +2566,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - DXF export's Include Placed Images and Include Fill Hatches (`includeImages`, `includeHatches`; VectorCraft's own options, on by default and off in CNC / CAM) leave out placed images with their linked files, without decoding them, and the solid hatch after each filled area's outlines, each on its own, with one note in `warnings` when something was left out; R12 keeps its own notes. An open path's fill outline is closed, as the fill is, in every version (`an_open_path_s_fill_outline_keeps_its_closing_edge`, `fills_without_hatches_keep_their_outlines`, `images_can_be_left_out_with_their_files`, `images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`, `placed_images_and_fill_hatches_can_be_left_out`, `include_placed_images_and_fill_hatches_follow_the_preset_and_a_change_shows_custom`). - DXF export writes a path of straight segments and circular arcs (a slot, a D shape, a rounded rectangle, a pie) as one polyline whose vertices carry a bulge (group 42) for each arc: an LWPOLYLINE in R14 and later, a POLYLINE with VERTEX entities in R12 and R13, closed when the path is closed, and it reads back as the same outline (#1299, `crates/cad/src/tests.rs`). Such a path was written as one SPLINE (a flattened polyline in R12); a path with any other curve still is. A shallow curve becomes an ARC or a bulge only when it lies on the circle within 5e-4 of its own extent as well as of the radius, and the drawing extents (`$EXTMIN`, `$EXTMAX`) reach the furthest points of every ARC and bulge. - DXF export with Use Artboards applies live effects and places symbols' art once for all the artboards' drawings instead of once for each drawing; each drawing's bytes, linked images, warnings and notes are the same as before (`drawings_apply_the_live_effects_once_and_match_drawings_written_alone`, `each_artboard_s_drawing_is_the_drawing_of_that_artboard_alone`). + - DXF Options' Always Export Group as Block Reference (`groupBlocks`, off by default and not set by a preset) writes each group as a block of its contents, placed by an INSERT on its layer, with groups inside it as blocks placed inside that block, in every version from R12 to 2018; the drawing reads back with the same art bounds (`groups_are_blocks_placed_by_inserts_in_every_version`, `blocks_read_back_at_the_place_their_group_was`, `group_blocks_write_a_group_as_an_insert`). Behavior reference: [Export artwork, AutoCAD export options](https://helpx.adobe.com/illustrator/using/exporting-artwork.html). - DWG drawings open and place in the desktop build, and `document.dxfInfo` reads them: craft-dwg converts the drawing to DXF, in a copy of the app started with `--dwg-worker`, off the UI thread when the user opens or places it, and the DXF reader reads it with the DXF Import Options. The web build and R1.x and R2.x drawings return an error that says to save the drawing as DXF. DWG is not written: Export As keeps it greyed out, exporting to it says to export DXF, and Save over the drawing is refused (`a_dwg_drawing_comes_in_as_its_dxf_does`, `document_open_reads_a_dwg_drawing_as_its_dxf`, `dxf_info_and_place_read_a_dwg`, `a_dwg_opened_is_never_written_back_as_dwg`; scores and estimates unchanged). - Affinity documents in (AF.1–AF.4): `.af` (Affinity 3) and `.afdesign`/`.afphoto`/`.afpub` (Affinity 1 and 2, container versions 8–12) open and place as editable art: layers and sublayers, groups (pass-through or isolated), artboards (with their names and backgrounds) and Publisher pages side by side, curves with live corners, parametric shapes (rectangles with corner radii, ellipses, polygons, stars, pies, triangles, trapezoids), compound shapes, solid/linear/elliptical gradient fills and strokes (weight, dashes, alignment, scale-with-object), clipping by nesting, vector and pixel masks, artistic and frame text with fonts, sizes, tracking, leading and alignment, placed images (their original JPEG/PNG) and pixel layers (8/16-bit RGB, CMYK), opacity, visibility, locking and blend modes, at the document's resolution in points. Effects, adjustments, brushes and pressure profiles, transparency gradients, master pages, symbol instances (imported as their cached picture), special shapes (cloud, heart, cog…, imported as ellipses) and Affinity-only blend modes are named in the import warning. A file whose native data can't be read opens as its embedded preview with the reason, and that preview can't be placed. Save never writes back over the Affinity file and there is no Affinity export. AF.5 (from DesignCraft's import, storytold/designcraft#291) adds master pages (on a locked layer behind the pages that show them), tables (area type per cell and a line per edge), each paragraph's alignment, indents, spacing and leading, horizontal text scale, outlined text, frame text sized by its text scale, drop shadows and outer glows as live effects (inner shadows as inner glows), outline effects as strokes, colour and gradient overlays baked into the paint, embedded Affinity documents as editable content (their artboards don't become artboards), pixel layers over 64 MP at a reduced resolution and HEIC photos from their stored pixels; automatic leading (size plus the font's line gap) fitted on thumbnails; underlines and strikethrough; strokes whose style is None (every shape stores one) left out, which also brings 6 public files closer to their thumbnails; line breaks inside a paragraph; table cell text centred as Affinity centres it, also where it is taller than its cell; CMYK pixel layers converted through the document's embedded CMYK profile (relative colorimetric with black-point compensation, as each layer's colour settings name), or kept as CMYK images when there is none; outline effects on stroked shapes around their stroke; artistic text whose paragraphs align differently aligned within its longest line, a frame's first baseline at cap height, and frames whose last lines' descenders hang out made tall enough to show them (all measured on a local document's own PDF export: baselines match to 0.1 pt); a local 56-artboard document's mean thumbnail difference went from 16.2 to 11.4, and its pages' mean difference from the owner's PDF export from 12.9 to 9.3. AF.4 adds Affinity 3 artboard recognition and actual-outline clipping, source-backed JPEG/PNG raster tiles, Unicode text-run recovery, stored fallback/exact installed fonts, OpenType feature flags and compound-geometry limits. 51 public CC0/MIT/Apache-2.0 files (33 current `.af`), pinned and sha256-verified (`cargo xtask corpus --affinity`), test native retention and every-board native/SVG/PDF/PSD output for current files; selected files compare their saved thumbnails. No Affinity reopen or independent paired PSD oracle was available; [source audit and complex-font gaps](affinity-validation.md); [scope, provenance and limits](../crates/affinity/README.md). - `.cdr` drawings of versions 1 to 27 open and place, and `.cdt` templates open as new untitled documents. `craft-cdr` reads the `WL` files of versions 1 and 2 (one page and one layer of rectangles, whole ellipses and curves with uniform fills and outlines), the RIFF chunk tree of versions 3 on and its compressed lists, and the ZIP packages of versions 14 on with the data streams of versions 16 on, and the importer maps pages to artboards side by side, layers by name, the master page's guidelines to guides on every page, groups, clipping containers (as clipping groups), curves and paths, rectangles (live, with each corner's radius), ellipses (live), arcs and polygons, uniform fills in CMYK, CMY, RGB, gray and registration, and outlines with their width (0.25 pt for a width of 0), caps, joins and dashes (behind the fill, or scaled with the object's matrix, where the file says so), an object without a fill or outline of its own taking its style's, hidden and locked layers, groups and objects, the winding flag as the nonzero fill rule, and a uniform transparency of version 13 and later as the object's opacity and blend mode. A library color stored with its name and values (version 13 and later, in a fill or an outline) becomes a spot swatch with its tint; one stored only by its number opens as a black spot color named by its palette and number, with a warning. Text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills, arrowheads, lenses, other transparency and the envelopes of version 3 are left out with a warning, and encrypted, ZIP64 and split packages are refused with a message. Every record layout has a source in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`). Reading is bounded by limits on input size, inflated size, package members, nesting, chunks, objects, coordinates and dashes, where an outline's dashes count for every shape that uses it (`craft-cdr` `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs`, `crates/engine/tests/import_fuzz.rs`). diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 542a3e8c41..6d29b8144d 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6"; +const REV: &str = "35709fdbe599b8e6309bafa8a18e20645e3602aa"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 5bc621ec7183133a25795c9136ba10a67554d780 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 15:57:15 -0800 Subject: [PATCH 16/24] Docs: a group that writes no entity writes no DXF block --- docs/target-app-parity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 91a3b15c32..ad1adbe7d4 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -2566,7 +2566,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - DXF export's Include Placed Images and Include Fill Hatches (`includeImages`, `includeHatches`; VectorCraft's own options, on by default and off in CNC / CAM) leave out placed images with their linked files, without decoding them, and the solid hatch after each filled area's outlines, each on its own, with one note in `warnings` when something was left out; R12 keeps its own notes. An open path's fill outline is closed, as the fill is, in every version (`an_open_path_s_fill_outline_keeps_its_closing_edge`, `fills_without_hatches_keep_their_outlines`, `images_can_be_left_out_with_their_files`, `images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`, `placed_images_and_fill_hatches_can_be_left_out`, `include_placed_images_and_fill_hatches_follow_the_preset_and_a_change_shows_custom`). - DXF export writes a path of straight segments and circular arcs (a slot, a D shape, a rounded rectangle, a pie) as one polyline whose vertices carry a bulge (group 42) for each arc: an LWPOLYLINE in R14 and later, a POLYLINE with VERTEX entities in R12 and R13, closed when the path is closed, and it reads back as the same outline (#1299, `crates/cad/src/tests.rs`). Such a path was written as one SPLINE (a flattened polyline in R12); a path with any other curve still is. A shallow curve becomes an ARC or a bulge only when it lies on the circle within 5e-4 of its own extent as well as of the radius, and the drawing extents (`$EXTMIN`, `$EXTMAX`) reach the furthest points of every ARC and bulge. - DXF export with Use Artboards applies live effects and places symbols' art once for all the artboards' drawings instead of once for each drawing; each drawing's bytes, linked images, warnings and notes are the same as before (`drawings_apply_the_live_effects_once_and_match_drawings_written_alone`, `each_artboard_s_drawing_is_the_drawing_of_that_artboard_alone`). - - DXF Options' Always Export Group as Block Reference (`groupBlocks`, off by default and not set by a preset) writes each group as a block of its contents, placed by an INSERT on its layer, with groups inside it as blocks placed inside that block, in every version from R12 to 2018; the drawing reads back with the same art bounds (`groups_are_blocks_placed_by_inserts_in_every_version`, `blocks_read_back_at_the_place_their_group_was`, `group_blocks_write_a_group_as_an_insert`). Behavior reference: [Export artwork, AutoCAD export options](https://helpx.adobe.com/illustrator/using/exporting-artwork.html). + - DXF Options' Always Export Group as Block Reference (`groupBlocks`, off by default and not set by a preset) writes each group with output as a block of its contents, placed by an INSERT on its layer, with groups inside it as blocks placed inside that block, in every version from R12 to 2018; a group whose contents write no entity (an empty group, or one whose objects are all hidden or left out) writes no block or INSERT; the drawing reads back with the same art bounds (`groups_are_blocks_placed_by_inserts_in_every_version`, `blocks_read_back_at_the_place_their_group_was`, `group_blocks_write_a_group_as_an_insert`). Behavior reference: [Export artwork, AutoCAD export options](https://helpx.adobe.com/illustrator/using/exporting-artwork.html). - DWG drawings open and place in the desktop build, and `document.dxfInfo` reads them: craft-dwg converts the drawing to DXF, in a copy of the app started with `--dwg-worker`, off the UI thread when the user opens or places it, and the DXF reader reads it with the DXF Import Options. The web build and R1.x and R2.x drawings return an error that says to save the drawing as DXF. DWG is not written: Export As keeps it greyed out, exporting to it says to export DXF, and Save over the drawing is refused (`a_dwg_drawing_comes_in_as_its_dxf_does`, `document_open_reads_a_dwg_drawing_as_its_dxf`, `dxf_info_and_place_read_a_dwg`, `a_dwg_opened_is_never_written_back_as_dwg`; scores and estimates unchanged). - Affinity documents in (AF.1–AF.4): `.af` (Affinity 3) and `.afdesign`/`.afphoto`/`.afpub` (Affinity 1 and 2, container versions 8–12) open and place as editable art: layers and sublayers, groups (pass-through or isolated), artboards (with their names and backgrounds) and Publisher pages side by side, curves with live corners, parametric shapes (rectangles with corner radii, ellipses, polygons, stars, pies, triangles, trapezoids), compound shapes, solid/linear/elliptical gradient fills and strokes (weight, dashes, alignment, scale-with-object), clipping by nesting, vector and pixel masks, artistic and frame text with fonts, sizes, tracking, leading and alignment, placed images (their original JPEG/PNG) and pixel layers (8/16-bit RGB, CMYK), opacity, visibility, locking and blend modes, at the document's resolution in points. Effects, adjustments, brushes and pressure profiles, transparency gradients, master pages, symbol instances (imported as their cached picture), special shapes (cloud, heart, cog…, imported as ellipses) and Affinity-only blend modes are named in the import warning. A file whose native data can't be read opens as its embedded preview with the reason, and that preview can't be placed. Save never writes back over the Affinity file and there is no Affinity export. AF.5 (from DesignCraft's import, storytold/designcraft#291) adds master pages (on a locked layer behind the pages that show them), tables (area type per cell and a line per edge), each paragraph's alignment, indents, spacing and leading, horizontal text scale, outlined text, frame text sized by its text scale, drop shadows and outer glows as live effects (inner shadows as inner glows), outline effects as strokes, colour and gradient overlays baked into the paint, embedded Affinity documents as editable content (their artboards don't become artboards), pixel layers over 64 MP at a reduced resolution and HEIC photos from their stored pixels; automatic leading (size plus the font's line gap) fitted on thumbnails; underlines and strikethrough; strokes whose style is None (every shape stores one) left out, which also brings 6 public files closer to their thumbnails; line breaks inside a paragraph; table cell text centred as Affinity centres it, also where it is taller than its cell; CMYK pixel layers converted through the document's embedded CMYK profile (relative colorimetric with black-point compensation, as each layer's colour settings name), or kept as CMYK images when there is none; outline effects on stroked shapes around their stroke; artistic text whose paragraphs align differently aligned within its longest line, a frame's first baseline at cap height, and frames whose last lines' descenders hang out made tall enough to show them (all measured on a local document's own PDF export: baselines match to 0.1 pt); a local 56-artboard document's mean thumbnail difference went from 16.2 to 11.4, and its pages' mean difference from the owner's PDF export from 12.9 to 9.3. AF.4 adds Affinity 3 artboard recognition and actual-outline clipping, source-backed JPEG/PNG raster tiles, Unicode text-run recovery, stored fallback/exact installed fonts, OpenType feature flags and compound-geometry limits. 51 public CC0/MIT/Apache-2.0 files (33 current `.af`), pinned and sha256-verified (`cargo xtask corpus --affinity`), test native retention and every-board native/SVG/PDF/PSD output for current files; selected files compare their saved thumbnails. No Affinity reopen or independent paired PSD oracle was available; [source audit and complex-font gaps](affinity-validation.md); [scope, provenance and limits](../crates/affinity/README.md). - `.cdr` drawings of versions 1 to 27 open and place, and `.cdt` templates open as new untitled documents. `craft-cdr` reads the `WL` files of versions 1 and 2 (one page and one layer of rectangles, whole ellipses and curves with uniform fills and outlines), the RIFF chunk tree of versions 3 on and its compressed lists, and the ZIP packages of versions 14 on with the data streams of versions 16 on, and the importer maps pages to artboards side by side, layers by name, the master page's guidelines to guides on every page, groups, clipping containers (as clipping groups), curves and paths, rectangles (live, with each corner's radius), ellipses (live), arcs and polygons, uniform fills in CMYK, CMY, RGB, gray and registration, and outlines with their width (0.25 pt for a width of 0), caps, joins and dashes (behind the fill, or scaled with the object's matrix, where the file says so), an object without a fill or outline of its own taking its style's, hidden and locked layers, groups and objects, the winding flag as the nonzero fill rule, and a uniform transparency of version 13 and later as the object's opacity and blend mode. A library color stored with its name and values (version 13 and later, in a fill or an outline) becomes a spot swatch with its tint; one stored only by its number opens as a black spot color named by its palette and number, with a warning. Text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills, arrowheads, lenses, other transparency and the envelopes of version 3 are left out with a warning, and encrypted, ZIP64 and split packages are refused with a message. Every record layout has a source in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`). Reading is bounded by limits on input size, inflated size, package members, nesting, chunks, objects, coordinates and dashes, where an outline's dashes count for every shape that uses it (`craft-cdr` `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs`, `crates/engine/tests/import_fuzz.rs`). From 1efdc3ffb1471f6c02c0d7ee650287f04993174b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 16:57:16 -0800 Subject: [PATCH 17/24] Fonts: text is hinted again, now that the pinned skrifa ends its blue-zone search The VectorCraft window drew all text without font hinting, because adopt_context turned egui's hinting off in both themes of each new context (ui_fonts::hinting_off). With hinting on, skrifa 0.44's automatic hinter never finished a tall narrow Hebrew letter in a face without hinting instructions, and the font list stopped responding. The craft-libs rev in Cargo.toml (37d0532f42, storytold/craft-libs#5222) carries skrifa 0.44.0 with the blue-zone exit, and the [patch.crates-io] entry takes skrifa from it. Remove hinting_off and its call, so every context hints text as egui does by default: interface text and the samples in the font list and the font picker. Type on the canvas is drawn from its own outlines and does not change. a_face_without_hinting_instructions_draws_its_sample now checks that a context the app adopts hints text in its global, light and dark styles, and still draws U+05D1 from a face without instructions. --- crates/ui-egui/src/graphics.rs | 3 +-- crates/ui-egui/src/tests/font_menu.rs | 10 +++++----- crates/ui-egui/src/ui_fonts.rs | 11 ----------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/crates/ui-egui/src/graphics.rs b/crates/ui-egui/src/graphics.rs index b90827aea0..0e200259b5 100644 --- a/crates/ui-egui/src/graphics.rs +++ b/crates/ui-egui/src/graphics.rs @@ -127,14 +127,13 @@ impl VectorcraftApp { /// after losing its graphics), everything uploaded to the old one is made again: the fonts and /// theme, the canvas, the place cursor's thumbnails and every [`TexCache`]. The host hands it /// the window's context when it creates the app, so the first frame's input has the app's - /// commands. Each new context draws its text without hinting ([`crate::ui_fonts::hinting_off`]). + /// commands. pub fn adopt_context(&mut self, ctx: &egui::Context) { let tag = context_tag(ctx); self.ui_ctx = Some(ctx.clone()); if self.context == tag { return; } - crate::ui_fonts::hinting_off(ctx); if self.context != 0 { log::info!("vectorcraft: new graphics context: uploading the UI again"); forget_textures(); diff --git a/crates/ui-egui/src/tests/font_menu.rs b/crates/ui-egui/src/tests/font_menu.rs index 2045e85976..3a8567ff7f 100644 --- a/crates/ui-egui/src/tests/font_menu.rs +++ b/crates/ui-egui/src/tests/font_menu.rs @@ -77,8 +77,8 @@ fn samples_show_the_text_in_the_family_or_a_generic_sample() { /// A face with no hinting instructions draws a sample in a context the app has adopted, as the font list and the /// font picker draw each family's sample in its own face (a document face of the context): a Hebrew letter that is a -/// bar 20 by 700 thousandths of an em, whose blue zones the automatic hinter of skrifa 0.44 never finishes measuring. -/// The face is served to the fixture's context only, so the font database other tests read does not change. The +/// bar 20 by 700 thousandths of an em. The context hints text in both themes, so the sample goes through skrifa's +/// automatic hinter, whose blue-zone search for such a letter ends with the pinned skrifa. The face is served to the fixture's context only, so the font database other tests read does not change. The /// sample is one rasterized glyph from that face. It is drawn on a thread of its own, and the test fails when it has /// not ended after 300 s. #[test] @@ -145,9 +145,9 @@ fn a_face_without_hinting_instructions_draws_its_sample() { let (texts, [hinting, light_hinting, dark_hinting], fixture_has_glyph, nonempty_glyph) = rx.recv_timeout(std::time::Duration::from_secs(300)).unwrap_or_else(|e| panic!("drawing the sample: {e}")); assert!(texts.iter().any(|t| t == "\u{5d1}"), "the sample is the letter, in the face: {texts:?}"); - assert!(!hinting, "a context the app adopts draws text without hinting"); - assert!(!light_hinting, "the light theme draws text without hinting"); - assert!(!dark_hinting, "the dark theme draws text without hinting"); + assert!(hinting, "a context the app adopts hints text"); + assert!(light_hinting, "the light theme hints text"); + assert!(dark_hinting, "the dark theme hints text"); assert!(fixture_has_glyph, "the sample's face maps U+05D1"); assert!(nonempty_glyph, "the sample is one rasterized glyph for U+05D1"); } diff --git a/crates/ui-egui/src/ui_fonts.rs b/crates/ui-egui/src/ui_fonts.rs index e75c8e21b1..24260dc24c 100644 --- a/crates/ui-egui/src/ui_fonts.rs +++ b/crates/ui-egui/src/ui_fonts.rs @@ -24,17 +24,6 @@ pub fn ui_fonts() -> UiFonts<'static> { } } -/// Turns font hinting off for all text `ctx` draws, in both themes. With hinting on, egui hints a TrueType face that -/// has no hinting instructions (no `fpgm`, no `prep` and no glyph instructions) with skrifa 0.44's automatic hinter, -/// whose blue-zone search never ends for some glyphs, such as a tall narrow Hebrew letter, so the font list stops -/// responding when a row draws such a face. The font list and the samples get their faces through craft-libs, which -/// sets no hinting option per face, so the switch covers every face of the context. Hinting stays off until the -/// skrifa blue-zone exit (storytold/craft-libs#5222) is in the build; the craft-libs pin that brings it removes this -/// function and its call. -pub(crate) fn hinting_off(ctx: &egui::Context) { - ctx.all_styles_mut(|style| style.visuals.text_options.font_hinting = false); -} - #[derive(Clone)] struct FontSelection { language: Lang, From 4e9a761be2959da21bd1b85fb5dc83a33b026ad0 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 17:26:55 -0800 Subject: [PATCH 18/24] Tests: wrap the unhinted sample test's doc comment like the rest of the file --- crates/ui-egui/src/tests/font_menu.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/tests/font_menu.rs b/crates/ui-egui/src/tests/font_menu.rs index 3a8567ff7f..2fc247cfe9 100644 --- a/crates/ui-egui/src/tests/font_menu.rs +++ b/crates/ui-egui/src/tests/font_menu.rs @@ -78,9 +78,9 @@ fn samples_show_the_text_in_the_family_or_a_generic_sample() { /// A face with no hinting instructions draws a sample in a context the app has adopted, as the font list and the /// font picker draw each family's sample in its own face (a document face of the context): a Hebrew letter that is a /// bar 20 by 700 thousandths of an em. The context hints text in both themes, so the sample goes through skrifa's -/// automatic hinter, whose blue-zone search for such a letter ends with the pinned skrifa. The face is served to the fixture's context only, so the font database other tests read does not change. The -/// sample is one rasterized glyph from that face. It is drawn on a thread of its own, and the test fails when it has -/// not ended after 300 s. +/// automatic hinter, whose blue-zone search for such a letter ends with the pinned skrifa. The face is served to the +/// fixture's context only, so the font database other tests read does not change. The sample is one rasterized glyph +/// from that face. It is drawn on a thread of its own, and the test fails when it has not ended after 300 s. #[test] fn a_face_without_hinting_instructions_draws_its_sample() { use std::sync::{Arc, Mutex}; From 79aea5c009e05826ba55139b799bf0c6cf983274 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 17:41:34 -0800 Subject: [PATCH 19/24] Place: placed type keeps an installed font that shares a composite font's name A native file's composite font named like an installed font is not lent while the file's type is measured for placement, so the type is laid out in the installed font. Adoption still brought that definition in under a free name such as "Source Sans 3 2" and renamed the type to it, so the placed type switched to the composite font it was never measured in. Adoption now skips the source definitions the font database does not lend: one named like an installed font, or one that fails its own checks. --- crates/engine/src/cmd/place/adopt.rs | 15 +++++++++---- .../engine/tests/native_composite_adoption.rs | 21 +++++++++++++++++++ docs/mcp.md | 3 +++ 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/cmd/place/adopt.rs b/crates/engine/src/cmd/place/adopt.rs index c32aff52e1..f346d68b8f 100644 --- a/crates/engine/src/cmd/place/adopt.rs +++ b/crates/engine/src/cmd/place/adopt.rs @@ -597,12 +597,19 @@ fn collect_resources(src: &Document, nodes: &mut [Node], composites: bool) -> (U pub(crate) fn adopt(dst: &mut Document, src: &Document, nodes: &mut [Node], cmd: &str) -> Result<()> { let composites = !src.composite_fonts.is_empty() || !dst.composite_fonts.is_empty(); let (used, mut src_brushes, families) = collect_resources(src, nodes, composites); - let fonts = src.composite_fonts.iter().filter(|font| families.contains(&font.name.to_lowercase())).cloned().collect::>(); + // The source's type was measured without its composite fonts that fail their checks or are + // named like an installed font (the font database does not lend them), so they don't come in. + let db = vectorcraft_text::FontDb::global(); + let fonts = src + .composite_fonts + .iter() + .filter(|font| families.contains(&font.name.to_lowercase()) && font.check().is_ok() && !db.has_installed_family(&font.name)) + .cloned() + .collect::>(); // A family the source does not define as a composite font, which the destination defines as // one, would draw in the destination's composite font after placement. - let undefined_clash = families - .iter() - .any(|family| CompositeFont::named(&src.composite_fonts, family).is_none() && CompositeFont::named(&dst.composite_fonts, family).is_some()); + let undefined_clash = + families.iter().any(|family| CompositeFont::named(&fonts, family).is_none() && CompositeFont::named(&dst.composite_fonts, family).is_some()); // All representability/validation errors precede incoming or destination mutation. let plan = if fonts.is_empty() && !undefined_clash { None } else { Some(plan_import(fonts, families, dst, cmd)?) }; let staged; diff --git a/crates/engine/tests/native_composite_adoption.rs b/crates/engine/tests/native_composite_adoption.rs index cd033801ab..657dd2c668 100644 --- a/crates/engine/tests/native_composite_adoption.rs +++ b/crates/engine/tests/native_composite_adoption.rs @@ -102,6 +102,27 @@ fn kept_text(session: &mut Session, font: &CompositeFont) -> (NodeId, Node) { (id, document(session).node(id).unwrap().clone()) } +#[test] +fn placing_a_document_whose_composite_font_names_an_installed_font_keeps_the_installed_font() { + let _context = FontContext::hold(); + assert!(FontDb::global().has_installed_family("Source Sans 3"), "CONTROL: the bundled test face is installed"); + let mut source = destination(&[]); + source.execute("text.create", &json!({"x": 4, "y": 16, "text": "Ab", "font": "Source Sans 3"})).unwrap(); + let mut doc: Document = document(&source).clone(); + *doc.composite_fonts = vec![CompositeFont::new("Source Sans 3", "NativeInstalledNamePart", "Regular")]; + let dir = TempDir::new("native-composite-installed"); + let path = dir.join("installed.vectorcraft"); + let options = vectorcraft_format::SaveOptions { include_linked: true, precision: None, ..Default::default() }; + std::fs::write(&path, vectorcraft_format::save_with(&doc, &options).unwrap()).unwrap(); + for linked in [false, true] { + let mut session = destination(&[]); + let id = place(&mut session, &path, linked); + assert_eq!(placed_family(&session, id), "Source Sans 3", "the placed type keeps the installed family it was measured in"); + let fonts = &document(&session).composite_fonts; + assert!(fonts.is_empty(), "no composite font comes in for a name the source could not use: {fonts:?}"); + } +} + #[test] fn native_composite_meanings_survive_editable_and_embedded_placement() { let _context = FontContext::hold(); diff --git a/docs/mcp.md b/docs/mcp.md index 183f042d80..0c4d156d5e 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -11827,6 +11827,9 @@ with `link: false` or from `dataBase64` it is one group. `at` centres it, `rect` swaps the selected object (keeping its place and transform), `template` puts it on a new template layer. When placed editable art names a font family it does not define as a composite font, and the document defines a composite font of that name, the placed type gets a free name such as "Name 2" so it keeps the font it was laid out in. +A composite font of the placed file that is named like an installed font, or whose own name or part values are out of +range, does not come in: the file's type was laid out without it, and keeps that font. Two definitions of one name +that both come in still refuse the placement. A DCS file (Desktop Color Separation, version 1.0 or 2.0: an EPS file whose header names one EPS program per printing plate, ) is placed only from its `path` with link, as one linked image ([Import DCS files](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/import-other-file-types/import-dcs-files.html)). From b4f7d20598657fc63a98eef80a00101b9d4f8cc2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 17:44:33 -0800 Subject: [PATCH 20/24] Libraries: a library taller than the panel scrolls The panel's items sat in a stack that filled the panel's room without scrolling, so the wheel, touchpad and scroll bar did nothing and items past the bottom edge could not be reached, in both the list and the thumbnail view. The stack now scrolls vertically under the library picker and search field, and the footer stays in place. --- crates/ui-egui/src/panels/libraries.rs | 9 ++++--- crates/ui-egui/src/panels/libraries/tests.rs | 28 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/panels/libraries.rs b/crates/ui-egui/src/panels/libraries.rs index d9e2f9b70d..d69bf844fd 100644 --- a/crates/ui-egui/src/panels/libraries.rs +++ b/crates/ui-egui/src/panels/libraries.rs @@ -20,7 +20,7 @@ use craft::keymap::CommandRef; use craft::theme::variant::Tone; use craft::ui::choice::Segmented; use craft::ui::contract::{ - ActivateOn, Bind, BodyCx, CollectionEvent, DropAt, DropKind, DropPlace, Entry, ListDrag, Props as _, ReorderRule, SelectMode, Show as _, + ActivateOn, Bind, BodyCx, CollectionEvent, DropAt, DropKind, DropPlace, Entry, ListDrag, Props as _, ReorderRule, Scroll, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, Trigger, }; use craft::ui::display::{Divider, Shade, Text}; @@ -349,13 +349,14 @@ impl<'a> View<'a> { } } - /// The list: the ungrouped items, then the groups as sections. A drop anywhere on it away from - /// the items and groups takes an item out of its group, or adds art or a swatch ungrouped. + /// The list: the ungrouped items, then the groups as sections, scrolling under the header when + /// they are taller than the panel. A drop anywhere on it away from the items and groups takes an + /// item out of its group, or adds art or a swatch ungrouped. fn show(&self, ui: &mut Ui, closed: &mut HashSet<(String, String)>, acts: &RefCell>) { let membership = Arc::clone(&self.membership); let list = DropAction::new(move |drag: &PanelDrag| membership.landing(drag, None).is_some()) .sizing(Sizing::Fill) - .show(ui, |ui, _| Stack::new().fill().show(ui, |ui, cx| self.contents(ui, cx, closed, acts))); + .show(ui, |ui, _| Stack::new().fill().scroll(Scroll::vertical()).show(ui, |ui, cx| self.contents(ui, cx, closed, acts))); if let Some(drag) = &list.output.dropped && let Some(act) = self.membership.landing(drag, None) { diff --git a/crates/ui-egui/src/panels/libraries/tests.rs b/crates/ui-egui/src/panels/libraries/tests.rs index b9877b53ca..cfc1cd3a68 100644 --- a/crates/ui-egui/src/panels/libraries/tests.rs +++ b/crates/ui-egui/src/panels/libraries/tests.rs @@ -679,6 +679,34 @@ fn a_shrunk_thumbnail_keeps_its_color_beside_clear_pixels() { } } +/// A library longer than the panel scrolls: the wheel over the items brings the last one into view, in the list view +/// and in the thumbnail view, while the footer's New Group stays in view. +#[test] +fn a_long_library_scrolls_with_the_wheel() { + for list in [false, true] { + let mut app = app(); + app.run("library.create", json!({"name": "Brand"})).unwrap(); + for i in 0..400 { + app.run("library.add", json!({"kind": "fillColor", "color": format!("#{:06x}", i * 0x9731), "name": format!("Swatch {i}")})).unwrap(); + } + app.ui.libraries_list_view = list; + let mut panel = Harness::new(app, show); + panel.room(egui::vec2(300.0, 400.0)); + panel.frame(); + panel.frame(); + assert!(panel.in_view("Swatch 0"), "the first item shows (list view {list})"); + assert!(!panel.in_view("Swatch 399"), "the last item starts out of view (list view {list})"); + let at = panel.rect("Swatch 0").center(); + for _ in 0..40 { + panel.scroll_at(at, -400.0); + } + panel.frame(); + assert!(panel.in_view("Swatch 399"), "the wheel scrolls the last item into view (list view {list})"); + assert!(!panel.in_view("Swatch 0"), "the first item scrolls out of view (list view {list})"); + assert!(panel.in_view("New Group"), "the footer stays in view (list view {list})"); + } +} + /// Graphic thumbnails decoded while the panel draws one frame. fn decoded(panel: &mut Harness) -> usize { super::counters::DECODED.with(|c| c.set(0)); From ec78385f8ca7f96af05b9c1836817e9380a67ac9 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 17:45:02 -0800 Subject: [PATCH 21/24] Artwork Cleanup: Release All Containers keeps group paint and clipped art on locked artboards - A group with fill or stroke rows of its own stays whole, so its members keep the paint the group draws for them. - A clipping group whose shown clipped artwork overlaps a locked artboard stays whole even when its clipping path lies off the artboard, including when a target inside it is named by `ids`. Hidden artwork, art in pattern editing mode and runs with `clipGroups` false do not count. --- .../engine/src/cmd/addons/cleanup/release.rs | 45 ++++- .../src/cmd/addons/cleanup/release/tests.rs | 171 ++++++++++++++++++ docs/mcp.md | 2 +- docs/target-app-parity.md | 5 +- 4 files changed, 215 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/addons/cleanup/release.rs b/crates/engine/src/cmd/addons/cleanup/release.rs index 62b9c4c836..2e09151866 100644 --- a/crates/engine/src/cmd/addons/cleanup/release.rs +++ b/crates/engine/src/cmd/addons/cleanup/release.rs @@ -9,7 +9,7 @@ use std::collections::{HashMap, HashSet}; use std::sync::Arc; use serde_json::{Value, json}; -use vectorcraft_doc::{Document, LiveShape, Node, NodeId, NodeKind}; +use vectorcraft_doc::{Document, LiveShape, LockedArtboards, Node, NodeId, NodeKind}; use vectorcraft_geom::PathData; use vectorcraft_tools::builder::is_live_paint; @@ -27,7 +27,7 @@ pub(super) fn specs() -> Vec { "Release All Containers…", ["Object", "Plug-ins", "Artwork Cleanup"], None, - "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`; duplicate ids are an error), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless their clipping path or clipped artwork overlaps a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three true; `scope` and the three are never null} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with live effects on their appearance or fill and stroke rows, objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants; the entire clipping mask subtree of a clipping group or layer that stays is left as it is, including directly selected or named descendants; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", + "{scope?: \"selection\"|\"document\" (default: the selection, or the document while nothing is selected), ids?: [id…] (the objects, groups and layers to release in, instead of `scope`; duplicate ids are an error), groups?: bool (true: groups are ungrouped), clipGroups?: bool (true: clipping groups are ungrouped and layers stop clipping unless their clipping path or clipped artwork overlaps a locked artboard, their released clipping paths kept as plain paths), compoundPaths?: bool (true: compound paths, and paths of several subpaths, become one path per subpath); at least one of the three true; `scope` and the three are never null} take apart every container of the kinds asked for, at every level of nesting, as one undo step when one goes; layers stay; each object keeps the opacity of the groups and compound paths it was in, and a compound path's paths take its paint; objects with live effects on their appearance or fill and stroke rows, groups with fill or stroke rows of their own, objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants; the entire clipping mask subtree of a clipping group or layer that stays is left as it is, including directly selected or named descendants; from the selection or the document, locked and hidden objects, and objects on a locked artboard, stay whole; named by `ids`, locked and hidden ones are taken apart too (their objects become locked or hidden as they were), but not those on a locked artboard; the selection keeps what it held, each object taken apart replaced by what it left, locked and hidden objects left out → {scope (\"selection\", \"document\" or \"ids\"), ids (the objects selected), groups, clipGroups, compoundPaths (how many of each were released)}", has_doc, release_all )] @@ -66,8 +66,8 @@ struct Release<'a> { /// Whether `n` stays whole whatever is asked: a live object kept as a group or compound path /// (a compound shape, Live Paint group, graph, dimension, flare, Objects on Path, generated art, /// Shaper Group, Image Trace object, a clipping path's painted pieces), a path with Live Corners, -/// whose parts would lose their editable corners, or one with an opacity mask or live effects -/// on its appearance or fill and stroke rows. +/// whose parts would lose their editable corners, one with an opacity mask or live effects +/// on its appearance or fill and stroke rows, or a group with fill or stroke rows of its own. fn live(n: &Node) -> bool { let x = n.extras(); matches!(&n.kind, NodeKind::Blend { .. } | NodeKind::Envelope { .. } | NodeKind::Repeat(_) | NodeKind::Intertwine { .. }) @@ -84,6 +84,7 @@ fn live(n: &Node) -> bool { || x.generated.is_some() || x.live_paint_gaps.is_some() || x.clip_pieces + || (matches!(&n.kind, NodeKind::Group { .. }) && !n.appearance.items.is_empty()) || n.is_compound_shape() || is_live_paint(n) } @@ -269,6 +270,18 @@ impl Release<'_> { } } +/// Whether shown artwork in `n` overlaps a locked artboard: a plain group that is not live +/// ([`live`]) by its shown members, anything else by its own bounds. +fn shows_on(locks: &LockedArtboards<'_>, n: &Node) -> bool { + if !n.visible { + return false; + } + match (&n.kind, n.children()) { + (NodeKind::Group { clip: false, .. }, Some(children)) if !live(n) => children.iter().any(|c| shows_on(locks, c)), + _ => locks.holds(n), + } +} + /// Whether `id` is in the clipping mask subtree of a clipping group or layer. fn in_clipping_mask(d: &Document, id: NodeId) -> bool { d.ancestry(id).is_some_and(|chain| { @@ -334,7 +347,29 @@ fn release_all(s: &mut Session, p: &Value) -> Result { candidates(n, kinds.clips, &mut found); } let locks = d.locked_artboards(); - found.into_iter().filter(|id| locks.holds_id(*id)).collect() + let mut held: HashSet = found.iter().copied().filter(|id| locks.holds_id(*id)).collect(); + // A shown clipping group whose clipped artwork overlaps a locked artboard stays whole, + // wherever its clipping path lies, when clipping groups are released; the clipping groups + // the targets are in count too. + let ancestors = roots.iter().filter_map(|id| d.ancestry(*id)).flatten(); + let clip_groups: HashSet = found + .iter() + .copied() + .chain(ancestors) + .filter(|id| kinds.clips && d.node(*id).is_some_and(|n| matches!(&n.kind, NodeKind::Group { clip: true, .. }))) + .collect(); + // Pattern editing mode's art is on no artboard. + let pattern_layer = d.pattern_edit.as_ref().map(|e| e.layer); + for id in clip_groups { + let shown = d.ancestry(id).is_some_and(|chain| chain.iter().all(|a| Some(*a) != pattern_layer && d.node(*a).is_some_and(|n| n.visible))); + if shown + && let Some(n) = d.node(id) + && n.children().is_some_and(|c| c.iter().skip(1).any(|c| shows_on(&locks, c))) + { + held.insert(id); + } + } + held } else { HashSet::new() }; diff --git a/crates/engine/src/cmd/addons/cleanup/release/tests.rs b/crates/engine/src/cmd/addons/cleanup/release/tests.rs index f0b95941a1..991e74f854 100644 --- a/crates/engine/src/cmd/addons/cleanup/release/tests.rs +++ b/crates/engine/src/cmd/addons/cleanup/release/tests.rs @@ -509,6 +509,177 @@ fn release_all_keeps_a_layer_mask_that_alone_overlaps_a_locked_artboard() { } } +#[test] +fn release_all_keeps_a_clipping_group_whose_clipped_art_overlaps_a_locked_artboard() { + let mut s = session(); + let art = rect(&mut s, 10.0, 10.0); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[art, mask]); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (0, 0, 0), "{r}"); + assert_eq!(s.doc().unwrap().doc.parent_of(art), Some(g)); + assert!(node(&s, g).unwrap().clips()); +} + +#[test] +fn release_all_keeps_a_named_group_in_a_clipping_group_over_a_locked_artboard() { + let mut s = session(); + let art = rect(&mut s, 10.0, 10.0); + let other = rect(&mut s, 40.0, 10.0); + let inner = group(&mut s, &[art, other]); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[inner, mask]); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"ids": [inner.0]})).unwrap(); + assert_eq!(counts(&r), (0, 0, 0), "{r}"); + assert_eq!(s.doc().unwrap().doc.parent_of(art), Some(inner)); + assert_eq!(s.doc().unwrap().doc.parent_of(inner), Some(g)); +} + +#[test] +fn release_all_takes_apart_a_named_hidden_clipping_group_with_visible_art() { + let mut s = session(); + let art = rect(&mut s, 10.0, 10.0); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[art, mask]); + change(&mut s, g, |n| n.visible = false); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"ids": [g.0]})).unwrap(); + assert_eq!(counts(&r), (0, 1, 0), "{r}"); + assert!(node(&s, g).is_none()); + assert!(!node(&s, art).unwrap().visible); +} + +#[test] +fn release_all_takes_apart_a_clipping_group_in_a_named_hidden_group() { + let mut s = session(); + let art = rect(&mut s, 10.0, 10.0); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[art, mask]); + let other = rect(&mut s, 40.0, 10.0); + let outer = group(&mut s, &[g, other]); + change(&mut s, outer, |n| n.visible = false); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"ids": [outer.0]})).unwrap(); + assert_eq!(counts(&r), (1, 1, 0), "{r}"); + assert!(node(&s, g).is_none()); +} + +#[test] +fn release_all_ignores_hidden_clipped_art_over_a_locked_artboard() { + let mut s = session(); + let hidden = rect(&mut s, 10.0, 10.0); + let shown = rect(&mut s, 600.0, 10.0); + let inner = group(&mut s, &[hidden, shown]); + change(&mut s, hidden, |n| n.visible = false); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[inner, mask]); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (1, 1, 0), "{r}"); + assert!(node(&s, g).is_none()); + assert!(!node(&s, hidden).unwrap().visible); +} + +#[test] +fn release_all_keeps_a_clipping_group_whose_group_stroke_reaches_a_locked_artboard() { + let mut s = session(); + let a = rect(&mut s, 600.0, 10.0); + let b = rect(&mut s, 640.0, 10.0); + let inner = group(&mut s, &[a, b]); + change(&mut s, inner, |n| n.appearance = Appearance::basic(Paint::None, Paint::solid(Color::rgb(0.0, 0.0, 0.0)), 500.0).into()); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[inner, mask]); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (0, 0, 0), "{r}"); + assert_eq!(s.doc().unwrap().doc.parent_of(inner), Some(g)); +} + +#[test] +fn release_all_ungroups_off_artboard_groups_in_a_kept_clipping_group() { + let mut s = session(); + let a = rect(&mut s, 600.0, 10.0); + let b = rect(&mut s, 640.0, 10.0); + let inner = group(&mut s, &[a, b]); + let on = rect(&mut s, 10.0, 10.0); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[inner, on, mask]); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"scope": "document", "clipGroups": false})).unwrap(); + assert_eq!(counts(&r), (1, 0, 0), "{r}"); + assert!(node(&s, inner).is_none()); + assert_eq!(s.doc().unwrap().doc.parent_of(a), Some(g)); +} + +#[test] +fn release_all_takes_apart_pattern_editing_art_over_a_locked_artboard() { + let mut s = session(); + let art = rect(&mut s, 10.0, 10.0); + let mask = rect(&mut s, 500.0, 10.0); + let g = clip_group(&mut s, &[art, mask]); + select(&mut s, &[]); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + let layer = d.layers[0].id; + d.pattern_edit = Some(vectorcraft_doc::PatternEdit { pattern: "Checks".into(), layer, original: None }); + Ok(()) + }) + .unwrap(); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (0, 1, 0), "{r}"); + assert!(node(&s, g).is_none()); +} + +#[test] +fn release_all_keeps_a_group_with_its_own_fill_or_stroke() { + let mut s = session(); + let a = rect(&mut s, 10.0, 10.0); + let b = rect(&mut s, 40.0, 10.0); + let g = group(&mut s, &[a, b]); + change(&mut s, g, |n| n.appearance = red().into()); + let r = s.execute(C, &json!({"scope": "document"})).unwrap(); + assert_eq!(counts(&r), (0, 0, 0), "{r}"); + assert_eq!(s.doc().unwrap().doc.parent_of(a), Some(g)); + assert_eq!(*node(&s, g).unwrap().appearance, red()); +} + #[test] fn release_all_reuses_unchanged_siblings_when_rebuilding_a_layer() { let mut s = session(); diff --git a/docs/mcp.md b/docs/mcp.md index e77f4b9cf5..f6b8083815 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -17442,7 +17442,7 @@ their clipping path or clipped artwork overlaps a locked artboard (released clip and at least one must be true. Layers stay. Objects keep the opacity of the groups and compound paths they were in, and the paths of a compound path take its paint. Objects with live effects -on their appearance or fill and stroke rows, objects with an opacity mask, compound shapes, Live Paint groups, graphs, +on their appearance or fill and stroke rows, groups with fill or stroke rows of their own, objects with an opacity mask, compound shapes, Live Paint groups, graphs, dimensions, flares, Objects on Path, generated art, Shaper Groups, Image Trace objects, paths with Live Corners, blends, envelopes, repeats, intertwines and other live objects stay whole, including directly selected or named descendants. The entire clipping mask subtree of a clipping group or layer that diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 952ad949d4..20b4eb4d56 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -3021,8 +3021,9 @@ state. Tests: `simplify_named_locked_and_hidden_paths`, `deep_ungroup_named_lock Release All Containers… (`addon.cleanup.releaseAll`) takes apart the groups, clipping groups and compound paths of the kinds asked for in the selection, the objects named or the whole document, at every level of nesting, as one undo step; -layers stay, and stop clipping when clipping groups are released; paths of several subpaths split into one path per -subpath. Objects with an opacity mask, live objects and paths with Live Corners stay whole. Its dialog previews on the canvas and picks +layers stay, and stop clipping when clipping groups are released unless their clipping path or clipped artwork overlaps +a locked artboard; paths of several subpaths split into one path per subpath. Objects with an opacity mask, groups with +fill or stroke rows of their own, live objects, paths with Live Corners and artwork on a locked artboard stay whole. Its dialog previews on the canvas and picks where to release and which kinds (VectorCraft's own tool). Tests: `cmd::addons::cleanup::release::tests` in `vectorcraft-engine` and `addons::cleanup::release::tests` in `vectorcraft-ui-egui`. From 05ed058fb198e82e79af3df1dd4c2125d9664ef7 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 18:02:53 -0800 Subject: [PATCH 22/24] Shaper: new groups and clipping masks no longer delete a Shaper group A Shaper group keeps its source art at the bottom and rebuilds the rest from it. object.newGroup with a Shaper group as parent at index 0, and layer.clippingMask.toggle (also a script's clipped = true) on a Shaper group, put a new object where the source art was. The group then read no sources and was deleted. Both commands now refuse a Shaper group and leave the document as it is; the clipping check runs before the edit opens, so a refused call leaves typing as it is. --- crates/engine/src/cmd/layer.rs | 7 +++++- crates/engine/src/cmd/object/arrange.rs | 4 ++++ crates/engine/src/cmd/object/commands.rs | 2 +- crates/engine/src/tests/script_dom.rs | 27 ++++++++++++++++++++++++ docs/mcp.md | 8 +++++-- docs/target-app-parity.md | 2 +- 6 files changed, 45 insertions(+), 5 deletions(-) diff --git a/crates/engine/src/cmd/layer.rs b/crates/engine/src/cmd/layer.rs index ca4a9d7022..a2dd7f83a6 100644 --- a/crates/engine/src/cmd/layer.rs +++ b/crates/engine/src/cmd/layer.rs @@ -192,7 +192,7 @@ pub fn specs() -> Vec { "Make/Release Clipping Mask", ["Window", "Layers"], None, - "{id?: layer or group (default: the one highlighted layer or group row, else the one selected group, else the current layer)} make: its top object (a path, compound path or text, which loses its paint) clips the rest and moves to the bottom (new art added on top is clipped); release: it stops clipping, the clipping path stays unpainted → {clip}", + "{id?: layer or group (default: the one highlighted layer or group row, else the one selected group, else the current layer)} make: its top object (a path, compound path or text, which loses its paint) clips the rest and moves to the bottom (new art added on top is clipped; a Shaper group is refused and changes nothing); release: it stops clipping, the clipping path stays unpainted → {clip}", has_doc, clip_toggle ), @@ -526,6 +526,11 @@ fn clip_toggle(s: &mut Session, p: &Value) -> Result { None => None, }; let id = given.or(row).or(group).or(st.current_layer()).ok_or_else(|| bad("layer.clippingMask.toggle", "no layer"))?; + // A Shaper group keeps its source art first; a clipping path there would replace it. The + // check comes before the edit so that a refused call leaves any typing as it is. + if st.doc.node(id).is_some_and(|n| !n.clips() && n.extras().shaper.is_some()) { + return Err(bad("layer.clippingMask.toggle", format!("{} is a Shaper group, whose contents are made from its source art", id.0))); + } let clip = s.edit("Make/Release Clipping Mask", |d, _| { let n = d.node(id).ok_or(EngineError::NoNode(id))?; if !matches!(n.kind, NodeKind::Layer { .. } | NodeKind::Group { .. }) { diff --git a/crates/engine/src/cmd/object/arrange.rs b/crates/engine/src/cmd/object/arrange.rs index 8ed4656295..ef37bd7d99 100644 --- a/crates/engine/src/cmd/object/arrange.rs +++ b/crates/engine/src/cmd/object/arrange.rs @@ -129,6 +129,10 @@ pub(super) fn new_group(s: &mut Session, p: &Value) -> Result { if !matches!(n.kind, NodeKind::Layer { .. } | NodeKind::Group { .. }) || n.extras().graph.is_some() { return Err(bad(C, format!("{} is not a layer or group", parent.0))); } + // A Shaper group rebuilds its contents from the source art it holds first. + if n.extras().shaper.is_some() { + return Err(bad(C, format!("{} is a Shaper group, whose contents are made from its source art", parent.0))); + } if !d.is_editable(parent) { return Err(bad(C, "the layer or group is hidden or locked")); } diff --git a/crates/engine/src/cmd/object/commands.rs b/crates/engine/src/cmd/object/commands.rs index d5a89f8789..782c5a9511 100644 --- a/crates/engine/src/cmd/object/commands.rs +++ b/crates/engine/src/cmd/object/commands.rs @@ -142,7 +142,7 @@ pub fn specs() -> Vec { "Group", [], None, - "{parent?: layer or group id (default: the current layer), index?: n (0 = bottom, or directly above the clipping path in a clipping layer or group; 0 is refused in an Image Trace object, whose source image stays at the bottom; default: on top), compound?: bool (default false; true: an empty compound path instead of a group)} → {id}: an empty group or compound path in a shown, unlocked layer or group; an omitted key takes its default; null is refused for parent, index and compound; the selection stays as it is", + "{parent?: layer or group id (default: the current layer), index?: n (0 = bottom, or directly above the clipping path in a clipping layer or group; 0 is refused in an Image Trace object, whose source image stays at the bottom; default: on top), compound?: bool (default false; true: an empty compound path instead of a group)} → {id}: an empty group or compound path in a shown, unlocked layer or group (a Shaper group is refused and changes nothing); an omitted key takes its default; null is refused for parent, index and compound; the selection stays as it is", has_doc, new_group ), diff --git a/crates/engine/src/tests/script_dom.rs b/crates/engine/src/tests/script_dom.rs index 54926e1659..905df7882a 100644 --- a/crates/engine/src/tests/script_dom.rs +++ b/crates/engine/src/tests/script_dom.rs @@ -3683,6 +3683,33 @@ fn compound_path_items_add_makes_an_empty_compound_path_that_takes_paths() { assert!(s.execute("object.newGroup", &json!({"compound": 1})).unwrap_err().to_string().contains("true or false")); } +/// A Shaper group rebuilds its contents from the source art it holds first, so `object.newGroup` +/// refuses it as a parent: at index 0 the empty group would take the sources' place and the +/// Shaper group would be deleted. +#[test] +fn new_group_refuses_a_shaper_group_as_its_parent() { + let (mut s, a, _) = doc(); + let b = rect(&mut s, 30.0, 20.0, 30.0, 40.0); + s.execute("select.set", &json!({"ids": [a.0, b.0]})).unwrap(); + let shaper = NodeId(s.execute("shaper.scribble", &json!({"points": [[25, 40], [50, 40]]})).unwrap()["id"].as_u64().unwrap()); + let before = s.active().unwrap().doc.node(shaper).cloned().unwrap(); + for index in [json!(0), json!(1), Value::Null] { + let mut p = json!({"parent": shaper.0}); + if !index.is_null() { + p["index"] = index; + } + let err = s.execute("object.newGroup", &p).unwrap_err().to_string(); + assert!(err.contains("Shaper group"), "{p}: {err}"); + assert_eq!(s.active().unwrap().doc.node(shaper), Some(&before), "{p}"); + } + // Making a clipping mask moves the topmost object to index 0 the same way. + let err = s.execute("layer.clippingMask.toggle", &json!({"id": shaper.0})).unwrap_err().to_string(); + assert!(err.contains("Shaper group"), "{err}"); + let src = "var g = app.activeDocument.groupItems[0]; try { g.clipped = true; vc.log('clipped'); } catch (e) { vc.log(String(e).indexOf('Shaper group') >= 0); }"; + assert_eq!(log(&mut s, src), [json!(true)]); + assert_eq!(s.active().unwrap().doc.node(shaper), Some(&before)); +} + /// The paint of a compound path's only path is the compound path's: moved into an empty compound /// path, the path gives it that paint, not its own default one. #[test] diff --git a/docs/mcp.md b/docs/mcp.md index 183f042d80..508a5b09e1 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3414,7 +3414,8 @@ through `$`: without art releases its mask in the same undo step. `groupItems.add()` makes an empty group on top of the layer's or group's contents, or of the current layer's for the document's collection, and `compoundPathItems.add()` makes an empty compound path in the same place - (https://ai-scripting.docsforadobe.dev/jsobjref/CompoundPathItems/). A path that `move` or `duplicate` puts into a + (https://ai-scripting.docsforadobe.dev/jsobjref/CompoundPathItems/). In a Shaper group, `groupItems.add()`, + `compoundPathItems.add()` and `clipped = true` throw and change nothing. A path that `move` or `duplicate` puts into a compound path becomes one of its paths and gives up its own paint, as Make Compound Path leaves its paths. The compound path becomes pixel-aligned when the path was, or when the compound path it leaves was. A path moved into an already pixel-aligned compound path is snapped to the pixel grid. An empty @@ -3444,6 +3445,8 @@ through `$`: since the source image stays at the bottom, and index 1 puts it directly above the source image), as one undo step named Group, and gives `{id}`. With `compound: true` it adds an empty compound path instead, as one undo step named Compound Path. + A Shaper group is refused as `parent` and changes nothing, since its contents are made from the source art it holds + at the bottom. An omitted key takes its default (`parent`: the current layer; `index`: on top; `compound`: false). Explicit `null` is refused for `parent`, `index` and `compound`. The selection stays as it is. `node.move` also puts a path into a shown, unlocked compound path (its layer and @@ -5281,7 +5284,8 @@ paints behind the clipped art and its stroke over it, not clipped, on screen and `layer.clippingMask.toggle {id?}` is the Layers panel's clipping mask button: the top object of the layer `id` (default: the one highlighted layer or group row, else the one selected group, else the current layer) becomes its clipping path (unpainted, moved to the bottom of the layer, so art added later is clipped too); called again it releases the mask. It returns `{clip}`, and the Layers panel -underlines clipping-path names. +underlines clipping-path names. Making a mask in a Shaper group is refused and changes nothing, since the group's +source art stays at its bottom. ## Object selection diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index bfccfd4a5a..7a7db00851 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1131,7 +1131,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Scripts: `document.characterStyles` and `document.paragraphStyles` add, find, rename, redefine, apply and remove character and paragraph styles, with the Normal styles listed first and kept, and a text range lists the styles its text is in, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/CharacterStyles/, https://ai-scripting.docsforadobe.dev/jsobjref/CharacterStyle/, https://ai-scripting.docsforadobe.dev/jsobjref/ParagraphStyles/, https://ai-scripting.docsforadobe.dev/jsobjref/ParagraphStyle/ and https://ai-scripting.docsforadobe.dev/jsobjref/TextRange/ describe them (`docs/mcp.md`). Style names of 1 to 256 characters without control characters, and at most 4,096 styles named in one run, are VectorCraft's own rules. Load Character Styles, Load Paragraph Styles and Load All Styles refuse a file larger than 64 MB. A paragraph style's character attributes are not there yet. `crates/engine/src/tests/script_styles.rs`. - Scripts: a text frame's `nextFrame` and `previousFrame` read and set its links to the frames before and after it, `areaText` and `pathText` thread a new frame to a base frame, and `document.stories` lists the stories, each with its frames in thread order and its text across them as one text range with its characters, words and paragraphs, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItem/, https://ai-scripting.docsforadobe.dev/jsobjref/Story/ and https://ai-scripting.docsforadobe.dev/jsobjref/Stories/ describe them; `text.thread.setNeighbor` links or unlinks two frames by id (`docs/mcp.md`). Which links are refused, and how a story is listed and found, are VectorCraft's own rules. `crates/engine/src/tests/script_threads.rs`. - Scripts: `PageItem.tags` reads, adds, renames and deletes an object's tags, name and value pairs that the native file keeps, and `Document.tags` reads, renames and deletes the tags of every page item but adds none (its `add` throws; a script adds a tag through the page item's `tags`), as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/Tags/ and https://ai-scripting.docsforadobe.dev/jsobjref/Tag/ describe them, through `object.tags` and the `object.tag.*` commands, at most 64 tags an object (`docs/mcp.md`). `crates/engine/src/tests/script_tags.rs`. - - Scripts: a document's layers and sublayers with their options, stacking and current layer, its groups and compound paths with clipping masks, new empty groups and compound paths and paths moved into compound paths, and its artboards with their rectangles, names, ruler origins and display options, added, inserted, removed and made active, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/Layer/, https://ai-scripting.docsforadobe.dev/jsobjref/Layers/, https://ai-scripting.docsforadobe.dev/jsobjref/GroupItems/, https://ai-scripting.docsforadobe.dev/jsobjref/CompoundPathItem/, https://ai-scripting.docsforadobe.dev/jsobjref/CompoundPathItems/, https://ai-scripting.docsforadobe.dev/jsobjref/Artboard/ and https://ai-scripting.docsforadobe.dev/jsobjref/Artboards/ describe them (`docs/mcp.md`); `artboards.add` returns the new artboard and `artboards.insert` returns nothing. Scoped collections support string conversion, which fails for `Layers`, `GroupItems`, `CompoundPathItems` and `Artboards` once their container is gone; a compound path's `pathItems` are `PathItems` objects whose `add()` and shape methods make the new path inside it; `removeAll()` on a compound path's `pathItems` throws when it would empty a compound path that clips a group or layer keeping other objects that are not ruler guides. Empty clipping containers release their masks in the deletion's undo step, and `clipped` changes check the group's, layer's and artboard's locks; turning clipping on also refuses a hidden or locked topmost object, which would become the mask. Layer selection changes keep unrelated selected objects, layer colors are assignable `RGBColor` values, stacking scans count toward the script budget, and paths moved into pixel-aligned compound paths are snapped. The `textFrames` of a layer or group list the type directly in it and put new type on top of its contents (VectorCraft's own rule), as https://ai-scripting.docsforadobe.dev/jsobjref/Layer/ and https://ai-scripting.docsforadobe.dev/jsobjref/GroupItem/ list them. `crates/engine/src/tests/script_dom.rs`, `crates/engine/src/tests/script_text.rs`, `crates/ui-egui/src/tests/script_run.rs`. + - Scripts: a document's layers and sublayers with their options, stacking and current layer, its groups and compound paths with clipping masks, new empty groups and compound paths and paths moved into compound paths, and its artboards with their rectangles, names, ruler origins and display options, added, inserted, removed and made active, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/Layer/, https://ai-scripting.docsforadobe.dev/jsobjref/Layers/, https://ai-scripting.docsforadobe.dev/jsobjref/GroupItems/, https://ai-scripting.docsforadobe.dev/jsobjref/CompoundPathItem/, https://ai-scripting.docsforadobe.dev/jsobjref/CompoundPathItems/, https://ai-scripting.docsforadobe.dev/jsobjref/Artboard/ and https://ai-scripting.docsforadobe.dev/jsobjref/Artboards/ describe them (`docs/mcp.md`); `artboards.add` returns the new artboard and `artboards.insert` returns nothing. Scoped collections support string conversion, which fails for `Layers`, `GroupItems`, `CompoundPathItems` and `Artboards` once their container is gone; a compound path's `pathItems` are `PathItems` objects whose `add()` and shape methods make the new path inside it; `removeAll()` on a compound path's `pathItems` throws when it would empty a compound path that clips a group or layer keeping other objects that are not ruler guides. Empty clipping containers release their masks in the deletion's undo step, and `clipped` changes check the group's, layer's and artboard's locks; turning clipping on also refuses a hidden or locked topmost object, which would become the mask. In a Shaper group, new empty groups and compound paths and turning clipping on are refused, since the group keeps its source art at the bottom. Layer selection changes keep unrelated selected objects, layer colors are assignable `RGBColor` values, stacking scans count toward the script budget, and paths moved into pixel-aligned compound paths are snapped. The `textFrames` of a layer or group list the type directly in it and put new type on top of its contents (VectorCraft's own rule), as https://ai-scripting.docsforadobe.dev/jsobjref/Layer/ and https://ai-scripting.docsforadobe.dev/jsobjref/GroupItem/ list them. `crates/engine/src/tests/script_dom.rs`, `crates/engine/src/tests/script_text.rs`, `crates/ui-egui/src/tests/script_run.rs`. - Scripts: `Document.print` prints the document to a file with `PrintOptions` and the job, color management, color separation, coordinate, flattener, font, page marks, paper and PostScript option classes the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/ and https://ai-scripting.docsforadobe.dev/jsobjref/PrintJobOptions/ describe, over the document's print settings, and `app.printPresetsList` lists the print presets (`docs/mcp.md`); `CUSTOMPROFILE` without a profile `name` throws. `crates/engine/src/tests/script_print.rs`. - Scripts: `Document.exportFile` with `ExportType.AutoCAD` writes a DXF file with the `ExportOptionsAutoCAD` options and the AutoCAD enumerations that https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsAutoCAD/ and https://ai-scripting.docsforadobe.dev/jsobjref/scripting-constants/ describe; DWG throws an error that says it is not available, and `unitScaleRatio` is a percentage, with 100 at full size (`docs/mcp.md`). `crates/engine/src/tests/script_save_open.rs`. - Scripts: `Document.print` without a file prints to the printer `PrintOptions.printerName` names, or the default printer, and `app.printerList` lists the installed printers as `Printer` objects, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/, https://ai-scripting.docsforadobe.dev/jsobjref/Application/ and https://ai-scripting.docsforadobe.dev/jsobjref/Printer/ describe. VectorCraft's own rules: the jobs are sent after the run's changes are kept and the person at the keyboard clicks Print or presses Space on it, which takes no click or focus for the first second, nothing is sent from a failed run, and the web build, and MCP or the command line without the app, cannot print to a printer from a script (`docs/mcp.md`); a batch submitted after a spool failure was reported clears it once the worker sends every job of the batch without a failure, while a failure reported after submission stays. `crates/engine/src/tests/script_print.rs`, `crates/ui-egui/src/tests/script_print.rs`. From 5bfe35996bf46fed481d5d6928f35da78f1b9df1 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 18:47:47 -0800 Subject: [PATCH 23/24] xtask: the cache warm no longer builds integration test executables Since #10163, `cargo xtask ci warm` built each test shard with `--lib --bins --tests --no-run`, so the dependency-cache entry also held the integration test executables. The gate-crates entry grew from about 4.7 GB to 10.3 to 10.5 GB, above the repository's 10 GB cache budget, and the slowest test shard on main took 30 to 31 minutes afterwards against 26 to 28 minutes before. The warm build now builds the library and binary tests of each shard's crates (`--lib --bins --no-run`) and skips a run of integration tests alone, whose crate has its library tests built on another shard. The integration tests take the same dependencies and dev-dependencies, so the entry still holds every dependency the shards build. Cargo again warns `unused dependency vectorcraft-testkit` for vectorcraft-cli in the warm log; only that crate's integration tests use it. --- .github/workflows/ci.yml | 3 ++- xtask/src/main.rs | 48 +++++++++++++++++++++++++--------------- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53a9be4e4a..94e08ef762 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,8 @@ jobs: # The warm build runs as one `cache warm /6` leg per shard, in parallel (each builds what # its shard builds), and `cache warm` puts their files into the one entry it saves. warm-split: true - # The dependency cache also keeps the compiled workspace crates and test executables, so a + # The dependency cache also keeps the compiled workspace crates and their library and binary + # test executables (not the integration tests' executables), so a # pull request's shards rebuild only the crates its changes reach. Each main run's `cache # warm` leg saves a rolling entry of its own, every leg restores the newest one, and # cache-prune.yml deletes the one it replaced after each attempt. The nightly run restores diff --git a/xtask/src/main.rs b/xtask/src/main.rs index a09949f548..d0b95be14e 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -420,11 +420,13 @@ fn cmd_ci_shard() -> Result<(), String> { run_steps(&steps) } -/// `cargo xtask ci warm`: for each run of each test shard, builds the test targets it runs without -/// running them, then builds what the checks shard builds, so one dependency-cache entry holds the -/// dependencies of every shard with the features that shard builds them with (cargo resolves -/// features over the packages each command selects). The test builds select the same crates and -/// targets as the test shards' runs, so the cache also holds the test executables the shards run. +/// `cargo xtask ci warm`: for each test shard, builds the library and binary tests of the crates +/// it tests without running them, then builds what the checks shard builds, so one +/// dependency-cache entry holds the dependencies of every shard with the features that shard builds +/// them with (cargo resolves features over the packages each command selects). It does not build +/// the integration tests ([`warm_runs`], [`warm_tests`]), which take the same dependencies and +/// dev-dependencies as the library tests. Cargo warns `unused dependency vectorcraft-testkit` for +/// vectorcraft-cli, whose integration tests are the only ones that use it. /// /// With `GATE_SHARD` and `GATE_SHARDS` set (the gate's split warm legs), it builds only what that /// shard builds: a test shard's tests, or the checks shard's builds. A split's later parts build @@ -446,7 +448,7 @@ fn cmd_ci_warm() -> Result<(), String> { let mut steps: Vec = Vec::new(); for i in tests { if let shards::Shard::Tests(runs, _) = checked[i].clone() { - for r in runs { + for r in warm_runs(runs) { steps.push(( "build tests", Box::new(move || { @@ -490,11 +492,19 @@ fn push_warm_checks(steps: &mut Vec) { steps.push(("wasm", Box::new(cmd_wasm))); } -/// The command `ci warm` builds the tests of one run of a test shard with, and its description. +/// The runs of a test shard that `ci warm` builds: every run except an integration-test run, whose +/// crate has its library tests in a run on another shard. +fn warm_runs(runs: Vec) -> impl Iterator { + runs.into_iter().filter(|r| r.targets != shards::Targets::Integration) +} + +/// The command `ci warm` builds the library and binary tests of one run of a test shard with, and +/// its description. fn warm_tests(r: &shards::Run) -> (Command, String) { + let units = shards::Targets::Units; let mut c = cargo(); - c.arg("test").args(shards::select(&r.crates)).args(r.targets.args()).arg("--no-run"); - (c, format!("cargo test {} --no-run ({})", r.targets.shown(), shards::names(&r.crates))) + c.arg("test").args(shards::select(&r.crates)).args(units.args()).arg("--no-run"); + (c, format!("cargo test {} --no-run ({})", units.shown(), shards::names(&r.crates))) } /// Runs `steps` in turn, stopping at the first that fails; the summary names the steps that passed @@ -646,15 +656,17 @@ mod tests { use super::*; #[test] - fn warm_builds_the_test_targets_the_shards_run() { - let a = shards::Member { name: "a".into(), id: "path+file:///w/a#0.1.0".into(), version: "0.1.0".into(), doctests: true }; + fn warm_builds_library_and_binary_tests_without_integration_tests() { + let m = + |name: &str| shards::Member { name: name.into(), id: format!("path+file:///w/{name}#0.1.0"), version: "0.1.0".into(), doctests: true }; let args = |r: &shards::Run| warm_tests(r).0.get_args().map(|a| a.to_string_lossy().into_owned()).collect::>(); - let all = shards::Run::all(vec![a.clone()]); - assert_eq!(args(&all), ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--tests", "--no-run"]); - assert_eq!(warm_tests(&all).1, "cargo test --lib --bins --tests --no-run (a)"); - let units = shards::Run { targets: shards::Targets::Units, crates: vec![a.clone()] }; - assert_eq!(args(&units), ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--no-run"]); - let integration = shards::Run { targets: shards::Targets::Integration, crates: vec![a] }; - assert_eq!(args(&integration), ["test", "-p", "path+file:///w/a#0.1.0", "--test", "*", "--no-run"]); + let all = shards::Run::all(vec![m("a")]); + assert_eq!(args(&all), ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--no-run"]); + assert_eq!(warm_tests(&all).1, "cargo test --lib --bins --no-run (a)"); + let units = shards::Run { targets: shards::Targets::Units, crates: vec![m("b")] }; + assert_eq!(args(&units), ["test", "-p", "path+file:///w/b#0.1.0", "--lib", "--bins", "--no-run"]); + let integration = shards::Run { targets: shards::Targets::Integration, crates: vec![m("b")] }; + let built: Vec = warm_runs(vec![all.clone(), integration, units.clone()]).collect(); + assert_eq!(built, [all, units]); } } From b54ce6910e65dbdfb9606aca2bf4c9235ea723dc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 20:08:54 -0800 Subject: [PATCH 24/24] Revert "Merge pull request #10894 from dotCooCoo/fix/font-hinting-back-on" This reverts commit 88851063c01e264d8bf6969f01a2d37611c4a528, reversing changes made to 7802fe94be291ee0332fff988b463601921e0ab7. --- crates/ui-egui/src/graphics.rs | 3 ++- crates/ui-egui/src/tests/font_menu.rs | 14 +++++++------- crates/ui-egui/src/ui_fonts.rs | 11 +++++++++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/graphics.rs b/crates/ui-egui/src/graphics.rs index 0e200259b5..b90827aea0 100644 --- a/crates/ui-egui/src/graphics.rs +++ b/crates/ui-egui/src/graphics.rs @@ -127,13 +127,14 @@ impl VectorcraftApp { /// after losing its graphics), everything uploaded to the old one is made again: the fonts and /// theme, the canvas, the place cursor's thumbnails and every [`TexCache`]. The host hands it /// the window's context when it creates the app, so the first frame's input has the app's - /// commands. + /// commands. Each new context draws its text without hinting ([`crate::ui_fonts::hinting_off`]). pub fn adopt_context(&mut self, ctx: &egui::Context) { let tag = context_tag(ctx); self.ui_ctx = Some(ctx.clone()); if self.context == tag { return; } + crate::ui_fonts::hinting_off(ctx); if self.context != 0 { log::info!("vectorcraft: new graphics context: uploading the UI again"); forget_textures(); diff --git a/crates/ui-egui/src/tests/font_menu.rs b/crates/ui-egui/src/tests/font_menu.rs index 2fc247cfe9..2045e85976 100644 --- a/crates/ui-egui/src/tests/font_menu.rs +++ b/crates/ui-egui/src/tests/font_menu.rs @@ -77,10 +77,10 @@ fn samples_show_the_text_in_the_family_or_a_generic_sample() { /// A face with no hinting instructions draws a sample in a context the app has adopted, as the font list and the /// font picker draw each family's sample in its own face (a document face of the context): a Hebrew letter that is a -/// bar 20 by 700 thousandths of an em. The context hints text in both themes, so the sample goes through skrifa's -/// automatic hinter, whose blue-zone search for such a letter ends with the pinned skrifa. The face is served to the -/// fixture's context only, so the font database other tests read does not change. The sample is one rasterized glyph -/// from that face. It is drawn on a thread of its own, and the test fails when it has not ended after 300 s. +/// bar 20 by 700 thousandths of an em, whose blue zones the automatic hinter of skrifa 0.44 never finishes measuring. +/// The face is served to the fixture's context only, so the font database other tests read does not change. The +/// sample is one rasterized glyph from that face. It is drawn on a thread of its own, and the test fails when it has +/// not ended after 300 s. #[test] fn a_face_without_hinting_instructions_draws_its_sample() { use std::sync::{Arc, Mutex}; @@ -145,9 +145,9 @@ fn a_face_without_hinting_instructions_draws_its_sample() { let (texts, [hinting, light_hinting, dark_hinting], fixture_has_glyph, nonempty_glyph) = rx.recv_timeout(std::time::Duration::from_secs(300)).unwrap_or_else(|e| panic!("drawing the sample: {e}")); assert!(texts.iter().any(|t| t == "\u{5d1}"), "the sample is the letter, in the face: {texts:?}"); - assert!(hinting, "a context the app adopts hints text"); - assert!(light_hinting, "the light theme hints text"); - assert!(dark_hinting, "the dark theme hints text"); + assert!(!hinting, "a context the app adopts draws text without hinting"); + assert!(!light_hinting, "the light theme draws text without hinting"); + assert!(!dark_hinting, "the dark theme draws text without hinting"); assert!(fixture_has_glyph, "the sample's face maps U+05D1"); assert!(nonempty_glyph, "the sample is one rasterized glyph for U+05D1"); } diff --git a/crates/ui-egui/src/ui_fonts.rs b/crates/ui-egui/src/ui_fonts.rs index 24260dc24c..e75c8e21b1 100644 --- a/crates/ui-egui/src/ui_fonts.rs +++ b/crates/ui-egui/src/ui_fonts.rs @@ -24,6 +24,17 @@ pub fn ui_fonts() -> UiFonts<'static> { } } +/// Turns font hinting off for all text `ctx` draws, in both themes. With hinting on, egui hints a TrueType face that +/// has no hinting instructions (no `fpgm`, no `prep` and no glyph instructions) with skrifa 0.44's automatic hinter, +/// whose blue-zone search never ends for some glyphs, such as a tall narrow Hebrew letter, so the font list stops +/// responding when a row draws such a face. The font list and the samples get their faces through craft-libs, which +/// sets no hinting option per face, so the switch covers every face of the context. Hinting stays off until the +/// skrifa blue-zone exit (storytold/craft-libs#5222) is in the build; the craft-libs pin that brings it removes this +/// function and its call. +pub(crate) fn hinting_off(ctx: &egui::Context) { + ctx.all_styles_mut(|style| style.visuals.text_options.font_hinting = false); +} + #[derive(Clone)] struct FontSelection { language: Lang,