Commit Graph
8158 Commits
Author SHA1 Message Date
.CooCoo ff60b8078d Merge pull request #10132 from dotCooCoo/fix/speed-object-move-large-doc
Performance: an edit skips unchanged objects without reading them
2026-11-29 18:21:16 -08:00
.CooCoo 8fe7aff22e Merge pull request #10120 from dotCooCoo/fix/missing-fonts-check-once
Missing Fonts: the frame after an open lists a document's missing fonts once
2026-11-29 18:20:43 -08:00
dotCooCoo d82a022446 Merge main into feat/match-objects-to-key 2026-11-29 15:41:29 -08:00
dotCooCoo 2960e55b6c Match Objects: a stacking match keeps clipping paths and settles Intertwine groups
Merging main made DIALOGS one entry short: Offset Objects and Match Objects
both joined it, so vectorcraft-ui-egui did not compile. The table now
declares seven entries.

A stacking match moved a clipping path out of its clip position and could
move a member out of an Intertwine group with its old overlap tiers. It now
refuses to move a clipping path, refuses a destination that would nest
Intertwine art, and clears the tiers of members that leave their group.

A stacking or rotate-only match no longer needs bounds on the source. A
size match measures each target after it is sized and turned, in its final
frame, and is refused when a target can't take the requested size, instead
of reporting success with the size unchanged. A target with no bounds that
needs to turn is refused.
2026-11-29 15:40:43 -08:00
dotCooCoo f11aac5aaa Merge main into feat/match-objects-to-key 2026-11-29 15:00:53 -08:00
dotCooCoo 97566860ec Merge main into feat/match-objects-to-key
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd/plugin_call/reviewed.rs
#	crates/ui-egui/src/addons/arrange.rs
#	docs/mcp.md
2026-11-29 13:57:34 -08:00
dotCooCoo 42bd1ffdfc Merge main into fix/speed-object-move-large-doc 2026-11-29 13:03:13 -08:00
dotCooCoo aaa54f1307 Performance: an edit skips unchanged objects without reading them
After every edit, the pixel grid, color mask, Objects on Path, Shaper and
symbol instance passes, and the inline graphics refresh, pair each object
with its counterpart from before the edit. Each pass read both objects to
compare their ids before it found that they were the same node, so moving
one object in a layer of 20,000 objects read all of them in four passes.
The color mask pass is new since v0.24.1, and object.move became slower
than in that release.

The new vectorcraft_doc::changed_nodes does the pairing for all six. An
object that is the same node at the same position is skipped by a pointer
comparison; only changed and new objects are looked up by id.

object.move of one rectangle in a document of 20,000 objects, release
build, median CPU time of 2,000 moves: main 1.25 ms, this change 1.08 ms,
v0.24.1 1.06 ms. The passes' share of the move went from about 30% to 5%
in a profile.
2026-11-29 13:03:07 -08:00
dotCooCoo 340edf90b2 Merge main into fix/missing-fonts-check-once 2026-11-29 11:42:08 -08:00
dotCooCoo c7487a4657 Missing Fonts: the frame after an open lists a document's missing fonts once
The frame after a document opens checked whether its Missing Fonts dialog
waits by building the whole dialog (opening::may_switch), and the dialog
pump then built it again to open it. Each build walked the document's type
and resolved every font it names: 6.5 ms over the two calls at 20,000
objects.

The rows are now kept in CanvasCache::missing_fonts for the document's
content version and the font database's generation, the same key Type ›
Find Font's cache uses, and both calls read them. An edit or a font that
loads while the dialog waits makes the next call list the fonts again. The
Fonts folder next to the document is still looked up when the dialog opens.
Rows are dropped once their document no longer waits.

text.missingFonts's answer is unchanged; its rows and its folder are now
two engine functions, missing_font_rows and fonts_next_to_document.

Tests count the row lists (one for the check and the open together) and
check that a document edited while its dialog waits lists its new font.
2026-11-29 11:42:07 -08:00
dotCooCoo 7e5d8d368c Merge main into fix/global-edit-preview-cache 2026-11-29 11:36:55 -08:00
dotCooCoo 3617039ef5 Global Edit: the canvas shares the kept outlines instead of copying them each frame
With one object selected and the Selection tool active, or while Global
Edit is on, every frame copied each highlighted outline out of the kept
list and made one overlay per object, which the canvas flattened and
stroked again. With 10,000 matching objects that was most of a 27 ms
frame.

highlights and similar now return the kept outlines as a shared
Highlights, grouped by layer color with a revision that changes only when
the outlines are found again. The session sends one Overlay::Outlines per
color, and the canvas shows it as a SelectionOutline keyed by that
revision, so the lines are stroked again only when the outlines or the
view change.
2026-11-29 11:36:48 -08:00
.CooCoo 52de8120d3 Merge pull request #10105 from dotCooCoo/fix/script-dom-path-edits
Scripts: point removals keep the selection, new-art defaults and batching right
2026-11-29 10:58:53 -08:00
.CooCoo 8b96a72de4 Merge pull request #10104 from dotCooCoo/fix/script-name-setter-stale-first
Scripts: page-item setters report a stale item before a bad value
2026-11-29 10:51:52 -08:00
dotCooCoo 92a2056a8b Scripts: page-item setters report a stale item before a bad value
The name, note, hidden, locked, opacity, blendingMode, position, left,
top, width and height setters checked the assigned value before the
item, so a bad value on a removed item reported the value error instead
of "Stale page item". Each setter now looks up its item first.
2026-11-29 10:26:04 -08:00
dotCooCoo 87b5aef639 Scripts: point removals keep the selection, defaults and batching right
Follow-up to #9288.

- Removing the last anchor of a closed path with its closing segment
  selected also deselects the first anchor, the segment's other end.
- Removing a point puts back new art's paint, so a default stroke width
  a script set still applies to the next path it draws.
- A removal that leaves the direct selection as it was waits with the
  other point changes, unless every remaining anchor is now selected,
  the selection refers to points that are gone, or the path is in an
  Objects on Path group.
- Reading the points of a path first writes the waiting point changes
  of another path in the same Objects on Path group.
- Writing a path in an Objects on Path group checks the other tracked
  paths in the outermost such group, so their PathPoint handles go stale
  when the group moves them, even after an undo.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-29 10:24:53 -08:00
.CooCoo 283902214f Merge pull request #10075 from dotCooCoo/feat/offset-objects-row
Arrange Tools: Offset Objects chains the selection in a row or a column with a set gap
2026-11-29 10:23:17 -08:00
.CooCoo 8aa8120586 Merge pull request #9777 from ruchirguitar/feat/spell-check
Spell-check other languages from the Craft apps' Language packs
2026-11-29 10:23:00 -08:00
.CooCoo 9bbc3950e1 Merge pull request #10094 from dotCooCoo/ci/warnings-G1
Engine: end_folder no longer warns about unused s and turn on wasm32
2026-11-29 09:51:35 -08:00
dotCooCoo a5f877e0d1 Merge main into feat/match-objects-to-key 2026-11-29 09:39:05 -08:00
dotCooCoo 13f3227220 Match Objects: rotate says which way it turns; scaleStrokes is journaled
The gate's turn_direction test failed because the `rotate` param of
addon.arrange.match did not say which way it turns. Its description now
says each target turns clockwise or counter-clockwise to the source's
angle.

Match, Set Size of Each, Swap, Replace and Sort now record the resolved
`scaleStrokes` value in their journal entry, so a replay scales strokes
the same way after the preference changes.
2026-11-29 09:39:04 -08:00
ruchirguitar a4659724f6 Merge main into feat/spell-check
Cargo.toml: #10049 moved craft-libs to 186a229c; the font store crates this
branch adds move with it, so every craft-libs crate stays at one rev.
2026-11-29 22:41:45 +05:30
dotCooCoo 91e4c6fbce Engine: end_folder no longer warns about unused s and turn on wasm32
end_folder uses its Session and StoreTurn only in the native arm that
finishes loaded modules and saves the disabled list. The wasm32 build has
no such arm, so rustc reported both parameters as unused there. The
function now marks them used under cfg(target_arch = "wasm32"), as
install_folder above it already does.

cargo check -p vectorcraft-engine --target wasm32-unknown-unknown:
2 warnings in vectorcraft-engine before, 0 after. The manifest and patch
warnings it also prints are unchanged.
2026-11-29 09:10:51 -08:00
.CooCoo 619a6e5ed1 Merge pull request #10071 from dotCooCoo/fix/symbol-options-unchanged-undo
Symbols: Symbol Options and Replace Symbol that change nothing add no undo step
2026-11-29 09:10:19 -08:00
.CooCoo e21b9202e9 Merge pull request #10048 from dotCooCoo/fix/transparency-info-values
Transparency: transparency.info reports the selected symbol part that transparency.set edits
2026-11-29 09:07:52 -08:00
dotCooCoo 6ef6df3407 Scripts: round artboard rows as main's New Document test expects, and drop pathItems= from the host table
Cause of the CI failures on 212090fd7a:
- main's dialogs::new_document test a_presets_rows_reach_the_document_create_makes
  sets artboardLayout.rows to 3.6 and expects 4, but this branch refused a
  rows value that was not a whole number. rows now rounds like columns and is
  still refused outside 1 to 1000.
- script_host_vs_scriptcheck listed Document.prototype.pathItems=, the
  setter of main's placeholder. This branch makes pathItems a read-only
  collection, like pageItems, so the row goes.
2026-11-29 06:45:32 -08:00
dotCooCoo 7a71837dea Scripts: keep new-art defaults and direct selections through path edits
- PathPoint.remove() renumbers the direct-selected anchors and segments
  after the removed point, and drops the removed anchor and the selected
  segments it ended, through selection commands after the points are
  written. A removed anchor no longer stays selected, and the same index
  no longer selects a different point.
- pathItems.add() reads new art's paint after the target document is
  active, so a path added to a document in the back keeps the stroke
  that document's selection gives new art.
- Paths a script draws put new art's paint back afterwards, so a
  defaultStrokeWidth the script set applies to every path it draws, not
  only the first.
- appearance.setNewArt refuses a fill or stroke paint with a setting a
  paint does not take, such as opacity, instead of applying the rest.
2026-11-29 05:51:46 -08:00
dotCooCoo dd93247cbf Scripts: tests index page items topmost first and check the preset fallback
Cause of the script_dom and script_dom_paths failures: main's 9872e6b679
("page items report their own members, and lists start with the topmost
object") made pageItems, pathItems and the selection list art topmost first.
The branch's tests still indexed the objects bottom first, so pageItems[1]
and pathItems[0] named the other object. The tests now make the objects in
the order the lists read them, and index them topmost first.

The own-members test asked about rotate, which this branch makes available,
so it now asks about transform, which is not available yet.

The fallback test for addDocument relied on five 1,000,000 pt artboards not
fitting, but a new DocumentPreset puts them in one column. It now unsets the
layout so the built-in preset puts them in one row, and the test fails when
addDocument falls back to the saved preset of the same name.
2026-11-29 04:41:14 -08:00
dotCooCoo 2b61bdc752 Arrange Tools: Offset Objects chains the selection in a row or a column with a set gap
Object › Plug-ins › Arrange Tools › Offset Objects… (addon.arrange.offset)
puts the selected objects one after another in a row (left to right) or
a column (top to bottom), each a gap past the one before it; a negative
gap overlaps them. The order is the stacking order from the back or the
position (left or top edges), and Reverse Order runs it the other way.
The first object stays where it is, and the others move only along the
row or column, keeping their place across it. Objects are measured by
their visual bounds, a clipping group by its mask. One undo step, none
when nothing moves; bad params are refused.

The dialog has Direction, Gap, Order and Reverse Order with Preview.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md, ROADMAP.
2026-11-29 03:38:29 -08:00
dotCooCoo 4f2bb0d177 Arrange Tools: Match Objects gives the others the key object's size, angle and stacking place
Object › Plug-ins › Arrange Tools › Match Objects… (addon.arrange.match)
makes the other selected objects match one source object: the key
object, or the top or the bottom selected object. Each can take the
source's width (height in proportion), height (width in proportion) or
both, its bounding-box angle, and its stacking place directly above it
in its layer or group, about a reference point, as one undo step. No
step is recorded when nothing changes, and invalid params are refused.
The dialog previews on the canvas; OK stays off while nothing is chosen
or the source is a missing key object.

Docs: docs/mcp.md, docs/target-app-parity.md, docs/ui-parity.md, ROADMAP.
2026-11-29 03:38:13 -08:00
dotCooCoo 951e552a76 Symbols: Symbol Options and Replace Symbol that change nothing add no undo step
symbol.options recorded an undo step and moved the revision whenever any
option was passed, unless only alignToPixelGrid was given with the value
the symbol already had. A newName equal to the current name, or a
registration, export type, 9-slice, type or pixel grid value the symbol
already has, now leaves the document and its undo history as they are.

symbol.replace with the symbol the instances already show recorded an
undo step too. It now records one only when an instance changes.

Both run through colorcmds::edit_if_changed, as the Symbol Shifter and
the other symbolism tools do.
2026-11-29 02:43:57 -08:00
dotCooCoo 4b7ac69692 Scripts: fix path handles after main's revert count and review findings on path edits
PathItem handles carry the document's revert count, as page item
handles on main do, so path members find their path again.

setEntirePath and the path point setters throw a RangeError for a point
off the canvas. Opening a path whose closing segment is selected keeps
the edit. pathItems.add() leaves new art's paint as it was with New Art
Has Basic Appearance off. addDocument reports settings the built-in
preset refuses. appearance.setNewArt refuses a swatch that is not a
name. Writing one path's points looks only at that path afterwards.
2026-11-29 00:42:20 -08:00
dotCooCoo 0bd735f53d Merge main into feat/scripts-doc-defaults 2026-11-28 23:20:21 -08:00
dotCooCoo ff47fc8699 Transparency: transparency.info reports the selected symbol part that transparency.set edits
With an object of a dynamic symbol instance selected by Direct Selection,
transparency.set without ids changes that object's opacity and blend mode
for the instance, and the Transparency panel shows those values. The
transparency.info command still reported the instance's own opacity and
blend mode. Without ids or id it now returns the panel's values
(Session::transparency_info), so it reports the part's opacity and blend
mode with the instance's isolate and knockout. With ids or id it still
reports those objects.
2026-11-28 21:58:54 -08:00
.CooCoo 677414e15e Merge pull request #8131 from dotCooCoo/feat/color-wheel-copy-color-as
Part of #978: Copy Color As in the Color Wheel panel copies the color as hex, hex with alpha, CSS or CMYK values
2026-11-28 21:39:54 -08:00
dotCooCoo 288c14310d Merge main into feat/color-wheel-copy-color-as 2026-11-28 21:39:07 -08:00
.CooCoo 8ea80cb3bf Merge pull request #9093 from dotCooCoo/feat/hairline-slivers
Clean Up: remove hairline slivers thinner than a set width
2026-11-28 21:38:18 -08:00
.CooCoo 208185a7cf Merge pull request #10039 from dotCooCoo/fix/speed-i13930-global-edit-preview
Global Edit: the preview after an edit compares only the changed objects again
2026-11-28 21:38:02 -08:00
dotCooCoo cb75bb73fc Merge main into feat/scripts-app-undo-redo
# Conflicts:
#	crates/engine/src/cmd/scripts.rs
2026-11-28 20:45:40 -08:00
.CooCoo 2255484d45 Merge pull request #9132 from dotCooCoo/feat/js-es2015-modules
JavaScript: a .mjs script runs as an ECMAScript 2015 module
2026-11-28 20:44:58 -08:00
dotCooCoo cac93ca107 Merge main into feat/js-es2015-modules 2026-11-28 20:44:06 -08:00
.CooCoo eaad35e231 Merge pull request #9108 from dotCooCoo/feat/plugin-api-localized-labels
Plug-ins: names and labels show in the UI language from the manifest's translations
2026-11-28 20:41:55 -08:00
dotCooCoo 5a8f56dc4e Merge main into feat/hairline-slivers 2026-11-28 20:07:16 -08:00
dotCooCoo aa5f1bdca1 Clean Up: Hairline Slivers leaves art at 0% opacity alone
A sliver at 0% opacity, or inside a group or layer at 0% opacity, paints
nothing, so Clean Up and Select > Object > Hairline Slivers now skip it.
The params text and docs/mcp.md say so, and docs/mcp.md also names what a
group or compound path used as a clipping path holds among the objects
both commands leave.
2026-11-28 20:07:16 -08:00
.CooCoo 9393a36007 Merge pull request #8894 from dotCooCoo/fix/swatch-drag-replaced-source
Swatches: a swatch replaced during a drag is not duplicated or deleted on drop
2026-11-28 20:06:13 -08:00
.CooCoo 70e3cc7e02 Merge pull request #8824 from dotCooCoo/fix/issue-1232
Live Corners: pick any corner widget with Direct Selection
2026-11-28 20:05:41 -08:00
dotCooCoo 728da50e7b Merge main into fix/swatch-drag-replaced-source 2026-11-28 20:04:11 -08:00
dotCooCoo 38dfb800e1 Scripts: leave getIsFileOpen's path comparison as main has it
The change to how getIsFileOpen compares paths on and off Windows goes in its own change, with
its test.
2026-11-28 20:03:45 -08:00
dotCooCoo 45fc9cf55c Merge main into fix/speed-i13930-global-edit-preview 2026-11-28 20:03:00 -08:00
dotCooCoo b8daf6ff2c Global Edit: the preview after an edit compares only the changed objects again
With one object selected, the canvas highlights the objects Start Global
Edit would take. After every edit the engine reduced each candidate in
the document to its form again, measured its bounds twice, and made the
outline of each highlighted object again.

The forms, bounds and outlines are now kept by node between calls. An
edit replaces each node it changes, so after an edit only the replaced
nodes are measured again. Bounds of objects that hold symbol instances
are not kept. The outline pass finds each object, its selected ancestors
and its layer color in one walk down its index path.

The new test counts the forms and outlines made: 40 and 39 for the first
preview of 40 squares, then 1 and 0 after the selected square moves.
2026-11-28 20:03:00 -08:00