Commit Graph
20420 Commits
Author SHA1 Message Date
dotCooCoo 23b6184c5b Recolor with Preset: reject a color group
ui.recolorDialog with preset: true and a group opened the preset dialog
and dropped the group, so OK recolored the art without rewriting the
group. That call is now an error. The params text and
docs/control-protocol.md say so.
2026-11-22 11:31:42 -08:00
dotCooCoo 977e896fd0 Plug-ins: File › Place keeps a named importer and its params for every file
- file.place with `importer` and `params` and `paths`, or with no file,
  opened the Place dialog with only the files, so its OK read them with the
  built-in reader. Each dialog entry now carries the importer and its
  params, from the paths given, the desktop pick and the web pick, and OK
  passes them to file.place and file.place.queue.
- On the web, each picked file carries its own pick's importer and params.
  Picked files with other ones, or that arrive while a Place dialog is open,
  wait for the next dialog.
- The Place dialog does not read the start of a PDF, .ai, EPS or PostScript
  file placed with an importer named to tell whether Link would place it as
  a document.
- A path placed or opened with `importer` named is refused from its size
  before any of it is read. Before, its first 64 KiB were read first.
- docs/plugins.md and docs/mcp.md say when the size check runs, that the
  web's File › Place reads the picked file in the browser, that File ›
  Place's filters leave out extensions a built-in format reads, and that a
  dropped file a built-in format reads goes to that format.
2026-11-22 11:31:23 -08:00
dotCooCoo 1de14d2bdd Display Print Size: a floating window keeps its settled fit while a modal is open
A floating OS window whose view fits it and whose display changed
density while a dialog or other modal was open settled its zoom, but the
window kept the fit from before the change, so the next resize did not
fit the view again. The window now keeps the settled zoom and center as
its fit while a modal blocks it too.
2026-11-22 11:23:44 -08:00
ruchirguitar 2cc47a707e vectorcraft-metafile: format picture.rs 2026-11-23 00:44:19 +05:30
dotCooCoo da5344af2c Recolor with Preset: test that grays of different lightness get different tints
The 1 Color Job test now requires a strictly higher tint on the darker of
two grays for a linked ink, and different colors for a process swatch, so
a flat tint fails it. docs/ui-parity.md gets a Recolor with Preset item
and the M3 row in docs/roadmap.md names the preset flow.
2026-11-22 11:14:02 -08:00
dotCooCoo 185d79b820 Swatch libraries: only a numbered pattern swatch keeps its free library name
A library pattern swatch named after its pattern took the library
swatch's name whenever the document did not use it, even when its
pattern came in under another name. For an unnumbered name this changed
the existing result: adding a library "Tiles" to a document that has
another pattern "Tiles" without a swatch named the swatch "Tiles" while
it paints "Tiles 2". Only a numbered name, which the reservation keeps
for the library swatch, is now kept that way; an unnumbered one is named
after the pattern that comes in, as before.

docs/mcp.md is rewrapped where two lines were broken mid-paragraph, and
the progress line puts the Use Library Item sentence before the rules
that apply only to Add to Swatches.
2026-11-22 11:13:43 -08:00
dotCooCoo 2592dde6c8 Selection: a Cmd double-click after a tool switch is the new tool's
The double-click or triple-click that follows a lent Cmd-click went to
the tool lent to that press even after another tool or document was
chosen. The lent tool is now kept with the document and the tool it was
lent from, and a follow-up in another document or after a tool switch
goes to the active tool.
2026-11-22 11:07:03 -08:00
ruchirguitar edf449c379 chore: update craft-metafile rev to 6d02a9d79 2026-11-23 00:37:02 +05:30
dotCooCoo 2f465a09c3 Docs: ES2015 test262 counts include the tests that do not tokenize
The ES2015 subset now runs the tests whose sources the token reader
rejects, 151 more runs, so the evidence line gives 533 of 708 other runs
and lists the forms that the runs that do not parse use.
2026-11-22 11:03:57 -08:00
ruchirguitar e4df00ed5e Merge origin/main into refactor/metafile-pict-shared 2026-11-23 00:32:03 +05:30
dotCooCoo 6b8c10999d JavaScript: spread and default parameters stay within the heap limit
- Spreading an array checks the room in the result as each element is
  read, so a getter that shrinks an array of length 4294967295 gives the
  elements it reads. An array no getter reads, and any other object, is
  still checked against its length when spread begins.
- Spread counts each element's index name, and each character of a
  string, against the heap as it reads them.
- A function with default or rest parameters checks the heap again before
  its body's environment and declarations are made, since the parameters'
  values may have used the room the call reserved.
- Without the ES2015 option, a function that eval code declares on the
  global object closes over the global scope, so it sees the scripts'
  `let` and `const` names, as functions of global code do.
- With the ES2015 option, a global `var` whose name the global object
  only inherits gets its own property.
- The test262 ES2015 subset runs a test whose source does not tokenize,
  so the error counts as a failure instead of a skip.
2026-11-22 11:00:34 -08:00
dotCooCoo e6cf6a7dbb Docs: a batch forgets its filter only when it changes that same plug-in
docs/plugins.md said a batch step does not count when a later step
installs, removes or reloads any plug-in. The step is dropped only when
a later step installs or removes that same plug-in, or reloads
plug-ins; installing or removing another plug-in keeps it.
2026-11-22 10:51:08 -08:00
dotCooCoo 1596380f23 Merge #9079 into feat/js-es2020-optional-chaining-nullish 2026-11-22 10:48:32 -08:00
dotCooCoo 7bd49975d0 Display Print Size: a zoom set as a percentage keeps it at the first reading
A floating window whose view was given a zoom with View > Zoom (or
view.setZoom) and whose recorded fit matched that zoom counted the zoom
as a fit at its display's first reading, so the percentage changed with
the display's density. Only a view whose zoom is still the zoom a fit
gave it now counts from the reading without a change of zoom.
2026-11-22 10:47:19 -08:00
dotCooCoo cfbb1cdf67 Selection: pie widgets hide while Cmd lends Direct Selection
With a shape tool active and Direct Selection chosen last, Cmd held
lends Direct Selection, which does not press a live ellipse's pie
widgets. The canvas now draws them for a shape tool only while that
tool is the one shown, as the bounding box already does.
2026-11-22 10:40:07 -08:00
ruchirguitar 946f33c878 metafile: address CodeRabbit feedback on truncation warnings, patterns, and region shapes 2026-11-23 00:00:42 +05:30
Dylan M. Taylor bcaeb29737 Merge pull request #9112 from storytold/feat/778-use-shared-metafile-writers
metafile: use shared EMF and WMF writers
2026-11-22 13:16:18 -05:00
dotCooCoo f6bbab4b6e Swatch libraries: swatches a pattern brings skip the library's numbered names
Add to Swatches now passes the clipboard importer the library's numbered
swatch names that a picked pattern's swatches and patterns can come in
under. A swatch or pattern that the import brings under a numbered name
skips those names. This replaces the placeholder and copy swatches that
held the names around the import. Paste and Use Library Item pass none
and number swatches as before.

- A tint or gradient of a numbered library name that the art brings,
  such as a tint "Ink 2" of "Ink", keeps that name. Before, in a
  document with another "Ink", the art's "Ink" came in as "Ink 2", the
  tint as "Ink 2 2", and adding the library's "Ink 2" next added it
  again.
- A swatch of a numbered library name that the document does not use
  comes in under that name instead of as the document's identical copy
  ("Ink 2 2"). A copy of it that the import already brought is not
  reused for another library color of the same paint.
- Of two library swatches with one numbered name, the first one in the
  library keeps the name when the other is a swatch the art brings or a
  pattern swatch.
- A pattern that the art is painted with, and its swatch, skip the
  library's names when they come in numbered. A pattern of a numbered
  name whose library swatch places it otherwise keeps its name, and the
  swatch that comes with it gets another, so adding the library swatch
  next finds its name free.
- A pattern swatch's numbered name skips the library's names, as a
  color's does, and a pattern swatch takes the library swatch's name
  when it is free, also when its pattern is reused.
- A pattern pasted into the document is still found: when skipping the
  names would add the pattern again, or would reuse it only by merging
  colors, an import that does not skip them is used if it reuses the
  pasted pattern and gives none of those names to another swatch.
- The paint and kind check on the colors a pattern's art brings or
  takes has a test: a library whose spot "Ink" shares its name with a
  global "Ink" in a color group, so that the art brings both.

docs/mcp.md is rewrapped and says that a library color is numbered
beside a document color of the same name and paint of another kind
(process, global or spot), not only beside a process color. The params
text of swatch.library.add, docs/mcp.md and the docs/target-app-parity.md
line describe these rules and name their tests.
2026-11-22 10:11:05 -08:00
ruchirguitar e3c874b13f metafile: delegate QuickDraw PICT parsing to craft-metafile
Replaces local pict.rs with craft_metafile::parse_pict, aligning with craft-libs#3073 and AGENTS.md Rule 9.
2026-11-22 23:28:27 +05:30
dotCooCoo c067c20788 Images: colorized image overprint follows every painting effect and gray ink in EPS
- Overprint Preview, Separations Preview and printed separations show a
  colorized image knocking out when it has any visible effect of its own
  that paints colors (a shadow, a glow, a raster effect, a color
  adjustment or a plug-in effect). Only the geometry effects leave it
  overprinting; a test keeps that list equal to the geometry effects of
  the effect catalog.
- EPS export writes an overprinting colorized image in a gray color as
  black ink alone (a DeviceN image at Level 3, a Separation image at
  Level 2), so it keeps the cyan, magenta and yellow below.
- On an EPS separation plate, an overprinting image without the plate's
  ink is left out only while overprints are preserved.
- Reading a legacy .ai file, a colorized image mask takes the fill
  overprint in force, as it takes the fill color: its own O, or the last
  O before it.
2026-11-22 09:38:04 -08:00
dotCooCoo e3d10ec15e Images: colorized image overprint keeps main's white rule and skips painted effects
White now follows the rule main has for white fills: with Discard White
Overprint on, PDF export, the previews and printed separations knock a
white color out, and EPS export turns overprinting on as it does for
fills and strokes. The changes to EPS output for white fills and to white
spot inks are no longer part of this change.

- The previews and printed separations treat an image with a visible
  drop shadow, outer glow or Gaussian blur of its own as knocking out, so
  the effect is not darkened or hidden with the image.
- Legacy .ai reading takes an image mask's fill overprint only from an O
  written after the previous object, not from the path before it.
- A fill of None, which takes the color off, also turns its overprint off.
- On a PostScript separation plate, an overprinting image whose color puts
  none of the plate's ink down is left out while a fill or stroke of it
  still draws, and an image that does not overprint as a whole knocks out.
- PDF export writes an overprinting gray color as an image of black ink
  alone, so the other process inks below it stay.
2026-11-22 08:48:09 -08:00
dotCooCoo 23ad161d30 Print: the Fonts setting chooses how PostScript output sends type
The Graphics section's Fonts setting was stored but no print writer read
it: PostScript output always drew type as glyph outlines.

- Subset (the default) defines, in each page's setup, Type 3 fonts drawn
  from the faces' outlines that hold only the glyphs that page shows.
- Complete defines every glyph of each face the job shows once, in the
  job's setup, and fails with an error before writing anything when the
  definitions would take more than 64 MB.
- None sends no font program: each page asks for the printer's copy by
  its PostScript name (%%DocumentNeededResources, %%IncludeResource) and
  names each glyph in an encoding, with a note naming each font.
- Type in a gradient or pattern, color glyphs, glyphs bent along a
  curved path, ruby and, under None, glyphs without names stay outlines.
  So does type in a font whose license forbids embedding, or, under
  Subset, allows only whole embedding, with a warning.
- Only the sheets the print order prints are drawn.
- PDF print still embeds font subsets; None and Complete add a note
  saying so, in the print and its preview.

Docs: docs/mcp.md, the print.setup params text, docs/target-app-parity.md.
2026-11-22 08:40:41 -08:00
dotCooCoo 63143460eb Pathfinder: effects journal every option they use, and Outline follows Precision
- effect.apply with some Pathfinder Options in params journals all three
  options the effect used. The journal entry used to keep only the ones
  given, so a replay took the others from the preferences at that time.
  The journal now merges an object a command resolved with the object
  the call gave, key by key.
- A Pathfinder effect's stored precision that is not a number (true,
  false, "1abc") evaluates and scales as the 0.01 pt default. It used
  to read true as 1 pt, false as the 0.001 pt bound and "1abc" as 1 pt.
  Commands still refuse such a value with an error.
- Outline, the panel operation and the effect, applies Precision. Its
  tolerance for crossings that count as one point, and for coincident
  edges, is multiplied by precision / 0.01, so the default leaves the
  output unchanged.
- Pathfinder Options' precision range is the Pathfinder effects' range
  constant rather than a copy of it.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 08:32:24 -08:00
dotCooCoo c1f1b662c8 Plug-ins: every filter step of a batch keeps its parameters
A batch that ran several filters remembered only the last one, so the
earlier filters' dialogs opened with older parameters or their defaults.
Each plugin.run step of a command.batch or Action Batch is now noted in
the order it ran: the last one stays the filter Apply Last Filter runs,
and a filter that ran twice keeps its newer parameters.

A later install, removal or reload drops a filter's parameters only when
it may have changed that filter: a removal of its id, an install that
reports its id (or whose result is unknown), or a reload. Installing
another plug-in later in the batch keeps them.
2026-11-22 08:23:20 -08:00
dotCooCoo 15fefc9930 JavaScript: block functions, spread and global declarations follow ECMAScript 2015
- A block function whose name a function of an enclosing block declares is
  not assigned to the variable of that name.
- A labelled function in a block is made when the block is entered, and the
  parser checks it against the `let` and `const` names of its statement list.
- A function standing alone as an `if` branch gets a block of its own.
- Spread reads a `String` object by code point, and reads an array's length
  again before each element.
- A `var` or function declared on the global object stops a later `let` or
  `const` of its name until its property is deleted, and a `var` the global
  object cannot take is a `TypeError` before anything is declared.
- A call keeps its callee, receiver and arguments reachable until its frame
  holds them, and global and eval code keep their environment and their heap
  charge until their frame is pushed.
- Template objects are released when no code that can run holds their sites,
  even when one code has several sites.
- `Realm::set_es2015` during a run applies once the run ends.
- A template piece that spans lines does not let a preprocessor line start
  after it on its last line.
2026-11-22 08:21:30 -08:00
dotCooCoo 100a954317 Images: an overprinting colorized image keeps the inks its color leaves out
- EPS export writes an overprinting colorized image in a CMYK color in
  only the process inks the color puts down: one DeviceN image at
  Level 3, one Separation image per ink at Level 2. A pass turned away
  at the page limit takes back the passes before it, and the encoding
  cache keeps overprinting and plain encodings apart.
- A fill or stroke of a colorized image counts as drawing only with a
  visible Convert to Shape or Outline Object (one shared list with the
  effects crate), so another effect, such as Offset Path, no longer
  keeps the image from overprinting as a whole.
- Flattening without Preserve Overprints, and clearing overprints on
  PDF import and printing, also clear the overprint an image keeps
  after its color is removed, so a color given later knocks out.

Docs: docs/mcp.md (Overprint), docs/target-app-parity.md.
2026-11-22 08:18:56 -08:00
dotCooCoo e2334a2165 Smart Pen: the tool is in the Pen tool's flyout
The Smart Pen Tool joins the Pen group in both shipped toolbars, after
the Quick Pen, and stays in Object › Plug-ins › Smart Pen. The All Tools
drawer lists it once, under Draw, and Edit › Keyboard Shortcuts › Tools
lists it once. It has no default shortcut, and the Pen keeps P. A
toolbar the user already edited keeps its saved layout; Reset Toolbar
adds the tool.

A group torn off the Tools panel's toolbar now shows the tools of the
current layout's group that starts with the same tool, after toolbar
edits, Reset Toolbar, a switch between Basic and Advanced, loading the
preferences and switching workspaces, as groups torn off a toolbar made
with New Toolbar already did. A strip with no such group keeps its
tools.

Part of #8326
2026-11-22 08:16:20 -08:00
Dylan M. Taylor a65bcb99bd metafile: use shared EMF and WMF writers (#778) 2026-11-22 11:05:07 -05:00
dotCooCoo 001e9ec83e JavaScript: the ?? precedence test tells the two groupings apart
`(null ?? 1 | 2)` and `(null ?? 0 ? 'a' : 'b')` give the same result under
either grouping. `(1 ?? 2 | 4)` gives 5 and `(1 ?? 0 ? 'a' : 'b')` gives 1
when `??` binds the wrong way, so the test now fails on a wrong precedence.
2026-11-22 07:59:50 -08:00
dotCooCoo 17c2f43485 Direct Selection: optional preference keeps paths joined when Delete removes anchors
The new General preference Delete Removes Anchor Points and Keeps Paths
Joined (`deleteKeepsPathsJoined`, off by default) is the default of a new
`keepJoined` param of edit.clear (Delete, Backspace, Edit › Clear, and the
Layers panel's Delete button while no row is highlighted). With it on,
Delete removes the direct-selected anchors of each path as Remove Anchor
Points does, refitting the curve around each one, so a closed path stays
closed and an open path stays in one piece. The next anchor along is selected (the one
before at an open path's end), so the next Delete goes on along the path.

- Objects selected whole are deleted and paths with a selected segment
  are cut there, as before, in the same undo step. A path left with fewer
  than two anchors is deleted; a compound path keeps its other members.
  When no changed subpath keeps two anchors, the path stays selected
  whole, as Remove Anchor Points leaves it.
- The value used joins the journal entry, so a replay removes the anchors
  the same way whatever the preference is at the time; a saved step
  without it opens the paths as it did when it was recorded. A keepJoined
  value that is not a boolean is an error, also with ids, where the param
  has no other effect. path.deleteAnchors and Cut are unchanged.
- The Smart Pen does not take the Delete key, so Delete follows the
  preference with it chosen too.
- The label and its description have a row in every catalog.

Without keepJoined and with the preference off, edit.clear gives the same
result as before.

Part of #8326

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-22 07:57:33 -08:00
centyandClaude Fable 5.2 ec674949df Decode an image's source in a helper that puts a left-out image's filters back
decode_image was over clippy's cognitive-complexity limit with the restore inline.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 10:53:21 -05:00
dotCooCoo 38cfc3073e Tests: the Shape Builder's freeform fill keeps its stops without points
The test now gives the tool's freeform fill Lines mode first, so the fill
has a freeform state with no points when its stops are edited. It checks
that the supplied stops and the mode survive the edit and the recolor of
the selected stop. Without the guard that skips recoloring from an empty
point list, the stops edit resets the first stop to white and the test
fails.
2026-11-22 07:28:41 -08:00
dotCooCoo c664ce630b Plug-ins: importers whose manifest sets place also read files for File › Place
An importer plug-in with "place": true in its manifest now reads its files
for File › Place as well as File › Open. file.place, file.place.info and
file.place.queue take importer and params; without importer, a file no
built-in format reads goes to the first placing importer by id that lists
its extension. The importer is given at most 128 MiB of the file (a larger
file is refused from its size before it is read) with _context.mode
"place", and its objects, guides left out, become one group named after
the file, as one undo step, embedded. A decline, invalid output, a trap or
Cancel places nothing.

- The Place dialog lists placing importers' extensions under "All
  placeable files" and in a filter named after each importer.
- On the web, a placing importer's file dropped on the canvas is placed.
- A file placed with a named importer skips the text, PDF, DXF and PSD
  import options.
- document.formats and plugin.list mark placing importers with place:
  true; place on any other kind is refused at install.

Docs: docs/plugins.md, docs/mcp.md, docs/gaps.md, docs/target-app-parity.md.
2026-11-22 07:20:07 -08:00
dotCooCoo 2eef47e7e2 Plug-ins: commands placed after either label of a switching item keep their order
A placed command's spot is now the matched item's own label rather than the
label its `after` names, so commands whose `after` names the two labels of
one Show/Hide item (Show Bounding Box and Hide Bounding Box) share one spot
and keep plug-in id order and then manifest order. The parity line now says
a live effect whose commands are all placed elsewhere is a single item in
Effect › Plug-ins.
2026-11-22 07:10:11 -08:00
dotCooCoo 74d481ef68 JavaScript: strict eval code keeps its own environment through collections
Strict eval code runs in a new declarative environment that no frame holds
until its declarations are made. Making the scope of its let and const names
reserves heap, and a collection there freed that environment, so the new
scope's outer link pointed at a reused slot. The environment is now a root
while the declarations are made, for direct and indirect eval.
2026-11-22 07:08:44 -08:00
dotCooCoo e48b811707 Scripts: an opacity a graph mark already has replaces the one its series keeps
Assigning PageItem.opacity skipped object.setProps when the item already
had that opacity, so a graph mark or label set to the opacity it shows
left the graph keeping the opacity another mark of its series or kind had
set. The setter now leaves the no-op check to object.setProps, as the
command does for that case. A value within the getter's rounding of the
item's opacity sends the opacity the item has, so assigning the opacity a
script read back still changes nothing and adds no undo step.
2026-11-22 07:02:06 -08:00
dotCooCoo 1592cee7a8 Plug-ins: Apply Last Filter and Last Filter… repeat the last filter plug-in
Object › Plug-ins now starts with Apply Last Filter (plugin.applyLastFilter)
and Last Filter… (plugin.lastFilter). Once a filter plug-in's plugin.run
succeeds (its menu item, its dialog's OK, a shortcut, a request, the last
plugin.run step of a command.batch or of an Action Batch that processed a
file or data set, or a background run once its result is applied), Apply
<name> runs it again on the selection with the same parameters, without
its dialog, as one undo step, and <name>… opens its dialog with those
parameters. A filter's own dialog opens with the parameters it last ran
with in the session. Previews, Cancel, failed runs, a plug-in's own
commands and live effects don't count.

Both items are grayed out, and return an error through automation, with
no document open, before a filter ran, once that filter was removed or
installed again, or when its manifest no longer takes the parameters as
they are. The parameters are kept for the session only, for at most 64
filters.

The help page describes the same pair for filters:
https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=357
Where the items sit and when they are grayed out are VectorCraft's own
rules.

Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 06:48:36 -08:00
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 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 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
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 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 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 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
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