Commit Graph
1316 Commits
Author SHA1 Message Date
dotCooCoo 8ba55104f0 Merge main into feat/group-rows
# Conflicts:
#	crates/engine/src/cmd/plugin_call/reviewed.rs
#	crates/mcp/src/ui_catalog.rs
#	crates/ui-egui/src/addons/arrange.rs
#	crates/ui-egui/src/menus/ui_commands.rs
#	docs/mcp.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-12-01 06:20:46 -08:00
.CooCoo 83b2c22b78 Merge pull request #10148 from dotCooCoo/feat/corner-marks
Arrange Tools: Mark Bounds of Each draws corner marks or a rectangle on each selected object's bounds
2026-12-01 06:18:27 -08:00
dotCooCoo 3fcb278b24 Merge main into feat/group-rows 2026-12-01 01:03:49 -08:00
dotCooCoo 9c4f01faf1 Merge main into feat/corner-marks 2026-12-01 01:03:01 -08:00
dotCooCoo f08d12949c Tests: run the attached recolor import test on a synthetic document
The recolor adjustment test read test.af from the repository root and
returned early when the file was absent, so it never ran in CI. It now
builds a magenta rectangle with an attached Recolor adjustment in the
test and checks that lightness 1 imports as a white fill, that
lightness 0.5 at hue 0 draws pure red, and that a hidden adjustment
leaves the fill unchanged.
2026-11-30 23:03:43 -08:00
.CooCoo 251d06b8b3 Merge pull request #10329 from dotCooCoo/fix/script-app-members-checks
Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
2026-11-30 16:42:58 -08:00
dotCooCoo b8ee4686b0 Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
app.getIsFileOpen treated any path with a backslash as a Windows path,
turning each backslash into a folder separator and ignoring letter case.
On macOS and Linux a backslash is a character of a file name, so
getIsFileOpen answered true for the path /work/a\b.ai while /work/a/b.ai
was open.
Paths now get the Windows rules only on Windows or when they start with a
drive letter.

DocumentPreset.typename and toString() answered for a preset kept from
an earlier run with #targetengine, while its settings throw a TypeError.
Both now check the preset the way the settings do.

Documents.addDocumentNoUI(startupPreset) was missing. It now makes the
document addDocument(startupPreset) makes.
2026-11-30 15:39:56 -08:00
.CooCoo b8470d947f Merge pull request #5272 from ljkx/fine-nudge-5258
Nudge: Ctrl/Cmd+arrow moves by a tenth of the keyboard increment (#5258)
2026-11-30 15:27:20 -08:00
.CooCoo cb0a23d293 Merge pull request #9052 from dotCooCoo/feat/scripts-api-d6-save-export-open
Scripts: documents save, export and open through Document.saveAs, exportFile and app.open
2026-11-30 14:36:03 -08:00
.CooCoo 38846fcdf3 Merge pull request #10116 from dotCooCoo/feat/edit-points-only
Selection Tools: Edit Points Only narrows a Direct Selection to its anchor points
2026-11-30 14:19:49 -08:00
.CooCoo 0b55e3160a Merge pull request #10085 from dotCooCoo/fix/color-value-finite
Colors: a color with a component too large to store is refused
2026-11-30 14:19:14 -08:00
.CooCoo 462b851eb7 Merge pull request #10257 from dotCooCoo/fix/merge-duplicate-tests
Tests: merge two duplicate engine tests, keeping every assertion
2026-11-30 14:05:18 -08:00
.CooCoo 5c9e3276a8 Merge pull request #10263 from dotCooCoo/fix/engine-tests-into-it
Tests: nine engine integration test files join the tests/it binary
2026-11-30 13:50:42 -08:00
dotCooCoo 8a5f206e3c Merge main into feat/scripts-api-d6-save-export-open 2026-11-30 10:55:42 -08:00
.CooCoo 82108c11bd Merge pull request #9277 from dotCooCoo/feat/scripts-app-select-tool
Scripts: app.selectTool picks a tool
2026-11-30 09:44:47 -08:00
dotCooCoo 680fd47b62 Merge main into feat/edit-points-only 2026-11-30 08:18:53 -08:00
dotCooCoo ed0859d0d0 Scripts: kept-default option enumerations and refusal of non-UTF-8 real paths
The enumerations whose default member an option keeps (OutputFlattening,
CompressionQuality, the PDF color, compression, mark and security enums,
and the SVG encoding, DTD, CSS and font enums) are now defined, so a
script that sets an option to its default no longer throws a
ReferenceError; another member still throws as not available yet.

saveAs, exportFile, app.open and close with SAVECHANGES refuse a path
whose real file name is not valid UTF-8 instead of writing to or opening
a file named with a lossy copy of it.
2026-11-30 07:51:17 -08:00
dotCooCoo 81cc0fc797 Tests: nine engine integration test files join the tests/it binary
blend_render_consistency, direct_handle_mirror, ellipse_drag_anchors,
eraser_open_fill, group3_reference, path_fill_hits, pen_space_handle,
preflight and scissors_snap were each a test binary of their own. They
now are modules of crates/engine/tests/it, with their tests unchanged,
so the engine's tests link nine fewer binaries.

The files that stay separate change process-wide state (installed
plug-ins, Safe Mode, the font database, color settings, the working
directory), are run by name from CI or xtask (the Affinity corpus
tests, script_corpus, import_fuzz), or compile for about a minute on
their own (command_sweep), which would make every edit to tests/it
rebuild it.

Docs that named the old paths name the new ones, and the preflight
command in docs/production-preflight.md runs `--test it preflight::`.
2026-11-30 06:19:13 -08:00
dotCooCoo 13b9e22c4c Tests: merge two duplicate engine tests, keeping every assertion
Two engine tests ran the same inputs as another test and checked them
again with a tighter bound or a second check.

- commands_that_do_not_wait_for_a_tool_edit_change_no_document ran every
  junk case of every non-waiting command on the Single and Multi
  fixtures, which every_command_with_junk_params also runs. The junk
  sweep now compares tool_edit_state before and after each of those
  calls as well as its own panic, interaction and invariant checks. The
  tool-edit test keeps only the cases that turn each option on and off
  (option_cases), which the junk sweep does not send.
- turned_colored_inflate_facets_and_seams_cover_their_edges_once drew
  the same turned Inflate in the same solid fill as one case of
  colored_light_surfaces_match_supersampling_at_internal_facet_edges.
  That case now carries its bound (at most one RGB channel more than 3
  levels off, by no more than 4) and the separate test is removed.

Each merged test fails on a fault that only the removed check caught
before: document.info bumping the revision on a non-object params value
fails every_command_with_junk_params ("document.info "str" [Multi]"),
and solid_surface drawing every facet as a fill and a seam stroke fails
the supersampling test (2 channels off, at most 5).

docs/target-app-parity.md and waits_for_tool_edit's doc comment name
the tests that now hold these checks.
2026-11-30 05:29:35 -08:00
ljkxandClaude Opus 5.5 397cb9a472 Merge remote-tracking branch 'origin/main' into fine-nudge-5258
# Conflicts:
#	crates/engine/src/cmd/object/commands.rs
#	docs/ui-parity.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:58:07 +01:00
dotCooCoo f4c911d4d3 Scripts: open options with an importer, null export options and close checks for files that keep every artboard
- document.open refuses page, cropTo, pages and crop when a named importer reads the file (linkPages
  still uses the built-in reader).
- exportFile with explicit null options throws a TypeError for GIF, PNG8 and TIFF too.
- close(SaveOptions.SAVECHANGES) saves a modern .ai or .ait file and an SVG file with Preserve
  Editing whatever range was remembered; a range the save refuses still refuses.
- The script checker keeps a try statement's catch and finally, and an else after a nested
  do-while, inside the loop body; a line break after a label does not start a new statement; a
  this assignment in a function that hides a global clears the global's saved methods; and
  holder.d['saveAs'] = ... no longer counts as a write to d.
- docs/mcp.md describes which files keep every artboard on close.
2026-11-30 03:36:01 -08:00
dotCooCoo 1b8927db9f Merge main into feat/group-rows 2026-11-29 19:10:04 -08:00
dotCooCoo 3a8b8b8f25 Merge main into feat/scripts-api-d6-save-export-open 2026-11-29 19:06:23 -08:00
dotCooCoo 8a29b0ac66 Merge main into feat/corner-marks 2026-11-29 17:10:09 -08:00
dotCooCoo e969d29387 Merge main into feat/corner-marks 2026-11-29 16:16:11 -08:00
dotCooCoo f11aac5aaa Merge main into feat/match-objects-to-key 2026-11-29 15:00:53 -08:00
dotCooCoo 9693ce96aa Arrange Tools: Group by Row puts each row of the selection in its own group
Object > Plug-ins > Arrange Tools > Group by Row... (addon.arrange.groupRows)
groups the selected top-level objects by the rows their visual bounds share:
an object joins a row when its bounds overlap the row from top to bottom,
and Group By Columns does the same from left to right. Extents that only
touch stay apart, and an object that overlaps two rows joins them into one.
Only objects in the same layer or group and on the same artboard share a
row; an object alone in its row stays as it is. Each new group takes its
frontmost member's place in the stacking order, and the groups and the
objects left alone stay selected. One undo step, none when no row holds two
objects; an unknown direction is refused. At most 20000 objects, sorted
once along the axis.

Group Overlapping Objects and Group by Row share the step that builds the
groups. The dialog has Group By (Rows or Columns) with Preview.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md, ROADMAP.
2026-11-29 14:19:39 -08:00
dotCooCoo b1e9a4cbb3 Merge main into feat/scripts-api-d6-save-export-open
main's Document member list held saveAs and close as members that are not
available yet; this branch's save_open members implement them, so the
merge drops them from that list and keeps main's other entries. The
script host test lists take main's members together with this branch's
open, userInteractionLevel, fullName, path, saved and option classes,
and the heap accounting keeps main's ModuleNamespace arm beside the
FsEntry string arm.
2026-11-29 14:13:21 -08:00
dotCooCoo 314ee3681e Arrange Tools: Mark Bounds of Each draws corner marks or a rectangle on each selected object's bounds
Object > Plug-ins > Arrange Tools > Mark Bounds of Each... runs the new
command addon.arrange.markBounds. For each selected object it draws a
group of four inward L-shaped corner marks (10 pt legs by default, each
at most half the side it runs along) or a rectangle, with no fill and a
red 1 pt stroke by default, on the object's geometric or visual bounds.
Visual bounds count strokes, brush art and effects as drawn.

- Clip groups are measured by their clipping path, other groups by
  their members together. Guides and objects without bounds, such as
  empty groups, are skipped; a selection with nothing to mark is an
  error that makes no undo step.
- The marks go directly above their object, or above the outermost clip
  group or clipping sublayer that holds it, so the mask does not clip
  them. The run is one undo step and selects the marks.
- Out-of-range lengths and weights, unknown styles and bounds, and bad
  colors are errors; defaults apply only to omitted values. At most
  20000 objects are marked at once.
- The dialog has Preview; Length is off unless Draw is Corner Marks.
- vectorcraft-render gains drawn_bounds_with, drawn_bounds with a shared
  symbol cache, so a large selection measures each symbol once.

Docs: docs/mcp.md, ROADMAP.
2026-11-29 12:57:12 -08:00
dotCooCoo fda48b02d0 Merge main into feat/scripts-app-select-tool 2026-11-29 10:25:17 -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
dotCooCoo a5f877e0d1 Merge main into feat/match-objects-to-key 2026-11-29 09:39:05 -08:00
dotCooCoo b19aac26ec Selection Tools: Edit Points Only narrows a Direct Selection to its anchor points
addon.select.editPointsOnly {segmentEnds?} turns the current selection into
one that holds only anchor points, so a move or transform that follows acts
on the points alone. Selected segments leave the selection, and the points
at their ends leave it too unless segmentEnds is true. Paths selected whole
keep every point. A group or compound path selected whole gives way to the
visible, unlocked paths inside it (no Shaper Group originals, and no guide
paths while guides are locked). Type, images, symbols and other objects
without anchor points leave the selection.

Only the selection changes, so there is no undo step. With nothing selected
or nothing left to keep it is an error and the selection stays as it was.
The command is on the plug-in allowed list.

Object > Plug-ins > Selection Tools > Edit Points Only... opens a dialog
with Keep Ends of Selected Segments; it previews the narrowed selection on
the canvas, OK keeps it and Cancel puts the selection back.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-29 09:21:40 -08:00
dotCooCoo 8f1edd0644 Colors: a color with a component too large to store is refused
A color given as {"c": 1e300, ...}, [1e300, 0, 0], {"gray": 1e300}, a Lab
color or a color object with a number past f32::MAX was stored with an
infinite component. paint.setFill, artboard.setProps, swatch.new,
text.create and the other commands that read colors through
cmd::color_value took it.

- color_value refuses a color whose components are not finite, so the
  commands that read a color through it answer an error and change
  nothing.
- An effect's color (Drop Shadow, Inner Glow, Outer Glow, Shift to Color)
  with such a number is refused with "`color` must be a #rrggbb color".
- ui.colorWheel's contrastBackground refuses it as well.

Docs: docs/mcp.md.
2026-11-29 07:11:18 -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 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 0bd735f53d Merge main into feat/scripts-doc-defaults 2026-11-28 23:20:21 -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
dotCooCoo 043650d794 Scripts: tighten save, open and close edge cases
- saveAs picks the encoder from the requested name, so a link to a file of
  another format writes the format the name asks for.
- fullName, path and close(SaveOptions.SAVECHANGES) resolve a relative saved
  path against the working directory.
- close(SAVECHANGES) accepts an artboard range that covers every artboard and
  keeps the document open when the save would drop artboards.
- app.open keeps the requested file name, rejects a file over 128 MiB before
  reading it, applies the requested color space to plug-in imports, and
  rejects PDF options for files that are not PDF content; null PDF options
  keep their defaults.
- Explicit null options throw; assigning the current Document.saved value
  runs no command; Document.path reflects as Folder or string.
- An implicit multi-file save names no refused path in its error.
- The script checker counts SAVECHANGES only on SaveOptions and keeps write
  warnings for receivers that evaluated code can rebind.
2026-11-28 21:21:56 -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
dotCooCoo cac93ca107 Merge main into feat/js-es2015-modules 2026-11-28 20:44:06 -08:00
dotCooCoo f9496f6c59 Merge main into feat/color-wheel-copy-color-as 2026-11-28 19:54:43 -08:00
dotCooCoo ecf193cc06 Merge main into feat/scripts-app-undo-redo
# Conflicts:
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/target-app-parity.md
2026-11-28 19:47:12 -08:00
dotCooCoo 3e2a615aee Merge main into feat/js-es2015-modules 2026-11-28 19:45:10 -08:00
.CooCoo 4f7fe4556e Merge pull request #9005 from dotCooCoo/feat/color-wheel-contrast-lines
Color Wheel: the box and the wheel mark the contrast lines and offer the closest passing color
2026-11-28 19:39:31 -08:00
dotCooCoo 1ad8134791 Merge main into feat/color-wheel-contrast-lines 2026-11-28 19:38:37 -08:00
dotCooCoo 6112616e13 Merge main into feat/scripts-app-undo-redo 2026-11-28 18:30:41 -08:00
.CooCoo dc2c6ff30f Merge pull request #9061 from dotCooCoo/feat/scripts-api-d4b-text-styles
Scripts: character and paragraph styles for scripts
2026-11-28 18:26:11 -08:00