The contrast row, its menu rows and its tests move to the craft UI framework,
as main's Color Wheel panel now uses it:
- The row is a Row with a Swatch named Background (a color well whose value is
the background's hex value) and Text for the ratio and the AA and AAA
results, each with the WCAG minimums as its tooltip.
- Show Contrast, Contrast For and Contrast Background are rows of the panel
menu's items (ui.colorWheel.contrast, contrastFor.<id>,
contrastBackground.below and contrastBackground.current), after Show
Opacity. Current Color is gray, and its row answers an error, while the
active proxy has no solid color.
- The kept background and ratio answer are fields of WheelUi instead of panel
state. The answer's key also holds whether the Live Paint Bucket paints,
which changes the proxies' paint without a document revision.
- The row's tests run in the panel's Fixture by accessible name; the drag test
runs an interaction whose previews set the fill, as the Show Document Colors
drag test does.
- The settings lists in the params text, docs/mcp.md and the tests take both
opacity and the contrast keys.
app.executeMenuCommand('Fit Artboard to artwork bounds') threw the
command's error when the active artboard was locked or had no art on
it. The canvas's right-click menu dims Fit to Artwork Bounds then
(DocState::any_art_to_fit), so the script now does nothing and adds
no undo step, as for the other menu items that are not available. The docs state
that an available menu item runs its command and that an error that
command returns throws.
The host-versus-checker name table lists
Application.prototype.executeMenuCommand.
The script host ran its realm with E4X off, so XML literals were syntax
errors and XML, XMLList, Namespace, QName, isXMLName and
setDefaultXMLNamespace were missing from every script, although
vectorcraft-js has them. script.run and File › Scripts now turn E4X on
for .js and .jsx files, script text, #include files, $.evalFile, eval
and Function, and for a #targetengine engine.
script.check lists the e4x and xml features under the language need
instead of hostOnly, since VectorCraft runs them.
The Safe Mode choice after a stopped launch moves to main's dialog host and keeps listing every
plug-in that was loading: one name in the sentence, or the list with "Disable Listed Plug-ins and
Continue". Automation requests wait in the queue while plug-ins load, and one past its deadline is
answered as expired. File > Open and opening a file still wait for the plug-ins still loading.
- Assigning hidden, locked, position, left, top, width or height to an
object in a hidden or locked layer throws Cannot edit, as opacity
does, and changes nothing. Its name and note still change.
- An object with nothing in it, such as an empty group or a compound
path whose paths moved out, reads its bounds, position, width and
height as zeros, and assigning them does nothing, so reading every
property for-in lists does not throw on it.
- Assigning selection without app. sets the active document's
selection, and app.selection can be assigned the same way. Assigning
activeDocument without app. activates a document, and assigning
documents keeps its value.
- JSON.stringify writes a collection, or data that holds one, without
reading toJSON through the collection's name lookup, which threw
Not found.
- The docs state that Object.keys, Object.getOwnPropertyNames and
Object.getOwnPropertyDescriptor do not report the members, that a
value assigned to a member the class lacks is not kept, and that the
selection order is VectorCraft's own rule.
Docs: docs/mcp.md, docs/target-app-parity.md.
Scripts that check a member with hasOwnProperty before using it skipped
every page item, because the members live on the class prototype. Now
hasOwnProperty and propertyIsEnumerable are true for each member of an
object's class that is available, and for-in lists its properties but
not its methods. Members that only throw "not available yet" stay false.
- An empty selection is an empty list instead of null.
- pageItems lists art topmost first, as the CMYKColor example reads the
frontmost path as pathItems[0]
(https://ai-scripting.docsforadobe.dev/jsobjref/CMYKColor/). A
document's selection lists the selected objects in that order too,
whatever order they were picked in. That selection order is
VectorCraft's own rule.
- A collection read with a name, such as pageItems["Logo"], gives what
getByName gives, as
https://ai-scripting.docsforadobe.dev/scriptingJavascript/objectReferences/
shows. A name nothing has throws Not found, and assigning to such a
name throws the same error.
- activeDocument, documents and selection can be named without app., as
that page describes for the application's members.
- move() with the object itself and PLACEBEFORE or PLACEAFTER leaves it
where it is and adds no undo step.
- move() keeps a compound path whose last path moves out, so a script
that holds it can still read it.
- Assigning opacity to an object in a hidden or locked layer throws
Cannot edit and changes nothing.
- name takes a number or a Boolean as its text.
- String() of an object gives its class and name, such as
[PathItem Logo].
Docs: docs/mcp.md, docs/target-app-parity.md.
- file.place with `importer` and `params` and `paths`, or with no file,
opened the Place dialog with only the files, so its OK read them with the
built-in reader. Each dialog entry now carries the importer and its
params, from the paths given, the desktop pick and the web pick, and OK
passes them to file.place and file.place.queue.
- On the web, each picked file carries its own pick's importer and params.
Picked files with other ones, or that arrive while a Place dialog is open,
wait for the next dialog.
- The Place dialog does not read the start of a PDF, .ai, EPS or PostScript
file placed with an importer named to tell whether Link would place it as
a document.
- A path placed or opened with `importer` named is refused from its size
before any of it is read. Before, its first 64 KiB were read first.
- docs/plugins.md and docs/mcp.md say when the size check runs, that the
web's File › Place reads the picked file in the browser, that File ›
Place's filters leave out extensions a built-in format reads, and that a
dropped file a built-in format reads goes to that format.
An importer plug-in with "place": true in its manifest now reads its files
for File › Place as well as File › Open. file.place, file.place.info and
file.place.queue take importer and params; without importer, a file no
built-in format reads goes to the first placing importer by id that lists
its extension. The importer is given at most 128 MiB of the file (a larger
file is refused from its size before it is read) with _context.mode
"place", and its objects, guides left out, become one group named after
the file, as one undo step, embedded. A decline, invalid output, a trap or
Cancel places nothing.
- The Place dialog lists placing importers' extensions under "All
placeable files" and in a filter named after each importer.
- On the web, a placing importer's file dropped on the canvas is placed.
- A file placed with a named importer skips the text, PDF, DXF and PSD
import options.
- document.formats and plugin.list mark placing importers with place:
true; place on any other kind is refused at install.
Docs: docs/plugins.md, docs/mcp.md, docs/gaps.md, docs/target-app-parity.md.
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.
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.
Scripts get the global UnitValue constructor: a number with one of the
length units (inches, feet, yards, miles, millimeters, centimeters,
meters, kilometers, points, picas, traditional points and picas,
ciceros), pixels or percent. as() and convert() give or change the
unit, baseUnit sets what one pixel and 100% measure, and the arithmetic,
comparison and unary operators calculate with the object's number. With
two objects the right one is converted to the left one's unit.
Conversions go through exact ratios to the inch, so 1 in is exactly
72 pt. An unknown unit or text makes an invalid object; converting it or
using it with an operator, a result that is not finite and a comparison
with a number that is not finite throw a RangeError.
A realm without UnitValue keeps the standard operators. docs/mcp.md
describes the class.
At launch the desktop app loaded every stored plug-in and every module in
the Additional Plug-ins Folder on the UI thread before the window
appeared, one after the other. A slow or panicking module held up or
ended startup.
- crates/plugins/src/loader.rs (new): `Loads` runs load jobs on up to
four threads. Each job runs inside `catch_unwind`; a panic or a load
that takes 10 s or longer fails that job alone, and the others go on.
Outcomes come back in job order.
- registry::FolderLoad and store::StoredLoad list in one step, load on
the workers and install in file-name order. A module whose id was
installed or removed in another window while it loaded is skipped.
- The desktop app loads in the background only during launch; frames
install the finished loads. Plug-in commands, commands that edit,
exports, control requests and files opened at launch wait for the
loads first; view commands and queries do not.
- The launch marker names every plug-in still loading, not only the
oldest. After a launch that stopped during the loads, the Safe Mode
choice lists all of them, and Disable Listed Plug-ins and Continue
turns them all off. `plugin.safeMode` adds `pendingItems`. A module
whose load panicked is no longer named.
Docs: docs/plugins.md, docs/mcp.md.
- 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.
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.
grants.json now holds {"version": 1, "grants": [...], "mac": "..."}, where
mac is an HMAC-SHA-256 of the grants and of the plug-in folder, made with a
random 32-byte key kept in the system key store: the Keychain on macOS,
Credential Manager on Windows, the Secret Service on Linux and the BSDs. The
MAC is compared in constant time. A file without a valid MAC for its folder
(an edited or added grant, a removed or changed MAC, a file copied from
another folder) grants nothing, and its plug-ins ask for approval again.
This changes the default for existing files: a grants.json written by an
earlier version is a plain list without a MAC, so its plug-ins ask once
more, and the next approval replaces it with a signed file.
When the key store can't be reached, an approval lasts for the session
only, nothing claims to persist, and the existing file is left as it is.
The first key is made under a per-user lock and read back, so processes
that approve their first plug-in at the same time keep one key. The web
build keeps no grants file.
New native-only dependencies of vectorcraft-engine: hmac, sha2, getrandom
and keyring (all MIT OR Apache-2.0).