Commit Graph
23685 Commits
Author SHA1 Message Date
dotCooCoo f9679bf92b Overprint Preview: the canvas around the artboards is white, with no artboard shadows
In Overprint Preview, and in Separations Preview, which turns it on, the
canvas outside the artboards was drawn in the pasteboard color. It is now
white, and the artboards draw no drop shadows. Turning the preview off
brings back the pasteboard color and the shadows.

- With a display profile, translucent art around the artboards is blended
  with the white canvas before the conversion, as it is on the paper.
- Artboard names and the ruler origin's crosshair use the dark gray they
  use in Outline. Where the Artboard tool's Fade Region Outside Artboard
  darkens a white canvas, in Overprint Preview and in Outline, the names
  and the crosshair are black.
- Over a white canvas the Artboard tool's names of its selected artboards
  are dark blue instead of the selection blue.
- proof::overprint_preview_on() reads the proof view without copying it,
  since the canvas now asks for it several times a frame.
- The canvas tests that check the pasteboard, the names or the display
  profile's frames hold the proof view while they run, and the tests that
  change it outside the Proof Setup tests take it for writing.
- docs/mcp.md, docs/target-app-parity.md and docs/ui-parity.md describe
  the white canvas.
2026-11-22 06:46:46 -08:00
dotCooCoo faa5e3062c Scripts: .js scripts read optional chains and the ?? operator
With Options::es2015, vectorcraft-js reads and runs two ECMAScript 2020
forms: optional chains (a?.b, a?.[key], f?.(args) and the accesses and
calls after them) and ??.

- An optional step that finds undefined or null ends the whole chain
  with undefined, without evaluating its other keys and arguments.
  Parentheses end a chain. a?.b() and a.b?.() call with a as this,
  (a?.b)() does too, eval?.(code) is an indirect eval, and delete a?.b
  is true when a is undefined or null.
- ?? keeps any left side other than undefined and null.
- ?. before a digit still reads as ? and a number (a?.5:1).
- Mixing ?? with && or || without parentheses, assigning to or updating
  an optional chain, a tagged template after one and new a?.b() are
  syntax errors.

Two new jump instructions test for undefined and null, and the verifier
checks both of their paths. A chain of any length compiles with a loop.
.jsx files and source strings stay ES5.1, where ?. and ?? are syntax
errors.

The test262 ES2015 subset now also reads expressions/optional-chaining
and expressions/coalesce: 426 of 426 negative parse runs and 591 of 615
other runs pass with the option. The 24 failing runs are the same as
before this change.
2026-11-22 06:45:48 -08:00
dotCooCoo 029482d0d7 Scripts: class code, eval and block functions follow the ES2015 rules
- Direct eval in a derived constructor, or in an arrow function inside
  one, reads the constructor's this binding when it runs, so
  eval('this') before super() throws a ReferenceError, and an arrow
  function made by the eval code sees this once super() returns.
- A class's heritage and computed keys run as strict mode code inside
  sloppy code; the code after the class, and a handler of what they
  throw, stay sloppy.
- A super property write that cannot be made throws with
  Realm::set_strict_writes, as other property writes do.
- A labeled function in a block is made when the block is entered and
  declares its name in the block, so { let f; L: function f() {} } is
  a SyntaxError. A block function whose name a function of an
  enclosing block also declares no longer assigns the outer variable.
- Methods reject duplicate parameter names outside strict mode code.
- With a global object that is not extensible, a var that would add a
  property throws a TypeError before the script or the eval code
  declares anything.
- The receiver, arguments and new.target of a call, a strict eval's
  own environment and spread's elements stay reachable while their
  scopes and properties are made, and spread counts the array's new
  properties against the heap limit before it adds them.
- Tagged template strings objects are dropped once nothing but the
  cache holds their code, also for code with several sites.
- A //@ or # directive after a template with a substitution that
  spans lines is read only at the start of a line.
- The code size estimate counts a block scope's entries by their size.
2026-11-22 06:41:35 -08:00
dotCooCoo cd646a9b34 Scripts: a ScriptUI edit field keeps a refused text after it loses the focus
A text longer than 16 KiB that an edit field gives as it loses the
focus now goes back in the field, with the error in the status bar,
instead of being dropped when the next frame draws the script's old
text. The field keeps it until the person changes it.
2026-11-22 06:41:16 -08:00
dotCooCoo f9d7fd23b4 JavaScript: a walked string counts its flattened copy against the heap
In a realm made without the ECMAScript 2015 built-ins and later switched
to ECMAScript 2015 code, `for`-`of`, spread and array patterns walk a
string by code point. The walk flattened a concatenated string before any
limit was checked; it now flattens through the counted helper that
`String.prototype[Symbol.iterator]` uses, so the run ends with the heap
limit before the copy is made. The rope test also covers array patterns
and `for`-`of`, in both kinds of realm.

The crate docs now say that such a realm walks arrays and `arguments`
objects by index and strings by code point.
2026-11-22 06:41:10 -08:00
dotCooCoo 7fb823a462 Scripts: XMP namespaces have length limits and a byte budget
XMPMeta.registerNamespace and packets that declare namespaces could add
up to 4,096 namespaces of any length, held outside the script heap.

- A namespace URI over 1,024 bytes and a prefix over 128 bytes, the
  `_n_` suffix included, throw "the XMP data is too large".
- The registered namespaces hold at most 1 MiB together; a namespace
  past that throws the same error and is not registered.
- Reading a packet takes fuel for the namespaces it copies.
- Error messages hold at most the first 200 characters of a name,
  path, value or namespace the script gave.

Tests: namespace_lengths_and_the_registry_budget_are_bounded,
long_namespaces_from_scripts_and_packets_are_refused and
error_messages_hold_a_bounded_part_of_the_script_text in
crates/js/src/xmp_tests.rs. Docs: docs/mcp.md.
2026-11-22 06:40:13 -08:00
dotCooCoo f1f0911ddb Merge branch feat/js-es2015-symbol-iterators into feat/js-es2015-generators 2026-11-22 06:28:23 -08:00
dotCooCoo 1cecbb9aee Display Print Size: keep the last density, fits and percentages right
- A fit made while a floating window's display has not answered keeps
  counting from the density the window was last shown at, so Actual
  Size and the zoom field no longer fall back to 96 points to an inch
  meanwhile.
- A view that still fits its floating window keeps fitting it after a
  move to a display of another density: the fit kept for the window
  takes the settled zoom.
- The plausible range of a measured display applies to its pixels per
  inch, before the display scale divides them into points. A
  1920 x 1080 display of 527 x 296 mm at scale 4 now measures about
  23 points to an inch instead of falling back to 96, and Actual Size
  takes any finite, positive point density the host measured.
- View > Set Zoom, Zoom In and Zoom Out, the wheel and the Zoom tool
  clear the zoom a fit gave the view, so a percentage that equals the
  last fit's zoom keeps its percentage at the first reading.
- The Actual Size and preference descriptions say that a size no
  display has also counts 96 points to an inch.
2026-11-22 06:25:08 -08:00
dotCooCoo 945d0a42b0 Plug-ins: check every number in the type styles a filter writes
Type a filter returned went to layout with its character and paragraph
styles only parsed, and a style equal to one of the type's runs was not
checked at all, so a filter could set leading of 1e9, 100,000 tab stops,
a scale of 0 or a Kinsoku set the document does not have.

- The ranges the character and paragraph style commands keep each
  attribute to move to CharStyle::check_ranges and
  ParaStyle::check_ranges in vectorcraft-doc (text/attr_ranges.rs).
  charStyle.new, charStyle.edit, charStyle.setAttrs and the paragraph
  style commands call them, and so does the filter write path, for every
  run and paragraph style, including one the type already has.
- A paragraph style's custom Kinsoku set must name one of the
  document's sets, and takes that set's characters.
- The character style commands now also refuse tracking and kerning
  outside -1000 to 10000, rotation outside -360 to 360, a miter limit
  outside 1 to 500, Small Caps outside 1 to 200, negative dash lengths
  and a variable font axis setting that is not a number.

Each refusal names the object and the field, and the document does not
change. Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 06:24:25 -08:00
dotCooCoo 7578da1824 Scripts: screen readers call a ScriptUI control by its visible prompt first
An edit field, list, slider or progress bar with a visible static text
just before it in its container is now named by that text, and by the
name the script gave it only when there is none. Before, a script's
name replaced the visible prompt.
2026-11-22 06:23:48 -08:00
dotCooCoo 452cfe4d4a Brushes: pen-driven pattern tiles follow the scale across a closed path's start
A side tile over a closed path's start was drawn at one scale when the
scale at its ends, its middle and each pen sample within it was the
same, even where the scale recorded at the end of the stroke differed
from the one at its start. Such a tile now also needs the same scale at
the stroke's start and end before it is drawn at one scale.

A start or end tile no longer takes the length the scale gives at its
first length's middle when that length matches. The search over the
lengths up to the run now runs whenever the scale follows the pen, so a
tile that fits at a shorter length is placed there.
2026-11-22 06:20:09 -08:00
dotCooCoo 51565e30cc Merge branch feat/js-es2015-symbol-iterators into feat/js-es2015-for-of-destructuring
# Conflicts:
#	crates/js/src/lib.rs
#	docs/target-app-parity.md
2026-11-22 06:18:50 -08:00
dotCooCoo 3d75d9edcc Merge branch feat/js-es2015-block-arrow-template into feat/js-es2015-for-of-destructuring
# Conflicts:
#	crates/js/src/interp.rs
2026-11-22 06:17:48 -08:00
dotCooCoo 3a00d4a73a Scripts: show startup scripts that cannot start when a launch or chosen run begins
script.startup.run returns the startup scripts that could not start before the first run did, such as a file larger than 8 MiB, in its reply's failed list. The launch and the File > Scripts runs now show each one in the status bar as name: error, so a launch where every startup script fails to start no longer shows nothing.
2026-11-22 06:15:57 -08:00
dotCooCoo 4f73ef7fbb Images: Overprint Fill makes a colorized image's color overprint
A grayscale or 1-bit image colorized with a fill color had no way to
overprint: object.setOverprint {fill: true} changed nothing, since an
image has no fill row. The color now carries its own overprint flag
(colorize_overprint in native files).

- object.setOverprint (fill, without item) and attributes.info set and
  read it; Overprint Black and Print Ink Fixes' Remove White Overprint
  treat the color as the image's fill.
- Overprint Preview, Separations Preview and printed separations show
  the inks below the image where its color has none; on a plate the
  color puts no ink on, the image is left out.
- PDF export draws the image in an overprinting graphics state, a
  process color as an image of only the process inks it puts down.
- EPS export turns overprinting on for it, and now leaves white fills,
  strokes and colorized images knocking out with Discard White
  Overprint, as PDF export does.
- A legacy .ai file writes it as the image mask's fill overprint and
  reads it back. Warped pieces, geometry-effect copies and flattening
  keep or drop it as they do for fills.
- A white spot color is an ink: with Discard White Overprint it keeps
  overprinting in PDF and EPS export and in both previews.

Docs: docs/mcp.md (Overprint, Print Ink Fixes), docs/target-app-parity.md.
2026-11-22 06:15:41 -08:00
dotCooCoo 8cc1bc8530 Scripts: ExternalObject loads the XMP objects XMPMeta, XMPFile and XMPConst
new ExternalObject("lib:AdobeXMPScript") defines XMPMeta, XMPFile and
XMPConst in the script engine; any other library name throws and no
native library is loaded.

- XMPMeta reads a packet string and serializes one, with or without the
  packet wrapper: simple properties, arrays of simple items, language
  alternatives and namespace registration and lookup. Structures and
  values with qualifiers are kept as they were written.
- XMPFile reads and writes only where File may. A .xmp sidecar opened
  for update takes putXMP, and closeFile writes it through a temporary
  file in the same folder when the script may write there; other files
  are scanned for their packet and are read only. File's 8 MiB limit
  applies before reading.
- Packets are parsed with craft-xml: a document type declaration, an
  undefined entity, nesting over 64 levels and a packet over 8 MiB are
  refused with an error.
- Members not built yet (iterators, structure fields, qualifiers,
  aliases, sorting, byte-array packets, XMPFile.getFormatInfo) throw
  that they are not available yet.

The XMPConst flag values follow the public XMP Toolkit SDK header
XMP_Const.h. Tests: crates/js/src/xmp_tests.rs, with fuzz cases for the
packet parser and scanner, and crates/engine/src/tests/script_xmp.rs.
Docs: docs/mcp.md and docs/target-app-parity.md.
2026-11-22 06:11:31 -08:00
dotCooCoo d1ba7d4f02 Scripts: ui.dialog.cancel returns the error of a refused typed text
ui.dialog.cancel, and ui.dialog.set with action cancel, now return the
error when a ScriptUI dialog holds a typed text longer than 16 KiB, as
ui.dialog.confirm does. The dialog stays open with every field as it
was. Escape still shows the error in the status bar.
2026-11-22 06:08:12 -08:00
centyandClaude Fable 5.2 b40ea27592 Put a left-out image's filters back before skipping its data; test the measuring charge
materialize now empties a file whose decode failed, so the reduced image that is
left out restores its pending filters for skip_data. The new test runs an image
over 300 MB of compressed zeros from a reusable stream in a loop until the
operation budget ends.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 09:04:25 -05:00
dotCooCoo 0d4780e33c Export: GIF and PNG-8 take the Transparency Dither settings
document.export reads transparencyDither (none, diffusion, pattern or
noise) and transparencyDitherAmount (0 to 100) for GIF and PNG-8 with
the same ids as Save for Web, and refuses an unknown method or an
amount outside 0 to 100. Other formats do not read the keys, and the
warnings name them as not used.

GIF and PNG-8 Options show Transparency Dither and, for Diffusion, its
Amount, disabled while Transparency is off.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-22 06:03:49 -08:00
dotCooCoo 1bf1001a90 JavaScript: for-of loops and destructuring in ES2015 realms
With Options::es2015, vectorcraft-js reads and runs for-of loops and
array and object destructuring (ECMA-262 11th edition, sections 13.7.5,
12.15.5 and 13.3.3) in var, let and const declarations, assignments,
function and arrow parameters and catch clauses, with defaults, holes
and rest elements. Object literals take shorthand and computed names.

for-of, spread and array patterns use the iterator protocol and call
the iterator's return method when a loop or pattern stops early.
Destructuring undefined or null throws a TypeError. Object rest
properties (ECMAScript 2018) stay syntax errors. A realm switched to
ES2015 without Symbol.iterator walks arrays, arguments objects and
strings by index.

Each step takes fuel, a rest element or spread reserves the whole size
of each new element against the heap limit, and nested patterns count
against Options::max_depth. The test262 runner reads the for-of and
dstr folders: 609 of 617 runs pass (529 before).
2026-11-22 06:03:10 -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 b6bb1329cd New Document: choosing the selected Grid by Column keeps a preset's rows
Clicking the layout that is already selected removed the rows of a preset
made with file.new's rows and kept only the columns they showed, so Create
put a different number of artboards in each column. With five artboards
and rows 4, the first column got three artboards instead of four. A
different layout or a new column count still replaces the rows.
2026-11-22 05:58:20 -08:00
dotCooCoo b7f2eacc6a Canvas: a click pressed and released in one frame ends with its release's modifiers
A press whose release came in the same frame started the gesture and
left the release for the next frame, which read that frame's modifiers,
Space and position. Alt pressed before the release and let go after it
in the frame then opened the Rectangle dialog without centering the
shape on the click.

The press now ends the gesture in its own frame, through the same
release path a held drag takes, with the modifiers, Space and position
of the button-up.
2026-11-22 05:58:13 -08:00
dotCooCoo 8dbb3c3f72 Brushes: a pen-driven pattern tile checks only the pen samples within it
The check for whether a pattern tile's scale is the same along all of
it looked at every recorded pen sample on the track for each tile, so a
long stroke with many samples and small tiles took work in proportion
to the tiles times the samples. The samples are kept in order, and each
tile looks up only the ones within its span.
2026-11-22 05:53:10 -08:00
dotCooCoo cbfc785886 Plug-ins: a slider drag previews only in its own interaction
- A drag on a plug-in parameter's slider in the Appearance panel notes
  the interaction it begins and previews and keeps values only in that
  one. An interaction that was open before the drag, or that replaced the
  drag's own while its row stays in view, is left as it is.
- The slider is a widget of its own for each document and selection, so
  a release in the same pass as a change of selection does not reach the
  objects selected now. The objects the drag began on keep its last
  preview as one undo step.
- A switch to another document during the drag keeps what it previewed
  as one undo step in the document it began in, instead of canceling it
  (Session::keep_interaction_on_switch).
2026-11-22 05:49:55 -08:00
dotCooCoo 5f2649aa63 Tests: the filter shortcut test no longer sees plug-ins another test installs
Installed plug-ins are process-wide, and the shortcut test
each_filter_plugin_takes_a_shortcut_of_its_own and the palette test
filter_plugins_with_one_name_show_their_ids both install two filter
plug-ins named Same Name. When the two ran at the same time, the
shortcut test counted 4 Same Name lines in the exported shortcuts
instead of its own 2, and its own row took an id suffix.

The tests that install filter plug-ins under a shared name, or that
check how plug-ins sharing a name are told apart, now hold one test
lock (SHARED_PLUGIN_NAMES in the ui-egui test module) while their
plug-ins are installed: the shortcut test and both palette tests
(each_filter_plugin_is_a_result_of_its_own checks the exact labels of
two filters named Group).

Running the two tests together with --test-threads=8, 50 times on
Linux: 0 of 50 passed before, 50 of 50 after.
2026-11-22 05:49:11 -08:00
dotCooCoo c85f3ebb5a Scripts: keep a stopped startup script's report and refuse a chosen script that cannot start
- A chosen script that script.run would refuse (a missing file, one larger
  than 8 MiB, bad parameters) ends script.startup.run with script.run's
  error before any startup script runs.
- When a queued run ends, the next one starts at the following pump, so
  the ended run's report stays for the status bar. The queue counts as a
  running script, so other runs and edits stay refused in that gap, and
  Stop asked for in it stops the run that starts next.
- Queued runs that could not start show in the status bar in the same
  frame, and the reply's failed list is not shown there again.
2026-11-22 05:48:51 -08:00
dotCooCoo e79aa9836a Docs: linked image crosses above the outline point limit
The progress-doc entry now says that above the 100,000-point overlay
limit, counting 4 points for each linked image's or placed document's
lines, both the current pane and other panes draw one rectangle around
the selection instead of outlines and crossing lines.
2026-11-22 05:45:22 -08:00
centyandClaude Fable 5.2 e53a643c86 Reflect by two clicks passes its drag to solve as a SolveDrag
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 08:42:40 -05:00
dotCooCoo 02ebfb7b8e Plug-ins: a run that changes nothing records no undo step
A filter run, a plug-in command, or a run that calls commands applied its
output through Session::edit, which records an undo step and marks the
document modified even when the output changes nothing. The output is now
applied to a copy first, as colorcmds::edit_if_changed does: only a copy
whose objects or kept documentData differ becomes the document, as one undo
step. Otherwise the document, its undo history and its saved state stay as
they were, and the run's objects are still selected.

Docs: params text of plugin.run and plug-in commands, docs/plugins.md,
docs/mcp.md, docs/target-app-parity.md.
2026-11-22 05:40:50 -08:00
dotCooCoo 479202931b Brushes: pen-driven pattern start and end tiles fit where the scale falls back
A start or end tile whose scale follows the pen was left out when it did
not fit at the length the scale at the middle of the whole run gives,
even where a shorter length fits because the scale rises and falls along
the stroke. The length is now the shortest one up to the run's length
that is as long as the scale at its own middle: evenly spaced lengths
and the lengths whose middle falls on a recorded pen sample are tried in
order, and the range where the tile starts to fit is halved.

On a closed path, a point before the path's start now takes the scale
recorded where Track::frame draws it, near the end of the stroke, as a
point past the end already did. A tile that Approximate Path starts
before the start took the scale at the start before.
2026-11-22 05:40:48 -08:00
dotCooCoo 9eaacbbaf9 Scripts: a refused typed text keeps the ScriptUI dialog's fields, and quitting forgets an ended show()
- OK, Cancel, Escape, ui.dialog.confirm and ui.dialog.cancel now check every
  text still typed in the dialog's edit fields before giving the script
  any event. When one is longer than 16 KiB, every field keeps its text,
  nothing is queued, and the click or cancel returns an error (Escape and
  the dialog's own buttons show it in the status bar). A disabled or
  hidden field keeps its typed text and is not sent.
- The quit question forgets the ScriptUI dialog it was asked over once
  the run has gone on to a different show(), so Cancel does not show the
  old dialog again.
2026-11-22 05:37:55 -08:00
dotCooCoo d4ca49b7c6 Tests: linked image crosses on distorted images, key, hover, Hide Edges
The selection marks test now also checks a distorted linked image and a
turned or distorted embedded image, the key object's outline alone and
the hover highlight, each along the image's frame and without lines
across it. A new test checks that the first canvas frame after View >
Hide Edges draws nothing in the layer's color for a selected linked
image. The render check comment uses American spelling.
2026-11-22 05:21:36 -08:00
dotCooCoo 3de7547b2a Clean Up: remove hairline slivers thinner than a set width
Object > Path > Clean Up gets a Hairline Slivers option, off by default,
with a Sliver Width (0.001 to 3 pt, 0.03 mm by default). It removes
closed paths and compound paths with a visible fill, no visible stroke
and no effect when no circle that wide fits anywhere inside their fill:
shapes that
look like single lines in Outline view but have almost no area.
Select > Object > Hairline Slivers... selects the objects Clean Up would
remove, only inside the isolated group while one is isolated.

- vectorcraft-pathops: thinner_than measures the largest circle that
  fits in a fill. Bounds, the area against the outline length, and the
  width of the convex hull settle most shapes; the rest go through a
  cell search on the path's edges and then on the resolved outline.
  thinner_than_within takes the search's work from a budget, and one
  budget covers a whole document, so a run over thousands of shapes
  ends in bounded time.
- Shapes too complex to measure, and shapes still unmeasured when the
  budget runs out, are kept, and the reply's warning counts them.
- A compound path is measured as one fill. Hidden, locked and template
  objects, art on locked artboards, guides, the clipping paths of groups
  and layers, and the members of live and generated art are left alone.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-22 05:17:47 -08:00
Terra854 a9a0aad34f deps: scope EPS prefix update to the stream codec stack 2026-11-22 21:08:36 +08:00
dotCooCoo 1a48bd827b Display Print Size: a fit made during a reading counts from the last one
A fit made in the main window while its display was being read counted
from 96 points to an inch until the reading arrived, so the zoom field,
the tab title and the zoom stops counted from a different density than
the window's other views. The fit now counts from the last reading, and
the reading, when it comes, keeps the fit's zoom, also when the views are
settled again before it arrives.

An app that draws no frames now still reads the displays again a minute
after the last reading: it asks for a frame then.

Tests now cover Actual Size after a fit that gave the same zoom, a
Navigator thumbnail click, and a floating OS window's display readings
(first display, a move, off every display, a fit, and docking back).
docs/mcp.md now states which views keep their zoom at the first reading,
that X11 and Wayland are read on Linux only, that headless sessions and
the CLI count 96 points to an inch, and that the preference also applies
in Pixel Preview. The progress line names the two rules that differ from
the help page.
2026-11-22 04:54:25 -08:00
dotCooCoo d1c35436f7 Merge main into fix/overprint-preview-canvas 2026-11-22 04:44:01 -08:00
dotCooCoo 57be8ca36f Plug-ins: a command's manifest can place it in another menu
At plug-in API level 2 a command may give `menu`: `{"path": [...],
"after"?: label}`. The menus list it in that menu, right after the
built-in item `after` names (either label of an item that switches
between two), or at the end of the menu, with the plug-in's name in
parentheses after its label. Keyboard Shortcuts, the command palette
and `command_list` list it under that menu, and `plugin.list` gives its
`menu` with `after` escaped.

A manifest may name 14 menus of Edit, Object, Type, Select, Effect and
View. File, Window, Help, the application menu and the submenus that
list files, fonts, panels or plug-ins are refused when the module is
installed, as is any other `menu`, an `after` that is not 1-64
printable characters and a repeated `menu`. A command whose label with
the plug-in's name reads like a built-in item or submenu of that menu,
or like a command a plug-in with a lower id places there, stays in its
plug-in's submenu, and `plugin.list` and `plugin.inspect` mark it
`placed: false`. The desktop app and `vectorcraft-cli` give the same
result. Commands of several plug-ins at one spot are listed in plug-in
id order and then manifest order. A plug-in whose commands are all
placed elsewhere is a single item in Object › Plug-ins. At API level 1
the key is ignored, repeated or not.
2026-11-22 04:38:27 -08:00
dotCooCoo 4011ab760b Plug-ins: test modules with no initial pages or a module name build
wat::module and wat::sectioned give a module at least one page of
initial memory, so the first vc_alloc block does not start at 0, which
the host refuses. wat::with_field adds its field after a module's $name
when the module has one, so a named module stays valid WebAssembly text.
2026-11-22 04:25:26 -08:00
dotCooCoo cfb9f82568 Place: PDF bytes without a .pdf name take the PDF Text preference
The PDF Text preference decided whether a place was a PDF by the
extension of its path or name, so a file.place with dataBase64 and no
name, or a name with another extension, kept its type editable with
Outlines set. file.place reads such bytes as a PDF by their content.

Bytes now count as a PDF when they start with %PDF, as file.place
detects them; only the first bytes are decoded for the check. A .ai or
.ait name is still placed as the file says, and a path is still checked
by its extension. A test covers unnamed bytes, another extension and a
.ai name.
2026-11-22 04:14:26 -08:00
dotCooCoo 4528614324 Canvas: a still release sends the tool its changed modifiers and Space
A tool drag released without moving since its last frame sent only the
up, so Shift pressed in the release's frame did not constrain the shape
it committed. The release now also sends a drag when Shift, Alt,
Cmd/Ctrl, Space or Backtick changed since the drag's last frame, as a
held drag does.

Space at the release is now read at the button-up, as the other
modifiers are: Space pressed after the release in the same frame no
longer moves the shape, and a focus loss after the release keeps Space
as it was held.
2026-11-22 04:14:12 -08:00
dotCooCoo 3745b14db4 Scripts: ScriptUI dialogs keep to their limits and steps under reentrant handlers
- A show() that a handler's error ended with steps left in `answers` now
  ends the run and rolls it back, even when the script catches the error.
- A list step's value written as a whole float (1.0) is an item index,
  in `answers` and in ui.dialog.confirm; a fraction is still refused.
- A progress bar's fraction stays finite across the widest range.
- add() checks the control and item counts again after the getters and
  conversions it runs, refuses an initial item array longer than the
  items left before reading it, and counts a new list's items only once
  the list is added.
- show() keeps the values a getter gives while their properties are
  read, and reads the dialog again when a getter changes a list after
  it was read; a list that changes again throws an Error.
- A click or close from ui.dialog.confirm gives the text still typed in
  the dialog's fields first.
- Quitting while a handler runs keeps the dialog and its queued events,
  so Cancel shows it again with them.
- Screen readers call an edit field without a name by the visible static
  text just before it in its container.
- The dialog's heading follows a title a handler changed while the
  dialog is open.
- A list box gives screen readers a list box node named by its name or
  the static text before it, with the selected item as its value, and a
  drop-down list is named the same way.
- The dialog closes when show() returns, also when the script goes on
  running.
- Enter clicks the default button while the keyboard focus is on a
  control other than an edit field, such as a slider.
2026-11-22 04:00:21 -08:00
dotCooCoo 49d4698c6a 3D: a twisted bevel's smoothed normals follow its curved pieces
With a twist, a band cuts each edge into pieces whose cut corners lie on
the art's curve, but the smoothed mesh normals and the 60 degree crease
test were worked out on straight chords between the edge's corners. On
a curved outline the normals then described quads other than the faces
the mesh holds. The corner rule is now one function, cut_corner, which
curved_band and smoothed_rows both use, so each piece's smoothed normal
comes from the quad that is built. Straight and uncut edges are as
before.

The test a_twisted_round_bevels_smoothed_normals_follow_its_curved_pieces
checks that each smoothed corner of a twisted, rounded bevel on a circle
is the mean of the normals of the two faces that meet there, with and
without perspective.
2026-11-22 03:56:16 -08:00
dotCooCoo 6280006e80 Plug-ins: a slider drag in the Appearance panel stays with its objects
The Appearance panel kept a plug-in slider's drag value under the row's
appearance item, effect index and parameter name only. When the
selection changed while the button was down and the drag ended off the
editor, the value stayed behind: the next object with the same effect,
or the same object selected again, showed it in place of its own. The
drag's interaction also stayed open, since the slider never saw its
release.

The kept value now carries the document and selection it was made for
and the UI pass that last drew its row, and it is dropped when either
changes or a pass does not draw the row. A drag that a pass did not
draw (its row or the panel closed), or that ended with no value to
keep, keeps what it previewed as one undo step and ends its
interaction. The app checks this at the end of every pass, after the
panels, as it does for the 3D panel's drags. Any other interaction is
left open.

The inline slider test now ends its drag on a value the canvas had not
previewed yet, and checks that the drag keeps that exact value.
2026-11-22 03:43:49 -08:00
dotCooCoo d261130741 i18n: translate the 64 MB style file limit in every complete catalog
The error for a styles file over the load limit reads "the file is larger
than 64 MB". Most complete catalogs translate it through their
`the file is larger than {_1} MB` row; ca, el, fi, id and vi have no such
row, so each gets an exact row next to its 1 MB one. A test checks the
message in every complete-message language.
2026-11-22 03:42:21 -08:00
dotCooCoo 9c636b9036 Scripts: a character style applied to an empty frame styles text set later
CharacterStyle.applyTo returned early on any empty range, so on an empty
text frame it never reached charStyle.apply, which restyles the stored
runs of empty text. It now passes an empty frame through and keeps the
no-op only for an empty range inside text.
2026-11-22 03:42:21 -08:00
dotCooCoo 8e23d74985 Scripts: textFrames.removeAll() refuses type on a locked artboard
textFrames.removeAll() now stops with the same error as pageItems.removeAll()
and PageItem.remove() when a type object sits on a locked artboard, and
deletes nothing.
2026-11-22 03:42:20 -08:00
dotCooCoo 86eed6b47d Selection: a selected linked image is crossed from corner to corner
A selected linked image or placed document now shows two lines in its
layer's color from corner to corner of its frame, in the current pane
and in other panes of the same document. A selected embedded image
shows its outline alone. An image is outlined along its frame, so a
turned or distorted image's outline follows its corners. The lines are
selection marks: View > Hide Edges hides them, the hover highlight
does not draw them, and output is unchanged. The overlay's point
limit counts their ends where they are drawn.

Fixes #9080
2026-11-22 03:41:21 -08:00
dotCooCoo 341f764458 Scripts: editable is false on a locked artboard, page item lists kept for several documents
- PageItem.editable is false for art on a locked artboard, as remove()
  refuses it. A group on a locked artboard is measured once for all its
  members.
- The lists of page items are kept for the last four documents read, so
  a script that reads two documents in turn does not walk each one again
  on every index.
2026-11-22 03:26:18 -08:00
dotCooCoo f8bbfae755 Plug-ins: a stored file whose read fails gives back its share of the store's bytes
- crates/engine/src/store.rs: each stored plug-in's load reports how
  much of its file it read. What a failed read did not read goes back to
  the 512 MiB the stored plug-ins may read together, on every platform;
  the permission check before the loads is removed. A file that what is
  left does not cover, but would if earlier reads failed, waits until
  those reads are done, so the files still install in file-name order.
  Disabled files and file stamps are taken once, when the store is
  listed. A file's content is compared with its loaded module at install
  only when the file was modified less than 2 s before the store was
  listed; the clock is read only when a file was listed. A grant the load
  removed goes back for a later file with the same id only when the
  grants file has no entry for the id, and each install turn reads the
  grants file once. At quit, a stored load takes no locks and a folder
  load does not wait for the store's turn or for another window that is
  changing the plug-ins.
- crates/engine/src/cmd/plugin.rs and crates/plugins/src/registry.rs:
  when a folder load turns off the file of a plug-in disabled by its id,
  the disabled list is saved in the same install turn, not only when the
  load ends. A change made in another window while the folder is being
  listed is one the load does not undo.
- crates/ui-egui: an export and File > Open install the plug-ins still
  loading before they look up the formats, and a control request waiting
  for the loads no longer asks for a frame of its own.
- crates/engine/src/file_access.rs: `ScopeHandle::capture` is as on
  `main` again. The new `ScopeHandle::capture_now` keeps the process's
  automation roots in force at capture time, and only the Additional
  Plug-ins Folder's per-file check uses it.
- New tests: a stored file replaced with one of the same length and
  modified time while it loaded is skipped; another window's
  `plugin.list` reports a folder still loading as loading; a grant given
  elsewhere after the load removed one is kept.
- docs/plugins.md: a module whose read and load take 10 s or longer is
  skipped also when it would have finished later, and at quit the app
  waits for the modules already loading, for at most 10 s. File > Open
  waits for the loads. The Loading
  paragraph and the docs/mcp.md lines are rewrapped.
2026-11-22 03:25:30 -08:00