Commit Graph
962 Commits
Author SHA1 Message Date
.CooCoo a15bd42649 Merge pull request #10834 from dotCooCoo/fix/remove-all-image-frame-clip
Scripts: pathItems.removeAll keeps a clipping path that still holds an image
2026-12-04 22:30:41 -08:00
.CooCoo db8d2c11e9 Merge pull request #10890 from dotCooCoo/fix/scoped-remove-all-walk
Scripts: a group's pathItems.removeAll() walks only the group
2026-12-04 22:26:30 -08:00
.CooCoo 99e8dc3f72 Merge pull request #10898 from dotCooCoo/fix/script-color-pick-document-profiles
Scripts: a Color Picker pick converts through the script document's profiles
2026-12-04 22:24:58 -08:00
dotCooCoo b280bc282f Merge main into fix/remove-all-image-frame-clip 2026-12-04 19:00:29 -08:00
dotCooCoo 02c4ac0f74 Scripts: a Color Picker pick converts through the script document's profiles
app.showColorPicker answers the run between slices, when the active
color settings hold the profiles of the document the window shows. A
pick in the run's own document, made or assigned other profiles by the
script, was converted to that document's RGB space and separated to CMYK
through the window's profiles instead.

The dialog now carries the RGB and CMYK profiles assigned to the run's
active document when the picker opens. On OK a display-sRGB pick (hex,
sample, HSB) is taken into that document's RGB space, RGB values typed
into the picker convert from the shown RGB profile to the document's,
and an RGB pick in a CMYK document separates through the document's
CMYK profile.
2026-12-04 18:38:31 -08:00
dotCooCoo 5d2050f665 Merge main into fix/scoped-remove-all-walk 2026-12-04 18:26:41 -08:00
dotCooCoo a680aef74a Merge main into fix/tracing-mask-art 2026-12-04 18:19:19 -08:00
dotCooCoo b63ed69db5 Merge main into fix/remove-all-image-frame-clip 2026-12-04 18:18:32 -08:00
.CooCoo ae67ca69e6 Merge pull request #10884 from dotCooCoo/fix/script-stale-collection-before-range
Scripts: stale layers and artboards throw their stale error from index()
2026-12-04 18:10:21 -08:00
.CooCoo f4c65a2f0f Merge pull request #9053 from dotCooCoo/feat/scripts-api-d5-swatches-symbols
Scripts: documents give scripts their swatches, spots, symbols, graphic styles and brushes
2026-12-04 18:08:05 -08:00
.CooCoo 85bd77b528 Merge pull request #9315 from dotCooCoo/feat/scripts-export-for-screens
Scripts: Document.exportForScreens writes artboards, assets or the document into a folder
2026-12-04 17:59:22 -08:00
dotCooCoo 22b169a905 Scripts: a group's pathItems.removeAll() walks only the group
removeAll() on a layer's or group's pathItems walked every object in the
document to check clipping paths, even when the collection was empty or
held two paths. It now walks the container's own objects, or, when the
container sits in the clipping path of a clipping group, the subtree of
the highest such clipping path and the group it clips. An empty
collection walks nothing. The document's own pathItems.removeAll() still
checks every object.

A scoped removeAll() now also throws when a path id in the list resolves
to an object outside the container, which a damaged file with repeated
ids can cause, instead of deleting that other object.

The walk came in with #9288 ("Scripts: paths, path points and colors
for scripts").
2026-12-04 17:29:42 -08:00
dotCooCoo a53165fa85 Scripts: stale layers and artboards throw their stale error from index()
layers.index(n) and artboards.index(n) returned Not found for a negative
or fractional number before checking whether the collection was stale, so
a script holding a stale collection got the wrong error. Both now check
the collection first, as the art collections' index() does.
2026-12-04 17:03:47 -08:00
dotCooCoo a4b2e4fe36 Scripts: remove the unused empty-path closed set
Setting `closed` on a path with no points gives it an empty closed
subpath, so the path's own data keeps the setting. The separate set of
empty paths, its key, its cleanup after commands and its copy in the
command trail were no longer written to by anything. `closed` and
`setEntirePath` now read the closed state from the subpaths only.
2026-12-04 16:52:48 -08:00
dotCooCoo b7820f07e9 Merge branch 'fix/remove-all-image-frame-clip' of github.com:dotCooCoo/vectorcraft into fix/remove-all-image-frame-clip 2026-12-04 16:34:43 -08:00
dotCooCoo f6de56e490 Scripts: pathItems.removeAll measures an effect's clip region under its fill rule
When a live geometry effect reshapes what stays in a clipping path,
removeAll() now measures the area that outline fills under its fill
rule, with overlaps resolved, instead of the area of each subpath. An
image whose Transform effect adds a copy reflected onto itself fills
nothing under nonzero, so deleting the other paths now throws and
deletes nothing. A frame that an effect scales to a thin strip still
counts as a clipping region.
2026-12-04 16:34:29 -08:00
dotCooCoo 96e66b5e8d Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 16:27:43 -08:00
dotCooCoo 8b82ccf327 Scripts: null exportForScreens arguments throw, and a read before a closing brace is shared
- Document.exportForScreens throws a TypeError for null in place of the
  options, itemToExport or fileNamePrefix, as exportFile does for null
  options, instead of taking the defaults.
- The script checker counts a variable read just before the `}` that
  closes a function body (`function get() { return $.global['local'] }`)
  as read in that body, so a later literal's saveAs is no longer exempt.
2026-12-04 16:04:49 -08:00
dotCooCoo e32c3ae32d Merge main into fix/tracing-mask-art 2026-12-04 15:56:51 -08:00
dotCooCoo 1d836fa24b Merge main into fix/remove-all-image-frame-clip
# Conflicts:
#	crates/engine/src/script/dom/paths.rs
#	docs/target-app-parity.md
2026-12-04 15:55:48 -08:00
dotCooCoo d467c36805 Merge main into fix/trace-preset-bracket-names 2026-12-04 15:32:09 -08:00
.CooCoo 88694da6eb Merge pull request #10628 from dotCooCoo/fix/script-remove-trace-source
Scripts: remove() refuses a tracing's shown source image
2026-12-04 15:29:17 -08:00
dotCooCoo 7dc78396e0 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 15:11:24 -08:00
dotCooCoo a06b8ed991 Merge main into fix/tracing-mask-art 2026-12-04 12:36:33 -08:00
dotCooCoo 49186cb426 Merge main into feat/scripts-api-layer-path-items 2026-12-04 12:28:26 -08:00
dotCooCoo e226ee93e7 Merge main into fix/script-remove-trace-source 2026-12-04 12:26:28 -08:00
dotCooCoo a9562a995f Merge main into fix/trace-preset-bracket-names 2026-12-04 12:26:24 -08:00
dotCooCoo 07fb4c17ed Merge main into fix/remove-all-image-frame-clip 2026-12-04 12:23:45 -08:00
.CooCoo 534291eb8f Merge pull request #10818 from dotCooCoo/fix/script-palette-review-9147
Scripts: palette events keep drags, drafts and frames as the person left them
2026-12-04 11:42:17 -08:00
.CooCoo 4db38b885e Merge pull request #9300 from dotCooCoo/feat/scripts-show-color-picker
Scripts: app.showColorPicker asks for a color
2026-12-04 11:42:06 -08:00
dotCooCoo b28b7b11b7 Merge main into fix/remove-all-image-frame-clip
# Conflicts:
#	docs/target-app-parity.md
2026-12-04 09:32:54 -08:00
dotCooCoo 07c33b9f2a Scripts: pathItems.removeAll judges a kept clipping region by its live effects
The check that an image or placed-document frame still encloses an area
now measures each subpath from its own first point, so a tiny frame far
from the origin is not lost to roundoff and a collapsed frame is not
counted through roundoff.

When a live geometry effect, such as an Offset Path inset, would leave
no clipping region once the paths are deleted, removeAll() now throws and
deletes nothing. The preflight copies only the members that hold a path
being deleted.
2026-12-04 09:32:28 -08:00
dotCooCoo 3cc3f80e36 Merge main into fix/script-remove-trace-source 2026-12-04 09:01:36 -08:00
dotCooCoo 6a19b804f7 Merge main into fix/remove-all-trace-group 2026-12-04 08:00:18 -08:00
dotCooCoo 1ae7a5d5cb Merge main into feat/scripts-api-layer-path-items 2026-12-04 08:00:07 -08:00
dotCooCoo 516b7eb321 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 07:56:23 -08:00
dotCooCoo 625c9fe454 Merge main into fix/trace-preset-bracket-names 2026-12-04 07:45:41 -08:00
dotCooCoo fa91b67756 Merge main into fix/tracing-mask-art 2026-12-04 07:40:12 -08:00
.CooCoo ef168fad05 Merge pull request #10665 from dotCooCoo/fix/remove-all-empty-compound-mask
Scripts: pathItems.removeAll cannot empty a compound path that clips other art
2026-12-04 06:56:17 -08:00
dotCooCoo 761f99fc5a Scripts: pathItems.removeAll keeps a clipping path that still holds an image
The document's pathItems.removeAll() refused to delete paths from a group
that is a clipping path when an image or placed document stayed inside
that group, although the image's frame still clips. It now counts the frame
of a visible image or placed document as clipping geometry when the frame
encloses an area, as Node::clip_shapes does, and still refuses when the
frame is collapsed to a line.
2026-12-04 06:49:26 -08:00
dotCooCoo d5a54ccffa Merge main into feat/scripts-api-layer-path-items 2026-12-04 02:57:25 -08:00
dotCooCoo 7304910e7b Merge main into fix/tracing-mask-art 2026-12-04 02:55:17 -08:00
dotCooCoo 90b6a7640b Scripts: palette events keep drags, drafts and frames as the person left them
Follow-up to the review of #9147 (script palettes):

- A waiting click or change that can no longer run (its control was
  disabled, hidden or removed by an earlier handler) is dropped before
  the open edit is settled, so it no longer commits or cancels a drag
  in the active document with no handler run.
- A palette title or other getter that hides or closes the palette
  while the palette is being described no longer sends that
  description to the host: the host keeps the controls the palette had
  when it was hidden.
- A typed text that matches the field's stored text is still given to
  the script, before a click, a close or on focus loss, when another
  change of that field waits, so the handler reads the typed text and
  not the waiting change.
- After a palette event's run fails to begin, the app does not retry
  and ask for a frame on every pass. It tries again after the next
  input in the window, another palette event, or a change to the
  documents' edit state, the active document or the recovery settings.
- The print test now checks that the click's handler ran after the
  print jobs were canceled, and the list test only fails when the
  earlier item's text changed.
2026-12-04 02:54:11 -08:00
dotCooCoo b6e0afaf2f Merge main into fix/script-remove-trace-source 2026-12-04 01:53:02 -08:00
dotCooCoo c84147e193 Merge main into fix/trace-preset-bracket-names 2026-12-04 01:41:42 -08:00
dotCooCoo 232b9e1597 Merge main into feat/scripts-show-color-picker 2026-12-04 01:13:39 -08:00
dotCooCoo 69afdf9194 Merge main into feat/scripts-api-layer-path-items 2026-12-04 01:01:08 -08:00
dotCooCoo 12c1b211ec Merge main into fix/tracing-mask-art 2026-12-04 00:52:54 -08:00
dotCooCoo 573b2da1b4 Merge main into fix/remove-all-trace-group 2026-12-04 00:43:34 -08:00
dotCooCoo 62e09de5ac Merge main into fix/remove-all-empty-compound-mask 2026-12-04 00:43:34 -08:00