Commit Graph
19421 Commits
Author SHA1 Message Date
dotCooCoo abe8b303de Scripts: remove and removeAll keep art on a locked artboard
PageItem.remove() and PageItems.removeAll() checked only whether the
object and its layers and groups were shown and unlocked, then passed the
ids to edit.clear, which deletes named objects without checking artboard
locks. Both now throw "cannot delete objects on a locked artboard" with
the object ids and delete nothing, as art on a locked artboard is not
editable elsewhere in the document.
2026-11-21 18:14:01 -08:00
dotCooCoo e15e3e083d New Document: Columns reads float rows and columns as file.new does
The dialog read artboardLayout's rows and columns as whole numbers only,
so a value stored as a float (4.0 from ui.dialog.set) fell back to the
stored columns while file.new made the grid from it. The dialog now reads
both as file.new does: a number of 1 or more, rounded and kept to the
artboard limit.
2026-11-21 17:35:17 -08:00
dotCooCoo 5cb6480258 Scripts: assigning PageItem.selected keeps how the other objects are selected
Setting selected to true or false runs select.add or select.toggle for that one object, so the
other objects keep their direct-selected anchors and segments and the key object. Before, it
replaced the selection with whole objects.
2026-11-21 14:53:28 -08:00
dotCooCoo ba0441c458 Scripts: addDocument takes only a DocumentPreset and throws when its profile cannot be read
- new DocumentPreset() now makes an object of the DocumentPreset class whose settings the run
  keeps, so addDocument refuses a plain object, one with a typename of DocumentPreset included,
  with a TypeError naming presetSettings.
- When file.new reports a profileError, addDocument throws an error that names the profile and
  the reason, and the document made with the defaults is put back.
- A script's file.new reads the New Document profile file in the app's own profiles folder;
  the automation roots in force still apply. Before, the script's file gate refused the folder,
  so a scripted addDocument never used an edited profile.

Docs: docs/mcp.md.
2026-11-21 14:33:43 -08:00
dotCooCoo f33e0cb16d Scripts: PageItem.remove refuses hidden or locked art as removeAll does
remove() on an object that is hidden or locked, sits in a hidden or locked layer or group, or is a group holding such an object now throws and deletes nothing, the same rule pageItems.removeAll() applies. docs/mcp.md states both rules and that width and height scale along the page's axes.
2026-11-21 12:37:34 -08:00
dotCooCoo 76aee609f1 Tests: page item width and height setters give the page-aligned size on rotated objects
A rotated rectangle given a width and then a height through the scripting object model reads back the values set, its geometric bounds have that size, and other objects stay as they were. The resize doc comment names the page's axes.
2026-11-21 12:21:32 -08:00
dotCooCoo a8d1b29766 Tests: the script corpus failure test reads an undefined name
Scripts now have an app object, so app.activeDocument no longer throws a
ReferenceError. The test reads a name the host does not define instead.
2026-11-21 11:46:08 -08:00
dotCooCoo 4bc1f7a187 Scripts: Documents.add takes the artboard spacing file.new takes
artboardSpacing is refused above 100,000 points, the limit file.new
applies, so a value file.new would refuse throws a RangeError that names
artboardSpacing.
2026-11-21 11:40:55 -08:00
dotCooCoo 4b97cc8492 Scripts: a failed selection restore ends the run unless the command refused
When an edit puts the selection back, the Layers panel target, symbol part,
Objects on Path member, ruler guide and key object commands fall back or
skip only when the command refuses with an ordinary error. An internal
failure or a request to stop now ends the run instead of being treated as
a refusal.
2026-11-21 11:18:44 -08:00
dotCooCoo 626d843520 Scripts: list the object model in the host name check, refuse zOrder inside a compound path
The host name test now has rows for app, the document model classes and the enumerations the script host adds. zOrder on a path inside a compound path throws an error and leaves the document unchanged, as duplicate does.
2026-11-21 10:34:09 -08:00
dotCooCoo 6cce980e2b Scripts: keep targets and chosen parts when edits restore the selection
- An edit a script makes puts back a Layers panel target, an object
  chosen inside a dynamic symbol instance and an object chosen in an
  Objects on Path group, each with its own selection command.
- Assigning a document's selection selects a symbol instance or an
  Objects on Path group as a whole when one of its objects was chosen.
- file.newPresets lists a grid by column's rows as set, also when there
  are fewer artboards than rows, and New Document's Columns shows the
  columns those rows give the current number of artboards.
- docs/roadmap.md's M13 row names the script object model that is
  available.
2026-11-21 09:46:14 -08:00
dotCooCoo f70d2ee7e6 Scripts: duplicate, selection and wrapper fixes for the object model
- duplicate() runs Edit > Duplicate, the place and the selection
  restore under one savepoint, so a refused place leaves the documents,
  the selection and the undo history as they were. It reads the copy's
  id from the command's own result, so ids above 2^53 return the copy.
  A path inside a compound path throws an error instead of copying the
  whole compound path.
- An edit restores a mixed selection (direct-selected anchors and whole
  objects) in its original order with one select.anchorsMany.
- Assigning the selection clears a Layers panel target.
- A call on an inactive document switches back even when the selection
  restore fails.
- documents.add with a grid by column passes the row count to file.new,
  which takes a new artboardLayout.rows key: 5 artboards in 4 rows give
  columns of 4 and 1. A preset keeps the rows until columns without
  rows, or another layout, is given, and New Document drops them when
  Columns or the layout changes.
- A held page item stays the same object when its class changes in the
  same family (a placed image that is embedded becomes a RasterItem).
- A waiting class member's answer is read as a class instance, and a
  class constructor called with new cannot wait.

Docs: docs/mcp.md (DocumentPreset, duplicate, file.new rows), docs/gaps.md
(G6).
2026-11-21 08:43:10 -08:00
dotCooCoo f2d3b09fe6 Scripts: app, documents, selection and page items for scripts
Scripts get an app object with its documents, the active document and its
selection, and the page items of a document, read and edited through
commands so each edit is one undo step and is journaled. Host classes in
the JavaScript engine give each document or item one object while a script
holds it, answer `in` and indexed reads, and throw on stale objects and on
members that are not available yet.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 05:13:46 -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
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
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
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
BFlat d77b6d9309 Merge pull request #8870 from dotCooCoo/fix/dimension-guide-member-holder
Dimension: a guide member of a compound path does not hold a preview-bounds corner
2026-11-21 10:39:09 +07:00
BFlat 54f256f666 Merge pull request #8634 from dotCooCoo/fix/select-widget-drags-settle
Selection: widget drags read the release point and a tool switch cancels them
2026-11-21 10:38:43 +07:00
BFlat f558297963 Merge pull request #8681 from dotCooCoo/feat/retype-near-matches
Retype: near matches within a tolerance, and words outlined as one compound path
2026-11-21 10:38:18 +07:00
BFlat 911177c775 Merge pull request #8874 from dotCooCoo/docs/3d-shadow-expands-blurred-as-image
Docs: a blurred 3D shadow expands to an image
2026-11-21 10:37:51 +07:00
BFlat 53fe391488 Merge pull request #8865 from dotCooCoo/fix/palette-typo-order-docs
Command Palette: docs order typo matches by the field the word is met in
2026-11-21 10:37:26 +07:00
BFlat 193f110ebe Merge pull request #8864 from dotCooCoo/fix/relink-edited-mask-docs
Docs: Relink and Update Links keep a clipping mask edited in the document
2026-11-21 10:37:02 +07:00
BFlat de11798f93 Merge pull request #8892 from dotCooCoo/fix/kinsoku-paste-relayout-test
Kinsoku sets: tests for pasted type and shaped lines under a custom set
2026-11-21 10:36:41 +07:00
BFlat 43e0407cd0 Merge pull request #8891 from dotCooCoo/fix/eraser-drag-midpoint-tip
Eraser: a drag's outline takes the tip halfway along each step in two more cases
2026-11-21 10:36:19 +07:00
BFlat 6aaef5ad68 Merge pull request #8886 from dotCooCoo/fix/outline-compound-strokes-not-fill
Pathfinder: Outline of a compound shape with no fill adds no stroke of its own
2026-11-21 10:35:55 +07:00
BFlat 7945ef5c86 Merge pull request #8884 from dotCooCoo/fix/safe-mode-expand-symbol-art
Expand Appearance: Safe Mode checks symbol art that a group's raster effect draws
2026-11-21 10:35:31 +07:00
BFlat f39e3e06cf Merge pull request #8871 from dotCooCoo/feat/draw-behind-place-symbol
Symbols: in Draw Behind a placed instance goes directly below the selection
2026-11-21 10:35:08 +07:00
BFlat ada693c03c Merge pull request #8868 from dotCooCoo/perf/legacy-ai-gradient-index
Legacy .ai: gradient definitions are found by a key of their gradient
2026-11-21 10:34:44 +07:00
BFlat c86bb07a44 Merge pull request #8854 from dotCooCoo/fix/confined-single-pdf-test-artboards
Tests: a confined single-file PDF of several artboards checks every artboard it carries
2026-11-21 10:34:16 +07:00
BFlat e8b23c5ba9 Merge pull request #8852 from dotCooCoo/fix/mesh-picks-survive-tool-switch
Mesh: picked points stay picked between the mesh-point tools
2026-11-21 10:33:52 +07:00
BFlat a5f9966ca5 Merge pull request #8861 from dotCooCoo/feat/freeform-lines-leave-ends-line
Gradient: moving out of a freeform object ends the Lines mode line
2026-11-21 10:33:27 +07:00
BFlat 4c0edd8844 Merge pull request #8904 from dotCooCoo/feat/script-check-host-classes
Script checker: setting a File's length, hidden or readonly counts as a file write
2026-11-21 10:32:19 +07:00
BFlat 9704f52fc8 Merge pull request #8812 from dotCooCoo/fix/shape-tools-smart-guide-labels
Shape tools: the Smart Guide label of a hover goes when the pointer leaves the canvas
2026-11-21 10:31:04 +07:00
dotCooCoo 0b5620cf78 Type: the font scan tells whether a family sets Thai as loading it does
The system font scan built each face from its name, fvar, OS/2, head and
post tables only, so a family that was found but not loaded never had
Thai in its traits. The font menus' Thai filter left such families out,
and Show Similar Fonts grouped them with the other scripts until they
were loaded.

- A face sets Thai when its OS/2 table allows it (no OS/2 table, the
  Thai Unicode range, bit 24, or the Thai code page, bit 16) and its
  character map has Thai, loaded or scanned.
- The scan reads the cmap table of such a face only, up to 16 MiB.
  The search for a document's missing fonts reads no cmap table, so
  its byte limit covers the same tables as before.
2026-11-20 19:25:52 -08:00
BFlat 83d6c2133c Merge pull request #8876 from dotCooCoo/fix/single-line-composer-geometry-tests
Type: tests check where the Single-line Composer sets lines around text wrap
2026-11-21 10:19:16 +07:00
BFlat 3f5531a7d3 Merge pull request #8881 from dotCooCoo/fix/dimension-first-pick-link
Dimension: a first Linear point keeps its link when the art moves before the second click
2026-11-21 10:18:42 +07:00
BFlat b724e022cd Merge pull request #8882 from dotCooCoo/fix/type-overlay-layout-count-tests
Tests: font changes on other threads wait while a Type layout count runs
2026-11-21 10:18:32 +07:00
BFlat c176da5d0e Merge pull request #8905 from dotCooCoo/fix/pathfinder-intersect-empty-operand
Pathfinder: an Intersect effect with a group that has no area at its precision draws nothing
2026-11-21 10:17:57 +07:00
BFlat d323cf0c19 Merge pull request #8907 from dotCooCoo/fix/tangent-circle-canceled-preview
Path Precision Tools: the Tangent Circle Tool works out its circle again after a canceled live edit
2026-11-21 10:17:35 +07:00
dotCooCoo f4b114ae78 Path Precision Tools: check each place along the first segment once
When the same segment appears more than once among the second segments,
its roots were found once per copy, and each copy's places were checked
against every second segment. The sorted places now drop exact repeats
before they are checked. Places that differ, however close, are all kept,
so the circles found do not change.
2026-11-20 19:16:06 -08:00
dotCooCoo ce2fd22267 Path Precision Tools: the Tangent Circle Tool works out its circle again after a canceled live edit
A live edit changes the document without an undo step, so the tool was
not told about it. Circles found while a preview moved the second
segment stayed cached under the same segment key, and a click after the
preview was canceled drew the cached circle instead of one touching the
segment where it is again. A first segment picked during a preview kept
its old shape the same way.

The cache key now holds the shapes of the first segment and of the
segments a circle may touch, so moving along an unchanged segment still
reuses the search. The first segment is forgotten when its shape no
longer matches the document, and a press on the second segment follows
the segments as they are at the release; a pressed segment that is gone
leaves nothing to touch.
2026-11-20 19:15:06 -08:00
dotCooCoo b2e7784160 Docs: progress line for the script checker's File setters and host test
docs/target-app-parity.md gets a line for the file.write report on a
File object's length, hidden and readonly and for the test that lists
every name the script host adds, with the tests that cover them. The
test's comment on vc no longer names another app.
2026-11-20 19:05:54 -08:00