Commit Graph
7190 Commits
Author SHA1 Message Date
dotCooCoo 57be8ca36f Plug-ins: a command's manifest can place it in another menu
At plug-in API level 2 a command may give `menu`: `{"path": [...],
"after"?: label}`. The menus list it in that menu, right after the
built-in item `after` names (either label of an item that switches
between two), or at the end of the menu, with the plug-in's name in
parentheses after its label. Keyboard Shortcuts, the command palette
and `command_list` list it under that menu, and `plugin.list` gives its
`menu` with `after` escaped.

A manifest may name 14 menus of Edit, Object, Type, Select, Effect and
View. File, Window, Help, the application menu and the submenus that
list files, fonts, panels or plug-ins are refused when the module is
installed, as is any other `menu`, an `after` that is not 1-64
printable characters and a repeated `menu`. A command whose label with
the plug-in's name reads like a built-in item or submenu of that menu,
or like a command a plug-in with a lower id places there, stays in its
plug-in's submenu, and `plugin.list` and `plugin.inspect` mark it
`placed: false`. The desktop app and `vectorcraft-cli` give the same
result. Commands of several plug-ins at one spot are listed in plug-in
id order and then manifest order. A plug-in whose commands are all
placed elsewhere is a single item in Object › Plug-ins. At API level 1
the key is ignored, repeated or not.
2026-11-22 04:38:27 -08:00
dotCooCoo 341f764458 Scripts: editable is false on a locked artboard, page item lists kept for several documents
- PageItem.editable is false for art on a locked artboard, as remove()
  refuses it. A group on a locked artboard is measured once for all its
  members.
- The lists of page items are kept for the last four documents read, so
  a script that reads two documents in turn does not walk each one again
  on every index.
2026-11-22 03:26:18 -08:00
dotCooCoo f8bbfae755 Plug-ins: a stored file whose read fails gives back its share of the store's bytes
- crates/engine/src/store.rs: each stored plug-in's load reports how
  much of its file it read. What a failed read did not read goes back to
  the 512 MiB the stored plug-ins may read together, on every platform;
  the permission check before the loads is removed. A file that what is
  left does not cover, but would if earlier reads failed, waits until
  those reads are done, so the files still install in file-name order.
  Disabled files and file stamps are taken once, when the store is
  listed. A file's content is compared with its loaded module at install
  only when the file was modified less than 2 s before the store was
  listed; the clock is read only when a file was listed. A grant the load
  removed goes back for a later file with the same id only when the
  grants file has no entry for the id, and each install turn reads the
  grants file once. At quit, a stored load takes no locks and a folder
  load does not wait for the store's turn or for another window that is
  changing the plug-ins.
- crates/engine/src/cmd/plugin.rs and crates/plugins/src/registry.rs:
  when a folder load turns off the file of a plug-in disabled by its id,
  the disabled list is saved in the same install turn, not only when the
  load ends. A change made in another window while the folder is being
  listed is one the load does not undo.
- crates/ui-egui: an export and File > Open install the plug-ins still
  loading before they look up the formats, and a control request waiting
  for the loads no longer asks for a frame of its own.
- crates/engine/src/file_access.rs: `ScopeHandle::capture` is as on
  `main` again. The new `ScopeHandle::capture_now` keeps the process's
  automation roots in force at capture time, and only the Additional
  Plug-ins Folder's per-file check uses it.
- New tests: a stored file replaced with one of the same length and
  modified time while it loaded is skipped; another window's
  `plugin.list` reports a folder still loading as loading; a grant given
  elsewhere after the load removed one is kept.
- docs/plugins.md: a module whose read and load take 10 s or longer is
  skipped also when it would have finished later, and at quit the app
  waits for the modules already loading, for at most 10 s. File > Open
  waits for the loads. The Loading
  paragraph and the docs/mcp.md lines are rewrapped.
2026-11-22 03:25:30 -08:00
dotCooCoo 3098776c07 Display Print Size: on by default, each window counts its own display
Preferences › General › Display Print Size at 100% Zoom is now on by
default, also for saved preferences that predate the key; a saved
choice to turn it off stays off.

A document floating in an OS window of its own counts 100% from the
display that shows that window. A move of the main window leaves the
zoom of floating windows alone, and a window that moves to a display of
another density keeps its zoom percentage.

The desktop app lists the displays once a second while the preference
is on and reads their physical sizes on a background thread when the
list changes; the UI thread does not wait for the X11 or Wayland
queries. RandR is asked for its version before the CRTC and output
queries. A reading that fails is tried again after 10 seconds, and the
displays are read again a minute after the last reading, so a display
replaced by one that lists the same gets its own size.

The Navigator's zoom field, slider and thumbnail clicks count the zoom
from Actual Size, as the status bar's zoom field does; before, a click
on the thumbnail with the preference on changed the zoom. ui.inspect
gives screenPpi and printPpi. The preference's description is updated
in every catalog.
2026-11-22 03:24:23 -08:00
dotCooCoo 891dc8006d Plug-ins: invisible notices are refused, and batch steps show their notice
A filter's `notice` made only of default-ignorable characters that the
host keeps as they are (U+034F combining grapheme joiner, the Hangul
fillers, variation selectors, invisible operators, tags and the like) was
accepted and showed an empty status message. Such a notice now refuses the
output, as one of only zero-width characters already did. The visible
character must also fall within the part the status bar shows: a notice
whose visible text comes after the 200-character cut is refused instead of
showing only the ellipsis. Text with a visible character keeps these
characters, and its bidirectional ones are still escaped.

A painted live effect that returned `notice` was refused and drew its
input unchanged, while the docs said the key is ignored. The painted
decoder now ignores a top-level `notice` and still refuses any other
unknown top-level key; the message and its catalog rows say so.

A plug-in step of an action or a `command.batch` now shows its notice in
the status bar too; when several steps report one, the last shows. The
run's result carries `pluginName`, the name of the plug-in that ran, next
to `notice`, so the status bar names the right plug-in even when a later
step of the batch removes or replaces it. The `plugin.run` and plug-in
command params text lists the new keys.

Docs: docs/plugins.md, docs/mcp.md.
2026-11-22 02:58:47 -08:00
dotCooCoo 80b90c5ebb Quick Pen: a length drag out and back to the same length records no undo step
A length drag that changed the length and then came back to where it
started previewed the path again at its first length, so letting go
recorded an undo step for an unchanged path. A drag that ends at the
length the piece started with is now taken back as Escape takes it
back, on the path being drawn and on a selected path.
2026-11-22 02:07:27 -08:00
dotCooCoo d1eb3f4ad3 Merge main into feat/quick-pen-length-handles 2026-11-22 01:38:35 -08:00
dotCooCoo 47276ca0f2 Quick Pen: the stale-hover tests allow the path's length handles
The two tests that check a stale hover's Smart Guides stay hidden with
Smart Guides off counted every overlay other than the path's points as
a guide. The length handles at the ends of the path being drawn now
show there too, so the tests failed although the guides were hidden.
The shared check accepts a handle and the line to it from the path's
end, and still fails when the tool shows a stale hover's guides.
2026-11-22 01:38:31 -08:00
dotCooCoo ed50dd06f4 Plug-ins: filters at API level 3 change type, images and symbol instances
A filter's manifest may list `writes`, the kinds among its `inputs` it
may change, at `api` 3 with `doc.write` in `permissions`. Such a filter
returns those objects with the fields it changes: type's runs and
paragraph styles, an image's transform and opacity, an instance's
transform and symbol (one already in the document), and each one's
name. Every value is checked as the input's limits and a path's paints
are; any other changed field, or a value out of range, refuses the run
naming the object and the field, and the document stays as it was.

The changes of one run are one undo step, and an output that changes
nothing records no undo step for any filter. Images are now also given
with their opacity.

Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 01:24:01 -08:00
dotCooCoo b88f48fd92 Quick Pen: a segment drag from its selected ends selects the segment
A drag on a segment whose two ends were already selected as anchors kept
that anchor selection, so Delete afterwards removed both anchors instead
of cutting the connection. The drag now keeps the current selection only
when that segment alone is selected; otherwise it selects the segment
with select.segments, as it does from a path selected whole.
2026-11-22 01:19:33 -08:00
dotCooCoo 5cd7f7f849 Save for Web: Save Color Table writes the whole image's table with no slice selected
With slices set to Selected and no slice selected, Save Color Table
failed with "no selected slice in the image" although the dialog's
preview shows the whole image's table. Without a `slice` parameter the
command no longer looks up the slices; a `slice` is still looked up
among the slices `slices` names. The preview is unchanged.

Docs: docs/mcp.md.
2026-11-22 01:11:00 -08:00
dotCooCoo 460678d341 Plug-ins: filters and plug-in commands read the document's settings, artboards, layers and swatches without a selection
A filter, or a live effect with commands, at plug-in API level 3 lists
`context` (settings, artboards, layers, swatches) with `doc.read` in its
permissions. Each filter or command run is then given those parts of the
active document in `_context.document`, whether or not anything is
selected: the document's name without its folder, color mode, units,
active artboard size, bleed and raster effects resolution; every
artboard's id, index, name, rectangle and whether it is active; every
layer and sublayer with its parent, depth, name, visibility, lock,
template, color and whether it is current; and every swatch as
swatch.list lists it. It holds no path, object or write handle, and
live-effect drawing, exporters and importers get none.

More than 10,000 rows or 4 MiB of them fail the run before the plug-in
starts, with the document unchanged, and each row takes 1,000
instructions from the run's budget. The install prompt names the wider
read. API_LEVEL is now 3, so older hosts refuse such a manifest.
plugin.list and plugin.info give `context`, and their params text names
it and API level 3.

The plug-in fuzz tests add hostile `context` manifests, installed and
run with and without a selection.

Docs: docs/plugins.md (Document information), docs/mcp.md,
docs/target-app-parity.md.
2026-11-22 01:02:00 -08:00
dotCooCoo 6ced69a4eb Merge main into feat/quick-pen-edit-delete
`an_arc_drag_shows_the_protractor` clears the selection before each
round, so its clicks draw instead of editing the path the last round
left selected.
2026-11-22 00:39:01 -08:00
dotCooCoo af91c28c64 Merge main into feat/scripts-unitvalue 2026-11-22 00:30:37 -08:00
dotCooCoo 875bde4841 Plug-ins: a filter or plug-in command can report a notice in the status bar
A filter's output may hold `notice`, one string reporting what the run did.
It needs no permission and no host import. Once the output is applied,
plugin.run and plug-in commands return it as `notice`, and the desktop app
and the web build show it in the status bar as `Plug-in “name”: notice`.
The status bar translates the words around it and never the notice.

The host trims the notice, escapes control, bidirectional and separator
characters, and cuts it at 200 characters, escapes included. A notice that
is not a string or has no visible character refuses the output, and nothing
changes. A run that declines, fails, is refused or is canceled shows none,
and a live effect's notice is ignored.

Docs: docs/plugins.md, docs/mcp.md, docs/target-app-parity.md.
2026-11-22 00:12:07 -08:00
dotCooCoo 70a56fb5be Path Precision Tools: Add Inscribed Circle bounds its work and memory
- The searches for all the selected objects share one limit of
  134,217,728 distances from a point to an edge, as Add Bounding Circle
  shares its splits, and each cell is measured only when the limit has
  room for it. One search keeps at most 1,048,576 cells waiting. The
  pathops crate adds inscribed_circle_within for a shared budget.
- The search stops once its best center is within the precision of half
  the box's narrower side, so a long rectangle ends at its first cells,
  and cells that cannot beat the best center are no longer queued.
- A fill much smaller than the precision still gets a circle: the
  search keeps splitting until it finds a center inside the outline.
- The precision also follows the box of the area the fill rule leaves.
- Flattening stops at the first curve past the edge limit. An outline
  that flattening closes up, or whose center lands outside the curves,
  is flattened up to four times, 16 times finer each time; one it still
  cannot resolve is too complex to measure, not empty. Areas are summed
  from each contour's own first point.
- An outline with more than 262,144 anchors in its filled subpaths is
  refused before it is resolved.
- A selected layer is refused like any other object that is not a path,
  and inside an isolated compound path the circles join it, as Tangent
  Circle's do.
- The menu item uses a named constant, and a UI test checks that it
  runs the command with no dialog and selects a new live circle in each
  selected shape, as one undo step.
- The params text and docs say that the 0.02 pt bound holds before the
  circle is drawn 0.03% smaller, that a shape under 10 pt across is
  measured to a five-hundredth of its narrower side, when long curves
  are flattened more coarsely, and that edges can move by 1e-6 pt as in
  the other path operations.
2026-11-21 23:53:37 -08:00
dotCooCoo c417aff8fb Scripts: .js scripts have Promise and run its jobs before the run ends
A script run from a .js file now has Promise as ECMA-262 11th edition
section 25.6 defines it: the constructor, then, catch, finally, and
Promise.resolve, reject, all, allSettled and race. .jsx scripts and
scripts given as source keep the ES5.1 built-ins; a named engine gets
Promise at the first .js run that names it and keeps it.

- The callbacks run as jobs from one FIFO queue after the script's own
  code ends and before the run ends, sliced like the script, with no
  native recursion along a then chain. Each job takes 1 unit of fuel, so
  an endless chain stops at the fuel limit.
- More than 1,048,576 waiting jobs end the run with a Jobs limit error.
  A run that fails, hits a limit or is stopped drops its waiting jobs
  and rolls back as before.
- A promise still rejected with no handler when the run ends goes to
  the report's unhandledRejections (first 20) and unhandledRejectionCount,
  and to the Script Console with its file, line and column.
- Until the language has iterators, all, allSettled and race take
  arrays, objects with a whole-number length and strings, and the
  statics always build plain Promise objects. Promise.any is not provided.

cargo xtask test262 now runs the suite's built-ins/Promise tests that
need only the built-ins present: 402 of 538 runs pass.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 23:25:43 -08:00
dotCooCoo d397f4232c Merge main into feat/scripts-startup-scripts 2026-11-21 22:52:51 -08:00
dotCooCoo 8d0001308f Merge main into feat/js-es2015-block-arrow-template 2026-11-21 22:52:36 -08:00
dotCooCoo c48b3e8c93 Merge main into feat/three-d-mesh-attributes 2026-11-21 22:34:22 -08:00
dotCooCoo cb3946fe2f Quick Pen: an open end on a selected segment continues its path
A click on an open end of another path that lies on a segment of the
selected path now goes on drawing from that end, and the pointer shows
that it will. Before, the segment took the press and the click started a
new path. An anchor of the selected path still comes first.
2026-11-21 22:23:15 -08:00
dotCooCoo ecc9a35499 Retype: each mark of a compound path keeps its own other character
The other character a shape read as a combining mark also is was kept
by the shape's id. The parts of a compound path share that id, so with
two such marks in one compound the second mark's character replaced the
first's, and a split that left the first mark first on a line set it as
the second mark's character (a dot below became a small tilde). The
character is now kept by the part's own glyph match, and the new test
moves a dot below and a tilde off their base into one compound path.
2026-11-21 21:58:11 -08:00
dotCooCoo 357133cef1 Quick Pen: a selection change during a press stops it
When another command changes the selection while a press on an anchor or
a segment is down, the release no longer selects an anchor, goes on
drawing from an open end, or moves anything. Choosing another tool during
a drag that came back to where it started now records no undo step.
2026-11-21 21:51:20 -08:00
dotCooCoo 26200f0599 Smooth: read the anchors around a run through the edited list
The merge of main brought in code that indexes the anchor list while
smooth_open now keeps it in an EditsFromEnd, which has no indexing, so
the engine did not build. The anchors at both ends of a run and of its
neighboring segments are now read from the span that EditsFromEnd::get
returns.
2026-11-21 21:44:17 -08:00
dotCooCoo 67633efb4d Scripts: a linked profile file is refused and preset values count as passed data
A New Document profile file that is a link or a folder is no longer read:
the read is exempt from a script's file gate, which never checked where a
link leads. file.new reports it as a profileError with the reason "not a
plain file".

Reading a DocumentPreset setting now counts the value it returns toward
the data a run may pass, as assigning it does, and addDocument counts the
preset's settings before copying them.

The removeAll() test on a locked artboard now also holds an object on an
unlocked artboard and checks it is still there after the call throws.
2026-11-21 21:36:54 -08:00
dotCooCoo 1410f7500c Quick Pen: an edit by another command during a drag stays
When another command edits the document or the selection during a drag
on an anchor or a segment, the drag now previews no more and its undo
step keeps that edit with the move as last shown, also when Escape ends
the drag. Before, the next drag event previewed from the document as it
was before the edit, so the edit was lost.
2026-11-21 21:23:36 -08:00
dotCooCoo 675c53eed6 Merge main into fix/retype-drawn-shape-font-state 2026-11-21 21:21:54 -08:00
dotCooCoo 14b2ec5bbf Merge main into feat/retype-installed-fonts 2026-11-21 21:18:21 -08:00
dotCooCoo cd03842fb1 Docs: path.smoothRegion states its sampling limits and acceptance test
docs/mcp.md now says the measuring spacing is a target (at least 4 and at
most 1,024 pieces per curved segment, fewer on subpaths of more than 256
segments) and gives the acceptance test as formulas: t1 <= t0 + 0.001 * s
and fewer anchors, t0 - t1 >= 0.000001 * s, or b0 - b1 > 0.0001 * b0,
with s the larger of t0 and 1. The roughness doc comment says the points
are about `step` apart.
2026-11-21 21:18:03 -08:00
dotCooCoo c5ca6d4273 Merge main into feat/save-for-web-transparency-dither 2026-11-21 21:12:41 -08:00
dotCooCoo 68602e24ad Merge main into fix/smooth-region-bounds-prefilter 2026-11-21 21:11:55 -08:00
dotCooCoo 5379d77fec Merge main into feat/dimension-alt-object-size 2026-11-21 21:06:53 -08:00
dotCooCoo 7916ffc1d6 Merge main into feat/curvature-circle-options 2026-11-21 21:06:24 -08:00
dotCooCoo dc9a724b6a Merge main into fix/script-export-linked-files 2026-11-21 21:04:37 -08:00
dotCooCoo 5f2a256449 Merge main into feat/smooth-tool-smoothness 2026-11-21 20:58:59 -08:00
dotCooCoo 39e2a19ee0 Merge main into feat/quick-pen-arc-center-i9314 2026-11-21 20:52:46 -08:00
dotCooCoo f312abf05a Merge main into fix/smooth-no-worse-pass 2026-11-21 20:52:42 -08:00
makesomethingshit 6cda197cbe PDF import: honor the editing data opt-out when opening a file (#7572) 2026-11-22 13:50:06 +09:00
dotCooCoo 059628a14c Quick Pen: a drag back to its start records no undo step
A drag on an anchor or a segment that is let go where it started now
moves nothing and adds no undo step. Before, it recorded a Move step
that changed nothing.
2026-11-21 20:47:12 -08:00
dotCooCoo 7d3094afe6 Scripts: .js scripts run let, const, arrows, templates, default and rest parameters and spread
vectorcraft-js gains Options::es2015, which reads and runs these
ECMAScript 2015 forms: let and const with block scope and their
temporal dead zone, a new let binding for each loop iteration,
function declarations scoped to their block (with the Annex B.3.3
variable outside strict mode code), arrow functions, template
literals and tagged templates, default and rest parameters, and
spread in array literals, calls and new. Spread reads arrays,
strings by code point and objects with a length, by index, and
throws a TypeError for anything else until iterators are added.

Eval code outside strict mode code cannot declare a var that clashes
with a let or const around it, or with a parameter inside a default
value. Spread, template objects and the new scopes take fuel and
count against the heap limit, and nested arrows and templates count
against the depth limit.

script.run sets the option for a .js file; eval, Function, #include
files, $.evalFile and a kept #targetengine read code the way the
running script does. A .jsx file and a source string stay ES5.1.

The test262 runner gains an ES2015 subset run, read without and with
the option. docs/mcp.md and docs/target-app-parity.md describe the
new forms.
2026-11-21 20:43:20 -08:00
BFlat db9acab4da Merge pull request #9004 from dotCooCoo/fix/retype-even-odd-turned-counters
Retype: a glyph in an even-odd compound matches with only some of its contours reversed
2026-11-22 11:38:53 +07:00
BFlat 90cd5eef57 Merge pull request #9016 from dotCooCoo/fix/dynamic-symbol-part-selection-paint
Symbols: Direct Selection picks a dynamic instance's part where its fill and stroke effects draw it
2026-11-22 11:38:33 +07:00
BFlat f03d04b91b Merge pull request #8996 from dotCooCoo/fix/simplify-smooth-keep-closed-start
Paths: Object > Path > Simplify and Smooth keep a closed path's start
2026-11-22 11:38:13 +07:00
BFlat 37610608f1 Merge pull request #8976 from dotCooCoo/fix/smooth-region-rejects-bad-params
Smooth: path.smoothRegion and path.joinScrub refuse a radius, fidelity or tolerance out of range
2026-11-22 11:37:54 +07:00
BFlat d13a06b2f2 Merge pull request #8963 from dotCooCoo/fix/live-paint-bucket-lent-tool-release
Live Paint: a Cmd-drag cut short keeps the bucket's colors
2026-11-22 11:37:34 +07:00
BFlat 1360f9ac6f Merge pull request #8961 from dotCooCoo/fix/safe-mode-expand-hidden-symbol-art
Expand Appearance: Safe Mode skips art that a group's raster image leaves out
2026-11-22 11:37:14 +07:00
BFlat 789f5033bb Merge pull request #8954 from dotCooCoo/fix/params-textedit-rest
Type: text commands refuse a parameter of the wrong type
2026-11-22 11:36:54 +07:00
BFlat 55064f7f59 Merge pull request #8949 from dotCooCoo/feat/dimension-drag-reposition
Dimension tool: a drag from a dimension already drawn moves it
2026-11-22 11:36:34 +07:00
dotCooCoo ceab5d7e11 Merge main into fix/script-grants-read-failure 2026-11-21 20:33:50 -08:00
dotCooCoo 7dfc281205 Merge main into feat/scripts-startup-scripts 2026-11-21 20:25:05 -08:00