Commit Graph
21712 Commits
Author SHA1 Message Date
dotCooCoo f7b7ca5f86 Recolor with Preset: ask whether to limit colors to a swatch library first
Edit > Edit Colors > Recolor with Preset (1, 2 and 3 Color Job, Color
Library) now opens a Recolor with Preset dialog with a Limit to Library
menu (None, Document Swatches or a library) before Recolor Artwork
opens; OK opens Recolor Artwork with the preset's colors and that
library, and Cancel opens nothing. The menu items run
ui.recolorDialog {preset: true}.

A 1 Color Job limited to the document's swatches, with a spot or global
ink picked for its row, gives gray art tints of that ink linked to its
swatch, so editing the swatch recolors the art.

Opening either dialog over another dialog now ends that dialog as
Cancel does, so a Recolor Artwork preview is rolled back.
2026-11-22 06:47:42 -08:00
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 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 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
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 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 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 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
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 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 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
dotCooCoo 35ee5de2d4 Place: an empty password counts as none, as file.place reads it
file.place reads an empty password as no password, but the PDF Text
preference treated one as given: a PDF placed from a path with Link on
and password "" got textAs outlines and was embedded instead of linked.
With Show Import Options off, an encrypted PDF placed with an empty
password was not asked for its password and the place failed.

Both checks now use the same test as the engine and the dialog's own
password field. Tests cover the linked place with an empty password and
the password prompt for an encrypted PDF.
2026-11-22 03:24:32 -08:00
dotCooCoo 3098776c07 Display Print Size: on by default, each window counts its own display
Preferences › General › Display Print Size at 100% Zoom is now on by
default, also for saved preferences that predate the key; a saved
choice to turn it off stays off.

A document floating in an OS window of its own counts 100% from the
display that shows that window. A move of the main window leaves the
zoom of floating windows alone, and a window that moves to a display of
another density keeps its zoom percentage.

The desktop app lists the displays once a second while the preference
is on and reads their physical sizes on a background thread when the
list changes; the UI thread does not wait for the X11 or Wayland
queries. RandR is asked for its version before the CRTC and output
queries. A reading that fails is tried again after 10 seconds, and the
displays are read again a minute after the last reading, so a display
replaced by one that lists the same gets its own size.

The Navigator's zoom field, slider and thumbnail clicks count the zoom
from Actual Size, as the status bar's zoom field does; before, a click
on the thumbnail with the preference on changed the zoom. ui.inspect
gives screenPpi and printPpi. The preference's description is updated
in every catalog.
2026-11-22 03:24:23 -08:00
dotCooCoo 050ddcb567 Fix #9051: Display Print Size shows 100% at the display's physical size
With Preferences › General › Display Print Size at 100% Zoom on, 100%
took 96 screen points to an inch on every display, so a ruler held to
the screen measured more or less than the document said on any display
of another density. The desktop app now measures the density of the
display that shows the main window from the physical size the system
reports (CGDisplayScreenSize on macOS, the monitor's raw DPI on
Windows, the RandR output's millimeters on X11, the wl_output geometry
on Wayland), and measures it again when the window moves to another
display, where every document window keeps its zoom percentage so the
art keeps its physical size. Actual Size, the zoom field, the zoom
stops and the tab titles count 100% from that density. Where the
system reports no size, or a size no display has (zero, an aspect
ratio given as the size, or axes that disagree), an inch stays 96
points, as on the web.

Zoom stepping takes the density from the app instead of a
process-wide flag, and the last zoom stop in each direction stays in
the zoom range.
2026-11-22 03:22:21 -08:00
centyandClaude Fable 5.2 2de6e34c52 Merge main; charge measuring oversized image data to the operation budget
encoded_len reports the bytes it decoded and stops at what the budget still
pays for; the skip charges them (one operation per 256 bytes). read_rows
charges what it decoded also when the data fails part way.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 06:19:51 -05:00
centyandClaude Fable 5.2 46019f6c17 Merge main
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 06:01:23 -05:00
dotCooCoo 891dc8006d Plug-ins: invisible notices are refused, and batch steps show their notice
A filter's `notice` made only of default-ignorable characters that the
host keeps as they are (U+034F combining grapheme joiner, the Hangul
fillers, variation selectors, invisible operators, tags and the like) was
accepted and showed an empty status message. Such a notice now refuses the
output, as one of only zero-width characters already did. The visible
character must also fall within the part the status bar shows: a notice
whose visible text comes after the 200-character cut is refused instead of
showing only the ellipsis. Text with a visible character keeps these
characters, and its bidirectional ones are still escaped.

A painted live effect that returned `notice` was refused and drew its
input unchanged, while the docs said the key is ignored. The painted
decoder now ignores a top-level `notice` and still refuses any other
unknown top-level key; the message and its catalog rows say so.

A plug-in step of an action or a `command.batch` now shows its notice in
the status bar too; when several steps report one, the last shows. The
run's result carries `pluginName`, the name of the plug-in that ran, next
to `notice`, so the status bar names the right plug-in even when a later
step of the batch removes or replaces it. The `plugin.run` and plug-in
command params text lists the new keys.

Docs: docs/plugins.md, docs/mcp.md.
2026-11-22 02:58:47 -08:00
dotCooCoo 93df144331 JavaScript: keep Symbol keys and converted operands counted while script runs
Object.defineProperties and Object.create now keep the Symbol keys of the
properties object rooted until they are defined, so a getter that deletes
a Symbol-keyed property already read no longer lets a collection drop the
Symbol's description from the heap count.

The + operator and the relational comparisons now keep the first
operand's converted value rooted while the second operand's
@@toPrimitive or valueOf runs, so a fresh Symbol or string from the first
conversion stays counted against the heap limit.
2026-11-22 02:35:00 -08:00
dotCooCoo 80b90c5ebb Quick Pen: a length drag out and back to the same length records no undo step
A length drag that changed the length and then came back to where it
started previewed the path again at its first length, so letting go
recorded an undo step for an unchanged path. A drag that ends at the
length the piece started with is now taken back as Escape takes it
back, on the path being drawn and on a selected path.
2026-11-22 02:07:27 -08:00
dotCooCoo e475181329 JavaScript: Date.prototype[@@toPrimitive] and ToPrimitive fixes in ES2015 realms
In a realm with `Options::es2015`, `Date.prototype[Symbol.toPrimitive]`
converts with `toString` first for the hints "string" and "default" and
with `valueOf` first for "number" (ECMA-262 11th edition, section
20.4.4.45). An object without an `@@toPrimitive` method, a Date whose
own method is `null` or `undefined` included, converts without a hint
with `valueOf` first (section 7.1.1.1), so `d + 1` gives 8 when
`valueOf` returns 7. A realm without the option keeps the ES5 order for
a Date.

`JSON.stringify` converts a Number or String object with ToPrimitive. A
`valueOf` or `toString` deleted from the object's own prototype is now
looked up further along the chain, so `Object.prototype.toString` is
called instead of the stored primitive value being returned.

A Symbol that an object's `@@toPrimitive` method gives as a property
key is rooted while the property is read or incremented, so it and its description
still count against the heap when a getter starts a collection.
2026-11-22 01:56:22 -08:00
dotCooCoo 0397283727 MCP: regenerate the UI catalog for the Corners relative radii
`cargo xtask ui-commands` copies the ui.corners description from
crates/ui-egui/src/menus/ui_commands.rs into crates/mcp/src/ui_catalog.rs,
so the headless MCP catalog now lists relativeRadii and the batch undo step.
2026-11-22 01:50:07 -08:00
dotCooCoo d1eb3f4ad3 Merge main into feat/quick-pen-length-handles 2026-11-22 01:38:35 -08:00
dotCooCoo 47276ca0f2 Quick Pen: the stale-hover tests allow the path's length handles
The two tests that check a stale hover's Smart Guides stay hidden with
Smart Guides off counted every overlay other than the path's points as
a guide. The length handles at the ends of the path being drawn now
show there too, so the tests failed although the guides were hidden.
The shared check accepts a handle and the line to it from the path's
end, and still fails when the tool shows a stale hover's guides.
2026-11-22 01:38:31 -08:00
dotCooCoo c021b269e7 JavaScript: tighten Symbol conversions, lookups and host crossings in ES2015 realms
- A string in `0b` or `0o` form converts to a number in a realm with
  `Options::es2015`, so an array iterator over an object whose length
  is "0b10" visits two elements. Realms without the option still read
  such strings as NaN.
- `JSON.stringify` calls a String or Number object's `@@toPrimitive`
  method before using its stored value, for the value itself, a
  replacer list entry and the `space` argument.
- A host function that returns a Symbol in a realm without the option
  throws a `TypeError`. A Symbol's description is charged to the heap
  before it is built.
- A text function takes a Symbol as `String(symbol)` gives it, and a
  data function refuses an object or array with an enumerable
  Symbol-keyed property; checking the keys takes fuel.
- A Symbol-keyed lookup takes a unit of fuel for each prototype it
  passes, and removing most of an object's Symbol keys releases their
  storage.
2026-11-22 01:24:03 -08:00
dotCooCoo ed50dd06f4 Plug-ins: filters at API level 3 change type, images and symbol instances
A filter's manifest may list `writes`, the kinds among its `inputs` it
may change, at `api` 3 with `doc.write` in `permissions`. Such a filter
returns those objects with the fields it changes: type's runs and
paragraph styles, an image's transform and opacity, an instance's
transform and symbol (one already in the document), and each one's
name. Every value is checked as the input's limits and a path's paints
are; any other changed field, or a value out of range, refuses the run
naming the object and the field, and the document stays as it was.

The changes of one run are one undo step, and an output that changes
nothing records no undo step for any filter. Images are now also given
with their opacity.

Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 01:24:01 -08:00
dotCooCoo 8e3e7239ae Corners: a relative radius is a percentage of each corner's own maximum
With Relative chosen, OK in Corners turned the percentage into a length
from the first picked corner's maximum and sent that one length for every
picked corner. object.setLiveShape then stored it as a fraction of each
corner's own maximum, so corners with a different maximum (a star's points
and its inner corners) were rounded more or less than the percentage shown.

OK now works out the length for each corner from its own maximum. Corners
that get the same length share one object.setLiveShape; when they differ,
the calls run as one command.batch, a single undo step. The ui.corners
params text and docs/mcp.md name the relativeRadii field and the
percentage.
2026-11-22 01:23:05 -08:00
dotCooCoo b88f48fd92 Quick Pen: a segment drag from its selected ends selects the segment
A drag on a segment whose two ends were already selected as anchors kept
that anchor selection, so Delete afterwards removed both anchors instead
of cutting the connection. The drag now keeps the current selection only
when that segment alone is selected; otherwise it selects the segment
with select.segments, as it does from a path selected whole.
2026-11-22 01:19:33 -08:00