Commit Graph
21712 Commits
Author SHA1 Message Date
dotCooCoo 606157cc34 Scripts: XMPFile methods take only XMPFile objects, and x-default updates its matches
- XMPFile's methods refuse an object the XMPFile constructor did not
  make, so a plain object or one made from XMPFile.prototype with
  properties of the same names is not read or written as a file.
- setLocalizedText for x-default also changes the items that had the
  text of the x-default item.

Tests: a_script_cannot_change_the_state_of_an_xmp_file in
crates/engine/src/tests/script_xmp.rs and
localized_text_for_x_default_changes_the_items_that_matched_it in
crates/js/src/xmp_tests.rs.
2026-11-22 11:09:01 -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 72c4875990 Scripts: a script cannot change the state an XMPFile keeps
An XMPFile kept its path, open flags and pending packet in writable,
configurable properties, so a script could assign a packet to a file
opened for reading and closeFile wrote it without checking the update
flag or reading the packet.

- The properties holding an XMPFile's state are not writable,
  enumerable or configurable, and the pending packet is one of them from
  the start.
- The XMPMeta docs say that only the namespaces a packet's names use
  are registered, which is what reading a packet does.

Test: a_script_cannot_change_the_state_of_an_xmp_file in
crates/engine/src/tests/script_xmp.rs. Docs: docs/mcp.md.
2026-11-22 10:44:46 -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 7ce4647ef0 Merge branch feat/js-es2015-block-arrow-template into feat/js-es2015-generators 2026-11-22 08:35:07 -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 e06015b295 Plug-ins: object filters written in JavaScript
An object filter may be a .vcplugin manifest with "runtime": "js" and the
.js file its script key names in the same folder. plugin.install {path},
plugin.inspect, plugin.reload and File > Open read the two together; the
host keeps them as one JSON object (the manifest with the script's text in
source), which plugin.install {dataBase64} also takes and which the grant's
SHA-256 covers.

Each run gets a new interpreter with no file, command or clock access, the
filter's instruction and time budgets, and a heap within the plug-in's
memory cap. run(input, params) returns the output a module returns, checked
the same way, and the document changes as one undo step. Syntax errors,
thrown errors, limits and a missing result name the plug-in and its script,
with the line and column when the interpreter reports them. A manifest
without script, an unsafe script name or a script over 8 MiB is refused
before the script is read.

Docs: docs/plugins.md (JavaScript filters), docs/mcp.md, progress line.
Part of #2193.
2026-11-22 08:26:24 -08:00
dotCooCoo 4a51aa4d48 Scripts: XMP properties in the RDF or XML namespace are refused
setProperty and the other property members took a path in the RDF or
XML namespace, and serialize() wrote a packet that XMPMeta could not
read back. Such a path now throws "... is not a valid property name".

Test: rdf_and_xml_namespaces_hold_no_properties in
crates/js/src/xmp_tests.rs.
2026-11-22 08:24:53 -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
dotCooCoo 30eb12aba3 JavaScript: generator functions, yield and yield* in ES2015 realms
A realm made with Options::es2015 reads function* declarations and
expressions, *name() methods in object literals, yield and yield*, as
ECMA-262 11th edition sections 14.4 and 25.4 define them. A suspended
generator keeps its frame in its object; next, return and throw on
%GeneratorPrototype% push it back on the interpreter's frame stack, so
a resumption takes fuel and counts against the frame limit, and return
runs the finally blocks around the yield. Resuming a running generator
throws a TypeError. yield* passes next, throw and return on to its
iterator and closes one without throw before throwing a TypeError.
%GeneratorFunction% is reached through a generator function's
constructor. Outside generators, sloppy code still reads yield as a
name, and a realm without the option reads function* as a syntax error.

An engine that #targetengine kept from a .jsx run has no generator
built-ins, so a generator function called there throws a TypeError.

cargo xtask test262 runs the generator folders: 509 of 549 runs pass
(94 of 96 before). Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-22 08:15:47 -08:00
dotCooCoo 58dab25cc6 Scripts: a sidecar XMPFile replaces keeps its Unix permission bits
closeFile() writes a sidecar through a new temporary file and renames it
over the sidecar, so a 0600 sidecar became 0644 under a 022 umask. The
temporary file now takes the sidecar's permission bits before the
rename, as File.copy does for its target.

Test: a_replaced_sidecar_keeps_its_permissions (Unix only) in
crates/engine/src/tests/script_xmp.rs.
2026-11-22 08:11:31 -08:00
dotCooCoo d5de4b2f6b Plug-ins: errors for filters that write objects are translated in every complete catalog
The messages a filter's `writes` manifest key and its changed type,
images and symbol instances can give have an `@msg` row in each of the
25 complete-message catalogs. The other new errors use messages the
catalogs already translate: "`{key}` must be a string", "`{key}` must
be an object", and "read-only field 'text' changed" for text changes to
an object that is not type.
2026-11-22 08:09:59 -08:00
dotCooCoo 909c169afe Scripts: queued startup runs keep the file access scope of the request that queued them
In the app, script.startup.run starts only the first queued run inside the request; the later
startup scripts and the chosen script start from the frame loop. Each of them now starts, and its
file is read, in the scope captured when the queue was built, so a confined request's automation
roots apply to every run it queued.
2026-11-22 08:06:13 -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 84acd52710 Scripts: text beside an XMP array keeps the property as written
A property holding text next to its rdf:Bag, rdf:Seq or rdf:Alt was
read as an array of simple items, and serialize() dropped the text.
Such a property is now kept as the XML it was written in.

Test: text_beside_an_array_is_kept in crates/js/src/xmp_tests.rs.
2026-11-22 07:36:05 -08:00
dotCooCoo 438f2a9ba8 Scripts: Promise review fixes for rooting, slices, finally and the combinators
- A promise resolved with itself roots its TypeError before the queue
  reserves room, so a collection there no longer frees the reason.
- A sliced run whose last job ends a slice reports Done in that slice
  instead of Paused, and a pause asked for in a run's last step no longer
  pauses the next run.
- The job queue is replaced at run end, which frees its buffer.
- A reaction job runs a finally callback as its own call, so a slice can
  pause inside it; the callback no longer runs to its end within the
  unbroken-fuel allowance.
- all, allSettled and race read an array to its current length at each
  step, and a string input is flattened through the charged path and
  shared instead of copied.
- The test262 runner checks the expected exception of an async test with
  a runtime negative.
2026-11-22 07:29:09 -08:00
dotCooCoo 81dfbf4078 Scripts: keep startup notes in the status bar when a folder is not read in full
A startup round whose listing of the Startup Scripts folder stopped at a limit or skipped an entry now says that the folder was not read in full, at launch and before a script chosen from File > Scripts. A folder that cannot be read is named before a chosen script too, not only at launch.

The notes of a round (startup scripts that could not start and the two folder notes) no longer replace each other: the status bar shows the first and its hover lists them all. When the round's last run ends they show again, with that run's message in the hover, so a later message does not hide them.
2026-11-22 07:28:58 -08: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
centyandClaude Fable 5.2 494635f932 Format the Reflect solve call
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 10:25:45 -05:00
dotCooCoo b8bf41b7a9 Scripts: an undeclared prefix inside a kept XMP value is malformed
A structure or qualifier whose element or attribute used a prefix that
nothing declared was read and then serialized with the prefix unbound.
Such a packet is now refused as not well-formed XMP.

Test: namespaces_inside_kept_values_are_registered in
crates/js/src/xmp_tests.rs.
2026-11-22 07:20:30 -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 cac32433a9 Scripts: XMP packets register the namespaces inside kept values
A namespace declared only inside a structure, an array of structures or
on a qualifier was not registered when the packet was read, so
XMPMeta.getNamespacePrefix gave undefined for it. Reading a value that
is kept as it was written now registers the namespaces its element and
attribute names use, other than RDF and XML.

Test: namespaces_inside_kept_values_are_registered in
crates/js/src/xmp_tests.rs.
2026-11-22 07:08:10 -08:00
dotCooCoo 68df6224ea Accessibility: Save PDF and Print name every number and length field
Screen readers found six image resolution fields in Save PDF with no
name, and the four bleed fields were not connected to their labels. In
Print, the artboard Range field had no name, Width and Height were both
named Width:, Placement X and Y both Placement:, and Scale W and H both
Scale:.

- save_pdf::number_named and length_named take a name for a field that
  shares its row or has none; number and length keep naming a field by
  its row.
- The resolution fields are named by their group and the word before
  them (Color images to, Color images above), the bleed fields by their
  side, Width and Height by their own labels, and Placement and Scale by
  the row and the axis.
- No visible text changes.

Tests: dialogs::save_pdf::tests and dialogs::tests_print
every_number_and_length_field_is_named_by_its_label.
2026-11-22 07:06:17 -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 e1b15ecea6 Canvas: a click pressed and released in one frame starts where it was pressed
A press and release that come in one frame now start the gesture at the
press's own position, not where the pointer moved after the release in
that frame. With Animated Zoom off, such a Zoom tool click whose pointer
then moves away steps the zoom instead of zooming to the area between the
release and the new hover position, and a drag pressed, moved and released
in one frame zooms to the area dragged across. The Hand, Rotate View and
tool presses start at the press position the same way.
2026-11-22 06:59:03 -08:00
dotCooCoo 1a33ff7326 Scripts: XMP generic-language updates and packets that serialize too deep
- setLocalizedText reads its generic language argument. With no item in
  the specific language and exactly one item in the generic language
  or a variant of it, that item changes, as the XMP Toolkit SDK's
  SetLocalizedText does (XMPCore/source/XMPMeta-GetSet.cpp); with
  several, the specific language is added.
- A packet read from rdf:RDF alone could hold a value nested 64
  elements deep that serialize() then wrote under x:xmpmeta, 65 deep,
  so the written packet did not read back. A value is now measured as
  deep as serialize() writes it, and one past 64 elements throws when
  the packet is read.

Tests: localized_text_updates_a_single_generic_language_item and
deeply_nested_values_read_back_after_serializing in
crates/js/src/xmp_tests.rs. Docs: docs/mcp.md.
2026-11-22 06:54:42 -08:00
dotCooCoo 9fe9ad658a Plug-ins: paragraph styles follow the paragraphs' text when a filter adds or joins paragraphs
Runs written without text.paragraphs that change the paragraph count at
two separate places gave every paragraph between the first and last change
the first one's style. The host now matches the old and new paragraphs by
their text: an unchanged paragraph keeps its style, changed paragraphs take
the styles of those they replace in order, and an added paragraph takes the
style of the one before it (the next one at the start) without a list
number. Past 262,144 compared pairs the paragraphs are paired in order.
2026-11-22 06:51:52 -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