Commit Graph
675 Commits
Author SHA1 Message Date
dotCooCoo 6e2c0fea9c Merge main into fix/dwg-export 2026-12-05 05:29:36 -08:00
.CooCoo 4a7fe04e81 Merge pull request #10888 from dotCooCoo/fix/targa-color-model
Targa export: a Color Model option writes grayscale files
2026-12-04 22:27:33 -08:00
dotCooCoo 21c89d170c Merge main into fix/dwg-export 2026-12-04 19:59:56 -08:00
.CooCoo 1597047278 Merge pull request #10873 from dotCooCoo/fix/dxf-group-block-reference
DXF export: Always Export Group as Block Reference
2026-12-04 19:41:55 -08:00
dotCooCoo ccedb75154 Merge main into fix/dwg-export 2026-12-04 19:23:02 -08:00
dotCooCoo 60cdfc1eb4 Merge main into fix/dxf-group-block-reference
The craft-libs pins take main's rev. Until storytold/craft-libs#5381 merges,
crates/cad/src/blocks_compat.rs writes the block records, BLOCK definitions
and INSERT entities that #5381 adds to the drawing writer.
2026-12-04 18:24:34 -08:00
dotCooCoo 48f7214daa Merge main into fix/targa-color-model 2026-12-04 17:52:30 -08:00
dotCooCoo e487e66d0c Merge main into fix/held-dialog-outcomes 2026-12-04 17:36:29 -08:00
.CooCoo ecf3096ff0 Merge pull request #10867 from dotCooCoo/fix/save-changes-docs-choice
Docs: the save-changes question takes choice dontSave, not discard
2026-12-04 17:03:30 -08:00
dotCooCoo d3d6e81975 Targa export: a Color Model option writes grayscale files
Targa Options gets a Color Model menu, RGB or Grayscale, and
`document.export` takes it as `colorModel` (`rgb` or `gray`, as BMP
does). Grayscale writes an uncompressed grayscale file (image type 3)
at 8 bits per pixel, flattened on white, or 16 bits with an 8-bit
alpha; omitting `depth` with `gray` gives 8 bits. `cmyk`, an unknown
model and a grayscale depth of 24 or 32 bits are refused with an error.
Switching the model in the dialog moves a depth the new model lacks to
that model's default.

The transparency rule of the dialog's background list now follows the
depth: 16 and 32 bits keep transparency, 8 and 24 bits are flattened.

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.
2026-12-04 16:12:01 -08:00
dotCooCoo ca77a2726f Merge main into fix/dwg-export 2026-12-04 15:53:43 -08:00
dotCooCooandAlex-BB44 335c7c64dd DWG: export writes the DXF drawing as DWG 2000 to 2018
DWG was read only: Export As listed it grayed out, document.export
answered with a hint to export DXF, and a script's
AutoCADExportFileFormat.DWG, the default, threw an error.

- document.export {format: dwg}, a .dwg path, and document.exportDxf
  with format: dwg write the drawing the DXF export writes, with the
  same options, converted by craft-dwg in the --dwg-worker copy of the
  app. Versions are 2000, 2004, 2007, 2010, 2013 and 2018; R12, R13
  and R14 are refused with an error that names them. Records the DWG
  writer can't write in that version are left out with a warning that
  counts them by type.
- Export As lists DWG and opens DWG Options: DXF Options with the DWG
  versions. A version remembered from DXF Options that DWG isn't
  written as starts on 2018.
- Scripts: AutoCADExportFileFormat.DWG writes a .dwg file;
  AutoCADRelease13 and 14 with DWG throw an error.

Docs: docs/mcp.md, docs/control-protocol.md, docs/file-format-parity.md,
docs/target-app-parity.md, docs/roadmap.md.

Co-authored-by: Alex-BB44 <[email protected]>
2026-12-04 14:52:49 -08:00
dotCooCoo b117e7fa90 DXF export: Always Export Group as Block Reference
DXF Options gets the check box Always Export Group as Block Reference,
and document.exportDxf and document.export take groupBlocks. It is off
by default, and the CNC / CAM preset does not set it. When it is on,
each group is written as a block definition holding its contents,
placed by one INSERT on the group's layer at the origin, unscaled, so
its entities keep their coordinates. A group inside it becomes a block
placed inside that block, and a group that writes no entity writes no
block. Block names come from the group names ("Group" for an unnamed
group), made unique with _2, _3 and so on, and follow each version's
naming rules. It works in every version from R12 to 2018.

The craft-libs revs move to 35709fdb (storytold/craft-libs#5381 on top
of the current pin 77ade517), whose drawing writer writes block
definitions and INSERT entities. A drawing without groups, or with the
option off, is written as before.

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.
2026-12-04 14:23:44 -08:00
dotCooCoo 6c314c4cd6 Docs: the control protocol gives Don't Save in one ui.dialog.set request
ui.dialog.set with fields and action "confirm" sets choice (and
applyToAll) and confirms the same Save Changes question in one request,
so no other dialog is answered between the two. The control-protocol row
now gives that form beside the two-request one, and the Save Changes test
checks the line and sends both one-request forms through the control
handler.
2026-12-04 12:57:51 -08:00
dotCooCoo ff9ee1f33a Merge main into fix/dialog-keys-ui-inspect 2026-12-04 10:48:55 -08:00
dotCooCoo 231d90614b Docs: the save-changes question takes choice dontSave, not discard
The question that Close, Close All and Quit open for a modified
document takes `choice` (`save`, `dontSave` or `cancel`) and, while
more documents wait, `applyToAll`. A `discard` field is refused with
"unknown field `discard`". docs/control-protocol.md, the answer_dialog
row of docs/mcp.md and the control module's doc comment still told
clients to set `discard: true`.

Each text now gives `{field: "choice", value: "dontSave"}`, lists the
values `choice` takes and describes `applyToAll`. The answer_dialog
row gives the choice in one call and the confirm in a second one: the
app answers a `set` with `action` by returning the confirm's result
alone, and answer_dialog then sends a second confirm, which can fail
after the document closed or answer the next document's question.

A test in unsaved.rs checks the requests on the lines that describe
the `{"pending": "saveChanges"}` reply in both docs and sends the same
requests through the control handler: the modified documents close
and no file is written.
2026-12-04 07:29:42 -08:00
David Mann 7c96961420 Merge remote-tracking branch 'upstream/main' into feat/agents-open-window
# Conflicts:
#	apps/vectorcraft-cli/src/main.rs
2026-12-04 00:12:25 +01:00
dotCooCoo 79b9671fdc Merge main into fix/dialog-keys-ui-inspect 2026-12-03 10:39:46 -08:00
dotCooCoo c910855ad7 Merge main into fix/held-dialog-outcomes
Main's Color Picker confirm check returns from the dialog-host closure, which on this branch returns a Reply; its refusal is now wrapped as one.
2026-12-03 08:26:35 -08:00
.CooCoo ceacaac6d4 Merge pull request #10551 from dotCooCoo/fix/placement-options-after-undo
Links: Placement Options does not edit an image placed after Undo
2026-12-03 07:27:14 -08:00
dotCooCoo fe3305b9dc Dialogs: a control confirm of a held OK replies with the app's answer
A dialog that holds its OK files the answer for the app, which accepts or
refuses it in the next dialog pump. `ui.dialog.confirm` and `ui.dialog.set`
with `action: "confirm"` replied `{"ok": true}` as soon as the answer was
filed, so a client could not tell that the app refused it (a color
adjustment confirmed while another document is active) and the dialog
stayed open.

`ui.dialog.set` with an `action` also replied with the reply to the
confirm or cancel alone. The MCP `answer_dialog` tool reads a reply
without a `dialog` key as an app that did not answer the dialog, and
sends another `ui.dialog.confirm` or `ui.dialog.cancel`: after an
accepted OK that call failed with "no hosted dialog is open" or answered
the dialog under it.

- Both confirm paths answer with `dialog_reply`, and the app holds the
  reply of a confirm that waits on the dialog's held OK until the app
  answers that opening of the dialog.
- A set with an `action` replies `{dialog, result}`: the dialog as the
  set left it, and the reply to its confirm or cancel, also once a held
  OK is answered. This covers the hosted dialogs, Preferences and
  ScriptUI dialogs; the Simplify and Smooth sliders already replied this
  way.
- A held reply shows the paths outside the read root that the request
  sent by their file names, as a reply sent at once shows them.
- The app polls the held replies right after the dialog pump, before the
  next pass closes an accepted dialog, and after the control requests.
- While a confirm waits on a held OK, the control logic asks for a pass
  (a paint while the window is hidden), so a minimized window answers
  too. A dialog whose OK waits with no confirm on it, such as Print
  during its printer lookup, does not keep the window drawing.
- docs/control-protocol.md describes the held reply and its errors.
2026-12-03 02:05:33 -08:00
David MannandClaude Opus 5.5 3e699b4d21 feat(automation): agents in the open window through the ArtCraft Launcher's switch
While the launcher's Settings > AI agents switch names VectorCraft, the
window serves its control channel on loopback with craft-libs' AgentLink
and publishes agent-connection.json; plain `vectorcraft-cli mcp` finds it
on every tool call through the shared Live (challenge handshake, no port or
token in client configs) and otherwise runs headless or follows the
closed-app choice. Agent requests in the window are confined to the agent
folders. Preferences gets an AI Integrations page (the shared Agents page),
saved through the new UI command prefs.agents, which agents can't change.
New MCP tool agent_folders; `--when-closed`; `--connect` deprecated.

Closes #10621, closes #1470, closes #10453.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-03 02:07:29 +01:00
dotCooCoo 5d784fb626 Merge main into fix/halftone-grid-styles 2026-12-02 15:15:55 -08:00
dotCooCoo b1a88d652a Merge main into fix/dialog-keys-ui-inspect 2026-12-02 11:50:36 -08:00
dotCooCoo d41bf48738 Vector Halftone: round dots inside the cell keep four anchors
Circle and Ellipse dots that fit inside their cell use the four-anchor
ellipse path again; the quadrant builder is kept for dots that need
clipping. The style tests use a gray fill, so an explicit shape that is
ignored changes the result. docs/control-protocol.md lists the dialog's
style field.
2026-12-02 06:19:35 -08:00
dotCooCoo 628d21f37c Links: Placement Options does not edit an image placed after Undo
Placement Options checked the document and its reverts before OK, but not
Undo or Redo. After undoing the place of the image it opened on, a new
image can take the same id, and OK then changed that image's Placement
Options. OK now refuses after an Undo or Redo in the opening document, as
Create Object Mosaic does, and asks to reopen the dialog.

The guard was missing since the dialog started applying to the images it
opened on (62199b98b3).
2026-12-02 01:37:45 -08:00
.CooCoo d2b21eee81 Merge pull request #10145 from dotCooCoo/fix/placement-options-keeps-links
Links: Placement Options applies to the images it opened on
2026-12-01 09:47:28 -08:00
.CooCoo fd24af05d7 Merge pull request #10118 from dotCooCoo/fix/layer-options-key
MCP: dialog params texts name the keys ui.inspect reports
2026-12-01 09:47:10 -08:00
dotCooCoo ff81deb8d7 MCP: dialog params texts match the keys and fields ui.inspect lists
ui.inspect lists each open dialog with a key and its fields. The params
text of these commands, and docs/mcp.md, docs/control-protocol.md and
docs/target-app-parity.md, named keys and fields that ui.inspect does
not report:

- Recolor Artwork (ui.recolorDialog) and JavaScript Files
  (ui.javascriptFilesDialog) were listed with key null. Both dialogs now
  report the key their texts name: recolor and javascriptFiles.
- Print (file.print) and the print preset editor (ui.printPresetDialog):
  the texts said dialog print and printPreset; the key is null. The
  Print dialog lists section and sheet, not toFile, __section or
  __sheet, and Done is choice: done followed by ui.dialog.confirm, not
  discard: true. printer takes a name from print.printers, or PDF File,
  with which Print saves the job as a PDF.
- Find and Replace (ui.findAndReplace, ui.paramDialog with
  edit.findReplace): the texts said dialog findReplace and named an
  action field that ui.dialog.confirm runs. The key is null, the dialog
  lists no action field, and the texts now name its fields and buttons.
- Check Script (ui.checkScript): the texts said dialog scriptCheck with a
  report field. The key is null and the fields are lines, notes and
  groups; Copy copies the report as text.
- Import Shortcut Set (ui.shortcutImportDialog): the review opens inside
  Keyboard Shortcuts, which ui.inspect does not list. The text no longer
  names a shortcutImport dialog or its fields, and says that
  shortcutSet.read reads a file and matches its entries and
  importMatches.set stores matches.
- Data Recovery: the app asks about one copy at a time, with the field
  choice (recover or discard), not copies and discard.
- Reset Preferences: the question over Preferences is not listed in
  dialogs, and has no resetPreferences key.

Each command has a test that opens the dialog and checks its params text
against what ui.inspect lists.
2026-11-29 18:59:21 -08:00
dotCooCoo 62199b98b3 Links: Placement Options applies to the images it opened on
Opened without ids (the menu, a shortcut or ui.placementOptionsDialog {}),
the dialog read the selected images but sent null ids on OK, and
links.placementOptions read null as the selection at that moment. Selecting
another image while the dialog was open applied the options to that image,
and emptying the selection made OK fail.

links.placementOptions without options now returns {ids, placement}, and
the dialog sends those ids on OK. OK is refused when one of them has been
deleted. Callers that pass ids are unchanged, as is the check that OK edits
only the drawing the dialog opened in.
2026-11-29 15:29:52 -08:00
dotCooCoo e1b3943f46 MCP: tool.options' params text says where its dialog names appear
The params text of tool.options (in both command catalogs) and
docs/control-protocol.md named the dialogs' keys without saying that
they are the `key` ui.inspect reports. The `dialog` field tool.options
returns holds `rotate`, `scale`, `reflect` or `shear` for the transform
tools, `move` for the selection tools and `command` for the Type on a
Path tools.

- The text names both: the `key` in ui.inspect and the returned
  `dialog` field.
- The tool.options test checks the returned `dialog` field against the
  params text as well as the key.
- The ui.menuDialog test checks that the Simplify and Smooth popovers
  are showing when the params text says those commands show a slider.
2026-11-29 14:52:10 -08:00
dotCooCoo 9f6afc8403 MCP: dialog params texts name the keys ui.inspect reports
ui.inspect lists each open dialog with a key. The params text of these
commands, and docs/mcp.md and docs/control-protocol.md, named a key that
no open dialog reports:

- Layer Options (ui.layerOptions, ui.newLayer): layerOptions, now
  ui.layerOptions.
- The Layers panel's Panel Options: layersPanelOptions, now
  ui.layersPanelOptions.
- The Navigator panel's Panel Options: navigatorPanelOptions, now
  ui.navigatorPanelOptions.
- Document Raster Effects Settings (ui.rasterEffectsSettingsDialog):
  rasterEffectsSettings, now document.rasterEffectsSettings.
- The PDF preset editor (ui.pdfPresetDialog): pdfPreset, now pdf-export.
- Save for Web (file.saveForWeb): saveForWeb, now save-for-web.
- The Actions panel's Reset Actions question (ui.actionSet.reset):
  resetActions, now actionsQuestion.

Each command now has a test that opens the dialog and checks that its
params text names the key ui.inspect lists.
2026-11-29 11:06:33 -08:00
dotCooCoo 3cbe61a6d0 MCP: ui.menuDialog's params text names the dialog keys ui.inspect reports
Since the move to the craft UI framework, the dialogs ui.menuDialog
opens report their command id as their `key` in ui.inspect and
ui.dialog, except Transform Each and the envelope dialogs. The params
text, docs/mcp.md and docs/control-protocol.md still named the earlier
kinds (`move`, `scale`, `vectorHalftone`, `rearrangeArtboards`,
`renameArtboards`, `arrangeGrid`, `divideDashes`, `smoothBridge`,
`tangentCircle`, `textTweaker`, `command` and others), which no dialog
reports.

- The params text of ui.menuDialog (and its copy in the MCP catalog)
  says the key is the command id and names the four exceptions, and
  says Smooth, and Simplify until its dialog keeps its settings, show a
  slider rather than a dialog. ui.simplifyAuto and
  ui.simplifyMoreOptions name the Simplify dialog's key
  `object.path.simplify`.
- The params text of tool.options names the keys of the dialogs the
  Rotate, Scale, Reflect, Shear, selection and Type on a Path tools
  open: `object.rotate`, `object.scale`, `object.reflect`,
  `object.shear`, `object.move` and `type.pathOptions`.
- docs/mcp.md and docs/control-protocol.md name the keys the dialogs
  report, Type on a Path Options and Rasterize included.
- Tests open every command the ui.menuDialog params text lists, each of
  those tools' options and Simplify's More Options, and check the key
  against the params text, and that every key the ui.menuDialog text
  names is one a listed command opens.
2026-11-29 06:56:52 -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 87456c5b35 Merge main into fix/issue-1232 2026-11-28 20:00:34 -08:00
dotCooCoo 1ad8134791 Merge main into feat/color-wheel-contrast-lines 2026-11-28 19:38:37 -08:00
.CooCoo b24f5af47c Merge pull request #8099 from dotCooCoo/feat/color-wheel-hex-alpha-css
Part of #978: Show Hex Field in the Color Wheel panel takes hex with an alpha and CSS colors
2026-11-28 08:37:09 -08:00
dotCooCoo 97316b5ce0 Merge main into feat/color-wheel-hex-alpha-css 2026-11-28 08:20:14 -08:00
dotCooCoo af8b62bdd9 Merge main into feat/toolbar-button-rename
Rename Button now opens through the craft UI framework: the dialog is a
hosted parameter dialog like New Toolbar, its OK is held while the label
is refused, and an OK after switching workspaces is refused. The button
context menu item and the button face use the framework Menu and Button;
the face paints the label of its own while the accessible name keeps the
command name after it. Tests drive the dialog through panel_harness.
2026-11-28 03:26:32 -08:00
dotCooCoo e99a3e11cf Merge main into feat/toolbar-command-buttons 2026-11-27 23:03:16 -08:00
dotCooCoo 1d66710671 Selection: Cmd/Ctrl-clicks step through grouped objects under the pointer
With the Selection tool, the first Cmd-click (Ctrl on Windows and Linux)
now always goes to Direct Selection or Group Selection, also over a
selected object: it picks the object under the pointer, a member of a
group included, and arms Select Behind. While Cmd stays held, each
further Cmd-click over the selection selects the next object under the
pointer, counting the members of groups one by one, and comes back to
the topmost after the last. Letting go of Cmd (a pointer, hover or key
event without it), choosing another tool or switching documents ends it.

Before, the first Cmd-click over a selected object selected the object
behind it at once, and Select Behind stepped through whole groups, so a
member lying under another member of the same group could not be
reached that way.

- doc::hit::leaves_at lists the objects a Direct Selection click picks
  under a point, topmost first, in one traversal of the document; a
  clipping mask or a group drawn with its own geometry effects falls back
  to repeated hit tests. The list stops at 256 objects.
- The session keeps the arming (Session::behind_armed) and passes it to
  the tools as ToolContext::behind_armed.
- Docs: docs/control-protocol.md (ui.pointer), docs/mcp.md,
  docs/target-app-parity.md and docs/ui-parity.md.
2026-11-27 18:47:39 -08:00
BFlat 6d701bf953 Merge pull request #8982 from dotCooCoo/fix/save-pdf-partial-bleed-write
Save PDF: a settings object set by ui.dialog.set keeps the options it leaves out
2026-11-27 05:12:09 +07:00
BFlat d7982ef857 Merge pull request #9078 from dotCooCoo/fix/paste-keeps-unwritten-cut
Clipboard: Paste keeps a Copy or Cut whose system clipboard write failed
2026-11-26 16:59:28 +07:00
dotCooCoo 20d0b0073a Merge main into feat/color-wheel-contrast-lines 2026-11-25 23:47:09 -08:00
dotCooCoo dcea6b8f3d Merge main into fix/paste-keeps-unwritten-cut 2026-11-25 21:52:50 -08:00
dotCooCoo 0eec4f510f Toolbars: Dock Toolbar and Float Toolbar run again on the dock
window.toolbar.dock and window.toolbar.float were still listed in the
command catalogs, but the move to the framework dock removed their
handlers, so both returned "unknown command".

- window.toolbar.dock docks a toolbar made with New Toolbar as a column
  of the left or right edge's dock, at the column `order` asks for.
  Without `side` it uses the edge it docks at, else the edge of the
  docked panel it left, else the left.
- window.toolbar.float floats it at x, y, or as the dock floats a panel.
- A hidden toolbar that either command shows brings back the groups torn
  off it, and both commands end a Tab hide.
- window.toolbar.list reports that same edge for a floating toolbar
  instead of always "left".
- place_floating moves an open OS window's record with its rect, as
  float_actions does.

Docs: the params text in both catalogs, docs/mcp.md and
docs/control-protocol.md describe dock columns instead of lanes.
2026-11-25 21:46:05 -08:00
dotCooCoo c7ee18375a Merge main into fix/issue-1232
Main's Cmd lends the Selection tool change passes the shown tool to the corner widgets; the picked and hollow corner widgets take it the same way.
2026-11-25 20:23:27 -08:00
dotCooCoo ecdb9e9757 Merge main into feat/toolbar-command-buttons 2026-11-25 19:03:06 -08:00
dotCooCoo 812b6a2a92 Toolbars: command buttons skip the tool re-homing, and the protocol doc splits the remove rule
- `palette::button_texts` reads the kept palette build as it is and no
  longer recomputes every tool's home on each footer pass; it builds
  only when no build exists for the current catalog.
- `docs/control-protocol.md` states the errors of `toolbar.addCommand`
  apart from `toolbar.removeCommand`, which answers with the unchanged
  list for a command the toolbar has no button for.
- The edit toolbar tests run their lookups in a frame from
  `crate::testing::part_frame`.
2026-11-25 19:01:06 -08:00
BFlat a54d28887c Merge pull request #7718 from dotCooCoo/feat/color-wheel-contrast
Color Wheel: Show Contrast reports the WCAG contrast against the color behind the selection
2026-11-26 08:51:15 +07:00