From 0227c4f6cac0325df75ca1fb5047efd107c95c9f Mon Sep 17 00:00:00 2001 From: DuBearte <130190089+DuBearte@users.noreply.github.com> Date: Sat, 7 Nov 2026 02:55:29 -0500 Subject: [PATCH 1/4] fix(ui): a Perspective Crop drag from the pasteboard starts at the canvas edge (#11803) With View > Snap on, a new Perspective Crop quad dragged from the pasteboard kept its start point out there, so its corners lay outside the canvas. A drag that starts beyond a canvas corner (outside on both axes) now starts at that corner, and one that starts within the snap distance of an edge starts on it, when Snap To > Document Bounds is on. Snap off, clicked corners, corner drags and moves are unchanged. Co-Authored-By: Claude Opus 5.5 --- .../src/tools/perspective_crop_snap_tests.rs | 80 +++++++++++++++++++ .../ui-egui/src/tools/perspective_crop_ui.rs | 30 +++++++ 2 files changed, 110 insertions(+) create mode 100644 crates/ui-egui/src/tools/perspective_crop_snap_tests.rs diff --git a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs new file mode 100644 index 0000000000..4df970dbfe --- /dev/null +++ b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs @@ -0,0 +1,80 @@ +//! #11803: with View › Snap on, a Perspective Crop drag that starts on the pasteboard beyond a +//! canvas corner starts at that corner, and one starting within the snap distance of an edge starts +//! on it. Snap off, clicked corners, corner drags and moves are as before. + +use super::*; + +fn app(snap: bool) -> PhotocraftApp { + let mut s = photocraft_engine::Session::new(); + s.execute("file.new", serde_json::json!({"width": 800, "height": 500})).unwrap(); + let mut app = PhotocraftApp::new(s, crate::Services::default()); + app.ui.tool = Tool::PerspectiveCrop; + app.ui.extras.snap = snap; + app.ui.view.snap_to.document_bounds = true; + app +} + +fn drag(app: &mut PhotocraftApp, from: [f64; 2], to: [f64; 2]) { + pointer(app, ToolEvent::Down { x: from[0], y: from[1], pressure: 1.0 }); + pointer(app, ToolEvent::Move { x: to[0], y: to[1], pressure: 1.0 }); + pointer(app, ToolEvent::Up { x: to[0], y: to[1] }); +} + +fn click(app: &mut PhotocraftApp, p: [f64; 2]) { + drag(app, p, p); +} + +#[test] +fn a_drag_from_the_pasteboard_starts_at_the_canvas_corner() { + let mut app = app(true); + drag(&mut app, [-78.0, -100.0], [700.0, 450.0]); + assert_eq!(app.ui.perspective_crop, Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]])); +} + +#[test] +fn a_drag_near_an_edge_starts_on_it() { + let mut app = app(true); + drag(&mut app, [3.0, 4.0], [700.0, 450.0]); + assert_eq!(app.ui.perspective_crop, Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]])); + // Well inside, nothing moves. + let mut app = self::app(true); + drag(&mut app, [100.0, 120.0], [700.0, 450.0]); + assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([100.0, 120.0])); +} + +#[test] +fn with_snap_off_the_drag_is_as_before() { + let mut app = app(false); + drag(&mut app, [-78.0, -100.0], [700.0, 450.0]); + assert_eq!(app.ui.perspective_crop, Some([[-78.0, -100.0], [700.0, -100.0], [700.0, 450.0], [-78.0, 450.0]])); +} + +#[test] +fn clicked_corners_stay_where_they_were_clicked() { + let mut app = app(true); + for p in [[-50.0, -40.0], [850.0, -30.0], [820.0, 540.0], [-20.0, 520.0]] { + click(&mut app, p); + } + assert_eq!(app.ui.perspective_crop, Some([[-50.0, -40.0], [850.0, -30.0], [820.0, 540.0], [-20.0, 520.0]])); +} + +#[test] +fn corner_drags_and_moves_are_as_before() { + let mut app = app(true); + app.ui.perspective_crop = Some([[100.0, 100.0], [600.0, 100.0], [600.0, 400.0], [100.0, 400.0]]); + drag(&mut app, [100.0, 100.0], [-60.0, -60.0]); + assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([-60.0, -60.0]), "a corner goes where it is dragged"); + drag(&mut app, [300.0, 250.0], [310.0, 250.0]); + assert_eq!(app.ui.perspective_crop.map(|q| q[1]), Some([610.0, 100.0]), "a move keeps its offset"); +} + +#[test] +fn far_presses_and_no_document_never_panic() { + let mut app = app(true); + drag(&mut app, [-1.0e12, -1.0e12], [1.0e12, 1.0e12]); + assert!(app.ui.perspective_crop.is_some_and(|q| q.iter().flatten().all(|v| v.is_finite()))); + let mut empty = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + empty.ui.tool = Tool::PerspectiveCrop; + drag(&mut empty, [-100.0, -100.0], [50.0, 50.0]); + assert_eq!(empty.ui.perspective_crop, None); +} diff --git a/crates/ui-egui/src/tools/perspective_crop_ui.rs b/crates/ui-egui/src/tools/perspective_crop_ui.rs index ed60c90d41..8704177239 100644 --- a/crates/ui-egui/src/tools/perspective_crop_ui.rs +++ b/crates/ui-egui/src/tools/perspective_crop_ui.rs @@ -147,6 +147,7 @@ pub fn pointer(app: &mut PhotocraftApp, ev: ToolEvent) -> bool { } } else { app.pcrop.clicks.clear(); + let start = snap_start(app, start); let (x0, y0, x1, y1) = (start[0].min(cur[0]), start[1].min(cur[1]), start[0].max(cur[0]), start[1].max(cur[1])); // A straight drag has no area: no box (it could neither be committed nor // replaced by a new drag). @@ -159,6 +160,31 @@ pub fn pointer(app: &mut PhotocraftApp, ev: ToolEvent) -> bool { true } +/// Where a new quad's drag starts, with View › Snap and Snap To › Document Bounds on (#11803): a +/// press on the pasteboard beyond a canvas corner (outside on both axes) starts at that corner, +/// and one within the snap distance of a canvas edge starts on it. Clicked corners keep their place. +fn snap_start(app: &PhotocraftApp, p: [f64; 2]) -> [f64; 2] { + let Some(size) = app.session.active().map(|s| s.doc.size) else { return p }; + if !(app.ui.extras.snap && crate::snap_ui::options(app).document) { + return p; + } + let tol = crate::snap_ui::tolerance(app); + let (w, h) = (f64::from(size.width), f64::from(size.height)); + let corner = !(0.0..=w).contains(&p[0]) && !(0.0..=h).contains(&p[1]); + let snap = |v: f64, max: f64| { + if corner { + v.clamp(0.0, max) + } else if v.abs() <= tol { + 0.0 + } else if (v - max).abs() <= tol { + max + } else { + v + } + }; + [snap(p[0], w), snap(p[1], h)] +} + fn drag_to(app: &mut PhotocraftApp, p: [f64; 2]) { match app.pcrop.drag { Some(Drag::New { start, .. }) => app.pcrop.drag = Some(Drag::New { start, cur: p }), @@ -618,3 +644,7 @@ mod tests { assert!(app.pcrop.drag.is_none() && app.pcrop.clicks.is_empty()); } } + +#[cfg(test)] +#[path = "perspective_crop_snap_tests.rs"] +mod perspective_crop_snap_tests; From dfcc11c999c9bd29bb79cceb53e9326f92edd919 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 15:30:30 +0100 Subject: [PATCH 2/4] PR #11859: show the snapped Perspective Crop start while dragging The drag preview drew the box from the raw press, so a drag from the pasteboard showed its start outside the canvas and jumped to the corner only on release. The preview and the release now build the box the same way. Tests: the preview during the drag, a press outside on one side only, and the snap distance at 75% and 200% zoom (views pinned to 100% for the other tests). Co-Authored-By: DuBearte Co-Authored-By: Claude Opus 5.5 --- .../src/tools/perspective_crop_snap_tests.rs | 39 +++++++++++++++++++ .../ui-egui/src/tools/perspective_crop_ui.rs | 36 +++++++++++------ 2 files changed, 63 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs index 4df970dbfe..76f5d9a9d0 100644 --- a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs +++ b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs @@ -11,9 +11,15 @@ fn app(snap: bool) -> PhotocraftApp { app.ui.tool = Tool::PerspectiveCrop; app.ui.extras.snap = snap; app.ui.view.snap_to.document_bounds = true; + set_zoom(&mut app, 1.0); app } +fn set_zoom(app: &mut PhotocraftApp, zoom: f32) { + app.ui.views = vec![crate::state::View { zoom, ..Default::default() }]; + assert_eq!(app.point_zoom(), zoom); +} + fn drag(app: &mut PhotocraftApp, from: [f64; 2], to: [f64; 2]) { pointer(app, ToolEvent::Down { x: from[0], y: from[1], pressure: 1.0 }); pointer(app, ToolEvent::Move { x: to[0], y: to[1], pressure: 1.0 }); @@ -78,3 +84,36 @@ fn far_presses_and_no_document_never_panic() { drag(&mut empty, [-100.0, -100.0], [50.0, 50.0]); assert_eq!(empty.ui.perspective_crop, None); } + +#[test] +fn the_drag_preview_shows_the_snapped_start() { + let mut app = app(true); + pointer(&mut app, ToolEvent::Down { x: -78.0, y: -100.0, pressure: 1.0 }); + pointer(&mut app, ToolEvent::Move { x: 700.0, y: 450.0, pressure: 1.0 }); + assert_eq!(shown_quad(&app), Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]]), "while dragging"); + pointer(&mut app, ToolEvent::Up { x: 700.0, y: 450.0 }); + assert_eq!(shown_quad(&app), app.ui.perspective_crop, "after the release"); +} + +#[test] +fn a_press_outside_on_one_side_only_stays_put() { + for from in [[-50.0, 100.0], [100.0, -50.0], [850.0, 100.0], [100.0, 550.0]] { + let mut app = app(true); + drag(&mut app, from, [400.0, 300.0]); + let q = app.ui.perspective_crop.unwrap_or_default(); + assert!(q.contains(&from), "{from:?} -> {q:?}"); + } +} + +#[test] +fn the_snap_distance_is_in_screen_pixels() { + // 8 screen px: about 10.7 document px at 75%, 4 at 200%. + let mut app = app(true); + set_zoom(&mut app, 0.75); + drag(&mut app, [9.0, 9.0], [700.0, 450.0]); + assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([0.0, 0.0]), "75%"); + let mut app = self::app(true); + set_zoom(&mut app, 2.0); + drag(&mut app, [6.0, 6.0], [700.0, 450.0]); + assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([6.0, 6.0]), "200%"); +} diff --git a/crates/ui-egui/src/tools/perspective_crop_ui.rs b/crates/ui-egui/src/tools/perspective_crop_ui.rs index 8704177239..80e7f2423c 100644 --- a/crates/ui-egui/src/tools/perspective_crop_ui.rs +++ b/crates/ui-egui/src/tools/perspective_crop_ui.rs @@ -147,11 +147,7 @@ pub fn pointer(app: &mut PhotocraftApp, ev: ToolEvent) -> bool { } } else { app.pcrop.clicks.clear(); - let start = snap_start(app, start); - let (x0, y0, x1, y1) = (start[0].min(cur[0]), start[1].min(cur[1]), start[0].max(cur[0]), start[1].max(cur[1])); - // A straight drag has no area: no box (it could neither be committed nor - // replaced by a new drag). - app.ui.perspective_crop = (x1 > x0 && y1 > y0).then_some([[x0, y0], [x1, y0], [x1, y1], [x0, y1]]); + app.ui.perspective_crop = new_box(app, start, cur); } } app.pcrop.drag = None; @@ -160,6 +156,28 @@ pub fn pointer(app: &mut PhotocraftApp, ev: ToolEvent) -> bool { true } +/// The box a new-quad drag from `start` to `cur` makes, its start snapped ([`snap_start`]). A +/// straight drag has no area: no box (it could neither be committed nor replaced by a new drag). +fn new_box(app: &PhotocraftApp, start: [f64; 2], cur: [f64; 2]) -> Option<[[f64; 2]; 4]> { + rect(snap_start(app, start), cur) +} + +fn rect(a: [f64; 2], b: [f64; 2]) -> Option<[[f64; 2]; 4]> { + let (x0, y0, x1, y1) = (a[0].min(b[0]), a[1].min(b[1]), a[0].max(b[0]), a[1].max(b[1])); + (x1 > x0 && y1 > y0).then_some([[x0, y0], [x1, y0], [x1, y1], [x0, y1]]) +} + +/// The quad the overlay draws: while a new box is being dragged, the box its release would make +/// (so a snapped start shows during the drag, not only after it; a press still within click +/// distance shows its raw box); otherwise the current quad. +fn shown_quad(app: &PhotocraftApp) -> Option<[[f64; 2]; 4]> { + match app.pcrop.drag { + Some(Drag::New { start, cur }) if is_click(app, start, cur) => rect(start, cur), + Some(Drag::New { start, cur }) => new_box(app, start, cur), + _ => app.ui.perspective_crop, + } +} + /// Where a new quad's drag starts, with View › Snap and Snap To › Document Bounds on (#11803): a /// press on the pasteboard beyond a canvas corner (outside on both axes) starts at that corner, /// and one within the snap distance of a canvas edge starts on it. Clicked corners keep their place. @@ -266,13 +284,7 @@ pub fn draw_overlay(app: &PhotocraftApp, painter: &egui::Painter, xf: &ViewXform } let scr = |p: [f64; 2]| xf.to_screen(p[0] as f32, p[1] as f32); let accent = crate::theme::Tokens::get(painter.ctx()).accent; - let quad = match app.pcrop.drag { - Some(Drag::New { start, cur }) => { - let (x0, y0, x1, y1) = (start[0].min(cur[0]), start[1].min(cur[1]), start[0].max(cur[0]), start[1].max(cur[1])); - (x1 > x0 && y1 > y0).then_some([[x0, y0], [x1, y0], [x1, y1], [x0, y1]]) - } - _ => app.ui.perspective_crop, - }; + let quad = shown_quad(app); if let Some(q) = quad.filter(|q| q.iter().flatten().all(|v| v.is_finite())) { let ok = convex_quad(&q); let color = if ok { accent } else { Color32::from_rgb(0xe5, 0x3e, 0x3e) }; From 2e20353937b2ca461c1748fd9c16a35adfedef6c Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 15 Nov 2026 20:22:38 +0100 Subject: [PATCH 3/4] Adapt to main: the snap tests pass the modifiers Perspective Crop's pointer takes now --- .../ui-egui/src/tools/perspective_crop_snap_tests.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs index 76f5d9a9d0..75d9e075ce 100644 --- a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs +++ b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs @@ -21,9 +21,9 @@ fn set_zoom(app: &mut PhotocraftApp, zoom: f32) { } fn drag(app: &mut PhotocraftApp, from: [f64; 2], to: [f64; 2]) { - pointer(app, ToolEvent::Down { x: from[0], y: from[1], pressure: 1.0 }); - pointer(app, ToolEvent::Move { x: to[0], y: to[1], pressure: 1.0 }); - pointer(app, ToolEvent::Up { x: to[0], y: to[1] }); + pointer(app, ToolEvent::Down { x: from[0], y: from[1], pressure: 1.0 }, egui::Modifiers::NONE); + pointer(app, ToolEvent::Move { x: to[0], y: to[1], pressure: 1.0 }, egui::Modifiers::NONE); + pointer(app, ToolEvent::Up { x: to[0], y: to[1] }, egui::Modifiers::NONE); } fn click(app: &mut PhotocraftApp, p: [f64; 2]) { @@ -88,10 +88,10 @@ fn far_presses_and_no_document_never_panic() { #[test] fn the_drag_preview_shows_the_snapped_start() { let mut app = app(true); - pointer(&mut app, ToolEvent::Down { x: -78.0, y: -100.0, pressure: 1.0 }); - pointer(&mut app, ToolEvent::Move { x: 700.0, y: 450.0, pressure: 1.0 }); + pointer(&mut app, ToolEvent::Down { x: -78.0, y: -100.0, pressure: 1.0 }, egui::Modifiers::NONE); + pointer(&mut app, ToolEvent::Move { x: 700.0, y: 450.0, pressure: 1.0 }, egui::Modifiers::NONE); assert_eq!(shown_quad(&app), Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]]), "while dragging"); - pointer(&mut app, ToolEvent::Up { x: 700.0, y: 450.0 }); + pointer(&mut app, ToolEvent::Up { x: 700.0, y: 450.0 }, egui::Modifiers::NONE); assert_eq!(shown_quad(&app), app.ui.perspective_crop, "after the release"); } From 24738d4dd48cb93ff9c048a69d24e486d8c40c29 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 29 Nov 2026 20:00:19 +0100 Subject: [PATCH 4/4] Perspective Crop: snap the drag start through the framework (#11803) Main moved the tool's press and drag handling into craft-libs, so the app-side snap_start is gone. storytold/craft-libs#4274 put the rule in the framework's PerspectiveCropTool, which snaps through the canvas's Snap the app already gives. Pin craft-libs at its current main, which carries it, and port the tests to the new tool: a drag from beyond a corner starts at it (also while dragging), one near an edge starts on it, one inside or outside on one axis stays, Snap or Document Bounds off changes nothing, and clicked corners stay put. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 189 +++++++++--------- Cargo.toml | 82 ++++---- crates/engine-core/Cargo.toml | 2 +- crates/ipp/Cargo.toml | 2 +- .../src/tools/perspective_crop_snap_tests.rs | 149 ++++++-------- .../ui-egui/src/tools/perspective_crop_ui.rs | 4 + 6 files changed, 202 insertions(+), 226 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e398054e1..368341024a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-automation", "craft-behavior", @@ -1406,7 +1406,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "crc32fast", "flate2", @@ -1427,7 +1427,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1438,7 +1438,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "rustix 1.1.6", ] @@ -1446,7 +1446,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1489,7 +1489,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-docpath", @@ -1507,7 +1507,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "egui", ] @@ -1515,7 +1515,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "md-5", "rayon", @@ -1524,12 +1524,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "serde", ] @@ -1537,7 +1537,7 @@ dependencies = [ [[package]] name = "craft-color-transform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-cms", "craft-color", @@ -1547,7 +1547,7 @@ dependencies = [ [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-cms", @@ -1567,7 +1567,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-ai-agents", "craft-atomic", @@ -1583,7 +1583,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1593,7 +1593,7 @@ dependencies = [ [[package]] name = "craft-crs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-metadata", "craft-xml", @@ -1603,7 +1603,7 @@ dependencies = [ [[package]] name = "craft-crw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "thiserror 2.0.21", ] @@ -1611,7 +1611,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "rayon", ] @@ -1619,7 +1619,7 @@ dependencies = [ [[package]] name = "craft-develop" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-color", "craft-color-transform", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "craft-develop-model" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-geom", "craft-metadata", @@ -1646,7 +1646,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1672,7 +1672,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "serde", ] @@ -1680,7 +1680,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1699,12 +1699,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" [[package]] name = "craft-file-formats" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-eps", "craft-idml", @@ -1722,7 +1722,7 @@ dependencies = [ [[package]] name = "craft-flags" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-atomic", "dirs", @@ -1732,7 +1732,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1767,7 +1767,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1776,7 +1776,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "cap-primitives", "craft-atomic", @@ -1799,12 +1799,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" [[package]] name = "craft-geom" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "serde", ] @@ -1812,7 +1812,7 @@ dependencies = [ [[package]] name = "craft-heif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "heic-rs", "rayon", @@ -1821,7 +1821,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1834,7 +1834,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "chrono", "fixed_decimal", @@ -1862,7 +1862,7 @@ dependencies = [ [[package]] name = "craft-idml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-xml", "craft-zip", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-dds", "craft-heif", @@ -1900,7 +1900,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1918,12 +1918,12 @@ dependencies = [ [[package]] name = "craft-ipp" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "thiserror 2.0.21", ] @@ -1931,7 +1931,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-host", "craft-i18n", @@ -1946,7 +1946,7 @@ dependencies = [ [[package]] name = "craft-kra" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-xml", "craft-zip", @@ -1956,7 +1956,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-i18n", @@ -1970,7 +1970,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-host", @@ -1988,7 +1988,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -2000,7 +2000,7 @@ dependencies = [ [[package]] name = "craft-ora" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-xml", "craft-zip", @@ -2010,7 +2010,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-keymap", @@ -2026,7 +2026,7 @@ dependencies = [ [[package]] name = "craft-pcraft-bundle" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "blake3", "craft-atomic", @@ -2039,7 +2039,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "flate2", "serde", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bytemuck", "flate2", @@ -2065,7 +2065,7 @@ dependencies = [ [[package]] name = "craft-pdn" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2074,7 +2074,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "async-channel", "async-io", @@ -2105,7 +2105,7 @@ dependencies = [ [[package]] name = "craft-plist" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "thiserror 2.0.21", ] @@ -2113,7 +2113,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-host", @@ -2137,7 +2137,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "encoding_rs", "flate2", @@ -2148,7 +2148,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "dispatch2", "egui", @@ -2161,7 +2161,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "chrono", "craft-crw", @@ -2179,7 +2179,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2198,7 +2198,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-atomic", "craft-host", @@ -2215,7 +2215,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-keymap", @@ -2248,16 +2248,17 @@ dependencies = [ [[package]] name = "craft-testkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "rustix 1.1.6", + "tempfile", "toml", ] [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2280,7 +2281,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2295,7 +2296,7 @@ dependencies = [ [[package]] name = "craft-theme-editor" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-theme", @@ -2306,7 +2307,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-atomic", "craft-behavior", @@ -2321,7 +2322,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "serde", "thiserror 2.0.21", @@ -2331,7 +2332,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "serde", "thiserror 2.0.21", @@ -2340,7 +2341,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-keymap", @@ -2355,7 +2356,7 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "serde", ] @@ -2363,7 +2364,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2377,7 +2378,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-i18n", @@ -2393,7 +2394,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "accesskit", "craft-behavior", @@ -2435,7 +2436,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2446,7 +2447,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-host", @@ -2464,7 +2465,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-host", @@ -2485,7 +2486,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-host", @@ -2505,7 +2506,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-behavior", "craft-host", @@ -2524,7 +2525,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "base64 0.22.1", "chrono", @@ -2556,7 +2557,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "winsafe", ] @@ -2564,7 +2565,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "craft-appkit", "craft-atomic", @@ -2596,7 +2597,7 @@ dependencies = [ [[package]] name = "craft-xcf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2605,7 +2606,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2615,7 +2616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "flate2", "thiserror 2.0.21", @@ -4135,7 +4136,7 @@ dependencies = [ [[package]] name = "hayro" version = "0.7.1" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bytemuck", "hayro-interpret", @@ -4165,7 +4166,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -4183,7 +4184,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -4207,7 +4208,7 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "flate2", "hayro-ccitt", @@ -5300,7 +5301,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "arrayvec", "kurbo 0.13.1", @@ -9810,7 +9811,7 @@ dependencies = [ [[package]] name = "vello_common" version = "0.0.8" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bytemuck", "fearless_simd", @@ -9858,7 +9859,7 @@ dependencies = [ [[package]] name = "vello_cpu" version = "0.0.8" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" dependencies = [ "bytemuck", "glifo 0.1.1", @@ -11504,14 +11505,14 @@ source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c28 [[patch.unused]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" [[patch.unused]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" [[patch.unused]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5#9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" +source = "git+https://github.com/storytold/craft-libs?rev=f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa#f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" diff --git a/Cargo.toml b/Cargo.toml index 7ca3366880..cb9fb0ef3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,21 +12,21 @@ rust-version = "1.95" [workspace.dependencies] # The craft framework through its facade (`craft::ui::…`). The egui `[patch]` below must match # `craft::egui_fork::REV` (checked by `cargo xtask ci`). -craft = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5", default-features = false } -craft-tracked = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-ui-macros = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa", default-features = false } +craft-tracked = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-ui-macros = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } # internal photocraft-geom = { path = "crates/geom" } photocraft-color = { path = "crates/color" } photocraft-raster = { path = "crates/raster" } photocraft-doc = { path = "crates/doc" } photocraft-ops = { path = "crates/ops" } -craft-plist = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] } +craft-plist = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] } photocraft-raw = { path = "crates/raw" } -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } photocraft-compose = { path = "crates/compose" } photocraft-gpu = { path = "crates/gpu" } photocraft-paint = { path = "crates/paint" } @@ -48,36 +48,36 @@ photocraft-ipp = { path = "crates/ipp" } # external # ICC colour management: the shared crate (replaces crates/cms; craft-libs#779). -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-print = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } # HEIC/HEIF: the shared decoder (replaces crates/heif; craft-libs#784). -craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5", features = ["raster", "write-raster"] } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa", features = ["raster", "write-raster"] } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } # Keep the shared embedded-image validation API until the framework revision includes it. -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5", features = ["tree-render", "tree-render-system-fonts"] } -craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa", features = ["tree-render", "tree-render-system-fonts"] } +craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } # Camera-field EXIF reader/writer, shared prerequisite craft-libs#1563. -craft-metadata = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-crs = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-develop = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -craft-develop-model = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-metadata = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-crs = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-develop = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +craft-develop-model = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } # Interface translations: lookup, fallback, CLDR plurals and language names over the craft-i18n # catalogs that `crates/ui-egui/build.rs` embeds from `CRAFT_I18N_DIR` (storytold/craft-i18n, at # the commit in `craft-i18n.rev`). Already in the tree through craft. -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa", features = ["ui"] } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" @@ -350,16 +350,16 @@ opt-level = 3 # Keep the complete egui family and native event bridge on reviewed fork commits. [patch.crates-io] -krilla = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -hayro = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -vello_common = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } -vello_cpu = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +hayro = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +vello_common = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } +vello_cpu = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" } emath = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" } epaint = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" } diff --git a/crates/engine-core/Cargo.toml b/crates/engine-core/Cargo.toml index c6aded5743..41bb4f31ea 100644 --- a/crates/engine-core/Cargo.toml +++ b/crates/engine-core/Cargo.toml @@ -19,7 +19,7 @@ photocraft-geom = { workspace = true } photocraft-color = { workspace = true } craft-cms = { workspace = true } # PCTIP codec from craft-libs#1564; kept at the same shared revision as the workspace. -craft-pcraft-tip = { package = "craft-pcraft-format", git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-pcraft-tip = { package = "craft-pcraft-format", git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } photocraft-raster = { workspace = true } photocraft-doc = { workspace = true } photocraft-ops = { workspace = true } diff --git a/crates/ipp/Cargo.toml b/crates/ipp/Cargo.toml index ec4d5b91e1..23fc19a72f 100644 --- a/crates/ipp/Cargo.toml +++ b/crates/ipp/Cargo.toml @@ -7,7 +7,7 @@ license.workspace = true rust-version.workspace = true [dependencies] -craft-ipp = { git = "https://github.com/storytold/craft-libs", rev = "9ad1dbf1b4e6c1b89e0d333d556bd6fb908eaeb5" } +craft-ipp = { git = "https://github.com/storytold/craft-libs", rev = "f0f9bb38ff21cd1bf7fa68f08f9f0cc7f22983fa" } [lints] workspace = true diff --git a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs index 75d9e075ce..57aab49a73 100644 --- a/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs +++ b/crates/ui-egui/src/tools/perspective_crop_snap_tests.rs @@ -1,119 +1,90 @@ -//! #11803: with View › Snap on, a Perspective Crop drag that starts on the pasteboard beyond a -//! canvas corner starts at that corner, and one starting within the snap distance of an edge starts -//! on it. Snap off, clicked corners, corner drags and moves are as before. +//! #11803: with View › Snap and Snap To › Document Bounds on, a Perspective Crop box dragged from +//! the pasteboard beyond a canvas corner starts at that corner, and one started within the snap +//! distance of an edge starts on it, already while it is dragged. Snap off, Document Bounds off and +//! clicked corners are as before. The rule lives in the framework's tool; these tests drive it +//! through the app's canvas, which hands it View › Snap To. + +use egui::Modifiers; +use serde_json::json; use super::*; +use crate::canvas::testing::{ToolEvent, tool_event}; -fn app(snap: bool) -> PhotocraftApp { - let mut s = photocraft_engine::Session::new(); - s.execute("file.new", serde_json::json!({"width": 800, "height": 500})).unwrap(); - let mut app = PhotocraftApp::new(s, crate::Services::default()); +/// A small document, so the canvas shows it at 100 % with pasteboard all round; the Perspective +/// Crop tool with Snap and Document Bounds as given. +fn app(snap: bool, document_bounds: bool) -> Box { + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({"width": 200, "height": 150})).unwrap(); + app.sync_views(); app.ui.tool = Tool::PerspectiveCrop; app.ui.extras.snap = snap; - app.ui.view.snap_to.document_bounds = true; - set_zoom(&mut app, 1.0); + app.ui.view.snap_to.document_bounds = document_bounds; app } -fn set_zoom(app: &mut PhotocraftApp, zoom: f32) { - app.ui.views = vec![crate::state::View { zoom, ..Default::default() }]; - assert_eq!(app.point_zoom(), zoom); +fn press_and_move(app: &mut PhotocraftApp, from: [f64; 2], to: [f64; 2]) { + tool_event(app, ToolEvent::Down { x: from[0], y: from[1], pressure: 1.0 }, Modifiers::NONE); + let mid = [(from[0] + to[0]) / 2.0, (from[1] + to[1]) / 2.0]; + tool_event(app, ToolEvent::Move { x: mid[0], y: mid[1], pressure: 1.0 }, Modifiers::NONE); + tool_event(app, ToolEvent::Move { x: to[0], y: to[1], pressure: 1.0 }, Modifiers::NONE); } fn drag(app: &mut PhotocraftApp, from: [f64; 2], to: [f64; 2]) { - pointer(app, ToolEvent::Down { x: from[0], y: from[1], pressure: 1.0 }, egui::Modifiers::NONE); - pointer(app, ToolEvent::Move { x: to[0], y: to[1], pressure: 1.0 }, egui::Modifiers::NONE); - pointer(app, ToolEvent::Up { x: to[0], y: to[1] }, egui::Modifiers::NONE); + press_and_move(app, from, to); + tool_event(app, ToolEvent::Up { x: to[0], y: to[1] }, Modifiers::NONE); } fn click(app: &mut PhotocraftApp, p: [f64; 2]) { - drag(app, p, p); + tool_event(app, ToolEvent::Down { x: p[0], y: p[1], pressure: 1.0 }, Modifiers::NONE); + tool_event(app, ToolEvent::Up { x: p[0], y: p[1] }, Modifiers::NONE); +} + +/// Whether the quad's corners are `want` (the drag maps through the view, a fraction of a pixel off). +fn quad_is(app: &PhotocraftApp, want: [[f64; 2]; 4]) -> bool { + quad(app).is_some_and(|q| q.iter().flatten().zip(want.iter().flatten()).all(|(got, want)| (got - want).abs() < 1e-2)) } #[test] -fn a_drag_from_the_pasteboard_starts_at_the_canvas_corner() { - let mut app = app(true); - drag(&mut app, [-78.0, -100.0], [700.0, 450.0]); - assert_eq!(app.ui.perspective_crop, Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]])); +fn a_drag_from_the_pasteboard_beyond_a_corner_starts_at_it() { + let mut app = app(true, true); + press_and_move(&mut app, [-30.0, -40.0], [150.0, 100.0]); + assert!(quad_is(&app, [[0.0, 0.0], [150.0, 0.0], [150.0, 100.0], [0.0, 100.0]]), "while dragging: {:?}", quad(&app)); + tool_event(&mut app, ToolEvent::Up { x: 150.0, y: 100.0 }, Modifiers::NONE); + assert!(quad_is(&app, [[0.0, 0.0], [150.0, 0.0], [150.0, 100.0], [0.0, 100.0]]), "{:?}", quad(&app)); + // The bottom right corner too. + let mut app = self::app(true, true); + drag(&mut app, [240.0, 190.0], [50.0, 40.0]); + assert!(quad_is(&app, [[50.0, 40.0], [200.0, 40.0], [200.0, 150.0], [50.0, 150.0]]), "{:?}", quad(&app)); } #[test] -fn a_drag_near_an_edge_starts_on_it() { - let mut app = app(true); - drag(&mut app, [3.0, 4.0], [700.0, 450.0]); - assert_eq!(app.ui.perspective_crop, Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]])); - // Well inside, nothing moves. - let mut app = self::app(true); - drag(&mut app, [100.0, 120.0], [700.0, 450.0]); - assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([100.0, 120.0])); +fn a_drag_near_an_edge_starts_on_it_and_one_inside_stays() { + let mut app = app(true, true); + drag(&mut app, [2.0, 3.0], [150.0, 100.0]); + assert!(quad_is(&app, [[0.0, 0.0], [150.0, 0.0], [150.0, 100.0], [0.0, 100.0]]), "{:?}", quad(&app)); + let mut app = self::app(true, true); + drag(&mut app, [60.0, 50.0], [150.0, 100.0]); + assert!(quad_is(&app, [[60.0, 50.0], [150.0, 50.0], [150.0, 100.0], [60.0, 100.0]]), "{:?}", quad(&app)); + // Outside on one axis only, beyond the snap distance: the start stays. + let mut app = self::app(true, true); + drag(&mut app, [-30.0, 50.0], [150.0, 100.0]); + assert!(quad_is(&app, [[-30.0, 50.0], [150.0, 50.0], [150.0, 100.0], [-30.0, 100.0]]), "{:?}", quad(&app)); } #[test] -fn with_snap_off_the_drag_is_as_before() { - let mut app = app(false); - drag(&mut app, [-78.0, -100.0], [700.0, 450.0]); - assert_eq!(app.ui.perspective_crop, Some([[-78.0, -100.0], [700.0, -100.0], [700.0, 450.0], [-78.0, 450.0]])); +fn with_snap_or_document_bounds_off_the_drag_starts_where_it_was_pressed() { + for (snap, bounds) in [(false, true), (true, false)] { + let mut app = app(snap, bounds); + drag(&mut app, [-30.0, -40.0], [150.0, 100.0]); + assert!(quad_is(&app, [[-30.0, -40.0], [150.0, -40.0], [150.0, 100.0], [-30.0, 100.0]]), "snap {snap}, bounds {bounds}: {:?}", quad(&app)); + } } #[test] fn clicked_corners_stay_where_they_were_clicked() { - let mut app = app(true); - for p in [[-50.0, -40.0], [850.0, -30.0], [820.0, 540.0], [-20.0, 520.0]] { + let mut app = app(true, true); + for p in [[-30.0, -30.0], [100.0, 2.0], [180.0, 140.0], [2.0, 120.0]] { click(&mut app, p); } - assert_eq!(app.ui.perspective_crop, Some([[-50.0, -40.0], [850.0, -30.0], [820.0, 540.0], [-20.0, 520.0]])); -} - -#[test] -fn corner_drags_and_moves_are_as_before() { - let mut app = app(true); - app.ui.perspective_crop = Some([[100.0, 100.0], [600.0, 100.0], [600.0, 400.0], [100.0, 400.0]]); - drag(&mut app, [100.0, 100.0], [-60.0, -60.0]); - assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([-60.0, -60.0]), "a corner goes where it is dragged"); - drag(&mut app, [300.0, 250.0], [310.0, 250.0]); - assert_eq!(app.ui.perspective_crop.map(|q| q[1]), Some([610.0, 100.0]), "a move keeps its offset"); -} - -#[test] -fn far_presses_and_no_document_never_panic() { - let mut app = app(true); - drag(&mut app, [-1.0e12, -1.0e12], [1.0e12, 1.0e12]); - assert!(app.ui.perspective_crop.is_some_and(|q| q.iter().flatten().all(|v| v.is_finite()))); - let mut empty = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); - empty.ui.tool = Tool::PerspectiveCrop; - drag(&mut empty, [-100.0, -100.0], [50.0, 50.0]); - assert_eq!(empty.ui.perspective_crop, None); -} - -#[test] -fn the_drag_preview_shows_the_snapped_start() { - let mut app = app(true); - pointer(&mut app, ToolEvent::Down { x: -78.0, y: -100.0, pressure: 1.0 }, egui::Modifiers::NONE); - pointer(&mut app, ToolEvent::Move { x: 700.0, y: 450.0, pressure: 1.0 }, egui::Modifiers::NONE); - assert_eq!(shown_quad(&app), Some([[0.0, 0.0], [700.0, 0.0], [700.0, 450.0], [0.0, 450.0]]), "while dragging"); - pointer(&mut app, ToolEvent::Up { x: 700.0, y: 450.0 }, egui::Modifiers::NONE); - assert_eq!(shown_quad(&app), app.ui.perspective_crop, "after the release"); -} - -#[test] -fn a_press_outside_on_one_side_only_stays_put() { - for from in [[-50.0, 100.0], [100.0, -50.0], [850.0, 100.0], [100.0, 550.0]] { - let mut app = app(true); - drag(&mut app, from, [400.0, 300.0]); - let q = app.ui.perspective_crop.unwrap_or_default(); - assert!(q.contains(&from), "{from:?} -> {q:?}"); - } -} - -#[test] -fn the_snap_distance_is_in_screen_pixels() { - // 8 screen px: about 10.7 document px at 75%, 4 at 200%. - let mut app = app(true); - set_zoom(&mut app, 0.75); - drag(&mut app, [9.0, 9.0], [700.0, 450.0]); - assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([0.0, 0.0]), "75%"); - let mut app = self::app(true); - set_zoom(&mut app, 2.0); - drag(&mut app, [6.0, 6.0], [700.0, 450.0]); - assert_eq!(app.ui.perspective_crop.map(|q| q[0]), Some([6.0, 6.0]), "200%"); + assert!(quad_is(&app, [[-30.0, -30.0], [100.0, 2.0], [180.0, 140.0], [2.0, 120.0]]), "{:?}", quad(&app)); } diff --git a/crates/ui-egui/src/tools/perspective_crop_ui.rs b/crates/ui-egui/src/tools/perspective_crop_ui.rs index ebab323c53..58c1499ddd 100644 --- a/crates/ui-egui/src/tools/perspective_crop_ui.rs +++ b/crates/ui-egui/src/tools/perspective_crop_ui.rs @@ -230,6 +230,10 @@ mod perspective_crop_deselect_tests; #[path = "perspective_crop_mirrored_tests.rs"] mod perspective_crop_mirrored_tests; +#[cfg(test)] +#[path = "perspective_crop_snap_tests.rs"] +mod perspective_crop_snap_tests; + #[cfg(test)] mod tests { use craft::behavior::kurbo::Point;