Commit Graph
19723 Commits
Author SHA1 Message Date
dotCooCoo c6d9298540 Merge main into fix/retype-remeasure-budget 2026-11-20 22:30:12 -08:00
dotCooCoo ba0b3d2754 Tests: the inline refresh test's sessions share one created date
refreshing_only_changed_trees_matches_the_full_pass compares the
documents of two sessions. file.new stamps File Info's created date
with the current time, so sessions made in different seconds differed
in metadata.created and the test failed. The file's session() helper
now passes created: 0.
2026-11-20 22:18:48 -08:00
dotCooCoo ae9a11f661 Patterns: pattern and Repeat commands refuse an unknown object id
object.pattern.make, object.pattern.replaceArt and the object.repeat
commands dropped an `ids` entry that names no object and acted on the
other entries alone. They now return "no such object id N" and change
nothing.
2026-11-20 22:16:52 -08:00
dotCooCoo 133a5a4759 Shapes: the Curvature Circle tool reaches its circles again after Deselect
The tool passed over the circles it drew until the undo history moved, the
tool changed or another document became active. Deselect and a pick in the
Layers panel change only the selection, so the drawn circles stayed out of
reach. The tool now forgets them once the selection holds none of them,
after a command run from outside the tool and at the next pointer event.

docs/mcp.md and the tool's module comment name every case that makes the
circles reachable again. The engine's Undo test checks which path the click
hit, and a comment on the set in candidate_paths says the loop skips ids
that are already listed.
2026-11-20 21:54:15 -08:00
dotCooCoo 5adeec1151 Save for Web: a Custom table keeps shifted and locked colors first, and 255 opaque colors beside transparent pixels
- With transparent pixels, a fixed palette's colors mapped to
  transparent share the transparent pixels' slot, so at Colors 256 all
  255 opaque colors keep their entries.
- The preview's mappedToTransparent lists a color mapped to transparent
  that did not fit in the fixed palette when its pixels became
  transparent.
- When Colors leaves a fixed palette fewer slots than it has opaque
  colors, shifted colors keep their slots first, then locked ones, then
  the others in palette order. The file keeps the palette's order.
- quantize::nearest_entries hands each pixel's entry to a callback
  instead of collecting one per pixel.
- A GIF lossy test with one fixed entry of three.

Docs: params text, docs/mcp.md.
2026-11-20 21:51:57 -08:00
dotCooCoo a93cd03c35 Type: text commands refuse a parameter of the wrong type
text.editRange's insert, text.setText's text and text.createInPath's
mode and text must be strings, text.createInPath's at must be two
numbers, and start in text.touchType, text.glyphAlternates and
text.setGlyphAlternate must be a whole number of at least 0. A wrong
value was read as left out (an edit inserting nothing, area type, no
start point) or reported as a missing start; it is now an error naming
the parameter, and the document and undo history do not change. Null
still reads as the parameter left out.

Pathfinder precision no longer reads the leading number of a string
such as "1abc"; a number, a string that is all one number and a length
with a unit ("10 pt") still read.
2026-11-20 21:44:34 -08:00
dotCooCoo 36005d9a02 Appearance: aligned copies go to to when the stacks are the same
`appearance.duplicateItem` with `aligned: true` and `to` was refused for
every selection of two or more objects, so copying a row of a graph's
Legend group to `to` failed even when every label had the same rows. It
now refuses `to` with aligned rows only when the stacks differ, as the
params text says, and the copies land at `to` in each object as one
undo step.
2026-11-20 21:41:47 -08:00
dotCooCoo b919dbd66f Plug-ins: read the manifest from a custom section before running any code
A module may carry its manifest in a `vc_manifest` custom section, with
`"abi": 1` in place of the `vc_abi_version` export. When it does,
Plugin::load parses the manifest from the section and does not
instantiate the module: its start function, data segments,
`vc_abi_version` and `vc_manifest` do not run when it is inspected,
installed or loaded at startup. The host checks the imports against the
manifest's permissions, the exports `memory`, `vc_alloc` and `vc_run`
by type, and the initial memory and the tables against the limits a run
has (at most 4 tables of 100,000 elements). A module with more than one
such section is refused, and so is a section over 64 KiB, before its
contents are decoded, and a manifest in the section without `"abi": 1`.
The host uses the section and does not call a `vc_manifest` export.
Modules without the section load as before.

The Desaturate example carries the section and keeps the export, and
its fixture is rebuilt with Rust 1.100.0. build.sh clears RUSTFLAGS:
.cargo/config.toml sets `+simd128` for wasm32, and the host refuses
SIMD instructions. wat::sectioned builds test plug-ins with the section.
2026-11-20 21:39:33 -08:00
dotCooCoo 999521e391 Scripts: File.hidden can be set and File.createAlias makes a link within the grants
On macOS and Linux, setting `hidden` renames the file or link in its folder with
one leading dot added, or its leading dots taken off. Both the old and the new
name must be places the script may write, and a name of dots alone, a name in
use and a folder are refused. A file the object has open stays open at the new
path.

`createAlias(target)` makes a symbolic link at the object's path to the real
path of a file the script may read. The link's place must be one the script may
write where nothing is, a link that leads nowhere included; the settings folder
is refused for both. When a folder above the link's place is replaced by a link
while the alias is made, the new link is removed and the call fails. `hidden`
reads a link's own name, and setting `hidden`, `rename` and `remove` act on the
link itself.

On Windows both still set `error` and change nothing. `execute` stays
unavailable.

Behavior: https://extendscript.docsforadobe.dev/file-system-access/file-object/
and https://extendscript.docsforadobe.dev/file-system-access/using-file-and-folder-objects/
2026-11-20 21:38:37 -08:00
dotCooCoo e49a0d628c Plug-ins: storage calls pay instructions for the bytes they move
The settings and cache imports could move up to 1 GiB a run while the
instruction budget charged only for the calls themselves. The bytes they
read or write now cost the run one instruction per 64 bytes, counted
over the whole run so that splitting a transfer into calls costs the
same. A get also pays for the bytes it copies into the module's memory
that the store didn't count, such as a setting answered from memory.

A storage call pays from the store's fuel and from the part of the
budget not yet handed out. The meter it gives the storage holds no more
bytes than those instructions pay for, so a read or write the run can't
pay for doesn't happen, and the run ends with "instruction budget". A
read or write past the 1 GiB still returns -7. Bytes beyond the current
slice are read or written only before the deadline and Cancel, and the
host checks the deadline and Cancel after every storage call, so a run
past either stops after the call instead of at the next slice.

The plug-in fuzz test now also makes writes of up to about 1 MiB on
small instruction budgets.

Docs: docs/plugins.md.
2026-11-20 21:38:22 -08:00
dotCooCoo 1346b182cf Merge main into fix/retype-drawn-shape-font-state 2026-11-20 21:34:33 -08:00
dotCooCoo 92c63bb8cf Expand Appearance: Safe Mode skips raster groups inside a blurred group's image
A group or layer whose raster effects are not all shadows and outer
glows (a blur, feather or inner glow) becomes one image of what it
draws, and the groups and layers in it make no images of their own. The
Safe Mode plug-in check still looked into every group with a raster
effect inside it, so a hidden blurred group there holding a plain symbol
instance with a plug-in effect in its art stopped the expansion. The
check now stops at such a group. Under shadows and outer glows the
members still expand on their own, so their groups are still checked.
2026-11-20 21:34:07 -08:00
dotCooCoo a84a398a3f Expand Appearance: Safe Mode skips symbol art in a template layer of a group's image
The image a group's or layer's raster effect makes is drawn with
templates skipped, so it leaves out template layers, guides and ruler
guides with everything in them. The Safe Mode plug-in check still looked
into a template sublayer, so a plain symbol instance there whose symbol
art holds a plug-in effect stopped Expand Appearance of the layer. The
check now skips them as the renderer does.
2026-11-20 21:34:07 -08:00
dotCooCoo 6d264b2890 Expand Appearance: Safe Mode skips symbol art of a hidden instance in a group's image
The image a group's or layer's raster effect makes leaves out hidden
objects and everything in them, as the renderer does. The Safe Mode
plug-in check looked into every object of such a group, so a hidden
plain symbol instance whose symbol art holds a plug-in effect stopped
Expand Appearance of the group. The check now skips hidden objects
inside the group's image. The group itself still counts when it, or a
group around it, is hidden, since expansion still makes its image.
2026-11-20 21:34:07 -08:00
dotCooCoo 17517e93a5 Dimension tool: a level is checked across the whole span of both lines
The span a parallel line is checked across now runs from the lowest to
the highest point of both lines along the dimension. It no longer
depends on which end of the other line comes first, and it has no
one-point floor, so a short line that stays within 0.000001 pt of its
level is a level.
2026-11-20 21:27:59 -08:00
dotCooCoo c7a3b07465 Eyedropper: sampling into a stop of given objects reads their gradient
`paint.sampleColor` with `stop` and objects in `ids` took the stop list
from the gradient behind the proxy: the selection's, or the Live Paint
Bucket's while it was active. With the bucket on a solid color it
refused a valid target, and with another gradient behind the proxy it
copied that gradient's stops onto the given objects.

The stop list now comes from the topmost fill (or stroke) of the first
object `paint.editGradient` edits for those ids (a compound path for
its member, a group's first painted object), whatever tool is active.
Without objects in `ids`, the gradient behind the proxy is used as
before. The params text and docs/mcp.md describe the rule.
2026-11-20 21:26:35 -08:00
dotCooCoo acc07f19d6 Links: Unembed leaves a released or edited clipping mask as it is
Unembed re-applied the clipping path read back from the PNG or TIFF it
had just written, with a path and with a folder. A clipping mask
released in the document came back, and a mask edited in the document
got a clip group of the file's original path nested inside it. The same
held for a distorted image.

Unembed now leaves a clipping mask released, edited or made in the
document as it is. A clip group of the file's own clipping path still
follows the file written, as before.
2026-11-20 21:26:12 -08:00
dotCooCoo b461422bee Live Paint: freeform point edits without a target leave the selection alone under the bucket
While the proxies show the colors the Live Paint Bucket paints with,
`paint.freeform.get` and `paint.freeform.selectPoint` with an index find
no freeform gradient. The point and line edits (`addPoint`, `setPoint`,
`deletePoint`, `addLine`, `splitLine`) still edited the selected
object's freeform gradient when they named no target.

Those edits now report an error then, when no `ids`, `id` or `item` is
given, as the other paint commands leave the selection alone. A bad
`aligned` or `target` is still reported first. With a target they edit
that object as before. `get` and `selectPoint` now say that the
bucket's colors have no freeform points instead of suggesting
`paint.editGradient`. The params text and docs/mcp.md describe the rule.
2026-11-20 21:25:25 -08:00
dotCooCoo 57dbc644a4 Window: a restored window fitted to a small work area is not held at the minimum size
When the work area is smaller than the smallest window (800 x 500
points), `place` fits the restored window to it, but the native
minimum inner size from `native_options` stayed at 800 x 500, so the
system kept the window bigger than the work area. `restore` now lowers
the minimum to the fitted size in each dimension where it is smaller,
and keeps the normal minimum where the work area has room for it.
2026-11-20 21:23:35 -08:00
dotCooCoo 32afba75ae Live Paint: a Cmd-drag cut short keeps the bucket's colors
With the Live Paint Bucket active, Cmd lends the Selection tool for a
drag. When the bucket was chosen again during a drag of a corner, pie,
blend or similar widget, the lent tool canceled the drag as it went
back, after the session had already stopped treating the bucket as the
lender. With New Art Has Basic Appearance off, the cancel then gave the
selected object's appearance to the colors the bucket paints with.

The lent tool's last actions now run while the session still counts
them as the bucket's, as the Eyedropper's sample for the bucket does.
2026-11-20 21:20:58 -08:00
dotCooCoo 992f6b3faf Script checker: setting length, hidden or readonly on new Folder(...) or a Folder place is not a file write
script.check reported file.write and filesWritten when a script set
length, hidden or readonly on a Folder object as well as on a File
object. It now leaves out only objects that are Folder objects whatever
the path names: new Folder(...), new Folder, and the Folder places such
as Folder.temp, except Folder.current, which a script can assign.
Folder(...) without new gives a File object when the path names a file,
and Folder.selectDialog() gives a File or Folder object, so setting
those still counts.

A variable counts as a Folder only when every assignment the check
reads gives it one: an assignment in another branch, in a function
body, or in an included file that gives it an object that may be a
File object keeps it counting, and a variable assigned another
variable counts as a possible File object. A File object assigned to a
function's own variable or parameter, or to a catch block's parameter,
ends with them. Calls such as remove() on a Folder object still count
as writes.

Folder object constructors and selectDialog:
https://extendscript.docsforadobe.dev/file-system-access/folder-object/
2026-11-20 21:10:50 -08:00
dotCooCoo 7f3888c59d Fonts: a rescan clears the version record after it publishes its catalog
A rescan of the font folders cleared the record of families whose other
versions had been looked for before it walked the folders. A version
lookup made during the walk read the old catalog and recorded its family
again, so a version the rescan found stayed hidden until the next scan.
The record is now cleared after the new catalog is written.

- The font gate used by tests: a thread's first SteadyFonts no longer
  waits for a font change that is itself waiting for guards other
  threads hold, so a guarded test does not hang when another test queues
  a change. It still waits for a change under way and for a waiting
  change that can start.
- Tests that check a change waits for a guard now read the gate's own
  decision, recorded under its lock, instead of the request to change.
2026-11-20 21:07:47 -08:00
dotCooCoo e70ec2f136 Gradient: freeform Lines mode counts a symbol's stroke on a Preview-off layer of its art
The walk of a symbol instance's art switched to outline for a layer of
the art whose Preview is off without checking ignore_layer_preview, so
with the option set a press on the art's stroke past the instance's box
missed. FindPart::find now checks the option, as the other point hit
paths do.
2026-11-20 21:03:22 -08:00
dotCooCoo 011b6fb0e7 Docs: limit the matching-mask rule to a single path holding just the image
The relink rule for a clipping mask whose path matches the old file's
clipping path applies only when the mask holds just the image and its
clipping path is a single path. A mask that also holds other objects,
or whose clipping path is a compound path or text, is kept, with the
new file's clip group inside it. The kept-mask sentence now excludes
the matching masks.

Update Links and Relink keep a distorted image's corners and draw the
new file's clipping path through them; the PSD clipping-path entry
said that Update Links left that clipping as it was.
2026-11-20 20:56:06 -08:00
dotCooCoo 1be942d7fc Dimension tool: a drag from a dimension already drawn moves it
With no points or lines picked, a press within 8 pixels of what a
visible, unlocked dimension draws (its lines, arrowheads and label),
where it is the topmost object that can be edited, followed by a drag
moves that dimension as one undo step. A segment of the art as near
the press as the dimension's lines and label, or nearer, takes the
press instead, and a click there without a drag still picks a point.
The part grabbed follows the pointer: a linear dimension's line moves
as far across as the pointer moves, an angular arc moves as far as the
pointer moves away from or toward the vertex, and a radius or diameter
line turns about the center as the pointer turns, or toward the
pointer when grabbed at the center. The dimension keeps what it
measures and its link to the art. With Smart Guides on, a linear
dimension's line lands on the level of a parallel dimension line, as
when it is placed, and of two lines on one level the one nearer the
pointer along it wins. Isolation mode, clipping masks and locked artboards
apply as they do to a click; with a part of a dimension isolated, the
dimension is not dragged. A dimension that a geometry effect on it, on
one of its parts or on a group around it draws elsewhere is not
dragged, except in Outline view and on a layer whose Preview is off.

dimension.update takes `at: [x,y]`, which puts a linear dimension's
line through the point, gives an angular arc a radius of the point's
distance from the vertex (at least 12 pt), or turns a radius or
diameter line toward it. With Real-time Drawing off, a dimension.update
preview that names its dimensions outlines only those dimensions.

A dimension pasted into a document that had none now marks the
document as holding dimensions (Document::insert), so the Dimension
tool drags it like one drawn there and edits refresh it. Opening a
native file sets the flag from the objects it holds, which covers files
saved after such a paste.

Docs: docs/dimensions.md, docs/target-app-parity.md.
2026-11-20 20:44:44 -08:00
dotCooCoo 479dd27535 Dimension tool: a line at a slight angle or past the distance limit is not a level
A linear dimension line placed near another dimension's line lands on its
level only when that line is parallel. Before, the check compared the two
directions only, so a long line at a slight angle passed it: with its first
end within the snapping tolerance, the new line landed on a level the other
line had already left, and the guide ran at an angle between the lines. A
line is now parallel when it moves off its level by no more than 0.000001 pt
across the span of both lines.

A level that would put the line more than 1,000,000 pt from its points is
passed over. Before, the tool took it, the preview failed validation and
was not sent, and a click committed the earlier preview position. The next
level within reach is taken instead, or the line goes where the pointer is.

The level guide also needs Smart Guides on when it is drawn, so turning
Smart Guides off before the next pointer move hides it.

The nonparallel case in the placement test now puts the pointer within
reach of the first line's end, so it fails without the parallel check, and
the guide test expects exactly one guide.
2026-11-20 20:42:08 -08:00
dotCooCoo 63fe462a1d Docs: a clipping mask that matches the old file's clipping path is relinked as the file's
The PSD clipping-path entry in docs/target-app-parity.md said that
links.update and links.relink keep every clipping mask made in the
document. placed_clip_to in crates/engine/src/cmd/links.rs treats a clip
group holding just the image as the old file's when same_path finds its
clipping path equal to the old file's (anchors and handles within a
thousandth of a point) and the fill rule matches, whoever made it. Such a
mask takes the new file's clipping path, or becomes a plain group when
the new file names none. The entry and the matching DCS sentence in
docs/mcp.md now say so.
2026-11-20 20:41:24 -08:00
dotCooCoo fd27b2e6d4 Command Palette: docs rank typo results that match a word by description last
A result matched through a typo that also matches another query word only
through its description ranks after every other result, since the ranking
compares that before the whole-query match and the label-before-path rule.
Two typo words split between label and menu path tie with the reverse split
only when the other words get the same grades in both results.
2026-11-20 20:40:58 -08:00
dotCooCoo 4cd36c8428 Merge main into fix/retype-drawn-shape-font-state 2026-11-20 20:29:06 -08:00
dotCooCoo f2eb016e98 Tests: transform turns about the same pivot with a null or omitted origin
transform_rejects_a_mistyped_reflect_copy_or_origin_before_editing ran
a rotate with a null origin and checked only that the call succeeded.
It now compares the resulting path with the same rotate with origin
left out, so a null origin that moved the pivot would fail the test.
2026-11-20 20:26:14 -08:00
dotCooCoo c9d6c8f126 Docs: an Alt-drag copy of a clipping path in Draw Behind goes above it
The progress line now says that in Draw Behind the copy of the clipping path of a clip group or a clipping layer goes directly above it, so the clipping path stays the bottom object, as docs/mcp.md and copy_beside already do.
2026-11-20 20:23:32 -08:00
dotCooCoo 12fd6872cc Pathfinder: setting Soft Mix's Mixing Rate to the value it has records no undo step
effect.setParams compared a Pathfinder effect's values other than its
Pathfinder Options exactly, so a mixingRate of 50 over a stored 50.0
counted as an edit and recorded an undo step. A float now compares with
any number by value, and two integers still compare exactly.
2026-11-20 20:22:14 -08:00
dotCooCoo bd3f69f233 Path Precision Tools: Common Tangents finds a run's sample by binary search
The touching-run search looked up the sample before each angle with a
linear scan over the run, so a long run of samples within the tolerance
cost time in proportion to the square of its length. It now collects the
run's sample angles once and uses partition_point, which gives the same
sample at every angle.
2026-11-20 20:09:25 -08:00
dotCooCoo 9eb8cd6146 Merge main into feat/draw-behind-alt-drag-copy 2026-11-20 20:07:57 -08:00
BFlat 9fff48d88f Merge pull request #8910 from dotCooCoo/fix/similar-fonts-thai-scan
Type: the font scan tells whether a family sets Thai as loading it does
2026-11-21 11:03:21 +07:00
BFlat f593dff00c Merge pull request #8903 from dotCooCoo/fix/plugins-folder-special-files
Plug-ins: the plug-ins folder can't block startup on a special file
2026-11-21 11:02:50 +07:00
BFlat 93388d642f Merge pull request #8887 from dotCooCoo/fix/tangent-circle-close-contacts
Path Precision Tools: the Tangent Circle Tool finds both circles where two second segments touch close together
2026-11-21 11:02:18 +07:00
BFlat 4ce43b1091 Merge pull request #8532 from dotCooCoo/feat/distorted-image-commands
Links: Relink, Embed and Unembed keep a distorted image's corners
2026-11-21 11:01:53 +07:00
BFlat ddcefb86c9 Merge pull request #8918 from storytold/train/carry8875
Path Precision Tools: the Tangent Circle Tool leaves out a circle that would reach past the canvas (#8875)
2026-11-21 11:00:19 +07:00
BFlat 5b52369187 Merge pull request #8919 from storytold/train/carry8873
Dimension: pointer moves read a compound path's members once per revision (#8873)
2026-11-21 10:58:44 +07:00
dotCooCoo 94f4d54b04 Width tool: an Alt-double-click on one of several selected points edits them all
An Alt-press on a width point's center narrows the selection to that point,
ready to drag a copy. A release without a drag kept it narrowed and did not
remember the earlier selection, so an Alt-double-click on one of several
selected points opened Width Point Edit for that point alone, where a plain
double-click opens it for all of them. A release without a drag now
remembers the earlier selection as a plain click does, and an Alt-drag
still copies only the point under the pointer.
2026-11-20 19:57:05 -08:00
BFlat 1a1a939bdf Merge pull request #8858 from dotCooCoo/fix/style-redefine-series-own-links
Graphic Styles: Redefine Graphic Style keeps the own style of a path inside a series group linked to the target
2026-11-21 10:56:45 +07:00
BFlat 9078e13d78 Merge pull request #8867 from dotCooCoo/perf/selection-widgets-kind-first
Selection: on-canvas widgets check an object's kind before its editability
2026-11-21 10:56:16 +07:00
dotCooCoo 0575c1604a Swatch libraries: adding a pattern again reuses its numbered colors
Since the change that brings a library pattern's global and spot colors
under a numbered name ("Ink 2") when the document gives the name another
color, adding the same pattern or color again added more copies, and
Use Library Item still linked a pattern's art to the document's own
color of that name.

- A library color whose name the document gives another color is the
  document's numbered copy with the same color, so adding it again adds
  nothing. A numbered name that the same call also picks is not shared.
- A pattern the document holds with its art linked to the document's
  own color of a name, as pasting with Merge leaves it, is reused
  instead of coming in again as "Squares 2".
- `added` lists the colors a pattern brought, after the picked swatches.
- A library tint added with its base color links to the base's name in
  the document, and a later add finds it there.
- library.use brings a pattern's colors the same way.

Docs: docs/mcp.md.
2026-11-20 19:55:08 -08:00
dotCooCoo b763053289 Merge main into fix/flare-lone-x2-y2-error 2026-11-20 19:55:07 -08:00
dotCooCoo d4cd3f2c48 Tests: the missing-font question's tests check the open question and the clicked caret
An answer that names another question, Cancel or OK, now has to leave the
open question answerable: the right token's OK still starts the edit at the
clicked character. The canvas double-click lands a quarter of the way into
the text, and after OK the caret has to be the one a click at that point
puts in the type being edited.
2026-11-20 19:52:46 -08:00
bflatastic 3bda231dd6 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/target-app-parity.md
2026-11-21 10:46:25 +07:00
bflatastic 8daaa2995b Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/tools/src/dimension.rs
2026-11-21 10:43:59 +07:00
dotCooCoo 5132eaebfe PDF: a distorted CMYK image with an image mask keeps the resolution its pieces need
A distorted CMYK image whose opacity mask is a gray image with the
same corners writes the mask as the image's /SMask, and every piece of
its mesh draws that one image. The image was resampled for the size its
transform places it at, before the pieces' shared size was known, so
with downsampling on every piece stretched a smaller image across the
corners. The masked image is now resampled for the size the pieces
share, as the same image without a mask is, and the pieces are drawn
from the same expansion they were measured on.
2026-11-20 19:42:31 -08:00
BFlat 96726b1f41 Merge pull request #8837 from dotCooCoo/fix/live-paint-contents-group-targets
Live Paint: graphic styles on a group's contents give fills to its faces and strokes to its edges
2026-11-21 10:39:37 +07:00