Commit Graph
386 Commits
Author SHA1 Message Date
FredApps 6f6a6d4e20 Merge branch 'main' into codex/10008-native-composite-adoption 2026-12-04 10:31:44 +01:00
dotCooCoo c4a737f255 Merge main into feat/scripts-scriptui-palettes 2026-12-03 09:29:28 -08:00
.CooCoo 9a21dae940 Merge pull request #10636 from dotCooCoo/fix/script-image-read-once
Scripts: placing or relinking an image reads its file once
2026-12-03 07:32:03 -08:00
.CooCoo 68fcab0512 Merge pull request #10436 from dotCooCoo/fix/slider-cancel-after-failed-preview
Path sliders: Cancel ends the edit a refused preview left open
2026-12-03 07:25:26 -08:00
.CooCoo 7836fbbe1c Merge pull request #10379 from dotCooCoo/fix/gradient-stop-swatch-identity
Gradient: the stop popover keeps the swatch picked among swatches of one color
2026-12-03 07:24:27 -08:00
.CooCoo 44c6916bde Merge pull request #10077 from dotCooCoo/feat/artboard-flood-fill
Document Tools: Flood Fill Artboards adds an artboard-sized rectangle on its own layer
2026-12-03 07:17:43 -08:00
dotCooCoo 08a29802b8 Scripts: placing or relinking an image reads its file once
PlacedItem.file and PlacedItem.relink() ran file.place.info on the file
to check that it held an image, then file.place or links.relink read and
decoded it again. The image check now runs inside file.place and
links.relink while a script places or relinks an image: a file in no
image format is refused before the document changes, with "The file is
not an image", and a damaged image keeps its own error. The double read
came in with fed96731e2 (#9077).

A test counts the engine's file reads and fails with 2 reads on main.
2026-12-02 15:38:44 -08:00
dotCooCoo e1558e7e4a Merge main into feat/scripts-scriptui-palettes 2026-12-02 15:27:42 -08:00
dotCooCoo 930c02ce8f Merge main into feat/scripts-pageitem-transforms 2026-12-02 12:20:10 -08:00
dotCooCoo 46b0d0def6 Merge main into feat/scripts-scriptui-palettes 2026-12-02 12:08:01 -08:00
dotCooCoo 60f0cb13d5 Merge main into fix/gradient-stop-swatch-identity 2026-12-02 12:06:44 -08:00
.CooCoo dcb7085b2a Merge pull request #9139 from dotCooCoo/feat/plugin-api-events
Plug-ins: react to selection, layer, open and save events
2026-12-02 11:15:23 -08:00
.CooCoo 5d22b25bb7 Merge pull request #10333 from dotCooCoo/fix/script-new-document-overprint-links
Scripts: file.new takes Overprint Preview and reads the profile's linked files
2026-12-02 11:15:14 -08:00
dotCooCoo f8eb542e04 Scripts: geometry read from a document in the back matches what the setters measure
The bounds getters (position, left, top, width, height and the bounds
arrays) read an item in a document in the back without measuring its type,
while the setters measure it after the switch to that document since
#10538. A script that read t.width and assigned it back could resize the
item, and every geometry assignment switched to the document and back even
when nothing changed.

The getters now measure type not measured yet in a document in the back
for an item that holds type, a symbol instance or a placed document, the
way the switch measures it, and the check is skipped while the document is
unchanged. An assignment equal to the current value of an object without
such content in a document in the back returns without switching
documents, and no undo step is made.
2026-12-02 07:21:25 -08:00
dotCooCoo 734f08a85f Merge main into fix/gradient-stop-swatch-identity 2026-12-02 00:40:36 -08:00
dotCooCoo ebbb369c0c Merge main into feat/artboard-flood-fill 2026-12-02 00:38:46 -08:00
FredApps d94e3d628a Merge branch 'main' into codex/10008-native-composite-adoption 2026-12-02 02:22:24 +01:00
dotCooCoo c012eb8ee9 Merge main into feat/scripts-pageitem-transforms 2026-12-01 15:00:42 -08:00
dotCooCoo 682f27810a Merge main into feat/scripts-scriptui-palettes 2026-12-01 14:04:42 -08:00
dotCooCoo 9bf07c220e Merge main into fix/script-new-document-overprint-links 2026-12-01 13:53:12 -08:00
dotCooCoo 53040ad317 Path sliders: Cancel ends the edit a refused preview left open
When the Simplify or Smooth slider's preview is refused (no path in the
selection), the engine keeps the interaction open with no preview. Escape
and ui.dialog.cancel only rolled back an interaction whose preview was the
slider's own command, so the edit stayed open after the slider closed and
blocked other dialogs' previews.

Cancel now also rolls back an interaction with no preview, unless a tool
joined it (a Selection drag pressed but not yet moved). The engine records
that join on the interaction and exposes it as
Session::interaction_joined_by_tool.
2026-12-01 02:17:03 -08:00
dotCooCoo b852316921 Plug-ins: fix event delivery edge cases from review
- A commit or cancel with no drag open no longer ends an interaction for
  plug-in events.
- A host query that panics during a handler still puts the session back.
- Handler calls after a replayed command are checked as calls from outside.
- A rolled-back batch puts back the events its opens pushed out of the
  32-event queue.
- Installing a plug-in again, the same module included, turns its events
  back on; plugin.info's eventsOff follows the same rule.
- A document added before the first check records its baseline.
- Handler failures show in the status bar from their English templates,
  translated when shown, and event handler time counts toward the frame
  time.
- Tests check that the handler ran in the tested pass, and the script-run
  test no longer writes to other sessions' status bar.
2026-11-30 22:12:19 -08:00
dotCooCoo e4b486ebf2 Merge main into fix/gradient-stop-swatch-identity
The craft-libs revs move from main's a5669ed2f1 to fee4c30266, which is
that commit merged with the commit that adds
SwatchPalette::select_by_color.
2026-11-30 21:02:53 -08:00
dotCooCoo 316a4b6bfa Scripts: file.new takes Overprint Preview and reads the profile's linked files
A script's addDocument with previewMode OverprintPreview failed: file.new
turned the view on with view.overprintPreview, which scripts may not
run. A script's file.new now asks for the view, and the run turns
Overprint Preview on when it ends; a run that fails does not turn it on.

The images a New Document profile's symbols, patterns and brushes link
to were read under the script's file gate, after the profile's own file
was read outside it, so images beside the profile showed only their
preview. They are now read the way the profile's file is, under the
automation roots in force.
2026-11-30 15:54:19 -08:00
dotCooCoo 1b2da536cc Merge main into feat/scripts-print-printer 2026-11-30 15:25:50 -08:00
dotCooCoo fded4dd995 Merge main into feat/artboard-flood-fill 2026-11-30 15:25:30 -08:00
dotCooCoo 540f49b52d Merge main into feat/scripts-pageitem-transforms 2026-11-30 15:24:11 -08:00
dotCooCoo b3def332ff Merge main into feat/scripts-print-printer 2026-11-30 11:40:16 -08:00
dotCooCoo 8afd855040 Merge main into feat/plugin-api-events 2026-11-30 11:40:02 -08:00
dotCooCoo b3b3e78a36 Merge main into feat/scripts-pageitem-transforms 2026-11-30 11:07:22 -08:00
dotCooCoo 91469a3d0e Document Tools: a failed preview puts back the fill an earlier preview set
With nothing selected and New Art Has Basic Appearance off, a fill
preview followed by a failed Flood Fill preview left the previewed fill
in the new-art paints, and a commit kept it. The interaction now keeps
the paints from before the previews that build on each other and the
paints the last of them left. A failed preview puts back the first, with
the fields a command outside the previews changed kept as that command
left them.
2026-11-30 10:17:11 -08:00
dotCooCoo fca5dc67ea Gradient: the stop popover selects only the stop's own swatch and keeps it through renames
The Swatches view no longer lets the palette select a swatch by color.
When no swatch is the stop's own, nothing is selected, so a spot or
global swatch of an unlinked stop's color is not shown as picked and a
click on it links the stop.

swatch.edit records each rename with the uid of its document. A preview
records nothing, a failed command.batch puts the record back as it
was, and the session keeps the newest 64 renames. VectorcraftApp::run
and the popover take the record, and the popover's remembered pick
follows a rename of its swatch in its own document, inside a batch too.

The popover tests check the cells the view draws selected through the
panel harness.
2026-11-30 10:04:04 -08:00
dotCooCoo 30188730b8 Merge main into feat/scripts-scriptui-palettes 2026-11-30 10:02:43 -08:00
dotCooCoo a36c8ce509 Document Tools: cancel keeps the starting paints after a deselect and a failed preview
A preview that started from the paints saved before an earlier preview
took the selection's appearance cleared that snapshot. When a later
preview then failed, neither the cancel nor the commit after it saw that
the new-art paints had changed, and the previewed fill stayed. The
interaction now records that such a preview ran, and the cancel and the
commit after a failed preview put back the paints it began with.
2026-11-30 08:29:17 -08:00
dotCooCoo 680fd47b62 Merge main into feat/edit-points-only 2026-11-30 08:18:53 -08:00
dotCooCoo 3919499f10 Merge main into feat/artboard-flood-fill 2026-11-30 06:57:07 -08:00
dotCooCoo b57a4ff927 Document Tools: Flood Fill Artboards keeps an RGB current fill in a CMYK document
Two fixes for review threads on this pull request.

The dialog sent an RGB current fill's working components without
keepModel, so in a CMYK document the engine converted the fill to CMYK.
While the shown color is left unchanged, the dialog now also sends
keepModel: true. An edited color converts to the document's model as
before.

With New Art Has Basic Appearance off and nothing selected, a preview
that drew new art took its new-art paints from that art, and the next
preview then put back the paints the interaction began with. A second
rectangle preview after a fill preview was drawn with the starting fill
instead of the previewed one. The interaction now keeps the paints from
before the inheritance and the next preview starts from them. A fill
chosen during the drag updates them too. After a failed preview, a
cancel or a commit puts back the paints the interaction began with.
2026-11-30 06:20:07 -08:00
dotCooCoo 07ab97addc Document Tools: Flood Fill Artboards checks params on replay and keeps the defaults on Cancel
- Params that are not an object or null are an error on journal and
  action replay as well as in a batch.
- A call without `artboards` or `all` records the artboard it filled as
  `activeArtboard` for a journal replay; a recorded action leaves it out,
  so playing the action fills the artboard active then.
- The command is disabled when the document has no artboards.
- Canceling a Flood Fill preview puts back the new-art paints it began
  with instead of taking them from the selection.
2026-11-29 18:27:30 -08:00
dotCooCoo 3e29a71b99 Selection Tools: Edit Points Only keeps Appearance row changes and other status messages
Replacing or canceling a drag's preview restores the Appearance row only when
the preview itself changed it, so a row set or cleared during the drag stays.
The dialog clears only its own preview error, and only while it is still the
current status message. The group expansion test checks behavior instead of
source text.
2026-11-29 18:05:26 -08:00
dotCooCoo 8d5fb2ff6b Selection Tools: Edit Points Only skips hidden and locked art and keeps the Appearance row
Edit Points Only now leaves out selected paths and groups that are hidden or
locked, themselves or through an ancestor. Group expansion looks up explicit
anchor picks in a set instead of scanning the selection for each path.
Canceling the preview restores the active Appearance row, and a preview or OK
that succeeds clears the earlier status error.
2026-11-29 17:19:26 -08:00
dotCooCoo c0eb5b898b Merge main into feat/scripts-pageitem-transforms
PathItem now takes PageItem's translate, rotate and resize: main's PathItem versions are removed, and resize on a path keeps main's changeLineWidths percent for the stroke weight. Hidden objects are refused, and an identity transform of an empty path checks its Transformation value and does nothing.
2026-11-29 17:19:24 -08:00
dotCooCoo cd4253e52c Document Tools: Flood Fill Artboards refuses editing modes and bad params
- Flood Fill Artboards is disabled, and refused, while a symbol or a
  pattern is edited, so the rectangles never land in a definition.
- Params that are not an object or null are refused, also when an
  action.batch step is checked before it runs.
- The dialog keeps OK off, with a reason, when Current Fill is chosen
  and there is no current fill.
- With New Art Has Basic Appearance off and nothing selected, a paint
  preview that is replaced or canceled puts back the starting paints,
  so two paint.swap previews commit one swap, while a preview that
  takes its paints from new art it selected is tracked on its own.
2026-11-29 15:44:00 -08:00
dotCooCoo 60c1eb34af Merge main into feat/scripts-print-printer 2026-11-29 14:36:49 -08:00
dotCooCoo c85d16f3c5 Merge main into feat/plugin-api-events 2026-11-29 14:32:55 -08:00
dotCooCoo 330aa4dffb Plug-ins: deliver events after headless gestures and bound handlers per frame
- Headless tool gestures deliver plug-in events once their actions finish,
  and a drag set aside by a command holds events until it ends.
- Documents added in a batch are compared with their state when added.
- Background plug-in loads record the event baseline when they install, or
  after commit or cancel when a drag is open.
- Layer snapshots are compared by id through a map.
- Each desktop frame runs at most four handlers across background delivery
  and every UI pass, and asks for another frame while handlers remain queued.
2026-11-29 14:27:06 -08:00
dotCooCoo 950467b7de Menus: the start of a drag keeps every row's state
While an interaction is open (a move, scale or shape drag, a dialog's
preview, a typing session), the menus' state key left the document
revision out, so the key changed in the frame the interaction began and
the menus rebuilt every row's state for it, on top of the rebuilds for
the press and the release. A rebuild costs about 8 ms on small documents
and about 160 ms with 10,000 objects selected.

An interaction now records the revision it began from, and the key uses
that revision while the interaction is open. The key stays the same as
a drag begins and through its previews, and changes when it ends.

The new test drives a Selection tool move through the whole app and
counts the rebuilds in each frame: one for the press and one for the
release, none as the move begins.
2026-11-29 12:55:18 -08:00
dotCooCoo 1e31f9b94c Document Tools: Flood Fill Artboards refuses infinite colors and keeps the fill on Cancel
- A color component too large for f32 (c: 1e308, [1e39, 0, 0], gray or
  Lab out of range) read as infinite and reached the rectangles; the
  command now refuses it with "bad color".
- The dialog's Color option opened on the current fill in display sRGB
  and sent it as working RGB, so a document whose working RGB space is
  not sRGB got a shifted color. The dialog now opens on the fill's
  display color and converts the picked color back to working RGB.
- With New Art Has Basic Appearance off and nothing selected, a
  previewed color gave the new rectangles' fill to the new-art paints,
  and Cancel or a replaced preview kept it. Both now put back the paints
  the interaction began with.

Docs: docs/mcp.md.
2026-11-29 10:45:42 -08:00
dotCooCoo 4929a4beb6 Merge main into feat/scripts-scriptui-palettes 2026-11-29 10:23:01 -08:00
dotCooCoo 6227297ae4 Merge main into feat/plugin-api-events
# Conflicts:
#	crates/engine/src/cmd/plugin.rs
#	crates/plugins/src/lib.rs
#	crates/plugins/src/manifest.rs
#	crates/ui-egui/src/tests/plugins.rs
#	docs/plugins.md
2026-11-28 23:13:20 -08:00
yoriswind 495aff253d Merge current main and preserve native adoption in distorted replacement 2026-11-28 19:04:26 -08:00