Commit Graph
18983 Commits
Author SHA1 Message Date
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 84335645da Merge pull request #10335 from dotCooCoo/fix/linked-profile-listing
New Document: Manage Profiles reports a linked profile as unusable
2026-11-30 20:23:26 -08:00
.CooCoo 703252de65 Merge pull request #10334 from dotCooCoo/fix/script-run-accounting
Scripts: list rebuilds count against the run, a stop is not masked, bad answers throw at the call
2026-11-30 19:18:27 -08:00
.CooCoo e4da493676 Merge pull request #10344 from dotCooCoo/fix/selection-tool-hides-anchors
Selection: a path selected whole shows its anchors without direction handles
2026-11-30 19:12:54 -08:00
dotCooCoo 0ae5a199b2 Tests: linked-profile tests take main's with_profiles temp root
with_profiles on main returns the TempDir root as a third value, so the
three new listing tests did not compile after the merge. They now keep
their outside files under that root, which removes them on drop.
2026-11-30 19:11:32 -08:00
dotCooCoo f4d82931ea Merge main into fix/linked-profile-listing 2026-11-30 18:52:47 -08:00
dotCooCoo 1e4e7cfbfe Selection: a path selected whole shows its anchors without direction handles
With the Selection tool, a selected path drew the direction handles of
every anchor, so it looked as if Direct Selection were active. The canvas
marks now draw the handles only where a tool drags them: a partial
selection's anchors, a selected segment, and a path selected itself under
a tool that edits anchors. Every other selected path, including the
members of a group or compound path selected whole, shows its anchors
selected with no handles. A lone anchor selected whole is drawn with its
handles retracted.
2026-11-30 18:19:35 -08:00
dotCooCoo 1d6af09cff Scripts: a stop from end when show() fails ends the run
When show() failed (an answer that could not be read, a host call that
threw, or a handler that threw), the dialog's failure function called the
host's end and dropped its result, so an Abort from end did not stop the
run and the script could catch the error and finish. The failure function
now returns that stop, and the answer and call paths end the run with it
before the error reaches the script.
2026-11-30 17:59:40 -08:00
dotCooCoo 26cbcb711e Merge main into fix/menu-dialog-kind-names 2026-11-30 17:54:45 -08:00
dotCooCoo 1662723cae MCP: ui.menuDialog lists the slider keys and Edit Points Only
main now lists the Smooth and Simplify sliders in ui.inspect as dialogs
smoothSlider and simplifySlider, which ui.dialog.set, confirm and cancel
control, and Object › Plug-ins › Selection Tools › Edit Points Only…
opens through ui.menuDialog. The params text of ui.menuDialog,
ui.smoothAuto and ui.simplifyAuto, docs/mcp.md and the menu dialog key
test now say so.
2026-11-30 17:54:45 -08:00
.CooCoo 6b9cd3d462 Merge pull request #10328 from dotCooCoo/fix/script-array-host-collections
Scripts: array methods visit every element of a host collection
2026-11-30 17:31:49 -08:00
.CooCoo e3a265870d Merge pull request #10331 from dotCooCoo/fix/script-tests-check-what-they-name
Tests: script DOM and New Document tests check what they name
2026-11-30 17:05:58 -08:00
.CooCoo ccd1ab5cc0 Merge pull request #10330 from dotCooCoo/fix/new-document-card-tile-flake
Main: resting-card test picked Home screen cards in random node order
2026-11-30 16:55:47 -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
.CooCoo 8292a1cc0e Merge pull request #10325 from dotCooCoo/fix/step-repeat-review-findings
Step and Repeat: the dialog stays on its document, and copies go in at once
2026-11-30 16:26:25 -08:00
dotCooCoo 1ce1d2ccf2 New Document: Manage Profiles reports a linked profile as unusable
file.newProfiles and Manage Profiles checked a profile's file with
is_file, which follows a link. A profile file that was a link to a
document was listed as customized with Edit on, while file.new refuses
to read a link and gives the new document the defaults. A link that
led nowhere, or a folder, was listed as not customized, so Reset was
off and could not remove it, and Edit on a link that led nowhere wrote
the shipped profile where the link pointed.

The profile's file is now looked at without following a link:

- file.newProfiles lists a link or a folder as customized, with
  unusable: "not a plain file".
- Manage Profiles dims that profile's name, says why in its tooltip,
  and turns Edit off. Reset stays on for a link and removes the link,
  not the file it leads to. Reset is off for a folder, and
  file.newProfiles.reset gives an error instead of deleting a folder.
- file.newProfiles.edit gives an error for a link or a folder, and
  creates a missing profile file without following a link put there.

Docs: docs/mcp.md (New Document profiles) and the command help.
2026-11-30 16:07:05 -08:00
dotCooCoo aba076239d Scripts: document that a probed host indexer gives the element
The Array.prototype methods that skip missing elements, such as forEach
and map, read each index of a host collection with one indexer call
that has `true` as a third argument and use its answer as the element.
The docs of the module, HostClass::index and host_index now say that
such a call gives the element itself, or undefined when there is none,
and that reads without the third argument, such as those of join, are
ordinary reads.
2026-11-30 15:55:05 -08:00
dotCooCoo fe89d3f81e Scripts: list rebuilds count against the run, a stop is not masked, bad answers throw at the call
- pageItems, pathItems and textFrames build their list of a document again
  after every edit. The rebuild walked the whole document without counting
  anything against the run, so a loop that edits and reads a collection in a
  large document did unbounded host work. A rebuilt list now counts 16 bytes
  per object (as the selection's list does) against the run's host-call
  allowance, and the path and type lists count the page items they scan.
- An edit's own ordinary error was returned ahead of a stop (an uncatchable
  Abort) from putting back the selection or switching back to the active
  document, so a script could catch it and go on. A stop now comes first.
- An answer to a waiting call that could not be read as a value (nested too
  deep, too many entries) ended the run instead of being thrown at the call.
  It is now thrown there, where the script can catch it, and a ScriptUI dialog
  that waited for the answer stops showing, as when its host call fails.
- The selection cost test also compares the host calls, under the same
  64 KiB limit for both documents.
2026-11-30 15:54:45 -08:00
dotCooCoo c0002dbc09 Merge main into fix/menu-dialog-kind-names 2026-11-30 15:53:46 -08:00
dotCooCoo 0a56d7df9d Tests: script DOM and New Document tests check what they name
- The grid-by-column test now checks each artboard's row and column, so
  RLGridByCol must fill from the rightmost column. It compared only the
  number of distinct rows and columns before, which a left-to-right fill
  also passes.
- The keepEmpty test asserts that keepEmpty false deletes the compound
  path, instead of accepting any state other than an empty compound.
- The addDocument profile test closes the profile document before the
  script reads the profile, so the read goes through the app-folder
  exemption and not through the rule for open documents' files.
- The report-origin test adds authored ReferenceError controls for
  Window and activeDocument, and for BridgeTalk thrown as an error
  object, so a hint list that grows to those names cannot change a
  message the script wrote.
- New Document profile tests, and the temporary folders and files in
  script_dom.rs and script_run.rs, use vectorcraft_testkit::TempDir, so
  a failing assertion no longer leaves process-id folders behind. The
  linked-profile test keeps its link target in the same temporary
  folder.
2026-11-30 15:50:56 -08:00
dotCooCoo e4506377ba Main: the resting-card test checks only the New Document dialog's cards
resting_preset_cards_stand_on_a_tile took the first unselected list item
in the frame's access tree. That tree also holds the Home screen's
document cards behind the dialog, which lie flat by design, and the
update lists nodes in hash-map order, which changes from process to
process. When a Home card came first the test failed, so it failed on
some runs of the full workspace and passed alone.

The test now walks the dialog node's subtree and checks every unselected
card in it, so the result no longer depends on node order.
2026-11-30 15:49:02 -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
dotCooCoo a353ebef69 Scripts: array methods visit every element of a host collection
Array.prototype methods called on a host collection with more than 4,096
elements, such as forEach over a document's page items, visited only the
indices held as properties. A host collection keeps its elements in the
host, so those methods skipped every element. They now visit every
index of an object whose class has an indexer.

Each element read also called the indexer twice, once to test presence
and once to read the value. The methods now read an index of such an
object with one call, the one `k in object` makes, and take its answer as
the element.
2026-11-30 15:22:04 -08:00
.CooCoo 90e08df23f Merge pull request #10312 from dotCooCoo/fix/ui-frame-stability
Menus: a menu opens under its title on a monitor beside a portrait one
2026-11-30 15:02:38 -08:00
dotCooCoo f498c562e2 Merge main into fix/step-repeat-review-findings 2026-11-30 14:51:53 -08:00
dotCooCoo 8bd0b57c57 Step and Repeat: the dialog stays on its document, and copies go in at once
The Step and Repeat dialog now acts only on the document it was opened
on. Its preview no longer runs on another document, and OK is refused
there, or after File > Revert, with the reason shown. Opening the dialog
again rolls back the earlier dialog's preview instead of leaving its
copies on the canvas.

object.stepAndRepeat makes every copy first and inserts them in one
pass, so a large grid walks the document a fixed number of times
instead of once per copy. The stacking order of the copies is
unchanged. A negative margin, and a gap of minus the width or height
or less, are refused instead of being clamped or folding the grid back
on itself.
2026-11-30 14:51:52 -08:00
.CooCoo 639ce5004e Merge pull request #10304 from dotCooCoo/fix/smooth-bridge-says-why
Smooth Bridge: a refusal says why an object is not a circle
2026-11-30 14:39:43 -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 27a91089bf Merge pull request #10092 from dotCooCoo/fix/simplify-smooth-dialog-host
MCP: the Simplify and Smooth sliders show in ui.inspect and answer ui.dialog
2026-11-30 14:19:32 -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
BFlat cf2d168d49 PDF import: inline images with the same dictionary keep their own pixels (#10313)
An inline image has no object of its own, and the interpreter keys an image
by its dictionary alone, so every inline image of one size and encoding got
the key of the first one and was imported with its pixels: Type 3 glyphs drawn
as inline stencil images came in as the wrong letters. An inline raster image
is now keyed by its samples too, and a stencil image by its decoded pixels.

Fixes #9247
2026-12-01 05:05:57 +07:00
.CooCoo f4f42de9d8 Merge pull request #10239 from dotCooCoo/fix/plugins-whole-tree-reads
CI: declare the files each crate reads in other crates, for test selection
2026-11-30 14:05:36 -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 c4673da129 Merge pull request #10256 from dotCooCoo/fix/shrink-slow-test-inputs
Tests: the 3D face-limit and gray-level smoothing tests check the same cases with small inputs
2026-11-30 13:51:34 -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
.CooCoo c0b1a485cc Merge pull request #10285 from dotCooCoo/fix/dimension-alt-measure-outside-stroke
Dimension: Alt whole-path measure takes the outside of the stroke with Use Preview Bounds off too
2026-11-30 13:50:26 -08:00
dotCooCoo 8f8fa4fefa Merge main into fix/smooth-bridge-says-why 2026-11-30 13:42:22 -08:00
.CooCoo cf612892c0 Merge pull request #10192 from dotCooCoo/fix/properties-memo-whole-sections
Properties: the Document sections replay whole, header and body
2026-11-30 13:18:00 -08:00
.CooCoo d30f24eb80 Merge pull request #10309 from dotCooCoo/fix/smooth-bridge-empty-groups
Smooth Bridge: a group the bridged circles leave empty goes
2026-11-30 13:02:35 -08:00
.CooCoo 4097d6f3b3 Merge pull request #10135 from dotCooCoo/fix/menu-keymap-state-key
Menus: a new window keymap sets the panel rows' shortcuts without a rebuild
2026-11-30 12:57:47 -08:00
BFlat 77ed301775 SVG import: refuse an SVG the memory can't hold instead of running out (#10303)
* SVG import: refuse an SVG the memory can't hold instead of running out

The element limit now follows the installed memory, or the process's
cgroup limit where that is lower: about 8 KB an element, up to the
999,999 elements usvg reads. Past it the SVG is refused with an error
naming the memory, before usvg makes its tree.

Fixes #10165

* Tests: the shared element limit test follows the machine's limit
2026-12-01 03:42:59 +07:00
dotCooCoo 58923e0d78 Menus: a menu opens under its title on a monitor beside a portrait one
Moves craft-libs to a5669ed2f, which places overlays in the room of the
monitor the window is on (craft-libs f31beb26d, merged in #4506). The
old room assumed monitors tile the desktop by their size, so on a
landscape monitor to the right of a portrait one the File menu opened
at (726, 442), far from its title, with scroll arrows.

The new pin is craft-libs main just before #4278, whose dialog changes
need VectorCraft test updates that come with a later pin bump.

The new test menu_on_second_monitor opens the File menu with the window
on the landscape monitor at 1x and 1.5x; it fails on the old pin with
the menu at (726, 442).
2026-11-30 12:21:21 -08:00
dotCooCoo 125d17dc3c Merge main into fix/menu-dialog-kind-names 2026-11-30 12:18:04 -08:00
dotCooCoo 1d880065f3 Smooth Bridge: test a selected group of grouped circles
A selected group that holds two groups of one circle each keeps the
group with the outline, and the lower circle's group is removed.
2026-11-30 12:17:05 -08:00
dotCooCoo 96018f6d81 Merge main into fix/smooth-bridge-empty-groups 2026-11-30 12:16:57 -08:00
dotCooCoo 11883d2508 Merge main into fix/smooth-bridge-says-why 2026-11-30 11:53:03 -08:00
dotCooCoo 798a029bfc Smooth Bridge: a group the bridged circles leave empty goes
When outlines replace circles that sit in different groups, the circles
that go left their groups behind with nothing in them. Each group or
compound path left empty now goes in the same undo step, and so does
each group above it left empty in turn; layers and sublayers stay.
2026-11-30 11:44:20 -08:00
.CooCoo 2454563594 Merge pull request #10273 from dotCooCoo/fix/device-lost-swapchain-panic
Graphics: closing the window after a lost device no longer panics
2026-11-30 11:40:42 -08:00