From 4021d27d5a9d71269baf7107e4d8e92a8e3015eb Mon Sep 17 00:00:00 2001 From: yoriswind Date: Thu, 26 Nov 2026 11:27:37 -0800 Subject: [PATCH 01/15] Format the native layer appearance regressions --- crates/ui-egui/src/panels/layers/tests.rs | 31 +++++++++++++++-------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/crates/ui-egui/src/panels/layers/tests.rs b/crates/ui-egui/src/panels/layers/tests.rs index 6ca4cefe9c..29ea72202a 100644 --- a/crates/ui-egui/src/panels/layers/tests.rs +++ b/crates/ui-egui/src/panels/layers/tests.rs @@ -797,10 +797,13 @@ fn appearance_diamond(shape: &egui::Shape) -> Option<(egui::Pos2, f32, f32)> { fn target_marks_painted(panel: &mut crate::tests::panel_harness::Panel, name: &str) -> Vec<(f32, bool, f32)> { let center = panel.rect(name).center(); let (shapes, _) = panel.paint_at(1.0); - let ink = shapes.iter().find_map(|shape| match shape { - egui::Shape::Circle(circle) if circle.center.distance(center) < 0.01 && (circle.radius - 5.0).abs() < 1e-4 => Some(circle.stroke.color), - _ => None, - }).expect("the cell's outer target ring"); + let ink = shapes + .iter() + .find_map(|shape| match shape { + egui::Shape::Circle(circle) if circle.center.distance(center) < 0.01 && (circle.radius - 5.0).abs() < 1e-4 => Some(circle.stroke.color), + _ => None, + }) + .expect("the cell's outer target ring"); for shape in &shapes { if appearance_diamond(shape).is_some_and(|(at, _, _)| at.distance(center) < 0.01) && let egui::Shape::Path(path) = shape @@ -809,11 +812,17 @@ fn target_marks_painted(panel: &mut crate::tests::panel_harness::Panel, name: &s assert_eq!(path.stroke.kind, egui::StrokeKind::Middle, "the diamond's stroke is centered on its outline"); } } - let mut marks: Vec<_> = shapes.iter().filter_map(|shape| match shape { - egui::Shape::Circle(circle) if circle.center.distance(center) < 0.01 && circle.radius < 5.0 - && circle.fill == egui::Color32::TRANSPARENT => Some((circle.radius, false, circle.stroke.width)), - shape => appearance_diamond(shape).filter(|(at, _, _)| at.distance(center) < 0.01).map(|(_, r, width)| (r, true, width)), - }).collect(); + let mut marks: Vec<_> = shapes + .iter() + .filter_map(|shape| match shape { + egui::Shape::Circle(circle) + if circle.center.distance(center) < 0.01 && circle.radius < 5.0 && circle.fill == egui::Color32::TRANSPARENT => + { + Some((circle.radius, false, circle.stroke.width)) + } + shape => appearance_diamond(shape).filter(|(at, _, _)| at.distance(center) < 0.01).map(|(_, r, width)| (r, true, width)), + }) + .collect(); marks.sort_by(|a, b| a.0.total_cmp(&b.0)); marks } @@ -845,7 +854,9 @@ fn a_targeted_circle_with_an_appearance_shows_both_ring_and_dot() { assert!((alone.0 - 2.5).abs() < 1e-4); let looks = [&neither, &targeted, &styled, &both]; for (i, x) in looks.iter().enumerate() { - for y in &looks[i + 1..] { assert_ne!(x, y, "all four actual cell looks differ"); } + for y in &looks[i + 1..] { + assert_ne!(x, y, "all four actual cell looks differ"); + } } } From f26086c58b2f0bf08ccfa2fe9cb8acc4c3a861c5 Mon Sep 17 00:00:00 2001 From: yoriswind Date: Thu, 26 Nov 2026 12:30:14 -0800 Subject: [PATCH 02/15] Describe the hollow diamond in current Layers feature rows --- docs/roadmap.md | 2 +- docs/target-app-parity.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index f8ada20777..b4f19e07a8 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -188,7 +188,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | # | Milestone | Status | Est. remaining, one agent (h) | |---|---|---|---| | M0 | Skeleton + vertical slice | ✅ done | — | -| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (a targeted Layers item with an appearance of its own shows its inner ring around a smaller appearance dot (#8711); path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them); Layers own appearance has a hollow diamond and tooltip distinct from targeting/selection (#8710), retaining Hassan1305's #8757 ring-visibility fix; validation pending | 4–6 | +| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (a targeted Layers item with an appearance of its own shows its inner ring around a smaller hollow diamond (#8711); path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them); Layers own appearance has a hollow diamond and tooltip distinct from targeting/selection (#8710), retaining Hassan1305's #8757 ring-visibility fix; validation pending | 4–6 | | M2 | Drawing tools + smart guides | ✅ mostly done (Eraser preserves fill outside fixed and varied tip sweeps and Alt-drag marquees on fill-only open paths and keeps their compound holes; clipping masks retain surviving contours or empty geometry in the same node; ordinary Group/Layer paints and evaluated gradient placements are preserved when the stored paint reproduces their appearance; hidden Rasterize and Along/Across stroke rows do not block visible gradients; replacement-art effects, plug-ins/Rasterize, along/across-stroke gradients and placements that cannot be reproduced keep their existing fitting; stroked open paths retain main behavior (#6582); #3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123); Scissors hover and cuts use the Pen's path/align/intersect/anchor snaps, with Alt Add Anchor and cut endpoint selection retained (#6470); Scissors previews the current anchor or curve cut point (#8655) | 12–18 | | M3 | Paint & appearance (swatches, color, gradient, stroke, appearance, transparency, styles) | ✅ done (M3.7–M3.98): swatches, groups, libraries, tints, Lab spots and Registration; Eyedropper copies transformed character dimensions (#6404) and styles highlighted text only (atomic transparency rejection); Eyedropper reads visible locked and outside-isolation sources (#1251); Color Picker, Color panel (its spectrum grows with a resized panel, #8005), Color Guide, Color Themes, Edit Colors and Recolor Artwork (screen-bounded Edit chip list, #3416; native Lab entry and swatch libraries in the picker, Assign-row menus, #8031/#4028; Recolor with Preset asks whether to limit the colors to a swatch library first); gradients that follow every transform, the annotator, linked stops, freeform gradients, focal points, gradients on strokes and Expand; visible strokes when paint is added to inherited None/zero-width art (#1253); stroke geometry, arrowheads, dashes fitted to corners, stroke on type, width profiles and the Width tool (Shift-double-click enables adjoining adjustment in Width Point Edit; finite-arithmetic follow-up regressions and full CI passed ([Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area))), Scale Strokes and preview bounds; Appearance targeting, container appearance, target circles, Expand Appearance; knockout, isolation, blend accuracy, CMYK blending, overprint, Attributes, masks and clipping, Flatten Transparency; graphic styles, links and libraries; CSS library export preserves fractional linear and radial gradient stop positions. Left: freeform gradients in SVG/PDF, mixed spot/process gradients in SVG and PDF gradients mixing a spot color with RGB or Lab stops export as stops or process colors; PDF export writes dithered gradient fills with spot stops, and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, as images in process colors; confirm the Scale Strokes & Effects default; Recolor model selection is available through the engine and MCP only (#2520); the dialog retains its existing controls; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); | 4–8 | | M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths (#8128; estimates unchanged); Production Preflight checks fonts, overflow, links and image resolution with clickable findings and automatic rechecking (VectorCraft addition; estimates unchanged); PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300; estimates unchanged); PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one, as the file composites them; estimates unchanged); PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543; estimates unchanged); PDF import: type filled and stroked after a page of type filled only (more than 64 lines) comes in as one filled and stroked type object again, with or without a path between, and a `TJ` over more lines than are kept with a glyph kept as an outline still stays a filled object and a stroked one for each part (#8549 follow-up; estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index e0c7ac9998..c763d8e4b6 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -796,7 +796,7 @@ since 2026-10-01. - **Ctrl/Cmd-click and Shift-click on Layers panel target circles (#8639):** the target circles follow the same modifier rules as the row names, as the help page describes for selecting objects in the Layers panel: Shift for adjacent objects, Ctrl or Command for non-adjacent ones ([Move objects to different layers](https://helpx.adobe.com/illustrator/desktop/manage-layers/create-and-organize-layers/move-objects-to-different-layers.html)). Ctrl/Cmd-click adds the item (a layer: its art) to the selection or takes it out, which Shift-click did before (#913); Shift-click selects the art of every row from the last circle clicked (else the targeted row) to this one, and Shift+Ctrl/Cmd-click adds it (`layer.target {range, add?}`). Hidden or locked art and art outside the isolated group in the range is left out, and nothing stays targeted. Regression tests: `clicking_a_target_circle_targets_the_layer` and `shift_clicking_a_target_circle_selects_a_range_of_rows` in `crates/ui-egui/src/panels/layers/tests.rs`. - **Shift-click in the Layers panel's selection column selects the art of a range of rows:** after a selection square is clicked, Shift-clicking another selects the art of every row listed from the last square clicked to this one, down or up and across sublayers and groups, and Shift+Ctrl/Cmd-click adds that art to the selection (`layer.selectAll {range, add?}`). Hidden and locked rows and art outside the isolated group are left out, and a range does not move where the next Shift-click starts. Ctrl/Cmd-click adds one row's art or takes it out, and so does Shift-click before any square was clicked. The panel menu's Select Art of Highlighted Rows (`layer.selectHighlighted`) selects the art of the highlighted rows by the same rules. These are VectorCraft's own rules. Regression tests: `shift_clicking_a_selection_square_selects_the_art_of_a_range_of_rows` and `shift_clicking_the_first_selection_square_adds_or_removes_one_row` in `crates/ui-egui/src/panels/layers/tests.rs`, `the_selection_column_selects_the_art_of_a_range_of_rows` and `select_highlighted_selects_the_art_of_the_highlighted_rows` in `crates/engine/src/tests/layers.rs`. - **Layers added to the selection from their target circles show as targeted (#8646):** with several items picked from their circles (nothing targeted), a layer or sublayer's circle shows its inner ring while all of its visible, unlocked art is selected, as an object's circle does while the object is selected. A layer is never selected itself, only its art, so its circle used to keep a single ring. Regression test: `a_layer_added_from_its_target_circle_shows_as_targeted` in `crates/ui-egui/src/panels/layers/tests.rs`. -- **A targeted item with an appearance of its own shows both marks (#8711):** its target circle keeps the inner ring of a targeted item, with the appearance dot drawn smaller inside it and a gap between them, so not targeted, targeted, with an appearance and both look different, as the target icons in [Appearance attributes](https://helpx.adobe.com/illustrator/using/appearance-attributes.html) do. The dot used to cover the ring. Regression test: `a_targeted_circle_with_an_appearance_shows_both_ring_and_dot` in `crates/ui-egui/src/panels/layers/tests.rs`. +- **A targeted item with an appearance of its own shows both marks (#8711):** its target circle keeps the inner ring of a targeted item, with the hollow diamond drawn smaller inside it and a gap between them, so not targeted, targeted, with an appearance and both look different, as the target icons in [Appearance attributes](https://helpx.adobe.com/illustrator/using/appearance-attributes.html) do. The dot used to cover the ring. Regression test: `a_targeted_circle_with_an_appearance_shows_both_ring_and_dot` in `crates/ui-egui/src/panels/layers/tests.rs`. - **Selection passes through raster effects:** clicks with the Selection, Direct Selection and Group Selection tools (Group Selection's repeated click included), the Selection tool's pointer and marquee, Direct Selection's marquee, pointer and anchor highlight, and Group Selection's marquee (E for enclosed objects included) leave out the area that a drop shadow, a glow, a blur or another raster effect paints beyond an object. A click on a shadow selects the object under it, or nothing over an empty canvas, a repeated Group Selection click there adds the groups of the object under it, and a press on the shadow of a selected object does not move it ([the help page](https://helpx.adobe.com/illustrator/using/selecting-objects.html)). Over a shadow, Direct Selection highlights only the anchors of the object under it, and Group Selection keeps its own pointer and highlights no anchor, as it does everywhere (VectorCraft's own rule). No setting changes this. This covers paths, groups, type, symbol instances and images. Regression tests: `crates/engine/src/tests/select_effects.rs`. - **Symbol instances are selected where their art draws past their box:** a click or a marquee selects a symbol instance where a clipping path in its art, moved or reshaped by its live geometry effects, shows the art past the instance's box, as it selects a group of the same art; a click also selects it where a stroke in its art paints past the box ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/select-objects.html)). The rest is VectorCraft's own rule: inside the box the instance is selected as before; in Outline view and below a layer whose Preview is off only the box counts; hidden art and the area a raster effect paints are left out. This covers instances in groups, nested in other symbols' art, moved and scaled. Regression tests: `a_symbol_instance_is_hit_where_a_moved_clipping_path_in_its_art_shows_the_art` and `a_symbol_instance_is_hit_on_the_stroke_of_its_art_past_its_box` in `crates/doc/src/hit/tests.rs`. - **Selection follows geometry effects:** a click or a marquee with the selection tools selects a path or compound path where its live geometry effects (Transform, Offset Path, Roughen, Zig Zag and the other effects that reshape a path, on the object or on its fills and strokes) draw it, the copies a Transform effect makes included, and not where its own geometry no longer paints. The members of a group or layer whose own geometry effects move or reshape them are selected where they are drawn, at the depth each tool selects, and a locked member there lets the click through to what is below and is listed there in the Unlock submenu. A group's own fills and strokes are clicked where they paint its members, and a clipping path inside such a group is taken on its drawn outline before the art it clips. A compound path keeps its holes, Object Selection by Path Only takes the drawn outline and not its fill, and stacking order is kept. The selection tools select objects by clicking or by a marquee ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/select-objects.html)), and the effects leave the art they reshape editable ([the help page](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/apply-filter-effects/apply-and-modify-effects.html)); where clicks land on the reshaped art is VectorCraft's own rule. In Outline view clicks and marquees use the plain paths, and in a layer with Preview off they take outlines only. The area a raster effect paints is still left out. Regression tests: `a_*_shifted_art_*`, `a_click_hits_a_paths_copy_and_evaluates_its_art_once_until_it_changes`, `a_groups_own_effect_moves_where_its_members_are_hit`, `a_layers_own_effect_moves_where_its_art_is_hit`, `a_preview_off_sublayer_of_an_effected_layer_is_clicked_in_outline`, `a_painted_group_around_an_effected_symbols_instance_is_hit_where_its_art_is_drawn`, `an_intertwine_group_in_a_layers_drawn_art_is_hit_in_its_woven_order`, `a_click_in_a_plain_group_evaluates_only_its_member_with_effects`, `a_clip_groups_own_effect_moves_where_its_mask_outline_is_hit`, `an_isolated_clip_group_with_its_own_effect_is_marqueed_by_its_members_own_geometry` and `a_clip_groups_art_is_hit_when_its_drawn_art_holds_only_the_clipping_path` in `crates/doc/src/hit/tests.rs`, and `a_click_and_a_marquee_select_art_where_its_transform_effect_draws_it`, `a_click_selects_a_group_where_its_own_fill_paints_a_moved_member`, `a_marquee_takes_an_inner_groups_own_fill_inside_a_painted_group` and `a_marquee_takes_a_groups_own_fill_inside_a_painted_layer` in `crates/engine/src/tests/select_effects.rs`. From 07378009102db84ab7221fa2f6742047088675d2 Mon Sep 17 00:00:00 2001 From: yoriswind Date: Thu, 26 Nov 2026 12:55:01 -0800 Subject: [PATCH 03/15] test: assert Layers target button pressed state --- crates/ui-egui/src/panels/layers/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/panels/layers/tests.rs b/crates/ui-egui/src/panels/layers/tests.rs index 29ea72202a..205a9d0f74 100644 --- a/crates/ui-egui/src/panels/layers/tests.rs +++ b/crates/ui-egui/src/panels/layers/tests.rs @@ -882,7 +882,7 @@ fn appearance_marker_names_its_state_and_keeps_targeting_actions() { let active = "Target appearance: targeted, additional appearance or transparency"; assert_eq!(panel.description("Target A").as_deref(), Some(idle)); assert_eq!(panel.description("Target B").as_deref(), Some("Target appearance: not targeted, basic appearance")); - assert!(!panel.selected("Target A")); + assert_eq!(panel.toggled("Target A"), Some(craft::behavior::Mixed::Same(false))); let before = { let app = panel.app(); (app.session.active().unwrap().selection.clone(), undo_len(&app)) @@ -899,11 +899,11 @@ fn appearance_marker_names_its_state_and_keeps_targeting_actions() { panel.click("Target A"); assert_eq!(targeted(&panel.app()), (Some(a), vec![a])); assert_eq!(panel.description("Target A").as_deref(), Some(active)); - assert!(panel.selected("Target A")); + assert_eq!(panel.toggled("Target A"), Some(craft::behavior::Mixed::Same(true))); panel.click("Target B"); assert_eq!(panel.description("Target A").as_deref(), Some(idle)); assert_eq!(panel.description("Target B").as_deref(), Some("Target appearance: targeted, basic appearance")); - assert!(panel.selected("Target B")); + assert_eq!(panel.toggled("Target B"), Some(craft::behavior::Mixed::Same(true))); assert!(target_marks_painted(&mut panel, "Target A").iter().any(|m| m.1), "the appearance stays after targeting other art"); } From d48ea9a3c06ebdf5d2b567cc255483066ece432a Mon Sep 17 00:00:00 2001 From: yoriswind Date: Thu, 26 Nov 2026 13:03:54 -0800 Subject: [PATCH 04/15] Remove the unused test selection helper --- crates/ui-egui/src/tests/panel_harness.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/crates/ui-egui/src/tests/panel_harness.rs b/crates/ui-egui/src/tests/panel_harness.rs index 7251c04291..b596f3a1c8 100644 --- a/crates/ui-egui/src/tests/panel_harness.rs +++ b/crates/ui-egui/src/tests/panel_harness.rs @@ -378,11 +378,6 @@ impl Panel { tree.keys().into_iter().any(|key| tree.value_of(key).is_some_and(&matches)) } - /// Whether the control named `name` reports selected state. - pub(crate) fn selected(&self, name: &str) -> bool { - self.fixture.tree().selected_of(self.look(name).node).unwrap_or(false) - } - /// The toggle state of the control named `name`. // PLAN: assumed the facade re-exports the behavior crate's `Mixed` as `craft::behavior::Mixed`. pub(crate) fn toggled(&self, name: &str) -> Option> { From 53c57248adb0c1c926a3a677978c7eac0b21c5d1 Mon Sep 17 00:00:00 2001 From: yoriswind Date: Thu, 26 Nov 2026 15:02:33 -0800 Subject: [PATCH 05/15] Use the current stroke paint API in Properties --- crates/ui-egui/src/panels/properties/appearance_section.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/properties/appearance_section.rs b/crates/ui-egui/src/panels/properties/appearance_section.rs index cd71a0f035..e2ae112143 100644 --- a/crates/ui-egui/src/panels/properties/appearance_section.rs +++ b/crates/ui-egui/src/panels/properties/appearance_section.rs @@ -102,7 +102,7 @@ fn effect_delete(app: &mut VectorcraftApp, ui: &mut Ui, id: NodeId, effects: &[( /// active Appearance row in `PropertiesUi::edited_profiled`. False while the Type tool edits text or /// the Live Paint Bucket is active, when the list edits the stroke the panel shows. fn edited_strokes_profiled(app: &mut VectorcraftApp) -> bool { - if panels::character::text_editing(app).is_some() || app.session.bucket_paints() { + if panels::character::text_editing(app).is_some() || app.session.tool_paints(true) { return false; } let Some(st) = app.session.active() else { return false }; From d3e02f41a18d29e51628c13ba70769c8d8009f1e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 13:52:49 -0800 Subject: [PATCH 06/15] Performance: Properties rows read a large selection once per edit After an edit the selection keeps no record of its paints, so the Fill and Stroke chips and the Stroke and Width Profile rows looked up the groups around every selected object for Live Paint faces and edges each time they were drawn. DocState::live_paint_covered_kept keeps an empty answer for that version of the document and those objects. The Recolor quick action listed and sorted every color of the selection to see whether it held more than one. Session::several_colors_used reads the same objects and pattern tiles and stops at the second color. --- crates/engine/src/cmd.rs | 3 + crates/engine/src/cmd/paint.rs | 5 +- crates/engine/src/cmd/paint/tests.rs | 52 +++++++++ crates/engine/src/cmd/recolor.rs | 133 ++++++++++++++++++++++++ crates/engine/src/doc_state.rs | 34 ++++++ crates/ui-egui/src/panels/properties.rs | 8 +- 6 files changed, 229 insertions(+), 6 deletions(-) diff --git a/crates/engine/src/cmd.rs b/crates/engine/src/cmd.rs index 43d6e3a7d4..3641f82d6b 100644 --- a/crates/engine/src/cmd.rs +++ b/crates/engine/src/cmd.rs @@ -874,6 +874,9 @@ pub(crate) use vectorcraft_doc::range::parse_range; /// What the fill and stroke proxies read from the selected objects, kept with the selection /// ([`crate::doc_state::SelectionRecord`]). pub(crate) use paint::SelectionPaints; +/// The faces and edges of Live Paint groups among objects that count with their group +/// ([`crate::DocState::live_paint_covered_kept`] keeps an empty answer). +pub(crate) use paint::live_paint_covered; #[cfg(test)] pub(crate) use paint::{PAINTS_READ, WEIGHTS_READ}; diff --git a/crates/engine/src/cmd/paint.rs b/crates/engine/src/cmd/paint.rs index c722e2a58b..2a61f7fb74 100644 --- a/crates/engine/src/cmd/paint.rs +++ b/crates/engine/src/cmd/paint.rs @@ -1470,12 +1470,13 @@ fn in_live_paint(d: &Document, id: NodeId) -> bool { impl DocState { /// [`live_paint_covered`] for `ids`, the selected objects or the selection's subjects: none - /// when the [`SelectionPaints`] of the selection say no selected object is in a Live Paint group. + /// when the [`SelectionPaints`] of the selection say no selected object is in a Live Paint group, + /// else as [`DocState::live_paint_covered_kept`] keeps it for this version of the document. pub(crate) fn selection_live_paint_covered(&self, ids: &[NodeId]) -> std::collections::HashSet { if self.selection_paints().is_some_and(|p| !p.in_live_paint()) { return std::collections::HashSet::new(); } - live_paint_covered(&self.doc, ids) + self.live_paint_covered_kept(ids) } } diff --git a/crates/engine/src/cmd/paint/tests.rs b/crates/engine/src/cmd/paint/tests.rs index ec8f02f700..9b0fb393df 100644 --- a/crates/engine/src/cmd/paint/tests.rs +++ b/crates/engine/src/cmd/paint/tests.rs @@ -242,6 +242,58 @@ fn the_question_marks_read_only_the_selected_objects() { assert!(vectorcraft_doc::tree_walks() - walks <= 1, "one walk for a large selection"); } +/// How many times this thread read the groups around selected objects for their Live Paint faces +/// and edges ([`DocState::live_paint_covered_kept`]). +fn cover_reads() -> usize { + crate::doc_state::LIVE_PAINT_COVER_READS.with(Cell::get) +} + +/// After an edit the selection keeps no record of what it holds, and the proxies, the Stroke panel +/// and the "?" ask on every frame whether its objects lie in a Live Paint group. They read the +/// objects' groups once for each version of the document and selection, not once for each question. +/// A Live Paint group selected with one of its faces still counts the face with its group. +#[test] +fn live_paint_faces_are_looked_for_once_per_document_version() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 800, "height": 600})).unwrap(); + let ids: Vec = (0..20).map(|i| rect(&mut s, 10.0 + 30.0 * f64::from(i), "#ff0000", "#000000")).collect(); + s.execute("select.all", &json!({})).unwrap(); + s.execute("object.move", &json!({"dx": 5, "dy": 0})).unwrap(); + assert!(s.active().unwrap().selection_paints().is_none(), "the edit leaves the selection without a record"); + let ask = |s: &Session| { + for _ in 0..3 { + s.proxy_paints(); + s.shown_stroke(); + s.proxy_mixed(); + s.active().unwrap().stroke_mixed(); + } + }; + let before = cover_reads(); + ask(&s); + assert_eq!(cover_reads() - before, 1, "one read for this version of the document"); + s.execute("object.move", &json!({"dx": 5, "dy": 0})).unwrap(); + let before = cover_reads(); + ask(&s); + assert_eq!(cover_reads() - before, 1, "an edit reads them again, once"); + s.execute("select.set", &json!({"ids": [ids[0].0, ids[1].0]})).unwrap(); + s.execute("object.move", &json!({"dx": 5, "dy": 0})).unwrap(); + let before = cover_reads(); + ask(&s); + assert_eq!(cover_reads() - before, 1, "another selection reads them again, once"); + + // A Live Paint group with one of its edges selected too: the edge counts with its group on every ask. + s.execute("livePaint.make", &json!({"ids": [ids[2].0, ids[3].0]})).unwrap(); + let group = s.active().unwrap().selection.objects[0]; + let edge = vectorcraft_tools::builder::edges(s.active().unwrap().doc.node(group).unwrap())[0].id; + s.execute("select.set", &json!({"ids": [group.0, edge.0]})).unwrap(); + let st = s.active().unwrap(); + let covered = live_paint_covered(&st.doc, &st.selection.objects); + assert!(covered.contains(&edge)); + for _ in 0..2 { + assert_eq!(st.selection_live_paint_covered(&st.selection.objects), covered); + } +} + /// Random selections of a document with nested groups answer as a walk does. #[test] fn random_selections_match_a_walk_of_the_document() { diff --git a/crates/engine/src/cmd/recolor.rs b/crates/engine/src/cmd/recolor.rs index b4ad26400b..174f90ecb0 100644 --- a/crates/engine/src/cmd/recolor.rs +++ b/crates/engine/src/cmd/recolor.rs @@ -1027,6 +1027,76 @@ fn used_colors(d: &Document, ids: &[NodeId], only: Option<&BTreeSet>) -> used.into_iter().map(|(_, u)| u).collect() } +#[cfg(test)] +thread_local! { + /// Tests: how many objects [`several_colors`] read on this thread. + static SEVERAL_COLORS_READS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// Whether [`used_colors`] lists more than one color for the objects `ids`. The objects are read +/// until a second color turns up. +fn several_colors(d: &Document, ids: &[NodeId], only: Option<&BTreeSet>) -> bool { + struct Seen<'a> { + first: Option, + several: bool, + patterns: Vec<&'a str>, + } + impl<'a> Seen<'a> { + fn read(&mut self, m: &'a Node) { + #[cfg(test)] + SEVERAL_COLORS_READS.with(|c| c.set(c.get() + 1)); + let (first, several) = (&mut self.first, &mut self.several); + paints( + m, + &mut |c, _, _, _| { + let k = ColorKey::of(c); + match first { + None => *first = Some(k), + Some(f) => *several |= *f != k, + } + }, + &mut self.patterns, + ); + } + fn read_tree(&mut self, n: &'a Node, only: Option<&BTreeSet>) { + if self.several || only.is_some_and(|o| !o.contains(&n.id)) { + return; + } + self.read(n); + for c in n.children().into_iter().flatten() { + self.read_tree(c, only); + } + } + } + let mut seen = Seen { first: None, several: false, patterns: vec![] }; + for n in ids.iter().filter_map(|id| d.node(*id)) { + seen.read_tree(n, only); + } + let mut next = 0; + while !seen.several + && let Some(&name) = seen.patterns.get(next) + { + next += 1; + for a in d.pattern(name).map(|def| def.art.as_slice()).unwrap_or_default() { + a.walk(&mut |m| { + if !seen.several { + seen.read(m); + } + }); + } + } + seen.several +} + +impl Session { + /// Whether the objects `recolor.colors` reads without `ids` use more than one color: the + /// selection, or with nothing selected the objects Select All takes. False without a document. + pub fn several_colors_used(&self) -> bool { + let Ok((ids, only)) = scope_ids(self, &Value::Null, "recolor.colors") else { return false }; + self.doc().is_ok_and(|st| several_colors(&st.doc, &ids, only.as_ref())) + } +} + /// Count the colors `m` holds itself with `count` (the color, its swatch, the tint the paint /// stores, and whether it is a gradient stop that mixes the swatch's ink with process inks), and /// add the patterns it is painted with to `patterns`. @@ -2050,6 +2120,69 @@ mod tests { assert!(has(&t, RED), "P100 read again at the top"); } + /// How many objects [`several_colors`] read on this thread. + fn several_reads() -> usize { + SEVERAL_COLORS_READS.with(std::cell::Cell::get) + } + + /// Whether more than one color is used ([`Session::several_colors_used`]), checked against the + /// length of `recolor.colors`'s list, with how many objects the answer read. + fn several(s: &mut Session, what: &str) -> (bool, usize) { + let before = several_reads(); + let several = s.several_colors_used(); + let reads = several_reads() - before; + let listed = s.execute("recolor.colors", &json!({})).unwrap()["colors"].as_array().map_or(0, Vec::len); + assert_eq!(several, listed > 1, "{what}: {listed} colors listed"); + (several, reads) + } + + /// The Recolor quick action asks on every change whether the selection uses more than one + /// color. The answer matches `recolor.colors`, pattern tiles and Select All's objects included, + /// and the objects are read only until a second color turns up. + #[test] + fn several_colors_stop_at_the_second_color() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 800, "height": 600})).unwrap(); + let ids: Vec = (0..30) + .map(|i| { + let id = + s.execute("shape.rectangle", &json!({"x": 10 + 20 * i, "y": 10, "width": 10, "height": 10})).unwrap()["id"].as_u64().unwrap(); + s.execute("paint.setFill", &json!({"ids": [id], "color": "#ff0000"})).unwrap(); + s.execute("paint.setStroke", &json!({"ids": [id], "none": true})).unwrap(); + id + }) + .collect(); + s.execute("select.all", &json!({})).unwrap(); + assert_eq!(several(&mut s, "one red"), (false, 30), "one color: every object is read"); + // A blue object in the middle: the objects are read up to it, from either end. + s.execute("paint.setFill", &json!({"ids": [ids[15]], "color": "#0000ff"})).unwrap(); + let (found, reads) = several(&mut s, "a blue in the middle"); + assert!(found && matches!(reads, 15 | 16), "{reads} objects read"); + s.execute("paint.setFill", &json!({"ids": [ids[0], ids[29]], "color": "#00ff00"})).unwrap(); + assert_eq!(several(&mut s, "green at both ends"), (true, 2), "the second object holds the second color"); + s.execute("select.set", &json!({"ids": &ids[1..15]})).unwrap(); + assert!(!several(&mut s, "the red ones").0); + s.execute("select.none", &json!({})).unwrap(); + assert!(several(&mut s, "Select All's objects").0); + + // A red object filled with a pattern too: its tile's color counts. + for (tile, expect) in [(BLUE, true), (RED, false)] { + let filled = NodeId(ids[1]); + s.edit("t", |d, _| { + let art = square(d, 0.0, Paint::solid(tile)); + d.patterns.retain(|p| p.name != "Tile"); + d.patterns.push(PatternDef::new("Tile", vec![art])); + if let Some(n) = d.node_mut(filled) { + n.appearance.set_fill(Paint::Pattern { pattern: "Tile".into(), xf: Affine::IDENTITY }); + } + Ok(()) + }) + .unwrap(); + s.execute("select.set", &json!({"ids": [ids[1], ids[2]]})).unwrap(); + assert_eq!(several(&mut s, "a pattern tile").0, expect, "a tile of {tile:?}"); + } + } + /// A pattern tile's symbol instances charge the same limit as the art around it. #[test] fn pattern_tiles_charge_the_symbol_limit() { diff --git a/crates/engine/src/doc_state.rs b/crates/engine/src/doc_state.rs index e1bb6df83a..8307b6a8b1 100644 --- a/crates/engine/src/doc_state.rs +++ b/crates/engine/src/doc_state.rs @@ -203,6 +203,18 @@ pub struct DocState { /// The selected objects as [`crate::Session::select`] last checked them or the proxies last /// read them, with the document they were checked in ([`SelectionRecord`]). Not saved. pub(crate) selection_record: Option, + /// The objects that [`DocState::live_paint_covered_kept`] last found no face or edge of a Live + /// Paint group among, with the document it read. Not saved. + outside_live_paint: std::cell::RefCell>, +} + +/// Objects that hold no face or edge of a Live Paint group that counts with its group +/// ([`cmd::live_paint_covered`] is empty for them), with the document they were read in, held as +/// [`EmptyArtboards::doc`] holds it. +#[derive(Clone, Debug)] +struct OutsideLivePaint { + doc: std::sync::Weak, + ids: Vec, } /// A selection of objects alone ([`objects_only`]) with the document it was checked or read in: @@ -302,6 +314,8 @@ thread_local! { pub(crate) static EMPTY_ARTBOARD_MEASURES: std::cell::Cell = const { std::cell::Cell::new(0) }; /// Tests: how many times [`DocState::any_art_to_fit`] measured a document on this thread. pub(crate) static ART_TO_FIT_MEASURES: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// Tests: how many times [`DocState::live_paint_covered_kept`] read the objects' groups on this thread. + pub(crate) static LIVE_PAINT_COVER_READS: std::cell::Cell = const { std::cell::Cell::new(0) }; } static NEXT_DOC_UID: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(1); @@ -522,6 +536,7 @@ impl DocState { measured_in_own: None, inline_resolved: None, selection_record: None, + outside_live_paint: Default::default(), } } /// The [`SelectionRecord`] of the selection now: `None` when the document or the selected @@ -539,6 +554,25 @@ impl DocState { pub(crate) fn selection_paints(&self) -> Option<&cmd::SelectionPaints> { self.selection_record().and_then(|r| r.paints.as_ref()) } + /// The faces and edges of Live Paint groups among `ids` that count with their group + /// ([`cmd::live_paint_covered`]). An empty answer is kept for this version of the document and + /// these objects, so the proxies and the Stroke panel, which ask on every frame, read the + /// objects' groups once after an edit. + pub(crate) fn live_paint_covered_kept(&self, ids: &[NodeId]) -> std::collections::HashSet { + let kept = |k: &OutsideLivePaint| std::ptr::eq(k.doc.as_ptr(), Arc::as_ptr(&self.doc)) && k.ids == ids; + if self.outside_live_paint.try_borrow().is_ok_and(|k| k.as_ref().is_some_and(kept)) { + return std::collections::HashSet::new(); + } + #[cfg(test)] + LIVE_PAINT_COVER_READS.with(|c| c.set(c.get() + 1)); + let covered = cmd::live_paint_covered(&self.doc, ids); + if covered.is_empty() + && let Ok(mut k) = self.outside_live_paint.try_borrow_mut() + { + *k = Some(OutsideLivePaint { doc: Arc::downgrade(&self.doc), ids: ids.to_vec() }); + } + covered + } /// Keep the [`SelectionRecord`] of the selection that [`crate::Session::select`] left, with /// Lock Guides `guides_locked`. `record` is the record of the selection before, in the same /// document: the objects that leave the selection are taken out of its paints and the objects diff --git a/crates/ui-egui/src/panels/properties.rs b/crates/ui-egui/src/panels/properties.rs index 7e3caa1a43..b137711d0d 100644 --- a/crates/ui-egui/src/panels/properties.rs +++ b/crates/ui-egui/src/panels/properties.rs @@ -291,8 +291,9 @@ fn can_merge_live_paint(app: &VectorcraftApp) -> bool { }) } -/// Whether the selection uses more than one colour (`recolor.colors`), which offers the Recolor -/// quick action; memoised per document revision. +/// Whether the selection uses more than one colour (`recolor.colors` lists more than one, +/// [`vectorcraft_engine::Session::several_colors_used`]), which offers the Recolor quick action; +/// memoised per document revision. pub(crate) fn multi_color(app: &mut VectorcraftApp) -> bool { let Some(st) = app.session.active() else { return false }; let key = (st.uid, st.revision); @@ -301,8 +302,7 @@ pub(crate) fn multi_color(app: &mut VectorcraftApp) -> bool { { return multi; } - let r = app.session.execute("recolor.colors", &json!({})).unwrap_or_default(); - let multi = r["colors"].as_array().is_some_and(|c| c.len() > 1); + let multi = app.session.several_colors_used(); app.canvas.multi_color = Some((key, multi)); multi } From 3aa41526e2009af448624f9c93cceb6a7a7fed59 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 15:02:34 -0800 Subject: [PATCH 07/15] Performance: the color check stops walking objects after a second color several_colors kept looking up the remaining ids, walking the remaining children of a group and the rest of a pattern tile after it had found two colors. It now stops as soon as the second color turns up. --- crates/engine/src/cmd/recolor.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/cmd/recolor.rs b/crates/engine/src/cmd/recolor.rs index 174f90ecb0..a0ba6d243c 100644 --- a/crates/engine/src/cmd/recolor.rs +++ b/crates/engine/src/cmd/recolor.rs @@ -1065,12 +1065,18 @@ fn several_colors(d: &Document, ids: &[NodeId], only: Option<&BTreeSet>) self.read(n); for c in n.children().into_iter().flatten() { self.read_tree(c, only); + if self.several { + return; + } } } } let mut seen = Seen { first: None, several: false, patterns: vec![] }; for n in ids.iter().filter_map(|id| d.node(*id)) { seen.read_tree(n, only); + if seen.several { + return true; + } } let mut next = 0; while !seen.several @@ -1078,11 +1084,13 @@ fn several_colors(d: &Document, ids: &[NodeId], only: Option<&BTreeSet>) { next += 1; for a in d.pattern(name).map(|def| def.art.as_slice()).unwrap_or_default() { - a.walk(&mut |m| { - if !seen.several { - seen.read(m); - } + let _ = a.try_walk(&mut |m| { + seen.read(m); + if seen.several { std::ops::ControlFlow::Break(()) } else { std::ops::ControlFlow::Continue(()) } }); + if seen.several { + break; + } } } seen.several From 9a588078419876ffa2ec576ecc13678718a74812 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 16:44:27 -0800 Subject: [PATCH 08/15] Performance: a move finds the selected objects' places in fewer walks of the tree With 10,000 objects selected, object.move walked the document's tree five times and looked each object up by id three times. It now walks the tree three times and looks each object up once. - The selected roots (for the menus, for Move, Rotate, Scale and the other transforms, for Copy and Cut, and inside an isolated group) are put in paint order and reduced to their top-level objects from one walk instead of two. - A transform finds the objects' places once for Transform Patterns and for the edit, instead of once for each. - After a transform, the check for a pixel-aligned compound path reads the parent at the object's place instead of looking the object and its parent up by id. --- crates/engine/src/cmd/edit.rs | 30 +++++++++++++++++++---- crates/engine/src/cmd/edit/tests.rs | 30 +++++++++++++++++++++++ crates/engine/src/cmd/object/pixelgrid.rs | 12 +++++++++ crates/engine/src/cmd/object/transform.rs | 18 +++++++++----- crates/engine/src/tests/large_edits.rs | 18 ++++++++++++++ 5 files changed, 97 insertions(+), 11 deletions(-) diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 4fc1b83c29..70d7547313 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -967,7 +967,8 @@ pub(crate) fn selection_roots(st: &crate::DocState) -> Vec { } #[cfg(test)] ROOTS_FOUND.set(ROOTS_FOUND.get() + 1); - let roots = roots_of(&st.doc, st.selection.in_paint_order(&st.doc)); + let (ids, paths) = placed_in_paint_order(&st.doc, &st.selection.objects); + let roots = roots_placed(&st.doc, ids, &paths, |_, _| false); *kept = Some((Arc::downgrade(&st.doc), st.selection.objects.clone(), roots.clone())); roots }) @@ -1015,7 +1016,19 @@ pub(crate) fn no_symbol_part(s: &Session) -> std::result::Result<(), String> { pub(crate) fn selected_roots_to_transform(s: &Session) -> Result> { refuse_symbol_part(s)?; let st = s.doc()?; - Ok(roots_within(&st.doc, st.selection.in_paint_order(&st.doc), |_, _| true)) + let (ids, paths) = placed_in_paint_order(&st.doc, &st.selection.objects); + Ok(roots_placed(&st.doc, ids, &paths, |_, _| true)) +} + +/// The objects of `objects` that are in `doc`, in paint order as +/// [`vectorcraft_doc::Selection::in_paint_order`] gives them, with their places in the tree. One +/// walk finds the places for both the order and [`roots_placed`] ([`roots_within`] after +/// `in_paint_order` walks the tree twice). +fn placed_in_paint_order(doc: &Document, objects: &[NodeId]) -> (Vec, HashMap>) { + let paths = doc.index_paths(objects.iter().copied()); + let mut ids: Vec = objects.iter().copied().filter(|id| paths.contains_key(id)).collect(); + ids.sort_by(|a, b| paths.get(a).cmp(&paths.get(b))); + (ids, paths) } /// [`selected_roots`] for the selected objects inside the isolated object `root` @@ -1027,8 +1040,9 @@ pub(crate) fn selected_roots_to_transform(s: &Session) -> Result> { pub(crate) fn selected_roots_inside(s: &Session, root: NodeId, members: bool) -> Result> { refuse_symbol_part(s)?; let st = s.doc()?; - let ids = st.selection.in_paint_order(&st.doc).into_iter().filter(|id| super::inside_isolation(&st.doc, root, *id)).collect(); - Ok(roots_within(&st.doc, ids, |compound, _| members || compound == root)) + let (ids, paths) = placed_in_paint_order(&st.doc, &st.selection.objects); + let ids = ids.into_iter().filter(|id| super::inside_isolation(&st.doc, root, *id)).collect(); + Ok(roots_placed(&st.doc, ids, &paths, |compound, _| members || compound == root)) } /// The top-level objects among `ids` (in paint order): compound-path members stand for their @@ -1042,6 +1056,11 @@ pub(crate) fn roots_of(doc: &Document, ids: Vec) -> Vec { fn roots_within(doc: &Document, ids: Vec, keep_member: impl Fn(NodeId, NodeId) -> bool) -> Vec { // Every id's place in the tree, found in one walk (a lookup per id is a walk per id). let paths = doc.index_paths(ids.iter().copied()); + roots_placed(doc, ids, &paths, keep_member) +} + +/// [`roots_within`] with `paths`, the places of `ids` in `doc`'s tree, found already. +fn roots_placed(doc: &Document, ids: Vec, paths: &HashMap>, keep_member: impl Fn(NodeId, NodeId) -> bool) -> Vec { // A compound-path member acts as its compound (compounds are one object). let mut sel: Vec<(NodeId, Option>)> = ids .into_iter() @@ -1105,7 +1124,8 @@ fn copy_cut_targets(s: &Session) -> Result<(bool, Vec)> { st.doc.node(compound).and_then(|n| n.children()).is_some_and(|members| !members.is_empty() && members.iter().all(|m| whole(m))) }) }; - let roots = roots_within(&st.doc, st.selection.in_paint_order(&st.doc), |compound, _member| in_isolated_compound || !all_members_whole(compound)); + let (ids, paths) = placed_in_paint_order(&st.doc, &st.selection.objects); + let roots = roots_placed(&st.doc, ids, &paths, |compound, _member| in_isolated_compound || !all_members_whole(compound)); Ok((direct, roots)) } diff --git a/crates/engine/src/cmd/edit/tests.rs b/crates/engine/src/cmd/edit/tests.rs index 7ac2d9c162..7e0471f0f5 100644 --- a/crates/engine/src/cmd/edit/tests.rs +++ b/crates/engine/src/cmd/edit/tests.rs @@ -348,6 +348,36 @@ fn direct_selection_cut_timing() { } } +/// Finding the selected roots (for the menus, for Move and its siblings, for Copy and Cut, and +/// inside an isolated group) walks the tree once for the paint order and the roots together, in +/// paint order whatever order the objects were selected in. +#[test] +fn finding_the_selected_roots_walks_the_tree_once() { + let mut s = session(2_000, square); + let all = crate::tests_large_edits::layer(&s, 0); + let reversed: Vec = all.iter().rev().map(|id| id.0).collect(); + s.execute("select.set", &json!({"ids": reversed})).unwrap(); + type Find = fn(&Session) -> Vec; + let finds: [(&str, Find); 3] = [ + ("the selected roots", |s| selected_roots(s).unwrap()), + ("the roots to transform", |s| selected_roots_to_transform(s).unwrap()), + ("Copy's targets", |s| copy_cut_targets(s).unwrap().1), + ]; + for (what, find) in finds { + let walks = tree_walks(); + assert!(find(&s) == all, "{what} in paint order"); + assert_eq!(tree_walks() - walks, 1, "finding {what} walked the tree {} times", tree_walks() - walks); + } + s.execute("object.group", &json!({})).unwrap(); + let group = s.doc().unwrap().doc.layers[0].children().unwrap()[0].id; + s.execute("select.set", &json!({"ids": reversed})).unwrap(); + // The first call also builds the lookup cache that the isolation check reads. + assert!(selected_roots_inside(&s, group, false).unwrap() == all, "the roots inside the group in paint order"); + let walks = tree_walks(); + assert!(selected_roots_inside(&s, group, false).unwrap() == all); + assert_eq!(tree_walks() - walks, 1, "finding the roots inside the group walked the tree {} times", tree_walks() - walks); +} + /// The selected roots are found once for a document version and its selected objects, however many enabled checks /// read them, and found again after the selection changes, after an edit, and for another selection. #[test] diff --git a/crates/engine/src/cmd/object/pixelgrid.rs b/crates/engine/src/cmd/object/pixelgrid.rs index 81909da76f..220ed30099 100644 --- a/crates/engine/src/cmd/object/pixelgrid.rs +++ b/crates/engine/src/cmd/object/pixelgrid.rs @@ -142,6 +142,18 @@ pub(crate) fn keep_compound_aligned(d: &mut Document, id: NodeId, sc: Scaling) { } } +/// [`keep_compound_aligned`] for the object at `path` in `d`'s tree, found already: the compound +/// path is read at the parent's place, without looking either object up by id. +pub(crate) fn keep_compound_aligned_at(d: &mut Document, path: &[usize], sc: Scaling) { + let Some((_, up)) = path.split_last() else { return }; + if up.is_empty() || !d.node_at(up).is_some_and(|n| matches!(n.kind, NodeKind::Compound { .. }) && n.extras().pixel_aligned) { + return; + } + if let Some(n) = d.node_mut_at(up) { + snap_object(n, sc); + } +} + /// After any edit ([`Session::edit`]): snap each pixel-aligned object that the edit changed or added /// (its node in `doc` is not the one in `before`), with the pixel-aligned art of its linked opacity /// mask, to the pixel grid. Objects the edit did not touch are not visited. diff --git a/crates/engine/src/cmd/object/transform.rs b/crates/engine/src/cmd/object/transform.rs index 1a15e44aa3..3f471a00fe 100644 --- a/crates/engine/src/cmd/object/transform.rs +++ b/crates/engine/src/cmd/object/transform.rs @@ -66,10 +66,15 @@ pub(super) fn scaling_options(s: &Session, p: &Value) -> Scaling { /// param, else General › Transform Pattern Tiles)? Noted in the journal when they or the art of /// their linked opacity masks use a pattern, so a replay moves their tiles alike whatever the preference is then. pub(crate) fn transform_patterns(s: &mut Session, p: &Value, ids: &[NodeId]) -> Result { + let paths = s.doc()?.doc.index_paths(ids.iter().copied()); + transform_patterns_at(s, p, ids, &paths) +} + +/// [`transform_patterns`] with `paths`, the places of `ids` in the document's tree, found already. +fn transform_patterns_at(s: &mut Session, p: &Value, ids: &[NodeId], paths: &std::collections::HashMap>) -> Result { let on = bool_or(p, "patterns", s.prefs.transform_pattern_tiles); let d = &s.doc()?.doc; let mut uses = false; - let paths = d.index_paths(ids.iter().copied()); for n in ids.iter().filter_map(|id| paths.get(id)).filter_map(|p| d.node_at(p)) { uses |= uses_pattern_with_masks(n); } @@ -152,7 +157,9 @@ fn apply_transform_moving_guides( let areas = bool_or(p, "typeAreas", false); let objects = transforms_objects(p); let mut sc = if Scaling::factor(xf).is_some() { scaling(s, p) } else { Scaling::default() }; - sc.patterns = transform_patterns(s, p, &ids)?; + // The places of `ids`, found in one walk for Transform Patterns and for the edit below. + let paths = s.doc()?.doc.index_paths(ids.iter().copied()); + sc.patterns = transform_patterns_at(s, p, &ids, &paths)?; let c = xf.as_coeffs(); let is_translation = (c[0] - 1.0).abs() < 1e-9 && c[1].abs() < 1e-9 && c[2].abs() < 1e-9 && (c[3] - 1.0).abs() < 1e-9; let delta = guides.unwrap_or(Vec2::new(c[4], c[5])); @@ -174,8 +181,6 @@ fn apply_transform_moving_guides( // An edit normally preserves the tree positions already found here. Settling an active // typing session can change the document before the edit closure runs, so look up again then. let reindex = copy || (!s.previewing && crate::cmd::typing_in_progress(s)); - let d = &s.doc()?.doc; - let paths = d.index_paths(ids.iter().copied()); let none = paths.is_empty() && !has_guides; // A move of direct-selected anchors may re-map the handles beside them (`interpolate`). let mut interpolate = None; @@ -230,8 +235,9 @@ fn apply_transform_moving_guides( } } if objects { - for id in &targets { - super::pixelgrid::keep_compound_aligned(d, *id, sc); + // The transforms above leave every object at its place, so `paths` still holds them. + for p in targets.iter().filter_map(|id| paths.get(id)) { + super::pixelgrid::keep_compound_aligned_at(d, p, sc); } // Moving all of the tile art moves the tile as far. if let Some(before) = tile_art { diff --git a/crates/engine/src/tests/large_edits.rs b/crates/engine/src/tests/large_edits.rs index 0394fb18fa..2806cdd925 100644 --- a/crates/engine/src/tests/large_edits.rs +++ b/crates/engine/src/tests/large_edits.rs @@ -253,6 +253,24 @@ fn transform_each_with_copy_of_50000_objects_takes_few_tree_walks() { undo_gives_back(&mut s, &before); } +/// A move of 10,000 selected objects walks the tree once for the paint order and the top-level +/// objects, once for Transform Patterns and the edit, and once for the selection's check after the +/// edit. It reads each object's compound path at the object's place, so the only lookups by id are +/// the range check's, one per object. +#[test] +fn moving_10000_selected_objects_walks_the_tree_three_times() { + let n = 10_000; + let mut s = session(n, square); + let ids = layer(&s, 0); + let (walks, lookups) = (vectorcraft_doc::tree_walks(), vectorcraft_doc::path_lookups()); + s.execute("object.move", &json!({"dx": 3, "dy": 0})).unwrap(); + let (walks, lookups) = (vectorcraft_doc::tree_walks() - walks, vectorcraft_doc::path_lookups() - lookups); + assert_eq!(walks, 3, "walked the tree {walks} times"); + assert!(lookups <= n as u64, "{lookups} lookups by id for {n} objects"); + assert_eq!(bounds(&s, ids[n - 1]), square_at(n - 1) + vectorcraft_geom::Vec2::new(3.0, 0.0)); + assert!(selected(&s, &ids)); +} + #[test] fn offset_path_of_50000_objects_takes_few_tree_walks() { let s = session(50_000, square); From 42f973a5bc04d84293c9896edde56e70adc2920e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 16:50:38 -0800 Subject: [PATCH 09/15] xtask: the cache warm builds integration tests too `cargo xtask ci warm` built each test shard with `--lib --bins --no-run`, while the shards run `--lib --bins --tests`. The warm build left out the integration test executables the shards then build, and cargo warned `unused dependency vectorcraft-testkit` for apps/vectorcraft-cli, whose only use is in tests/it. The warm build now selects the same targets as the test shards, through one `TARGETS` list that both use. --- xtask/src/main.rs | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 08a55df09a..5484c0d3e9 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -267,12 +267,14 @@ fn cmd_test() -> Result<(), String> { test_packages(&["--workspace".to_owned()], "--workspace", None) } +/// The test targets that [`test_packages`] runs and `ci warm` builds. +const TARGETS: [&str; 3] = ["--lib", "--bins", "--tests"]; + /// [`cmd_test`] for the packages `select` picks (`--workspace` or `-p` ids), shown as `shown`; /// with `part`, only that part's share of their tests (xtask/src/shards.rs), which needs nextest. /// A part runs its counted share, then its pinned tests, each with nextest's default thread count. /// Every run finishes before the first error is returned. fn test_packages(select: &[String], shown: &str, part: Option) -> Result<(), String> { - const TARGETS: [&str; 3] = ["--lib", "--bins", "--tests"]; if let Some(part) = part { if !has_nextest() { return Err(format!("cargo nextest run {shown}: a shard that runs part of a crate's tests needs cargo-nextest")); @@ -393,11 +395,13 @@ fn cmd_ci_shard() -> Result<(), String> { run_steps(&steps) } -/// `cargo xtask ci warm`: for each test shard, builds its crates' library and binary 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). The integration tests are left out: they -/// build no dependency that the library tests do not, since both take the crate's dev-dependencies. +/// `cargo xtask ci warm`: for each test shard, builds its crates' library, binary and integration +/// 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). The test builds select the same +/// targets as the test shards ([`TARGETS`]), so the cache also holds the test executables the +/// shards run, and cargo does not warn (`cargo::unused_dependencies`) about a dev-dependency that +/// only an integration test uses. /// /// In a leg that saves the cache, every build records its units in `CRAFT_CACHE_UNITS` /// (xtask/src/cache_units.rs), xtask's own build included. @@ -414,9 +418,8 @@ fn cmd_ci_warm() -> Result<(), String> { steps.push(( "build tests", Box::new(move || { - let mut c = cargo(); - c.arg("test").args(shards::select(&crates)).args(["--lib", "--bins", "--no-run"]); - cache_units::run(c, &format!("cargo test --lib --bins --no-run ({})", shards::names(&crates))) + let (c, what) = warm_tests(&crates); + cache_units::run(c, &what) }), )); } @@ -447,6 +450,13 @@ fn cmd_ci_warm() -> Result<(), String> { run_steps(&steps) } +/// The command `ci warm` builds one test shard's tests with, and its description. +fn warm_tests(crates: &[shards::Member]) -> (Command, String) { + let mut c = cargo(); + c.arg("test").args(shards::select(crates)).args(TARGETS).arg("--no-run"); + (c, format!("cargo test {} --no-run ({})", TARGETS.join(" "), shards::names(crates))) +} + /// Runs `steps` in turn, stopping at the first that fails; the summary names the steps that passed /// and, after a failure, the one that failed and those skipped. fn run_steps(steps: &[Step]) -> Result<(), String> { @@ -588,3 +598,20 @@ fn i18n_report_packages(select: &[String], shown: &str) -> Result<(), String> { c.arg("test").args(select).args(["--lib", "--bins", "--tests", "--", "i18n::tests::untranslated_report", "--exact", "--nocapture"]); run(c, &format!("cargo test {shown} --lib --bins --tests -- i18n::tests::untranslated_report --exact --nocapture")) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn warm_builds_the_test_targets_the_shards_run() { + let crates = [shards::Member { name: "a".into(), id: "path+file:///w/a#0.1.0".into(), version: "0.1.0".into(), doctests: true }]; + let (c, what) = warm_tests(&crates); + let args: Vec = c.get_args().map(|a| a.to_string_lossy().into_owned()).collect(); + assert_eq!(args, ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--tests", "--no-run"]); + for target in TARGETS { + assert!(args.iter().any(|a| a == target), "ci warm does not build {target}"); + } + assert_eq!(what, "cargo test --lib --bins --tests --no-run (a)"); + } +} From 8e68c5edcf092ecd8993ea6aed7c630c2f921903 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 17:43:37 -0800 Subject: [PATCH 10/15] Shape Builder: Pick Color From defaults to Color Swatches While the Shape Builder is active, a fill picked from a swatch or a color changes only the current fill, and the selected art keeps its own. With Pick Color From set to Artwork, a merge takes the look of the art, so the picked color never reached the merged shape and the tool looked as if it could not fill. Pick Color From now defaults to Color Swatches: a merge fills with the picked color, and the Left and Right arrow keys step through the color swatches. A pickColorFrom saved with the preferences is kept, so a saved Artwork stays Artwork; preferences saved without one take Color Swatches. The shapeBuilder.merge command still defaults to artwork when its pickColorFrom is left out. Docs: docs/mcp.md and the tool options params text. --- crates/engine/src/tests/build.rs | 30 ++++++++++++++++++++++- crates/engine/src/tests/toolsettings.rs | 25 +++++++++++++++++++ crates/mcp/src/ui_catalog.rs | 2 +- crates/tools/src/builder.rs | 6 ++--- crates/ui-egui/src/dialogs/option_form.rs | 2 +- crates/ui-egui/src/menus/ui_commands.rs | 2 +- docs/mcp.md | 9 ++++--- 7 files changed, 65 insertions(+), 11 deletions(-) diff --git a/crates/engine/src/tests/build.rs b/crates/engine/src/tests/build.rs index 6ccdfad0a5..adb5d04af5 100644 --- a/crates/engine/src/tests/build.rs +++ b/crates/engine/src/tests/build.rs @@ -1753,7 +1753,8 @@ fn shape_builder_swatches_keep_the_current_fill_and_the_first_covered_objects_lo } /// The Shape Builder tool sends the point where the drag started first and the point where it -/// ended last, so a drag from the hole into the square takes the square's look. +/// ended last, so with Pick Color From Artwork a drag from the hole into the square takes the +/// square's look. #[test] fn shape_builder_tool_drag_from_the_hole_takes_the_look_where_it_ends() { let mut s = session(); @@ -1762,6 +1763,7 @@ fn shape_builder_tool_drag_from_the_hole_takes_the_look_where_it_ends() { select_ids(&mut s, &bars.iter().copied().chain([red]).collect::>()); let v = ViewInfo::default(); s.select_tool("shapeBuilder", v).unwrap(); + s.set_tool_option_cmd(&json!({"tool": "shapeBuilder", "values": {"pickColorFrom": "artwork"}})).unwrap(); s.pointer(&PointerEvent::new(PointerKind::Down, 50.0, 50.0), v).unwrap(); s.pointer(&PointerEvent::new(PointerKind::Drag, 85.0, 50.0), v).unwrap(); s.pointer(&PointerEvent::new(PointerKind::Drag, 120.0, 50.0), v).unwrap(); @@ -1853,6 +1855,7 @@ fn shape_builder_arrow_keys_step_the_current_fill_through_the_swatches() { let v = ViewInfo::default(); s.select_tool("shapeBuilder", v).unwrap(); let chips = |s: &mut Session| s.overlays(v).iter().filter(|o| matches!(o, vectorcraft_tools::Overlay::Swatch { .. })).count(); + s.set_tool_option_cmd(&json!({"tool": "shapeBuilder", "values": {"pickColorFrom": "artwork"}})).unwrap(); assert!(!s.tool_claims_key(ToolKey::Right, v), "Artwork leaves the arrows to nudging"); let values = json!({"pickColorFrom": "swatches", "cursorSwatchPreview": true}); s.set_tool_option_cmd(&json!({"tool": "shapeBuilder", "values": values})).unwrap(); @@ -2071,6 +2074,31 @@ fn shape_builder_fill_preview_is_put_back_by_a_cancel() { assert_eq!(s.paint.fill, before, "the cancel puts the fill back"); } +/// With the Shape Builder's default options, a fill picked while it is active (a swatch or a +/// color) fills the next merge: the tool sends `pickColorFrom: "swatches"`, and the merged shape +/// is not the red or blue of the art. +#[test] +fn shape_builder_default_merge_fills_with_the_picked_fill() { + let v = ViewInfo::default(); + for pick in [json!({"swatch": "Leaf"}), json!({"color": "#ff8800"})] { + let mut s = session(); + two(&mut s); + s.execute("swatch.new", &json!({"name": "Leaf", "color": "#00ff00"})).unwrap(); + s.select_tool("shapeBuilder", v).unwrap(); + s.execute("paint.setFill", &pick).unwrap(); + let picked = s.paint.fill.clone(); + s.pointer(&PointerEvent::new(PointerKind::Down, 25.0, 50.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Drag, 75.0, 50.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Drag, 125.0, 50.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 125.0, 50.0), v).unwrap(); + let (cmd, params) = s.journal.last().unwrap().clone(); + assert_eq!((cmd.as_str(), ¶ms["pickColorFrom"]), ("shapeBuilder.merge", &json!("swatches")), "{pick}"); + let d = &s.doc().unwrap().doc; + let fills: Vec = d.children(d.default_layer()).into_iter().flatten().map(|n| n.appearance.fill_paint()).collect(); + assert_eq!(fills, vec![picked], "{pick}: the two squares merged into one shape with the picked fill"); + } +} + /// With Pick Color From Color Swatches, a merge fills with the fill chosen while the Shape Builder /// is active, and the Gradient panel's eyedropper samples into a stop of that fill's gradient. #[test] diff --git a/crates/engine/src/tests/toolsettings.rs b/crates/engine/src/tests/toolsettings.rs index 7a28a84ec7..76fda42a5b 100644 --- a/crates/engine/src/tests/toolsettings.rs +++ b/crates/engine/src/tests/toolsettings.rs @@ -698,3 +698,28 @@ fn a_parametric_shape_kind_and_its_values_set_together() { assert_eq!(s.tool_options_of("parametricShape")["kind"], json!("star"), "a refused call sets nothing"); } } + +/// The Shape Builder picks colors from the color swatches by default: a fresh session, and saved +/// preferences that hold other Shape Builder options but no `pickColorFrom`, give `swatches`. A +/// saved `artwork` (or `swatches`) is kept. +#[test] +fn shape_builder_pick_color_from_defaults_to_swatches_and_keeps_a_saved_choice() { + let mut s = session(); + select(&mut s, "shapeBuilder"); + assert_eq!(s.tool_options()["pickColorFrom"], json!("swatches"), "a fresh session"); + for (saved, want) in [ + (json!({"highlightFill": false}), "swatches"), + (json!({"pickColorFrom": "artwork"}), "artwork"), + (json!({"pickColorFrom": "swatches"}), "swatches"), + ] { + let mut prefs = s.prefs.clone(); + prefs.tool_settings.insert("shapeBuilder".into(), saved.as_object().unwrap().clone()); + let saved_text = serde_json::to_string(&prefs).unwrap(); + let mut next = session(); + next.apply_prefs(serde_json::from_str(&saved_text).unwrap()); + select(&mut next, "shapeBuilder"); + assert_eq!(next.tool_options()["pickColorFrom"], json!(want), "saved {saved}"); + select(&mut next, "selection"); + assert_eq!(next.prefs.tool_settings["shapeBuilder"]["pickColorFrom"], json!(want), "stored again: {saved}"); + } +} diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index 9730bd7853..b6f0866d96 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -1192,7 +1192,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (swatches; a saved artwork is kept), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/crates/tools/src/builder.rs b/crates/tools/src/builder.rs index cdc7f6f7dc..42886ec013 100644 --- a/crates/tools/src/builder.rs +++ b/crates/tools/src/builder.rs @@ -66,11 +66,11 @@ pub struct ShapeBuilderOptions { /// region as if an invisible edge closed it. When it is off, the path cuts the regions it crosses /// as a line does. pub open_filled_as_closed: bool, - /// Pick Color From Color Swatches (`pickColorFrom: "swatches"`; off: `"artwork"`): a merge + /// Pick Color From Color Swatches (`pickColorFrom: "swatches"`, on; off: `"artwork"`): a merge /// fills the new shape with the current fill, and the Left and Right arrow keys step the current /// fill through the document's color swatches. With Artwork, the shape takes the look of the /// object where the drag starts, else of the one where it ends, else of the front-most selected - /// object. + /// object. A saved `pickColorFrom` is kept; preferences without one take Color Swatches. pub swatches: bool, /// Cursor Swatch Preview (`cursorSwatchPreview`, off): with Color Swatches, the current fill /// and the swatches before and after it show as chips above the pointer while no drag is on. @@ -105,7 +105,7 @@ impl Default for ShapeBuilderOptions { fn default() -> Self { Self { open_filled_as_closed: true, - swatches: false, + swatches: true, cursor_swatch_preview: false, straight_line: false, highlight_fill: true, diff --git a/crates/ui-egui/src/dialogs/option_form.rs b/crates/ui-egui/src/dialogs/option_form.rs index fde3f40932..7b1bf40418 100644 --- a/crates/ui-egui/src/dialogs/option_form.rs +++ b/crates/ui-egui/src/dialogs/option_form.rs @@ -631,7 +631,7 @@ pub(super) mod tests { tool: "shapeBuilder", opens_on: vec![ ("openFilledAsClosed", json!(true)), - ("pickColorFrom", json!("artwork")), + ("pickColorFrom", json!("swatches")), ("cursorSwatchPreview", json!(false)), ("selection", json!("freeform")), ("highlightFill", json!(true)), diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index f5e6908a8a..e76772d154 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -1193,7 +1193,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (swatches; a saved artwork is kept), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/docs/mcp.md b/docs/mcp.md index a9e9d9649a..5ec8ceafd4 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -15725,10 +15725,11 @@ a flare into a plain group of its parts. The document saves a flare's settings. The Shape Builder tool's options are its Shape Builder Tool Options (dialog `shapeBuilderOptions`): `openFilledAsClosed` (on: a filled open path bounds a region as if an invisible edge closed it; a path counts as filled when any of its fill rows is shown, painted and above 0% opacity, whichever row is on top; off: it cuts regions -as an unfilled path does), `pickColorFrom` (`artwork`, the default: a merged shape takes the appearance, opacity and -blending mode of the front-most selected object under the drag's first point, else of the one under its last point, -else of the front-most selected object; `swatches`: the current fill, and the Left and Right arrow keys without -Shift, Alt or Cmd/Ctrl step the current fill through the document's color swatches), `cursorSwatchPreview` (off; with `swatches`, chips above the +as an unfilled path does), `pickColorFrom` (`swatches`, the default: a merged shape fills with the current fill, and +the Left and Right arrow keys without Shift, Alt or Cmd/Ctrl step the current fill through the document's color +swatches; `artwork`: a merged shape takes the appearance, opacity and blending mode of the front-most selected object +under the drag's first point, else of the one under its last point, else of the front-most selected object; a +`pickColorFrom` saved with the preferences is kept, and preferences saved without one take `swatches`), `cursorSwatchPreview` (off; with `swatches`, chips above the pointer show the current fill and the swatches before and after it), `selection` (`freeform`, the default, or `straightLine`: a drag touches what the line from its first point to the pointer crosses), `highlightFill` (on by default; when it is off, merge mode shades no regions), `gapDetection` (off) with `gapLength` (pt, 0 to 72; 3), `clickStrokeSplitsPath` (In Merge Mode, From 80b15ed8d15eaaad0156eed1fc7aba6956855197 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 19:46:29 -0800 Subject: [PATCH 11/15] Swatches: idle frames replay the swatch rows The panel's browser has a row menu, drop rules and a drag payload of its own, and without a version for what they read it ran its rows in every frame. The panel now passes SwatchesPanel::host_version with a version of the document, its revision, its File > Revert count and its newest undo and redo steps, which are what those closures read. The craft-libs pin moves to current main (891f4060c), which has SwatchesPanel::host_version (storytold/craft-libs#4320), with the winit revision that craft-libs revision uses (0dfcec0e). --- Cargo.lock | 211 ++++++++++---------- Cargo.toml | 76 +++---- apps/vectorcraft-web/Cargo.toml | 2 +- crates/ui-egui/src/panels/swatches.rs | 4 + crates/ui-egui/src/panels/swatches/dnd.rs | 10 + crates/ui-egui/src/panels/swatches/tests.rs | 33 +++ xtask/src/pdf_deps.rs | 2 +- 7 files changed, 191 insertions(+), 147 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cb674e4ae..2a52380c8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -626,12 +626,6 @@ dependencies = [ "cpufeatures 0.3.1", ] -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - [[package]] name = "block-buffer" version = "0.10.4" @@ -725,6 +719,17 @@ dependencies = [ "brotli-decompressor 5.0.3", ] +[[package]] +name = "brotli" +version = "9.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13" +dependencies = [ + "alloc-no-stdlib 3.0.0", + "alloc-stdlib 0.3.0", + "brotli-decompressor 6.3.2", +] + [[package]] name = "brotli-decompressor" version = "5.0.3" @@ -1184,19 +1189,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-graphics2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b65858d95344d2711161cd92196732f67d6c5fea238cf12f994584828731a5c" -dependencies = [ - "bitflags 2.13.2", - "block", - "cfg-if", - "core-foundation 0.10.1", - "libc", -] - [[package]] name = "core_detect" version = "1.0.0" @@ -1239,7 +1231,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-automation", "craft-behavior", @@ -1280,7 +1272,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "crc32fast", "flate2", @@ -1291,18 +1283,19 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "block2 0.6.2", "objc2 0.6.5", "objc2-app-kit 0.3.2", + "objc2-core-graphics", "objc2-foundation 0.3.2", ] [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "rustix 1.1.6", ] @@ -1310,7 +1303,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1335,7 +1328,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1353,7 +1346,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-docpath", @@ -1371,7 +1364,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "crc32fast", "flate2", @@ -1380,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "egui", ] @@ -1388,7 +1381,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "md-5", "rayon", @@ -1397,12 +1390,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-cms", @@ -1422,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-control-protocol", "craft-platform", @@ -1433,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1443,7 +1436,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "rayon", ] @@ -1451,7 +1444,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1477,7 +1470,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "blake3", "craft-ecproj-format", @@ -1493,7 +1486,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "serde", ] @@ -1501,7 +1494,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1520,7 +1513,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-codepage", "encoding_rs", @@ -1532,7 +1525,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "serde", "serde_json", @@ -1542,12 +1535,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1562,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1581,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1590,7 +1583,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "cap-primitives", "craft-atomic", @@ -1613,12 +1606,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "gif", ] @@ -1626,7 +1619,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "flate2", ] @@ -1634,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1647,8 +1640,10 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ + "brotli 9.1.3", + "brotli-decompressor 6.3.2", "chrono", "fixed_decimal", "icu_calendar", @@ -1675,7 +1670,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-dds", "craft-jpeg", @@ -1702,7 +1697,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1720,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "thiserror 2.0.21", ] @@ -1728,7 +1723,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1739,7 +1734,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-host", "craft-i18n", @@ -1754,7 +1749,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-i18n", @@ -1768,7 +1763,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-host", @@ -1786,7 +1781,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1798,7 +1793,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "encoding_rs", "image", @@ -1809,7 +1804,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "chrono", "craft-codepage", @@ -1819,7 +1814,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-keymap", @@ -1835,7 +1830,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "flate2", "serde", @@ -1846,7 +1841,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1858,12 +1853,12 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "async-channel", "async-io", "async-process", - "core-graphics2", + "craft-appkit", "craft-atomic", "craft-docpath", "craft-host", @@ -1873,6 +1868,8 @@ dependencies = [ "js-sys", "log", "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", "rfd", "serde", "serde_json", @@ -1889,7 +1886,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1898,7 +1895,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-host", @@ -1922,7 +1919,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1933,7 +1930,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-eps", "flate2", @@ -1947,7 +1944,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "encoding_rs", "flate2", @@ -1958,7 +1955,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "dispatch2", "egui", @@ -1971,7 +1968,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1990,7 +1987,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-atomic", "craft-host", @@ -2007,7 +2004,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "fax", "hayro-ccitt", @@ -2018,7 +2015,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2039,7 +2036,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-keymap", @@ -2051,7 +2048,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2076,7 +2073,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2091,7 +2088,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-atomic", "craft-behavior", @@ -2106,7 +2103,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "serde", "thiserror 2.0.21", @@ -2116,7 +2113,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "serde", "thiserror 2.0.21", @@ -2125,7 +2122,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-keymap", @@ -2140,12 +2137,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2159,7 +2156,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-i18n", @@ -2175,7 +2172,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "accesskit", "craft-behavior", @@ -2213,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2224,7 +2221,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-host", @@ -2242,7 +2239,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-host", @@ -2263,7 +2260,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-host", @@ -2284,7 +2281,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-behavior", "craft-host", @@ -2303,7 +2300,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "base64 0.22.1", "chrono", @@ -2335,7 +2332,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "flate2", "serde", @@ -2346,7 +2343,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2356,7 +2353,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "js-sys", "serde_json", @@ -2367,7 +2364,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "winsafe", ] @@ -2375,7 +2372,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "craft-appkit", "craft-atomic", @@ -2407,7 +2404,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3762,16 +3759,16 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ - "brotli", + "brotli 8.0.4", "hayro-postscript", ] [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3789,7 +3786,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3807,12 +3804,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "flate2", "hayro-ccitt", @@ -4795,7 +4792,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "base64 0.22.1", "bumpalo", @@ -4952,7 +4949,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735" +source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" dependencies = [ "arrayvec", "kurbo 0.13.1", @@ -10067,7 +10064,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" version = "0.30.13" -source = "git+https://github.com/storytold/winit.git?rev=a517b3846ee8457d84ee4975110bfda6797c44dc#a517b3846ee8457d84ee4975110bfda6797c44dc" +source = "git+https://github.com/storytold/winit.git?rev=0dfcec0eb62fda5904137a63a6dd0c3d83295f45#0dfcec0eb62fda5904137a63a6dd0c3d83295f45" dependencies = [ "ahash", "android-activity", diff --git a/Cargo.toml b/Cargo.toml index 7ad3e4cfeb..0c7e739fb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,49 +10,49 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # 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 = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # 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 = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # 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 = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -192,13 +192,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } 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" } @@ -210,4 +210,4 @@ egui_glow = { git = "https://github.com/storytold/egui.git", rev = "14c39fed1817 egui_extras = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" } egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" } eframe = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" } -winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } +winit = { git = "https://github.com/storytold/winit.git", rev = "0dfcec0eb62fda5904137a63a6dd0c3d83295f45" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index ce4d1d3d44..0e50690b98 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 = "186a229c8da8db5916f8a863dfd894f1879af735", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/crates/ui-egui/src/panels/swatches.rs b/crates/ui-egui/src/panels/swatches.rs index 515456cad8..ca2b52c605 100644 --- a/crates/ui-egui/src/panels/swatches.rs +++ b/crates/ui-egui/src/panels/swatches.rs @@ -421,6 +421,9 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui) { let lit: Vec = highlighted(&st.doc, &base).into_iter().map(str::to_string).collect(); let doc = Arc::clone(&st.doc); let start = dnd::DragStart::of(st); + // The row menu, the drop rules and the drag payload read the document, its reverts and the drag start alone, so + // the browser's rows replay while this version holds. + let host = start.version(st.revision); let document = st.uid; let reverts = st.reverts; let foot = Footer::of(app, &model, held); @@ -448,6 +451,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut Ui) { .row_items(|key| row_items(shown_app, key)) .takes_drop::(DropPlace::Between, |drag, _| dnd::accepts(drag, document, reverts)) .takes_drop::(DropPlace::Onto, |drag, _| dnd::accepts(drag, document, reverts)) + .host_version(host) .select(SelectMode::Multi) .search(search) .reveal(focus.clone().map(SwatchKey::Swatch)) diff --git a/crates/ui-egui/src/panels/swatches/dnd.rs b/crates/ui-egui/src/panels/swatches/dnd.rs index df967e9700..4b68266bf1 100644 --- a/crates/ui-egui/src/panels/swatches/dnd.rs +++ b/crates/ui-egui/src/panels/swatches/dnd.rs @@ -1,3 +1,4 @@ +use std::hash::{DefaultHasher, Hash, Hasher}; use std::sync::{Arc, Weak}; use super::{Document, Paint, PanelDrag, REGISTRATION, Swatch, Value, VectorcraftApp, json, name_of, swatch_params}; @@ -126,6 +127,15 @@ impl DragStart { DragStart { uid: st.uid, reverts: st.reverts, doc: Arc::clone(&st.doc), steps: steps(st), back } } + /// A version of this start in the document's `revision` ([`DocState::revision`]): it changes with + /// the document, its count of File › Revert and its newest undo and redo steps, which are what the + /// panel's row menu, drop rules and drag payload read. + pub(super) fn version(&self, revision: u64) -> u64 { + let mut h = DefaultHasher::new(); + (self.uid, self.reverts, revision, self.steps).hash(&mut h); + h.finish() + } + /// Rows `names` as this document holds them. fn rows(&self, names: &[String]) -> HeldRows { let rows: Vec<_> = names.iter().map(|n| (n.clone(), HeldRow::of(&self.doc, n))).collect(); diff --git a/crates/ui-egui/src/panels/swatches/tests.rs b/crates/ui-egui/src/panels/swatches/tests.rs index f20c725ac0..df72fa25e1 100644 --- a/crates/ui-egui/src/panels/swatches/tests.rs +++ b/crates/ui-egui/src/panels/swatches/tests.rs @@ -1623,3 +1623,36 @@ fn the_swatch_libraries_menu_fits_its_rows_like_a_library_panels_menu() { let panel_menu = panel.rect_role("Swatch Libraries Menu", Role::MENU); assert_eq!(footer_menu.width(), panel_menu.width(), "footer menu {footer_menu:?}, library panel menu {panel_menu:?}"); } + +/// Frames that change nothing replay the swatch rows instead of running them again; deleting a swatch and undoing it +/// each run them, the rows show the change, and the frames after replay them again. +#[test] +fn idle_frames_replay_the_swatch_rows() { + use crate::tests::panel_harness::Panel; + use craft::ui::testing::{MemoRun, last_frame_memo_runs}; + let runs = |panel: &Panel| { + last_frame_memo_runs(panel.ctx()).iter().filter(|(name, _, run)| name.contains("ListProps") && *run == MemoRun::Ran).count() + }; + let idle = |panel: &mut Panel, after: &str| { + panel.frame(); + panel.frame(); + for _ in 0..5 { + panel.frame(); + assert_eq!(runs(panel), 0, "an idle frame {after} replays the swatch rows"); + } + }; + let red = "Red, #ed1c24"; + let mut panel = Panel::new(app(), show); + idle(&mut panel, "of a new document"); + assert!(panel.shows(red), "the rows show Red"); + panel.app().run("swatch.delete", json!({"names": ["Red"]})).unwrap(); + panel.frame(); + assert!(runs(&panel) > 0, "deleting a swatch runs the rows"); + assert!(!panel.shows(red), "and they no longer show it"); + idle(&mut panel, "after a delete"); + panel.app().run("edit.undo", json!({})).unwrap(); + panel.frame(); + assert!(runs(&panel) > 0, "an undo runs the rows"); + assert!(panel.shows(red), "and they show the swatch again"); + idle(&mut panel, "after an undo"); +} diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index f4f02f8627..4d937f436f 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 = "186a229c8da8db5916f8a863dfd894f1879af735"; +const REV: &str = "891f4060c4aefe2679a65afc9e76bb5ce345de31"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 2be42e79864534c8ac43d52e1adaee13f5b17c17 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 19:52:59 -0800 Subject: [PATCH 12/15] Shape Builder: saved Artwork from earlier versions switches to Color Swatches once Leaving the Shape Builder saved every one of its options, so preferences from earlier versions hold pickColorFrom "artwork" whether or not it was picked, and kept the old default after Color Swatches became the default. The preferences now carry toolSettingsVersion, written as 1 once a tool setting is stored. Applying preferences without it changes a saved Shape Builder pickColorFrom "artwork" to "swatches" and writes the version, so Artwork picked after that is kept at the next launch. A saved "swatches" and preferences without a saved pickColorFrom are unchanged. Docs: docs/mcp.md and the tool options params text. --- crates/engine/src/cmd/prefscmds.rs | 2 + crates/engine/src/prefs.rs | 36 ++++++++++++++++ crates/engine/src/tests/toolsettings.rs | 55 ++++++++++++++++++------- crates/engine/src/tooling.rs | 1 + crates/mcp/src/ui_catalog.rs | 2 +- crates/tools/src/builder.rs | 3 +- crates/ui-egui/src/menus/ui_commands.rs | 2 +- docs/mcp.md | 3 +- 8 files changed, 86 insertions(+), 18 deletions(-) diff --git a/crates/engine/src/cmd/prefscmds.rs b/crates/engine/src/cmd/prefscmds.rs index 27d38e158f..8420e67d30 100644 --- a/crates/engine/src/cmd/prefscmds.rs +++ b/crates/engine/src/cmd/prefscmds.rs @@ -725,6 +725,8 @@ impl Session { for e in self.prefs.keep_folders(&mut p) { log::warn!("{e}"); } + // Tool settings saved by an earlier version are updated once. + p.migrate_tool_settings(); // Saved gradient presets get names no built-in preset or other saved one has. for (old, new) in super::gradpresets::rename_clashing_presets(&mut p.gradient_presets) { log::warn!("saved gradient preset {old} is listed as {new}: another preset has its name"); diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs index 1a7b78a91b..3c2f3e3299 100644 --- a/crates/engine/src/prefs.rs +++ b/crates/engine/src/prefs.rs @@ -438,6 +438,12 @@ pub struct Prefs { /// resetting the preferences keeps them; `tool.setOption` edits them. #[serde(skip_serializing_if = "std::collections::BTreeMap::is_empty")] pub tool_settings: std::collections::BTreeMap>, + /// The version of [`Self::tool_settings`]: [`TOOL_SETTINGS_VERSION`] once this version stores + /// or updates a tool setting, 0 while none is stored and in preferences saved without one. + /// [`Prefs::migrate_tool_settings`] updates older tool settings once. Not a Preferences dialog + /// field: resetting the preferences keeps it. + #[serde(default, skip_serializing_if = "is_zero")] + pub tool_settings_version: u32, /// View → Perspective Grid presets: the user's (the built-in ones aren't stored). A local /// library, not a Preferences dialog field: resetting the preferences keeps it; /// `perspective.presets.*` edit it. @@ -464,7 +470,36 @@ pub const KEY_HOLD_DELAY: f64 = 0.35; /// The range of the Hold Shortcut Delay, in seconds. pub const KEY_HOLD_DELAY_RANGE: (f64, f64) = (0.2, 1.0); +/// The version of the tool settings these preferences write ([`Prefs::tool_settings_version`]). +/// Version 1 makes Color Swatches the Shape Builder's Pick Color From. +pub const TOOL_SETTINGS_VERSION: u32 = 1; + +fn is_zero(v: &u32) -> bool { + *v == 0 +} + impl Prefs { + /// Update tool settings saved by an earlier version to [`TOOL_SETTINGS_VERSION`], once. Before + /// version 1, leaving the Shape Builder saved its `pickColorFrom` whether or not it was + /// changed, so a saved `artwork` becomes `swatches`. Without tool settings, nothing changes; a + /// version newer than this one is kept. + pub fn migrate_tool_settings(&mut self) { + if self.tool_settings_version < 1 + && let Some(saved) = self.tool_settings.get_mut("shapeBuilder") + && saved.get("pickColorFrom").and_then(Value::as_str) == Some("artwork") + { + saved.insert("pickColorFrom".into(), Value::from("swatches")); + } + self.mark_tool_settings_current(); + } + + /// Record that [`Self::tool_settings`], when any is stored, is in this version's form. + pub(crate) fn mark_tool_settings_current(&mut self) { + if !self.tool_settings.is_empty() { + self.tool_settings_version = self.tool_settings_version.max(TOOL_SETTINGS_VERSION); + } + } + /// The `document.open` / place params `p` with `embeddedFonts: false` added when Preferences /// › File Handling › Use fonts embedded in imported PDFs is off and `p` gives no choice of its own. pub fn with_pdf_font_choice(&self, p: &serde_json::Value) -> serde_json::Value { @@ -672,6 +707,7 @@ impl Default for Prefs { use_registration_point_for_symbol: false, show_on_shape_creation: false, tool_settings: Default::default(), + tool_settings_version: 0, perspective_presets: vec![], blend_options: None, perspective_widget: Default::default(), diff --git a/crates/engine/src/tests/toolsettings.rs b/crates/engine/src/tests/toolsettings.rs index 76fda42a5b..db1fc01a30 100644 --- a/crates/engine/src/tests/toolsettings.rs +++ b/crates/engine/src/tests/toolsettings.rs @@ -700,26 +700,53 @@ fn a_parametric_shape_kind_and_its_values_set_together() { } /// The Shape Builder picks colors from the color swatches by default: a fresh session, and saved -/// preferences that hold other Shape Builder options but no `pickColorFrom`, give `swatches`. A -/// saved `artwork` (or `swatches`) is kept. +/// preferences that hold other Shape Builder options but no `pickColorFrom`, give `swatches`. +/// Preferences saved without `toolSettingsVersion` read a saved `artwork` as `swatches` once and +/// are then written with the version, so a later `artwork` is kept. A saved `swatches` is kept. #[test] -fn shape_builder_pick_color_from_defaults_to_swatches_and_keeps_a_saved_choice() { +fn shape_builder_pick_color_from_defaults_to_swatches_and_migrates_a_saved_artwork_once() { let mut s = session(); select(&mut s, "shapeBuilder"); assert_eq!(s.tool_options()["pickColorFrom"], json!("swatches"), "a fresh session"); - for (saved, want) in [ - (json!({"highlightFill": false}), "swatches"), - (json!({"pickColorFrom": "artwork"}), "artwork"), - (json!({"pickColorFrom": "swatches"}), "swatches"), - ] { - let mut prefs = s.prefs.clone(); - prefs.tool_settings.insert("shapeBuilder".into(), saved.as_object().unwrap().clone()); - let saved_text = serde_json::to_string(&prefs).unwrap(); + select(&mut s, "selection"); + assert_eq!(s.prefs.to_json()["toolSettingsVersion"], json!(1), "stored settings are written with the version"); + let load = |version: Option, saved: &Value| { + let mut prefs = Prefs::default().to_json(); + prefs["toolSettings"] = json!({ "shapeBuilder": saved }); + let fields = prefs.as_object_mut().unwrap(); + match version { + Some(v) => fields.insert("toolSettingsVersion".into(), json!(v)), + None => fields.remove("toolSettingsVersion"), + }; let mut next = session(); - next.apply_prefs(serde_json::from_str(&saved_text).unwrap()); + next.apply_prefs(serde_json::from_str(&prefs.to_string()).unwrap()); + next + }; + for (version, saved, want) in [ + (None, json!({"highlightFill": false}), "swatches"), + (None, json!({"pickColorFrom": "artwork"}), "swatches"), + (None, json!({"pickColorFrom": "swatches"}), "swatches"), + (Some(1), json!({"pickColorFrom": "artwork"}), "artwork"), + (Some(1), json!({"pickColorFrom": "swatches"}), "swatches"), + (Some(1), json!({"highlightFill": false}), "swatches"), + ] { + let mut next = load(version, &saved); + assert_eq!(next.prefs.tool_settings_version, 1, "the version is written: {version:?} {saved}"); select(&mut next, "shapeBuilder"); - assert_eq!(next.tool_options()["pickColorFrom"], json!(want), "saved {saved}"); + assert_eq!(next.tool_options()["pickColorFrom"], json!(want), "saved {version:?} {saved}"); select(&mut next, "selection"); - assert_eq!(next.prefs.tool_settings["shapeBuilder"]["pickColorFrom"], json!(want), "stored again: {saved}"); + assert_eq!(next.prefs.tool_settings["shapeBuilder"]["pickColorFrom"], json!(want), "stored again: {version:?} {saved}"); + } + // Artwork picked after the update, or in a session that started without saved settings, is + // kept at the next launch. + for mut next in [load(None, &json!({"pickColorFrom": "artwork"})), session()] { + select(&mut next, "shapeBuilder"); + next.set_tool_option("pickColorFrom", &json!("artwork")); + select(&mut next, "selection"); + let saved_text = serde_json::to_string(&next.prefs).unwrap(); + let mut later = session(); + later.apply_prefs(serde_json::from_str(&saved_text).unwrap()); + select(&mut later, "shapeBuilder"); + assert_eq!(later.tool_options()["pickColorFrom"], json!("artwork"), "picked after the update: {saved_text}"); } } diff --git a/crates/engine/src/tooling.rs b/crates/engine/src/tooling.rs index 422caab5ec..94f72f6441 100644 --- a/crates/engine/src/tooling.rs +++ b/crates/engine/src/tooling.rs @@ -581,6 +581,7 @@ impl Session { } } } + prefs.mark_tool_settings_current(); } /// Keep the active tool's persistent options for the next time it, or a tool sharing them, is diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index b6f0866d96..e933df1e5f 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -1192,7 +1192,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (swatches; a saved artwork is kept), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (swatches; a saved artwork is kept, except that preferences saved by an earlier version read it as swatches once), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/crates/tools/src/builder.rs b/crates/tools/src/builder.rs index 42886ec013..7451fd0226 100644 --- a/crates/tools/src/builder.rs +++ b/crates/tools/src/builder.rs @@ -70,7 +70,8 @@ pub struct ShapeBuilderOptions { /// fills the new shape with the current fill, and the Left and Right arrow keys step the current /// fill through the document's color swatches. With Artwork, the shape takes the look of the /// object where the drag starts, else of the one where it ends, else of the front-most selected - /// object. A saved `pickColorFrom` is kept; preferences without one take Color Swatches. + /// object. A saved `pickColorFrom` is kept, except that preferences saved by an earlier version + /// read a saved Artwork as Color Swatches once; preferences without one take Color Swatches. pub swatches: bool, /// Cursor Swatch Preview (`cursorSwatchPreview`, off): with Color Swatches, the current fill /// and the swatches before and after it show as chips above the pointer while no drag is on. diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index e76772d154..a4620e2a5b 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -1193,7 +1193,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (swatches; a saved artwork is kept), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview; with flares selected, the fields show the first one's settings, `flares` lists them and OK runs shape.editFlare with the settings changed instead, leaving the tool's options), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), circle → Circle Tool Options (dialog `circleOptions`, fields center, radii, diameter (all on), color (red|blue|magenta|green|black|gray; blue), standardAnchors (on) and dragThird (on); OK runs tool.setOption {tool: \"circle\", values}), curvatureCircle → Curvature Circle Tool Options (dialog `curvatureCircleOptions`, fields snapTolerance (screen points, 1–40; 5), snapWithoutGuides, annotateRadius, standardAnchors and constantRadius (all on); OK runs tool.setOption {tool: \"curvatureCircle\", values}), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront, filledLines and lineWidth held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool (the tool whose options show; the Tool row changes it), diameter (pt), intensity and density (1–10), usePressure, method: userDefined|average|random (not used by the Sprayer and the Shifter), showBrush, sprayScrunch, spraySize, spraySpin, sprayScreen, sprayStain and sprayStyle: average|userDefined (the Symbol Sprayer's), proportional and affectsDensity (the Symbol Sizer's), shared by the eight tools; OK runs tool.setOption {tool, values}, after symbol.setDensity from the density the dialog opened with to the new one when symbol sets are selected and it changed), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (swatches; a saved artwork is kept, except that preferences saved by an earlier version read it as swatches once), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/docs/mcp.md b/docs/mcp.md index 5ec8ceafd4..d2c7096762 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -15729,7 +15729,8 @@ as an unfilled path does), `pickColorFrom` (`swatches`, the default: a merged sh the Left and Right arrow keys without Shift, Alt or Cmd/Ctrl step the current fill through the document's color swatches; `artwork`: a merged shape takes the appearance, opacity and blending mode of the front-most selected object under the drag's first point, else of the one under its last point, else of the front-most selected object; a -`pickColorFrom` saved with the preferences is kept, and preferences saved without one take `swatches`), `cursorSwatchPreview` (off; with `swatches`, chips above the +`pickColorFrom` saved with the preferences is kept, except that preferences saved by an earlier version, without +`toolSettingsVersion`, read a saved `artwork` as `swatches` once; preferences saved without one take `swatches`), `cursorSwatchPreview` (off; with `swatches`, chips above the pointer show the current fill and the swatches before and after it), `selection` (`freeform`, the default, or `straightLine`: a drag touches what the line from its first point to the pointer crosses), `highlightFill` (on by default; when it is off, merge mode shades no regions), `gapDetection` (off) with `gapLength` (pt, 0 to 72; 3), `clickStrokeSplitsPath` (In Merge Mode, From 932d579a02a751d2ab35a7023ce85e31d7627d09 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 20:08:36 -0800 Subject: [PATCH 13/15] Swatches: rustfmt the idle replay test --- crates/ui-egui/src/panels/swatches/tests.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/panels/swatches/tests.rs b/crates/ui-egui/src/panels/swatches/tests.rs index df72fa25e1..7e17c305a5 100644 --- a/crates/ui-egui/src/panels/swatches/tests.rs +++ b/crates/ui-egui/src/panels/swatches/tests.rs @@ -1630,9 +1630,8 @@ fn the_swatch_libraries_menu_fits_its_rows_like_a_library_panels_menu() { fn idle_frames_replay_the_swatch_rows() { use crate::tests::panel_harness::Panel; use craft::ui::testing::{MemoRun, last_frame_memo_runs}; - let runs = |panel: &Panel| { - last_frame_memo_runs(panel.ctx()).iter().filter(|(name, _, run)| name.contains("ListProps") && *run == MemoRun::Ran).count() - }; + let runs = + |panel: &Panel| last_frame_memo_runs(panel.ctx()).iter().filter(|(name, _, run)| name.contains("ListProps") && *run == MemoRun::Ran).count(); let idle = |panel: &mut Panel, after: &str| { panel.frame(); panel.frame(); From 72825d55a6f5cc1a962d469b1ea1b1793fb7524e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 20:10:22 -0800 Subject: [PATCH 14/15] Dependencies: craft-libs pin to 6a4729d5, current main --- Cargo.lock | 172 ++++++++++++++++---------------- Cargo.toml | 76 +++++++------- apps/vectorcraft-web/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 2 +- 4 files changed, 126 insertions(+), 126 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 318a40b796..02efc93f98 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=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" 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=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" 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=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" 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=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" 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=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1328,7 +1328,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1346,7 +1346,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-docpath", @@ -1364,7 +1364,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "crc32fast", "flate2", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "egui", ] @@ -1381,7 +1381,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "md-5", "rayon", @@ -1390,12 +1390,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-cms", @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-control-protocol", "craft-platform", @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1436,7 +1436,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "rayon", ] @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "blake3", "craft-ecproj-format", @@ -1486,7 +1486,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "serde", ] @@ -1494,7 +1494,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1513,7 +1513,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-codepage", "encoding_rs", @@ -1525,7 +1525,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "serde", "serde_json", @@ -1535,12 +1535,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1583,7 +1583,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "cap-primitives", "craft-atomic", @@ -1606,12 +1606,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "gif", ] @@ -1619,7 +1619,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "flate2", ] @@ -1627,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1640,7 +1640,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1670,7 +1670,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-dds", "craft-jpeg", @@ -1697,7 +1697,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "thiserror 2.0.21", ] @@ -1723,7 +1723,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1734,7 +1734,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-host", "craft-i18n", @@ -1749,7 +1749,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-i18n", @@ -1763,7 +1763,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-host", @@ -1781,7 +1781,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1793,7 +1793,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "encoding_rs", "image", @@ -1804,7 +1804,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "chrono", "craft-codepage", @@ -1814,7 +1814,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "uds_windows", "winsafe", @@ -1823,7 +1823,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-keymap", @@ -1839,7 +1839,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "flate2", "serde", @@ -1850,7 +1850,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1862,7 +1862,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "async-channel", "async-io", @@ -1895,7 +1895,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1904,7 +1904,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-host", @@ -1928,7 +1928,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1939,7 +1939,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-eps", "flate2", @@ -1953,7 +1953,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "encoding_rs", "flate2", @@ -1964,7 +1964,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "dispatch2", "egui", @@ -1977,7 +1977,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1996,7 +1996,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-atomic", "craft-host", @@ -2013,7 +2013,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "fax", "hayro-ccitt", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2045,7 +2045,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-keymap", @@ -2057,7 +2057,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2082,7 +2082,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2097,7 +2097,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-atomic", "craft-behavior", @@ -2112,7 +2112,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "serde", "thiserror 2.0.21", @@ -2122,7 +2122,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "serde", "thiserror 2.0.21", @@ -2131,7 +2131,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-keymap", @@ -2146,12 +2146,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2165,7 +2165,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-i18n", @@ -2181,7 +2181,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "accesskit", "craft-behavior", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2230,7 +2230,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-host", @@ -2248,7 +2248,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-host", @@ -2269,7 +2269,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-host", @@ -2290,7 +2290,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-behavior", "craft-host", @@ -2309,7 +2309,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "base64 0.22.1", "chrono", @@ -2341,7 +2341,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "flate2", "serde", @@ -2352,7 +2352,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2362,7 +2362,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "js-sys", "serde_json", @@ -2373,7 +2373,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "winsafe", ] @@ -2381,7 +2381,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "craft-appkit", "craft-atomic", @@ -2413,7 +2413,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3768,7 +3768,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3777,7 +3777,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3795,7 +3795,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3813,12 +3813,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "flate2", "hayro-ccitt", @@ -4801,7 +4801,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "base64 0.22.1", "bumpalo", @@ -4958,7 +4958,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=891f4060c4aefe2679a65afc9e76bb5ce345de31#891f4060c4aefe2679a65afc9e76bb5ce345de31" +source = "git+https://github.com/storytold/craft-libs?rev=6a4729d5afaea4470bdfe2e8e4f3474d768d7059#6a4729d5afaea4470bdfe2e8e4f3474d768d7059" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index dc46672d51..f7fc21065d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,51 +10,51 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # 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 = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # 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 = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # 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 = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -194,13 +194,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "891f4060c4aefe2679a65afc9e76bb5ce345de31" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059" } 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/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 0e50690b98..cb731d92aa 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 = "891f4060c4aefe2679a65afc9e76bb5ce345de31", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059", 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 4d937f436f..43f0122072 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 = "891f4060c4aefe2679a65afc9e76bb5ce345de31"; +const REV: &str = "6a4729d5afaea4470bdfe2e8e4f3474d768d7059"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 04ced9bee734f216ee55ac13316932b5e501184c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 03:33:26 -0800 Subject: [PATCH 15/15] Performance: the check of a moved selection reads the objects at their places After a move, the check that a view can move the selection's marks instead of building them again looked each moved object up by id three times: the object, its parent's id and the parent. With 10,000 objects selected that was 30,000 lookups after the edit. The check now keeps each object's place from the transform and reads the object and its parent there, so the move looks each object up once, as before. --- crates/engine/src/cmd/object/transform.rs | 26 ++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/crates/engine/src/cmd/object/transform.rs b/crates/engine/src/cmd/object/transform.rs index c3ce0107f0..4212588f1b 100644 --- a/crates/engine/src/cmd/object/transform.rs +++ b/crates/engine/src/cmd/object/transform.rs @@ -200,7 +200,7 @@ fn apply_transform_moving_guides( // A move of whole objects, not of copies (which `reindex` covers): the document before it, // and the moved objects as the transform left them, for [`moved_by`] to check after the edit. let from = (objects && !areas && !reindex && c[..4] == [1.0, 0.0, 0.0, 1.0]).then(|| s.doc().map(|st| st.doc.clone())).transpose()?; - let mut held: Vec<(NodeId, Arc)> = vec![]; + let mut held: Vec<(Vec, Arc)> = vec![]; let targets = s.edit(label, |d, sel| { let mut targets = match &kept { // The document becomes the snapshot with the kept copies, untransformed, and the @@ -240,7 +240,7 @@ fn apply_transform_moving_guides( } // Holding them makes any later change to them copy them first, which `moved_by` sees. if from.is_some() { - held = targets.iter().filter_map(|id| Some((*id, node_arc(d, paths.get(id)?)?))).collect(); + held = targets.iter().filter_map(|id| paths.get(id)).filter_map(|p| Some((p.clone(), node_arc(d, p)?))).collect(); } if objects { // The transforms above leave every object at its place, so `paths` still holds them. @@ -294,20 +294,22 @@ fn node_arc(d: &Document, path: &[usize]) -> Option> { } /// The [`crate::Moved`] of a move by `by` that took `from` to the document of `st`, given the moved -/// objects as the transform left them (`held`). `None` unless every moved object is still that -/// node, none is a member of a blend (whose spine follows its members), and every object the -/// selection shows, the key object and the key anchor's object included, is a moved object or -/// inside one. A pass after the transform that changes a moved object, such as the one that snaps -/// moved pixel-aligned objects to the pixel grid again ([`super::pixelgrid::refresh`]), copies it -/// first, so it is no longer that node. -fn moved_by(from: &Arc, st: &crate::DocState, held: &[(NodeId, Arc)], by: Vec2) -> Option { +/// objects as the transform left them (`held`, each with its index path). `None` unless every moved +/// object is still that node at its path, none is a member of a blend (whose spine follows its +/// members), and every object the selection shows, the key object and the key anchor's object +/// included, is a moved object or inside one. A pass after the transform that changes a moved +/// object, such as the one that snaps moved pixel-aligned objects to the pixel grid again +/// ([`super::pixelgrid::refresh`]), copies it first, so it is no longer that node. The checks read +/// the nodes at their paths and look nothing up by id. +fn moved_by(from: &Arc, st: &crate::DocState, held: &[(Vec, Arc)], by: Vec2) -> Option { let d = &st.doc; - let unchanged = |(id, n): &(NodeId, Arc)| d.node(*id).is_some_and(|now| std::ptr::eq(now, Arc::as_ptr(n))); + let unchanged = |(p, n): &(Vec, Arc)| d.node_at(p).is_some_and(|now| std::ptr::eq(now, Arc::as_ptr(n))); if held.is_empty() || !held.iter().all(unchanged) { return None; } - let in_blend = |id: NodeId| d.parent_of(id).and_then(|p| d.node(p)).is_some_and(|p| matches!(p.kind, NodeKind::Blend { .. })); - if held.iter().any(|(id, _)| in_blend(*id)) { + // The node at each path is the moved object, so its parent is the node one level up. + let in_blend = |p: &[usize]| p.split_last().and_then(|(_, up)| d.node_at(up)).is_some_and(|parent| matches!(parent.kind, NodeKind::Blend { .. })); + if held.iter().any(|(p, _)| in_blend(p)) { return None; } let mut moved = std::collections::HashSet::new();