Commit Graph
1071 Commits
Author SHA1 Message Date
.CooCoo 5f1eec6cd9 Merge pull request #9291 from dotCooCoo/feat/scripts-document-views
Scripts: Document.views exposes each drawn document window
2026-11-28 08:02:30 -08:00
.CooCoo 503397ab73 Merge pull request #9897 from dotCooCoo/fix/dimension-alt-whole-object-preview-bounds
Dimension: Alt whole-path dimension measures the outside of the stroke with Use Preview Bounds
2026-11-28 08:02:27 -08:00
.CooCoo 2f4bc715db Merge pull request #9901 from dotCooCoo/fix/direct-shift-click-group-member
Direct Selection: a Shift-click on a member of a selected group deselects only that member
2026-11-28 08:02:19 -08:00
.CooCoo f59c044080 Merge pull request #9921 from dotCooCoo/feat/move-several-handles
Direct Selection: picked direction handles move together
2026-11-28 08:02:02 -08:00
dotCooCoo 88fb7a8128 Merge main into feat/scripts-document-views 2026-11-28 07:25:53 -08:00
dotCooCoo 6f012b6621 File formats: .pcraft documents open and place as one image
File › Open and File › Place read layered raster .pcraft documents
through craft-doc and store them as one PNG, sized by the document's
resolution. A placed file links like any image.

- The image is the file's full-size composite when it has one.
- Without one, the layers are combined at the canvas size when the
  document is RGB at 8 or 16 bits and every visible layer is a raster
  layer that blends Normal, with no clipping, layer effects, vector
  mask, frame, advanced blending or feathered layer mask. Hidden layers
  are not read, and an RGB ICC profile the document names is kept.
- Otherwise the composite preview comes in at the canvas's size, and
  Open, Place, links.update, links.relink and links.replaceEmbedded
  warn when it has fewer pixels than the canvas, naming both sizes and
  why the layers were not combined.
- A full-size composite or preview the file names but doesn't hold,
  can't decode or, for the full-size one, of another size than the
  canvas is an error. The Links commands decode the kept PNG before
  taking it.

The import fuzz tests cover mutated bundles and manifests.
2026-11-28 05:33:55 -08:00
dotCooCoo 41a6005414 Direct Selection: picked direction handles move together
A click on a path's direction handle picks it, a Shift-click adds it to
the picked handles or takes it away, and Escape lets them go. Picked
handles show ringed. Dragging one of two or more picked handles moves
all of them, on one path or several, by the same offset in one undo
step. A Shift-press on a handle reshapes only once the pointer has moved
3 pixels, so a Shift-click leaves the handle where it is.

The new command path.moveHandles does the move: an anchor with one
handle listed places it as path.setHandle does, an anchor with both
listed moves both and becomes a corner, and independent (Alt during the
drag) makes every listed handle's anchor a corner.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-28 04:58:12 -08:00
dotCooCoo 65d9ba2469 Direct Selection: a locked target does not open its group, and a second Shift-click deselects one anchor
expand_to took in the target without checking that it is editable, so a
locked or hidden object inside a selected group replaced the group with
its contents. It now leaves the selection unchanged for such a target.

select.anchors with mode toggle decided whether a path was selected whole
from the rest of the selection, so after a Shift-click had opened a group,
a Shift-click on an anchor of another path in it selected only that
anchor. A toggle on a group member now decides it from the member's own
selection; paths directly on a layer keep the existing rule.
2026-11-28 04:34:32 -08:00
dotCooCoo 419bf845bd Dimension: a preview-bounds dimension updates when its path becomes a guide or is released
art_changed compared only the strokes a path paints, so a dimension placed before the path was made into a guide kept measuring its stroke, and one placed on the guide kept the bare size after Release Guides. A change in guide state now counts as a change to the art for a Use Preview Bounds dimension of a whole path.
2026-11-28 03:56:13 -08:00
dotCooCoo 28af430081 Dimension: a guide's preview bounds leave out its stroke
A path made into a guide paints no strokes, but painted_box still measured its
stroke, so a Use Preview Bounds dimension of a whole guide reached past its
outermost points. painted_box now returns None for a guide, which covers both
preview_extents and reach. The parity note says W and H match only when the
path has no geometry effect, in line with docs/dimensions.md.
2026-11-28 03:31:46 -08:00
dotCooCoo 3e8d293232 Direct Selection: a Shift-click on a member of a selected group deselects only that member
With a group selected, a Direct Selection Shift-click on the fill of one of its paths ran
select.toggle on the path, which added the path beside the group. The path stayed selected
through the group, and so did everything else in it.

The new select.remove command takes each target out of the selection. For a target inside a
selected group or compound path, Selection::expand_to first selects the objects inside the
outermost selected one on the way down to the target, in its place, so the rest of the group
stays selected. Hidden and locked objects and a Shaper Group's original shapes are left out. Direct Selection's Shift-click on such a path runs select.remove, and a
Shift-drag from there moves nothing. A Shift-click on one of the path's anchors runs
select.anchors with mode toggle, which now opens the group the same way and deselects only that
anchor. A path selected beside the group around it, as Group Selection leaves it, is taken out
with the group.

No public documentation describes this case, so this is VectorCraft's own rule.
2026-11-28 02:20:39 -08:00
dotCooCoo 23db97a4bd Dimension: Alt whole-path dimension measures the outside of the stroke with Use Preview Bounds
With Use Preview Bounds on, the box Alt shows over a path and the linear
dimension of the whole path it places now reach the outside of the
path's strokes, the width or height W and H show, instead of the
outermost anchors.

- The extent source records `preview: true` (omitted when false), so the
  dimension measures to the outside of the strokes again after later
  edits, a new stroke weight included. Files without it measure as
  before.
- A member of a compound path is measured with the compound path's
  strokes and only the arrowheads the compound path draws on that member.
  Releasing the compound path or changing which member holds the first
  or last subpath measures it again.
- The dimension line stays outside the stroke.
- `dimension.create` takes `preview` on the extent source; a value other
  than true or false is an error.

Geometry effects are not included.
2026-11-28 02:06:27 -08:00
dotCooCoo fda03c81ed .ai import: a placed EPS file whose bytes the editing data includes opens as a placed document
A .ai file's editing data can include a placed EPS file's bytes between
%%BeginDocument: and %%EndDocument. The reader did not read those bytes:
in the %AI5_BeginPlace form the placed file showed only the preview the
data keeps of it, or an unread placeholder box without one, and in the
version 7 form the art the file draws came in as editable paths with a
note that placed files weren't read.

- The reader keeps those bytes (up to 256 MB) and makes the placed file a
  placed document of them, in the file's bounding box where the
  matrix puts it. It draws its art whether or not its file is found, and
  a native save keeps the bytes. The version 7 form's placed EPS art is
  no longer editable on open.
- A placed file stays as before when its bytes are a DCS file (File >
  Place makes those linked images), have no bounding box of their own,
  carry a VectorCraft document (as VectorCraft's EPS export writes),
  don't read as an EPS file, or belong to a file named .ai or .ait.
  What reading the bytes warns of is in the open result.
- One with a preview that an image variable binds stays the linked image
  showing its preview, as a placed PDF page does.
- The link takes the size and hash of the bytes, so a file found unchanged
  is neither missing nor modified.
- Drawing and the open check each read at most 8 placed EPS files inside
  one another, so a file whose included files include others opens.
  The open check draws the placed documents inside the bytes from their
  previews, and it reads each included file once at each depth. A file
  nested 12 levels deep opens with at most 8 drawing reads and 72
  checks.
- File > Package with Copy Fonts reads the type of a placed EPS file, as
  it reads a placed PDF page's, and of the EPS files it includes in turn,
  pattern art included.
- On %_ lines the %_ that starts each line is taken off. Then one line
  end is taken off the end of the bytes when another line end comes
  before it: the one the %%BeginDocument: line ends with when the bytes
  end with it, otherwise the last one. An LF after a CR is kept with it
  when the file's first line ends with CRLF.

Docs: docs/target-app-parity.md.
2026-11-28 01:16:09 -08:00
.CooCoo 31066b39c2 Merge pull request #9065 from dotCooCoo/feat/scripts-reflection
Scripts: reflect describes an object's properties and methods
2026-11-28 01:03:47 -08:00
.CooCoo a949db79fe Merge pull request #9137 from dotCooCoo/feat/plugin-api-live-effect-appearance
Plug-ins: live effects set opacity, blending and effects on their pieces
2026-11-28 00:46:29 -08:00
.CooCoo 39f317a0c6 Merge pull request #9840 from dotCooCoo/fix/engine-tests-count-work
Tests: bounded-work checks count the work instead of timing it
2026-11-28 00:16:46 -08:00
dotCooCoo e75b26cffc Merge main into feat/scripts-reflection 2026-11-27 23:38:58 -08:00
dotCooCoo 5a771c52f7 Merge main into feat/plugin-api-live-effect-appearance 2026-11-27 22:50:09 -08:00
dotCooCoo f7ccc194fc Merge main into feat/scripts-document-views 2026-11-27 22:14:06 -08:00
dotCooCoo f56fcd99f6 Merge main into feat/scripts-reflection 2026-11-27 22:13:50 -08:00
dotCooCoo c97b5eac1e Merge main into feat/scripts-api-d7a-variables 2026-11-27 21:57:44 -08:00
.CooCoo fc83083fea Merge pull request #9828 from dotCooCoo/fix/plugin-export-cancel-handshake
Tests: cancel the plug-in export test on the exporter's first progress report
2026-11-27 21:39:02 -08:00
.CooCoo 3737ccdc9a Merge pull request #9838 from dotCooCoo/fix/script-folder-scan-clock
Scripts: folder listings take their time limit from the session's clock
2026-11-27 21:14:30 -08:00
dotCooCoo 8c2ab73b81 Tests: bounded-work checks count the work instead of timing it
Six engine tests guarded against quadratic or unbounded work by timing
it (under 2, 10, 30 or 60 seconds) or by printing how long it took. A
slow or loaded machine could fail them, and a regression that stayed
under the bound passed. Each now counts the work the guarded code does
and compares it with a smaller input or with the code's own limit:

- An unknown command id or parameter key of 200,000 characters compares
  no more characters than one of 20 (edit-distance cells).
- A Word .doc with 20,000 hidden paragraphs reads at most one more Prl
  per paragraph than one with a single paragraph, and each style's
  properties are read once.
- One function-based shading filling 5,000 paths takes no more function
  evaluations than filling one, and twenty stay within the import's
  evaluation budget.
- A form decoding to 64 MiB drawn 1,000 times is walked no further than
  the page's form-content limit and one more form.
- A blend of 998 steps measures no more laid steps per object than a
  blend of 3, and one of 1,500 steps is not laid out.
- Retype of a tracked line of 450 glyphs lays out at most 20 times the
  glyphs a line of 45 does.

The counters are test-only: thread-local cells in the engine under
cfg(test), and in vectorcraft-pdf (read-count feature) and
vectorcraft-eps (new work-count feature), which the engine enables in
its dev-dependencies only. Retype's layout calls go through one helper
that counts them.
2026-11-27 16:20:23 -08:00
dotCooCoo a354d09af4 Scripts: folder listings take their time limit from the session's clock
script::folder::list and script::startup::list measured the 250 ms
listing limit (MAX_SCAN) with a real Instant. script.listInstalled,
script.startup.run and the File > Scripts menu read the folders through
them, so a test that went through any of these got a truncated listing
and missing scripts whenever the disk stalled for 250 ms.

- folder::Clock is either Wall (the real time since the listing started,
  the default) or Fixed (the same time at every check). Both list
  functions take one.
- Session::set_script_listing_clock sets the clock the two commands and
  the menu's listing job use; the app keeps the real clock.
- The script folder, startup script, scripts menu, script run and Safe
  Mode tests list with a fixed zero time, so a slow disk cannot cut a
  listing short. Direct listing calls use the test file's list helper.
- New tests check that script.listInstalled, script.startup.run and the
  menu stop at the session's clock once it is past the limit and list
  everything at the limit.
2026-11-27 16:10:28 -08:00
dotCooCoo 3f21199a7c Tests: cancel the plug-in export test on the exporter's first progress report
a_cancelled_export_stops_the_exporter cancelled from another thread after
a 300 ms sleep and asserted the elapsed time. The exporter now reports one
step before it loops forever, and the test's progress sink cancels the
token when that report arrives. The cancel lands while the exporter runs,
and the test asserts Err(Cancelled) and that the report arrived once. With
the cancel check between budget slices removed, the export ends at its
instruction budget instead and the test fails.
2026-11-27 16:06:29 -08:00
HassanKhan ea9cd206f6 Paste: a pasted clipping path is an ordinary path (#9227)
A copy of a clip group's clipping path kept its clipping mark when pasted
outside the group, so Offset Path and the other path commands skipped it
and Offset Path's OK did nothing. Paste now clears the mark, and Release
Clipping Mask clears it on a selected path that clips nothing, which
repairs paths pasted before this fix.
2026-11-27 13:24:20 +05:00
dotCooCoo 0669a4525a Merge main into feat/scripts-xmp-objects 2026-11-26 15:20:19 -08:00
BFlat 86316861ee Merge pull request #9118 from dotCooCoo/feat/plugin-api-javascript-runtime
Plug-ins: object filters written in JavaScript
2026-11-27 05:13:39 +07:00
BFlat 023843e3a6 Merge pull request #9114 from dotCooCoo/feat/scripts-startup-scripts
Scripts: run startup scripts at launch and before a chosen script
2026-11-27 05:13:16 +07:00
BFlat 3b73e8122b Merge pull request #9049 from dotCooCoo/feat/scripts-api-d7b-tags-notes-uuid
Scripts: PageItem.tags and Document.tags read, add, change and delete an object's tags
2026-11-27 05:12:59 +07:00
BFlat 8be131f6cd Merge pull request #8942 from dotCooCoo/fix/paste-all-artboards-conflicts
Paste on All Artboards: swatch conflicts leave copied artboard backgrounds out
2026-11-27 05:10:37 +07:00
dotCooCoo 051781e23d Merge main into feat/scripts-xmp-objects
Keep XMP file buffers in native state and release them at the file run boundary. Count registered namespaces and expanded metadata against the heap limit. Reset marked readers after updates and allow failed library setup to retry.
2026-11-26 13:13:53 -08:00
dotCooCoo ca68753463 Keep startup queue failures and stop requests consistent 2026-11-26 10:37:22 -08:00
dotCooCoo 4431c965f4 Merge main into feat/plugin-api-javascript-runtime
JavaScript plug-in runtime errors preserve the jobs limit classification.
2026-11-26 10:19:52 -08:00
dotCooCoo 93a5d81d2e Merge main into feat/scripts-api-d7b-tags-notes-uuid 2026-11-26 09:34:56 -08:00
dotCooCoo 8d9832ca9b Merge main into feat/scripts-startup-scripts 2026-11-26 09:08:48 -08:00
dotCooCoo 7da21d015c Validate and retain chosen scripts before startup runs 2026-11-26 08:56:39 -08:00
dotCooCoo 2d50196e2e Merge main into feat/scripts-document-views 2026-11-26 08:36:01 -08:00
BFlat 64a967adc1 Merge pull request #9410 from dotCooCoo/fix/effect-blend-mode-menu
Effects: restore the blend-mode menu for shadows and glows
2026-11-26 23:19:22 +07:00
dotCooCoo b64cbe2174 Merge main into feat/scripts-document-views 2026-11-26 08:05:40 -08:00
dotCooCoo e015b20396 Merge main into feat/scripts-startup-scripts 2026-11-26 07:31:10 -08:00
dotCooCoo acda8bed27 Effects: restore the blend-mode menu for shadows and glows
Use the grouped picker in the effect dialogs and Appearance editor. Validate new automation requests while preserving earlier spellings, recorded steps, and untouched stored modes.
2026-11-26 07:07:41 -08:00
BFlat 2c1aebf808 Merge pull request #9054 from dotCooCoo/fix/plugin-grants-integrity
Plug-ins: an edited grants file grants nothing, and its plug-ins ask again
2026-11-26 17:00:02 +07:00
dotCooCoo 3055ea5757 Merge main into feat/scripts-startup-scripts 2026-11-25 23:39:37 -08:00
dotCooCoo 2909471ebc Merge main into feat/scripts-api-d7a-variables 2026-11-25 23:38:36 -08:00
dotCooCoo 562bec3f1e Merge main into feat/scripts-api-d7b-tags-notes-uuid 2026-11-25 23:07:28 -08:00
dotCooCoo 7b776dea92 Merge main into feat/scripts-reflection 2026-11-25 22:14:36 -08:00
dotCooCoo 2fc172e69a Merge main into feat/scripts-xmp-objects 2026-11-25 22:11:49 -08:00
dotCooCoo 220c60b4a7 Merge main into feat/scripts-document-views 2026-11-25 20:37:28 -08:00