Commit Graph
528 Commits
Author SHA1 Message Date
BFlat 023843e3a6 Merge pull request #9114 from dotCooCoo/feat/scripts-startup-scripts
Scripts: run startup scripts at launch and before a chosen script
2026-11-27 05:13:16 +07:00
BFlat 9cc605bd7f Merge pull request #8975 from dotCooCoo/fix/gradient-midpoint-owner
Gradient panel: a picked midpoint stays with the gradient it was picked on
2026-11-27 05:11:38 +07:00
BFlat a431537d95 Merge pull request #8823 from dotCooCoo/feat/retype-installed-fonts
Retype: installed fonts that are not loaded yet are matched too
2026-11-27 05:09:16 +07:00
dotCooCoo 7da21d015c Validate and retain chosen scripts before startup runs 2026-11-26 08:56:39 -08:00
dotCooCoo e015b20396 Merge main into feat/scripts-startup-scripts 2026-11-26 07:31:10 -08:00
dotCooCoo 3055ea5757 Merge main into feat/scripts-startup-scripts 2026-11-25 23:39:37 -08:00
dotCooCoo 478ed51ace Merge main into feat/retype-installed-fonts 2026-11-25 18:40:00 -08:00
dotCooCoo b6b702f080 Merge main into fix/reset-preferences-interface-settings 2026-11-25 18:36:58 -08:00
dotCooCoo 1795c050c3 Merge main into fix/gradient-midpoint-owner 2026-11-25 18:25:26 -08:00
dotCooCoo bf782369fc Merge main into feat/retype-installed-fonts 2026-11-25 15:23:05 -08:00
dotCooCoo 916ea13906 Merge main into fix/reset-preferences-interface-settings 2026-11-25 10:07:37 -08:00
dotCooCoo 9e3b3efed0 Merge main into fix/shape-builder-color-pick 2026-11-25 09:45:57 -08:00
dotCooCoo bf48bb8f97 Merge main into fix/gradient-midpoint-owner 2026-11-25 09:39:19 -08:00
dotCooCoo f906a0f814 Merge main into feat/scripts-startup-scripts 2026-11-25 09:16:13 -08:00
BFlat 62eff34cc6 Merge pull request #9069 from dotCooCoo/feat/plugins-load-on-workers
Plug-ins: stored and folder plug-ins load on worker threads while the window shows
2026-11-25 19:32:48 +07:00
dotCooCoo c0d3260eb3 Merge main into fix/gradient-midpoint-owner 2026-11-25 04:11:43 -08:00
BFlat 3dd6257d16 Merge pull request #9143 from dotCooCoo/fix/command-during-interaction
Undo: a command run during a tool drag is its own undo step
2026-11-25 15:57:51 +07:00
dotCooCoo 9d225ba091 Merge main into feat/plugins-load-on-workers
The Safe Mode choice after a stopped launch moves to main's dialog host and keeps listing every
plug-in that was loading: one name in the sentence, or the list with "Disable Listed Plug-ins and
Continue". Automation requests wait in the queue while plug-ins load, and one past its deadline is
answered as expired. File > Open and opening a file still wait for the plug-ins still loading.
2026-11-24 23:31:07 -08:00
dotCooCoo 0a36ef97e1 Merge main into fix/ctrl-lends-selection-tool 2026-11-24 18:02:30 -08:00
dotCooCoo 7a85e09b26 Merge main into feat/retype-installed-fonts 2026-11-24 15:21:47 -08:00
dotCooCoo 06b483320e Merge main into fix/command-during-interaction 2026-11-24 10:12:16 -08:00
BFlat 2ef89d479e Merge pull request #8798 from dotCooCoo/fix/live-paint-bucket-journal-replay
Live Paint: bucket paint commands replay from the journal with any tool
2026-11-24 16:01:02 +07:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo 9562ed9b04 Preferences: Reset Preferences resets Smart Guides, Snap to Grid and the Contextual Task Bar
The Preferences dialog shows Smart Guides, Snap to Grid and General's Enable
Contextual Task Bar, but the app keeps them with the interface state, and
Reset Preferences left them as they were. Confirming Reset Preferences now
puts their defaults in the dialog with the other defaults: Smart Guides on,
Snap to Grid off, and the task bar as the current workspace was saved. OK
applies them and Cancel keeps the values in use. On a touch screen, where
the reset turns Enable Touch Workspace back on, OK sets the task bar in the
workspace it leaves, and the Touch workspace keeps its own.

prefs.reset (the Command Palette's Reset Preferences), alone or as a
command.batch step, resets them too, each only when it resets every category
or the setting's own (Smart Guides, Guides & Grid, General). With every
category or File Handling it also clears the app chosen for Edit Original, as
the dialog's reset does. The engine records the categories it reset
(Session::take_prefs_resets), and the app resets its own settings from them
after each command, each frame, and before a touch screen switches to the
Touch workspace.

A category that is not a string is now an error instead of a reset of every
category.
2026-11-22 16:56:25 -08:00
dotCooCoo ece910a3b7 Selection: a Cmd double-click after switching back is the active tool's
A switch from the Selection tool to another tool and back kept the
record of the selection tool Cmd lent the last press, so the Cmd
double-click that followed still went to Direct Selection. The record is
now cleared whenever the active tool changes and whenever the tool
starts afresh (a switch to another document or another view of it).
2026-11-22 16:45:24 -08:00
dotCooCoo 828f43447d Undo: a command run during a tool drag is its own undo step
A command run from a panel, a menu or an automation client while a tool
drag was open ran inside the drag. With Real-time Drawing on, the drag's
next move put the document back to where the drag began and dropped the
command's edit, and Escape dropped it too. With Real-time Drawing off,
the release lost what the drag drew or moved.

Such a command now runs on the document without the drag's preview and
records its own undo step and journal entry. The drag then continues
from the command's result: with Real-time Drawing on, its preview is
applied again at once. The release records the drag's step after the
command's, Undo takes back the drag first and the command next, and
Escape cancels only the drag. The drag acts on the objects it started
with, so a selection the command makes does not change what it moves,
and the fill and stroke proxies keep showing those objects' paints.
Objects the command deletes, hides or locks are left out of the drag.
A change the command makes to the current layer or to the new-art paints
stays when the drag ends or is canceled. When the command deletes the
art being dragged, the drag records no step. A warning or an error from
the preview applied again goes to the command's result.

Commands that already kept the drag as a step first still do (Undo,
Redo, command.batch, swatch.renameGroup, edit.newDocumentFromState and
the others that call settle_interaction). Typing in progress is still
kept as a step of its own first. A command run during a Quick Pen press,
object.transform with copy during an Alt-drag, and a command run during
a dialog's or a panel's preview still run inside the interaction.

Docs: docs/mcp.md (undo / redo row), docs/target-app-parity.md.
2026-11-22 15:17:12 -08:00
dotCooCoo 2592dde6c8 Selection: a Cmd double-click after a tool switch is the new tool's
The double-click or triple-click that follows a lent Cmd-click went to
the tool lent to that press even after another tool or document was
chosen. The lent tool is now kept with the document and the tool it was
lent from, and a follow-up in another document or after a tool switch
goes to the active tool.
2026-11-22 11:07:03 -08:00
dotCooCoo 909c169afe Scripts: queued startup runs keep the file access scope of the request that queued them
In the app, script.startup.run starts only the first queued run inside the request; the later
startup scripts and the chosen script start from the frame loop. Each of them now starts, and its
file is read, in the scope captured when the queue was built, so a confined request's automation
roots apply to every run it queued.
2026-11-22 08:06:13 -08:00
dotCooCoo a1bd1ba906 Shape Builder: a fill chosen while the tool is active leaves the selection's fills
Choosing a fill while the Shape Builder was active (a swatch, the Color
panel, the Fill box or a paint command) ran paint.setFill on every
selected path, so all of them took the color. With Pick Color From set
to Color Swatches the tool merges with the current fill, so the pick is
the color for the next merge.

While the Shape Builder is active, a fill chosen without ids, id or item
now changes only the current fill, with either Pick Color From: with
Color Swatches the next merge fills with it, and with Artwork merges
still take their look from the art. A stroke chosen then still goes to
the selection. Swap Fill and Stroke and Default Fill and Stroke change
only the paint for new art, and Swap gives the current fill the stroke
the Stroke proxy shows. This is VectorCraft's own rule; no default
setting changes.

- painting_tool_of says which tool paints with the chosen fill or
  stroke: the Live Paint Bucket with both, the Shape Builder with the
  fill. Session::tool_paints(stroke) replaces bucket_paints, so the
  paint and gradient commands, previews, the proxies, the Stroke panel
  and the Gradient panel's eyedropper follow it for each kind.
- A new selection does not replace the tool's fill for new art, with
  New Art Has Basic Appearance on or off, and new art is not linked to
  a graphic style whose fill it does not have.
- A cancel puts back a fill previewed for the tool, also after another
  tool was chosen during the drag.
- An Eyedropper pick armed for a stop of the tool's gradient samples
  only into a stop of that gradient, and ends once that stop is gone.
  Choosing another tool drops the stop the pick was armed for, and a
  pick armed while the Eyedropper waits for a Cmd-drag keeps its stop.
- The paint.freeform commands refuse the Shape Builder's fill as they
  refuse the Live Paint Bucket's colors, which lie on no object. For
  the gradient either tool paints with, the Color panel, the Gradient
  panel, the stop popover and swatch drops edit its stops instead of
  points, and the Gradient panel shows its Draw toggle, ramp and stop
  fields in place of the point controls. paint.editGradient keeps the
  given stops of a freeform gradient that has no points yet.
- A gradient command that names no kind edits the proxy in front when
  the tool paints with it, else the kind the selection's active
  Appearance row stands for.
- set_paint lists the commands that painted no object in unpainted.
- Params text and docs/mcp.md describe the rule.

Help (Pick Color From, Color Swatches):
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/shape-builder-tool-options.html
https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=266
https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=267
2026-11-22 06:01:44 -08:00
dotCooCoo d397f4232c Merge main into feat/scripts-startup-scripts 2026-11-21 22:52:51 -08:00
dotCooCoo 14b2ec5bbf Merge main into feat/retype-installed-fonts 2026-11-21 21:18:21 -08:00
dotCooCoo 27011606a5 Scripts: run startup scripts at launch and before a chosen script
With Preferences > General > Run Startup Scripts on (off by default), the
.jsx files of the Startup Scripts folder next to the preferences run when
VectorCraft starts and before each script chosen from File > Scripts,
installed or Other Script..., one at a time and sorted by name without
regard to case. Each runs with the limits of any script and its own undo
step; one that cannot be read, is too large or fails is named in the
Script Console and the status bar, and the next one runs, then the chosen
script. Nothing runs in Safe Mode; after a launch that stopped, they run
once Disable and Continue or Start Normally is chosen, and the launch
marker names the running startup script so a stop there offers to disable
it. script.startup.run runs the folder; script.* is refused inside
scripts, so a startup script cannot start another round.
2026-11-21 20:20:34 -08:00
dotCooCoo 1b29256601 Plug-ins: stored and folder plug-ins load on worker threads while the window shows
At launch the desktop app loaded every stored plug-in and every module in
the Additional Plug-ins Folder on the UI thread before the window
appeared, one after the other. A slow or panicking module held up or
ended startup.

- crates/plugins/src/loader.rs (new): `Loads` runs load jobs on up to
  four threads. Each job runs inside `catch_unwind`; a panic or a load
  that takes 10 s or longer fails that job alone, and the others go on.
  Outcomes come back in job order.
- registry::FolderLoad and store::StoredLoad list in one step, load on
  the workers and install in file-name order. A module whose id was
  installed or removed in another window while it loaded is skipped.
- The desktop app loads in the background only during launch; frames
  install the finished loads. Plug-in commands, commands that edit,
  exports, control requests and files opened at launch wait for the
  loads first; view commands and queries do not.
- The launch marker names every plug-in still loading, not only the
  oldest. After a launch that stopped during the loads, the Safe Mode
  choice lists all of them, and Disable Listed Plug-ins and Continue
  turns them all off. `plugin.safeMode` adds `pendingItems`. A module
  whose load panicked is no longer named.

Docs: docs/plugins.md, docs/mcp.md.
2026-11-21 19:09:18 -08:00
dotCooCoo 555b619228 Selection: Cmd Select Behind works on grouped art and line art
A Cmd press with the Selection tool now selects behind on a group that
holds a selected member, as it does on a selected object, so repeated
Cmd-clicks on grouped art reach the object behind the group. A path's
segments no longer keep the press for Direct Selection, so a Cmd-click
on a selected stroke-only path selects behind it. Select Behind needs
another object under the pointer: on a lone object the press is lent.
The bounding box's handles and rotate zones also lend the press.

- A double-click that follows a Cmd-click selecting behind keeps what
  that click selected, without isolating or editing, also when the
  press and the double-click come in one frame. After an edit or a
  selection change, or after a press that drags or is released away
  from where it began, it is an ordinary double-click.
- Whether a press selects behind is kept for the pointer's position
  while the document, the selection, the live inputs and the hit-test
  settings stay as they are, so the cursor, the canvas marks and the
  press do not walk the document again. A layer or group effect that
  draws art widens the area checked; raster effects and color
  adjustments do not.
- The selected blends' spines are built once per check.
- The status bar and the help bar name the tool a press at the pointer
  takes, which is the Selection tool where the press selects behind,
  and they are drawn again when it changes. The canvas drops a hover's
  decision once the tool, the selection or a preference it depends on
  changes.

Docs: docs/mcp.md (pointer_gesture, and Cmd+Alt with Direct
Selection), docs/control-protocol.md, docs/ui-parity.md,
docs/target-app-parity.md.
2026-11-21 18:34:20 -08:00
dotCooCooandSofiaAFigueredo dcff4edc3d Selection: Cmd/Ctrl lends Direct Selection until it is released
With the Selection tool chosen, holding Cmd (Ctrl on Windows and Linux)
now lends Direct Selection, or Group Selection when that was chosen
last, for each press; the Selection tool is back on the release. With
Group Selection chosen, Cmd lends the Selection tool, as it already did
with Direct Selection. Selection & Anchor Display > Command Click to
Select Objects Behind keeps a Cmd press on a selected object, away from
its anchors, handles, mesh points and spine, for selecting the object
behind it. A wide stroke's painted area counts as on the object there.

- The double-click or triple-click after Cmd-clicks goes to the tool
  the clicks went to.
- Cmd pressed once a drag is under way lends nothing, and the pointer
  stays the active tool's.
- While Cmd is held, the status bar's Current Tool and the help bar
  name the lent tool, and the canvas shows the lent tool's marks and
  widgets (blend, Shaper, mirror, trace divider and repeat handles) for
  the pointer's position in the same frame.
- The help bar has hints for Group Selection.

The helper that finds a selected object's editable parts under the
pointer follows the one in pull request 6597 by SofiaAFigueredo.

Docs: docs/ui-parity.md, docs/control-protocol.md (ui.pointer).

Co-authored-by: SofiaAFigueredo <223278896+SofiaAFigueredo@users.noreply.github.com>
2026-11-21 11:55:41 -08:00
dotCooCoo 17554f2a91 Gradient panel: a picked midpoint stays with the gradient it was picked on
The Gradient panel kept a selected midpoint diamond for the first selected
object only. With that object still selected, choosing the Live Paint
Bucket or toggling to the Stroke proxy left the diamond selected on the
gradient the panel showed then, and the Location field edited that
gradient's midpoint although nobody picked it.

The diamond is now kept for the same owner a selected stop is kept for
(document, object, proxy, Appearance row, symbol part and the bucket),
through the new `Session::gradient_owner`.
2026-11-20 21:20:58 -08:00
dotCooCoo 32afba75ae Live Paint: a Cmd-drag cut short keeps the bucket's colors
With the Live Paint Bucket active, Cmd lends the Selection tool for a
drag. When the bucket was chosen again during a drag of a corner, pie,
blend or similar widget, the lent tool canceled the drag as it went
back, after the session had already stopped treating the bucket as the
lender. With New Art Has Basic Appearance off, the cancel then gave the
selected object's appearance to the colors the bucket paints with.

The lent tool's last actions now run while the session still counts
them as the bucket's, as the Eyedropper's sample for the bucket does.
2026-11-20 21:20:58 -08:00
dotCooCoo 00ac5d7a3f Retype: installed fonts that are not loaded yet are matched too
Shapes no loaded font matches are now compared with the installed fonts
that nothing has loaded yet. type.retype reads their files one at a time,
smallest first, until each such shape matches a font it has read, and
type.retypeFonts (the Retype panel's list) ranks the matching installed
fonts with the loaded ones, up to 96 fonts in all.

- A file is read for the search and released. A face whose glyphs match
  is loaded as it was read, without the family's other files, and later
  searches in every open document compare it ahead of the other loaded
  faces. A matching face that another version of the same family and
  style shadows is loaded and not listed.
- Files over 256 MiB, and the files and faces past 2 GiB read or 500,000
  glyphs drawn, are left out and counted in the result's
  installed.skipped.
- A plain shape (one contour of up to four straight edges, such as a
  rectangle or a hyphen) does not start the search, and matches only a
  font the other shapes found.
- installed: false turns the search off; any value other than true,
  false or null is an error. retype.find takes installed too.
- In the app, Type > Retype and Find Matching Fonts (the panel's button,
  or retype.find from a menu or the command palette) search on a thread
  of their own. After 0.4 seconds a progress window shows the files
  read, with Cancel (also Esc, retype.cancelSearch). When the search is
  done the command runs with the fonts it found, without reading the
  installed fonts again, unless the document or its selection changed
  meanwhile. Reset Retype Panel and a new search stop a panel search.
  An MCP cancel stops the search between files.

Part of #4934.
2026-11-19 23:42:54 -08:00
dotCooCoo 426ea94268 Live Paint: bucket paint commands replay from the journal with any tool
While the Live Paint Bucket is active, a paint or stroke command that names
no objects changes only the colors the bucket paints with. The journal
recorded the params as given, and the active tool is not journaled, so a
replay with the Selection tool active painted the selection instead.

The paint and stroke commands now take defaultsOnly: true, which keeps a
command without ids, id or item to the defaults with any tool active. When
the bucket routed a command, its journal entry notes defaultsOnly: true,
also when the params gave false. library.use (a color, gradient or pattern)
and swatch.library.add with apply note it too and pass it to the commands
they run.

- defaultsOnly is a bool. It is refused with ids, id or item, and in
  stroke.setAdvanced with brush.
- With New Art Has Basic Appearance off, new-art inheritance does not
  replace the defaults after such a command, unless a later step of a batch
  selects another first object or changes its appearance.
- A preview with defaultsOnly: true, and the one after it, starts from the
  defaults the interaction began with, and a cancel puts them back.
- paint.sampleColor with a stop and defaultsOnly reads the default's
  gradient.

Test: live_paint_bucket_commands_replay_from_the_journal_with_another_tool
(engine). Docs: docs/mcp.md, the Live Paint Bucket paragraph; params text
of each command.
2026-11-19 16:35:59 -08:00
BFlat 190375c76c Merge pull request #7760 from dotCooCoo/feat/graph-designs-from-other-document
Graphs: graph designs come in from another document
2026-11-20 05:44:33 +07:00
BFlat 134e3defa6 Merge pull request #7021 from dotCooCoo/feat/3d-custom-bevels
3D: Extrude & Bevel takes custom bevel shapes drawn as open paths
2026-11-20 04:08:29 +07:00
dotCooCoo 7b222bbd57 Merge main into feat/graph-designs-from-other-document 2026-11-19 12:22:10 -08:00
BFlat f43f27658b Merge pull request #8759 from dotCooCoo/fix/live-paint-bucket-eyedropper-stop
Live Paint: the bucket keeps its colors through the stop eyedropper and a Cmd-click
2026-11-20 02:30:58 +07:00
dotCooCoo 856e61afb4 Merge main into feat/3d-custom-bevels 2026-11-19 11:13:58 -08:00
dotCooCoo b585b75109 Live Paint: the bucket keeps its colors through the stop eyedropper and a Cmd-click
The proxies and the paint commands that name no objects stood for the Live
Paint Bucket's colors only while the bucket itself was the active tool. Two
tools that work for the bucket lost them:

- The Gradient panel's eyedropper on a stop of the bucket's gradient: the
  stop was deselected as soon as the Eyedropper became active, and the click
  then copied the clicked object's appearance onto the selection.
- A Cmd-click with the bucket, which the Selection tool takes: with New Art
  Has Basic Appearance off, the new selection's appearance replaced the
  bucket's fill and stroke.

Session::bucket_paints() now answers for the bucket, the Eyedropper armed
for a stop of its gradient (Tool::returns_to), the Selection tool lent to
either, and the actions of the Eyedropper's click that end by switching back
to the bucket. Every check that compared the tool id with the bucket's now
uses it: the proxies, the Stroke panel, the selected stop's owner, new-art
inheritance, previews and their cancel.

- The armed pick ends without sampling, and switches back to the bucket,
  when its stop is no longer selected or no longer exists.
- Clicking the panel's eyedropper again while a pick is armed keeps the tool
  the pick returns to.
- The Color panel's cached mixed state is keyed on bucket_paints().
- A Brush Options Key Color pick or an Image Trace ignored-color pick armed
  from the bucket is not a stop pick.

Tests: live_paint_bucket_keeps_its_colors_through_the_stop_eyedropper_and_a_cmd_click
(engine), the stop option test (tools), the stop eyedropper and mixed
selection tests (ui-egui). Docs: docs/mcp.md, the Live Paint Bucket
paragraph.
2026-11-19 10:05:22 -08:00
BFlat b902c33e0c Merge pull request #8706 from dotCooCoo/fix/setoption-survives-dropped-press
Tools: an option set during a press survives the press being dropped
2026-11-20 01:01:44 +07:00
dotCooCoo 42d22b6cc6 Merge main into feat/graph-designs-from-other-document
# Conflicts:
#	crates/engine/src/cmd/clipboard/resources.rs
2026-11-19 06:48:38 -08:00
dotCooCoo 54a964d4fa Tools: an option set during a press survives the press being dropped
A dropped press puts back the persistent options the tool had when the
press began. It also put back an option set while the press was held
(tool.setOption or the desktop app's setter), and the next store of the
tool's options wrote the old value over the new one. A General > Corner
Radius change during a Rounded Rectangle press was undone the same way.

- Setting an option of the tool that took the press updates the press's
  saved options with every option the set changed, so the dropped press
  keeps them.
- Setting an option stores all of the tool's options, the drag's changes
  included, so a dropped press after such a set stores the options it
  puts back.
- A Corner Radius change updates the held Rounded Rectangle press's
  saved radius.
- Both hold when the tool lent a selection tool for the press (a
  Cmd-drag).
2026-11-19 05:21:36 -08:00
dotCooCoo 3fb77f58bb Merge main into feat/3d-custom-bevels 2026-11-19 04:54:39 -08:00
dotCooCoo 5d8609e881 Merge main into feat/proof-setup-save-load
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n/tests.rs
2026-11-19 04:47:38 -08:00