Merge main into feat/scripts-api-d5-swatches-symbols

This commit is contained in:
dotCooCoo committed 2026-12-01 14:09:43 -08:00
commit eba5ecbdfc
61 files changed
+4460 -156

No files matched your search

+5 -5
View File
@@ -600,7 +600,7 @@ keeps the dialog's options as a saved preset.
PDF presets: `ui.pdfPresetsDialog {selected?}` opens Edit → PDF Presets (dialog `pdfPresets`, field `selected`: a
preset name). Built-in presets are read-only. New… and Edit… open the preset editor, which `ui.pdfPresetDialog {name?
(a saved preset to edit) | preset? (the preset a new one starts from)}` opens too: dialog `pdfPreset`, the Save PDF
(a saved preset to edit) | preset? (the preset a new one starts from)}` opens too: dialog `pdf-export`, the Save PDF
dialog's option fields plus `name` and `description`; `ui.dialog.confirm` runs `pdf.preset.save` and returns to PDF
Presets (a new preset can't take a name in use). Delete, Import… and Export… are `pdf.preset.delete`,
`pdf.preset.import` and `pdf.preset.export`; `ui.dialog.confirm` closes. Opening a `.vcpdfpresets` file with `app.open`
@@ -757,7 +757,7 @@ the dock's tab strip while Layers shows) lists the layer commands (New Layer…,
Options for Selection…, clipping mask, isolation, Locate Object, Merge Selected, Flatten Artwork, Collect in New
Layer, Release to Layers, Reverse Order, Template, Hide/Outline/Lock Others or Show/Preview/Unlock All Layers), Paste
Remembers Layers (`layer.pasteRemembersLayers`, checked when on) and Panel Options…. Layer Options is the
`layerOptions` dialog (`ui.layerOptions {ids?}`, `ui.newLayer {sublayer?}`), Panel Options the `layersPanelOptions`
`ui.layerOptions` dialog (`ui.layerOptions {ids?}`, `ui.newLayer {sublayer?}`), Panel Options the `ui.layersPanelOptions`
dialog (`ui.layersPanelOptions`), and `ui.layersExpand {ids?, open?}` opens or closes rows; see the Layers panel
section of `docs/mcp.md` for the row commands (`layer.setCurrent`, `layer.highlight`, `layer.move`…).
@@ -769,7 +769,7 @@ File Info: File → File Info… (`file.info` from the menu or Cmd+Alt+Shift+I;
stays open.
Document Raster Effects Settings: Effect → Document Raster Effects Settings… (`ui.rasterEffectsSettingsDialog` for
agents) opens the `rasterEffectsSettings` dialog. Its fields are what `document.rasterEffectsSettings` reports
agents) opens the `document.rasterEffectsSettings` dialog. Its fields are what `document.rasterEffectsSettings` reports
(`resolution`, `colorModel`, `background`, `antiAlias`, `clippingMask`, `addAround` in pt, `preserveSpotColors`);
`ui.dialog.confirm` runs it with them as one undo step; a bad value keeps the dialog open. Object → Rasterize… opens the
`object.rasterize` dialog, whose fields (`ppi`, `colorModel`, `background`, `antiAlias`, `clippingMask`,
@@ -884,7 +884,7 @@ art too large at that scale) keeps the dialog open.
Placement Options: the Links panel's flyout (or `ui.placementOptionsDialog {ids?}` for agents) opens the
`placementOptions` dialog for the selected images (fields `ids`, `preserve`: `transforms`/`bounds`/`fileDimensions`/
`fit`/`fill`, `align`: `topLeft` … `bottomRight`, `clip`). `ui.dialog.confirm` runs `links.placementOptions` with them as
one undo step.
one undo step, on the images the dialog opened on even when the selection has changed since.
Relink: the Links panel's Relink… button and flyout item (or `ui.relinkDialog {ids?}` for agents) open the `relink`
dialog for the selected images and placed documents (fields `ids`, `links`: `[{name, ids}]`, one row per linked file,
@@ -997,7 +997,7 @@ the save dialog) opens `tiffOptions`, `bmpOptions` or `tgaOptions`: the raster r
rows off; RLE turns flipped rows off). `ui.dialog.set` the fields and `ui.dialog.confirm` writes the file(s) with
`document.export`.
Save for Web: File → Export → Save for Web (Legacy)… (`file.saveForWeb`, Ctrl/Cmd+Alt+Shift+S) opens the `saveForWeb`
Save for Web: File → Export → Save for Web (Legacy)… (`file.saveForWeb`, Ctrl/Cmd+Alt+Shift+S) opens the `save-for-web`
dialog on the remembered settings (`webExport.settings`). Its fields are the `document.exportForWeb` settings
(`format`, `colors`, `reduction`, `dither`, `quality`, `colorTable`, `width`, `percent`, `output`…; set `preset` to load
a preset) plus `__view` (`original`, `optimized`, `2up`, `4up`), `__zoom` (`fit` or a percentage), `__kbps` and
+94 -12
View File
@@ -632,6 +632,11 @@ of `appearance.setItem`, `anchor` of `path.removeAnchor` and `addon.pen.removePo
value such as `"3"`, `2.5`, `-1` or `true` with `` `index` must be a whole number ``, naming the key, and reports a key
left out or null as missing (such as `` missing integer `index` ``). An optional one, such as `subpath`, keeps its default when
left out or null; `appearance.setActiveItem` reads a null `index` as clearing the active item.
`file.new` refuses a number given for `artboards`, `artboardLayout.columns` or `artboardLayout.rows` that is not a
whole number from 1 to 1000, such as `2.4`, `0` or `1001`, and opens no document. A null `artboards` keeps the
default or the preset's count; a null `columns` or `rows` is an error. A `file.new` step replayed from a journal or
played from the Actions panel keeps the earlier rules: `artboards` is rounded and kept within 1 to 1000, a `columns` of
1 or more is rounded and kept to at most 1000, and a `rows` is rounded and must then be from 1 to 1000.
A command that leaves out an object selected inside a
selected group also leaves it out when `ids` list it together with a group that holds it. Every command that takes
`ids` (or `slices`, for the slice commands) refuses a list with an entry that is not a non-negative integer, or a value
@@ -2751,9 +2756,10 @@ control character, in the first 8 KiB) or `tooLarge` (over 8 MiB). For a script,
assign or declare `Folder`; a variable whose name a member assignment writes counts as one that may hold a File
object; the same objects left out are not counted for the File-only functions `open`, `read`, `readch`,
`readln`, `write`, `writeln`, `copy`, `createAlias`, `openDlg` and `saveDlg`, which a Folder object does not
have; a document's `saveAs`, `exportFile` or `exportVariables` counts too, and so does `SaveOptions.SAVECHANGES`
wherever the script reads it, since `close` given it saves the document to its file), `filesOpened` (files opened
in other apps), `network`,
have; a document's `saveAs`, `exportFile` or `exportVariables` counts too, and so do `print` called on
`app.activeDocument`, `app.documents[i]`, `documents.add()`, `documents.getByName()` or `app.open()`, or on a
variable that holds one of them, and `SaveOptions.SAVECHANGES` wherever the script reads it, since `close` given
it saves the document to its file), `filesOpened` (files opened in other apps), `network`,
`nativeCode`, `otherApps` (messages to other apps), `environment` (environment variables), `unseenCode` (`eval`,
`new Function` and `$.evalFile`) and `preferences` (the reference app's preferences changed).
- `problems` lists what would stop the script loading as written (strings, comments, regular expressions,
@@ -3209,6 +3215,78 @@ through `$`:
show the prompt. A bad value throws an error before anything is written. The warnings of the save or export that
`saveAs`, `exportFile`, `app.open` and `close` run go to the console, each after the method's name
(`saveAs: …`).
- `Document.print(options?)` runs `file.print` on the document, with the options a script assigned over the
document's print settings, or over the preset's when `printPreset` is assigned. The document's print settings
stay as they are, and `print` adds no undo step
(https://ai-scripting.docsforadobe.dev/jsobjref/Document/, https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/).
`options` is a `new PrintOptions()`, whose `jobOptions`, `colorManagementOptions`, `colorSeparationOptions`,
`coordinateOptions`, `flattenerOptions`, `fontOptions`, `pageMarksOptions`, `paperOptions` and `postScriptOptions`
are `new PrintJobOptions()`, `new PrintColorManagementOptions()`, `new PrintColorSeparationOptions()`,
`new PrintCoordinateOptions()`, `new PrintFlattenerOptions()`, `new PrintFontOptions()`,
`new PrintPageMarksOptions()`, `new PrintPaperOptions()` and `new PrintPostScriptOptions()`
(https://ai-scripting.docsforadobe.dev/jsobjref/PrintJobOptions/ and the pages beside it). Each property reads as
its help page's default until it is assigned, and a `PrintOptions` holds its option objects by reference, so a change
made after the assignment is printed. `print` maps `printPreset` (a print preset's name) and `flattenerPreset`;
`copies` (1 to 999), `collate`, `reversePages`, `designation`, `printAllArtboards`, `artboardRange`,
`printAsBitmap` and `file` of the job; `colorProfileMode` (`SOURCEPROFILE` and `CUSTOMPROFILE`), `intent` and
`name` (an RGB or CMYK profile) of color management; `colorSeparationMode` (`COMPOSITE` and
`HOSTBASEDSEPARATION`), `convertSpotColors` and `overPrintBlack`; `emulsion`, `fitToPage`, `horizontalScale` and
`verticalScale` (1 to 1000), `orientation`, `position` and `tiling`; `overprint` of the flattener; `colorBars`,
`pageInfoMarks`, `registrationMarks`, `trimMarks`, `pageMarksType` and `trimMarksWeight`; `name`, `width`,
`height` and `transverse` of the paper; and `negativePrinting` and `postScriptLevel` (`PSLEVEL2` and `PSLEVEL3`).
`app.printPresetsList` gives the print presets' names, `[Default]` first, and `app.PPDFileList` is empty.
The enumerations `PrintColorProfile`, `PrintColorIntent`, `PrintColorSeparationMode`, `PrintOrientation`,
`PrintPosition`, `PrintTiling`, `PrintArtworkDesignation`, `PrintingBounds`, `PrintFontDownloadMode`,
`FontSubstitutionPolicy`, `PageMarksTypes`, `PostScriptImageCompressionType` and `PrinterPostScriptLevelEnum` hold
strings such as `"PrintTiling.TILEFULLPAGES"`. VectorCraft's own rules: `print` writes the file `jobOptions.file`
names, checked as `saveAs` checks its file: PostScript when the name ends with `.ps` or `postScriptLevel` is
assigned, a print-ready PDF otherwise, also when that name is a link to a file with another extension, and
`printerName` does not apply. Without a file, `print` prints to the
printer `printerName` names, or to the system's default printer when it is `""` or not assigned
(https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/). The name must be exactly the name of a printer the
app listed for the run, or `print` throws `PrintOptions.printerName names no installed printer`; with no default
printer it throws `There is no default printer`. `print` composes the job as a print-ready PDF when it is called
and sends nothing while the run goes on. When the run ends and its changes are kept, the app asks before it sends
the jobs (dialog kind `scriptPrint`, listing each job's document, printer and pages). The dialog does not open
while a text field or text being typed on the canvas has the keyboard; it opens once neither does. The jobs are
sent only after the person at the keyboard clicks its Print button, or presses Space once Tab has moved the focus to
it: the button takes no click for the first second after the dialog appears (VectorCraft's own value), and Enter
does not print. `ui.dialog.set` refuses `answer: "print"`, `ui.dialog.confirm` is refused unless `answer` is
`"cancel"`, and a Print that synthetic input gives is refused and the dialog opens again. Cancel, Escape,
`ui.dialog.cancel` and `answer: "cancel"` drop the jobs and keep the run's changes. A run that fails or is stopped sends
nothing. Before it sends them, the app checks that each printer is still installed under that name, and sends none
when one is not. A run prepares at most 4 jobs, together at most 100 pages, every copy counted, and 32 MiB, and
none while an earlier run's jobs wait for an answer. The pages are counted from the art as it prints, artboard
backgrounds and placed files included, before the job is composed. A job for a printer is a PDF, so `postScriptLevel` with no
file throws. Where the app lists no printers for scripts (the web build, and MCP or the command line without the app),
`print` with no file throws `Printing to a printer is not available here`. `app.printerList` gives a `Printer` for
each printer the app listed for the run, at most 256, leaving out names longer than 512 bytes or with a control
character; when the system's default printer comes after the first 256, it takes the last place
(https://ai-scripting.docsforadobe.dev/jsobjref/Application/,
https://ai-scripting.docsforadobe.dev/jsobjref/Printer/). Its `name` is read-only and its `printerInfo` throws an
error that says it is not available yet. With no document open, `app.printerList` throws `Application.printerList
needs an open document`, as the Printer help page describes, and where the app lists no printers for scripts it
throws `Application.printerList is not available here`. A printer name is only compared with the listed names: it
is never read as a path, a URL or a command. `fitToPage` set to true wins over the scale factors and the tiling
mode. With `printAllArtboards` false, `artboardRange` picks the artboards, and without a range every artboard
prints. With `printAllArtboards` not assigned, an assigned `artboardRange` replaces the range of the settings
`print` starts from, which prints when those settings print a range. `print` starts from the preset's settings
when `printPreset` is assigned, otherwise from the document's saved settings. When those settings ignore the
artboards, an assigned `printArea` prints the artboards an assigned `artboardRange` names, or each artboard without
a range. With one of `horizontalScale` and `verticalScale` assigned, the other keeps its value in the settings
`print` starts from. `print` throws before anything is written when an assigned `artboardRange` names an
artboard the document does not have, also with `printAllArtboards` true, when `printPreset` or `flattenerPreset`
is not a preset's name (any case), when `colorManagementOptions.name` is not an RGB or CMYK profile's name (any
case), when `paperOptions.name` is not a paper `file.print` knows, or when it names a paper other than `custom`
and `width` or `height` is assigned above 0. An assigned name that is empty or only spaces, or holds `/`, `\` or
a control character (also at either end), throws too, and each checked name is sent without the spaces around it.
`PPDName` takes only `""`. A listed option that is not mapped, or a value that is not mapped such as
`PrintingBounds.ARTWORKBOUNDS`, `INRIPSEPARATION`, `PSLEVEL1` or a scale above 1000 with `fitToPage` not true,
throws an error that says it is not available yet. Each value is checked when it is assigned: a wrong type, a number that is not finite or is
out of range, a string longer than 4,096 bytes, an option object of the wrong class or from an earlier run, and a
path given as a string all throw. A run makes at most 256 option objects. Each warning `file.print` gives goes to
the Script Console as a line that starts with `Document.print: `. `vc.run` still cannot run `file.print` or
`print.*`.
- `Document.pathItems` (https://ai-scripting.docsforadobe.dev/jsobjref/PathItems/) lists the document's paths in the
order of `pageItems`, paths inside groups and compound paths included, with `length`, `[i]`, `index(key)`,
`getByName(name)`, `removeAll()`, `add()` (a path with no points, from `path.create`, painted as new art; when new
@@ -3818,7 +3896,8 @@ In the app, a script past the growth limit stops at a question to continue or to
with an error at that limit. The headless reply is `{ok: true, name, changed, written, log, fuelUsed, hostCalls,
runTimeMs, timingAvailable, hostCallCounts, slowestCommands, console, dialogs, dialogCount, dialogsTruncated}`, with
`unhandledRejections` and `unhandledRejectionCount` as well when a `.js` script left rejected promises unhandled. In
the app the reply is `{running: true, name}`, and the report appears later as `scriptReport` in `ui.inspect`. The
the app the reply is `{running: true, name}`, and the report appears later as `scriptReport` in `ui.inspect`, with
`prints`, the number of jobs the run prepared for a printer, when it prepared any. The
report of a failed run has the same fields after `kind`, `message`, `messageOrigin`, `line`, `column`, `file` (when
the error is in another file than the script) and `fuelLeft`. `messageOrigin` is `script` when `message` is text the
script supplied (a value it threw, or an error it made or whose name or message it changed) and `built-in` for the
@@ -4866,7 +4945,7 @@ shows no notice.
## Navigator panel options
The Navigator panel menu's Panel Options… opens the `navigatorPanelOptions` dialog (fields `color`, `solidDashes`),
The Navigator panel menu's Panel Options… opens the `ui.navigatorPanelOptions` dialog (fields `color`, `solidDashes`),
and `ui.navigatorPanelOptions {color?, solidDashes?, viewArtboardContentsOnly?}` sets the options without it →
`{color, solidDashes, viewArtboardContentsOnly}`; with none of the keys it opens the dialog. `color` is the color the
panel's view box is drawn in: `#rrggbb` or a preset name.
@@ -5259,8 +5338,9 @@ already walks Image Trace. Short agent entry points:
of it in one undo step; with `keepArt: true` the art stays ordinary art in its place, with its ids, and stays selected
unless it is hidden or locked, and the result's `id` is null; a `keepArt` other than true or false is an error; art that holds an instance of the symbol (opacity masks included), directly or through the art
of the symbols it holds instances of, is refused and nothing changes; the Symbols panel menu's Redefine Symbol sends `keepArt: true` when it
is chosen with Shift held, and the panel sends it with the dragged art's `ids` when art dragged
off the canvas is released on a symbol's tile or row with Alt (Option on macOS) held),
is chosen with Shift held, and the panel sends `symbol.update` with the dragged art's `ids` when art dragged
off the canvas is released on a symbol's tile or row with Alt (Option on macOS) held, with `keepArt: true` when Shift
is held too),
`symbol.edit {id?, ids?, name?, x?, y?, artboard?, viewCenter?}` (symbol editing mode: the symbol's art on a temporary
isolated layer, where the instance `id` shows it or centered on (x, y), by default on the center of artboard
`artboard`, the active one the app passes, or in a document without artboards on `viewCenter`, the view's center the
@@ -6041,7 +6121,7 @@ already walks Image Trace. Short agent entry points:
next free number when its name is in use (`Default Actions 2`), and keeps the current set and the selection.
Omitted params count as `{}`. Params of another type, another key, another `mode`, or a reset while an action
records or plays (also while it waits at a stop) is an error and changes nothing. Reset records no undo step. The panel menu's Reset
Actions is disabled while an action records or plays; it opens a `resetActions` question (fields `message`,
Actions is disabled while an action records or plays; it opens an `actionsQuestion` question (fields `message`,
`detail`, `append`): OK runs this with `replace`, Append with `append`, and `ui.dialog.cancel` changes nothing.
`ui.actionSet.clear {ids?: [id]}` is Clear Actions, and returns `{cleared}`, the number of sets deleted. It deletes
every set in the panel with its actions, the built-in Default Actions set included, so no set is current or
@@ -7922,14 +8002,14 @@ and `layerRows`, the rows highlighted in the panel.
`object.setProps` return an error when they would give either name to another path directly in the group, and a
path pasted directly into the group under either name loses its name.
- **Dialogs and panel state** (control channel and the app's MCP): `ui.layerOptions {ids?}` and `ui.newLayer
{sublayer?}` open Layer Options (dialog `layerOptions`: name, color, template, locked, visible, printable, preview,
{sublayer?}` open Layer Options (dialog `ui.layerOptions`: name, color, template, locked, visible, printable, preview,
dimImages, dimPercent; for existing rows, unchanged approval adds no undo step; an edit is one undo step.
Existing rows keep their stored names unless Name is edited or explicitly set through `ui.dialog.set`, so generated labels remain automatic.
`ui.dialog.set` of `template` also sets `locked` and `dimImages`, as the
checkbox does, except a Dim Images set before it; for several `ids` the dialog shows the first row's settings, and OK sends only the fields set with a
control or `ui.dialog.set`; Cmd/Ctrl+Alt+L runs `ui.newLayer` for a new layer; in isolation mode `ui.newLayer` for a
layer that would be outside the isolated art is an error, OK in the dialog checks again and returns the same error,
and the Layers panel's New Layer and New Sublayer are off then), `ui.layersPanelOptions` opens Panel Options (`layersPanelOptions`:
and the Layers panel's New Layer and New Sublayer are off then), `ui.layersPanelOptions` opens Panel Options (`ui.layersPanelOptions`:
layersOnly, locateSelected, rowSize small|medium|large|other, otherSize, thumbLayers, thumbGroups, thumbObjects), and
`ui.layersExpand {ids?, open?}` opens or closes rows as their triangles do (Alt-click: everything inside).
With `locateSelected` on (Locate Selected Objects, off by default), when the last selected object changes on the canvas
@@ -10688,7 +10768,7 @@ and goes back to Document Setup, whose OK runs `document.setup`; its Cancel goes
`file.new` takes everything New Document sets: `preset` (a name from `file.newPresets`), `name`, `width`/`height`
(points, or lengths such as `"210 mm"`), `units`, `orientation`, `artboards` with `artboardLayout {layout, columns,
rows, spacing, rightToLeft}` (`rows`, 1 to 1000 and rounded to a whole number, gives a `gridByColumn` layout that many rows, at most one for each artboard, in place of `columns`, and is
rows, spacing, rightToLeft}` (`artboards`, `columns` and `rows` are whole numbers from 1 to 1000, and any other number is an error; `rows` gives a `gridByColumn` layout that many rows, at most one for each artboard, in place of `columns`, and is
an error with another layout; a preset keeps the rows, and `file.newPresets` lists them as set even when there are
fewer artboards, until `columns` without `rows`, or another layout, is given; New Document's Columns shows the columns
the rows give the current number of artboards, and New Document drops the rows when Columns or the layout changes),
@@ -13102,7 +13182,9 @@ bleed, composite or separations output, graphics and colour management options o
`transform` from the document onto the page (pt, y down), the document `area` it prints, its `trim` box on the page
and, with copies per sheet, each copy's artboard on the page (`copies`), plus `tiles`, the
`inks` of a separation and `warnings`. `file.print {settings?, path?}` writes the job as a print-ready PDF (one page per
sheet, tile, ink and copy); headless it answers `dataBase64`. In the app, `file.print` with no params opens the Print
sheet, tile, ink and copy); headless it answers `dataBase64`. With `maxPages`, the job is composed only when it
prints at most that many pages, copies counted; with more, `file.print` composes and writes nothing and answers
`{pages, format}`. In the app, `file.print` with no params opens the Print
dialog, and with params it prints through the system (`printer`: a name from `print.printers`, default the system's
default printer) or, with `toFile`, a `path` or no printing available, saves the PDF.
+2
View File
@@ -1120,6 +1120,8 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Scripts: a text frame's `nextFrame` and `previousFrame` read and set its links to the frames before and after it, `areaText` and `pathText` thread a new frame to a base frame, and `document.stories` lists the stories, each with its frames in thread order and its text across them as one text range with its characters, words and paragraphs, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItem/, https://ai-scripting.docsforadobe.dev/jsobjref/Story/ and https://ai-scripting.docsforadobe.dev/jsobjref/Stories/ describe them; `text.thread.setNeighbor` links or unlinks two frames by id (`docs/mcp.md`). Which links are refused, and how a story is listed and found, are VectorCraft's own rules. `crates/engine/src/tests/script_threads.rs`.
- Scripts: `PageItem.tags` reads, adds, renames and deletes an object's tags, name and value pairs that the native file keeps, and `Document.tags` reads, renames and deletes the tags of every page item but adds none (its `add` throws; a script adds a tag through the page item's `tags`), as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/Tags/ and https://ai-scripting.docsforadobe.dev/jsobjref/Tag/ describe them, through `object.tags` and the `object.tag.*` commands, at most 64 tags an object (`docs/mcp.md`). `crates/engine/src/tests/script_tags.rs`.
- Scripts: each document's swatches, spots, color groups, symbols and their instances, graphic styles and brushes are live collections; scripts add, rename, recolor, group, duplicate, apply and remove them through the Swatches, Symbols, Graphic Styles and Brushes commands, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/Swatches/, https://ai-scripting.docsforadobe.dev/jsobjref/Spots/, https://ai-scripting.docsforadobe.dev/jsobjref/SwatchGroup/, https://ai-scripting.docsforadobe.dev/jsobjref/Symbols/, https://ai-scripting.docsforadobe.dev/jsobjref/SymbolItem/, https://ai-scripting.docsforadobe.dev/jsobjref/GraphicStyle/ and https://ai-scripting.docsforadobe.dev/jsobjref/Brush/ describe them (`docs/mcp.md`). A path's fill or stroke takes a `SpotColor` of a spot at a tint (https://ai-scripting.docsforadobe.dev/jsobjref/SpotColor/). Gradients and patterns are not there yet. `crates/engine/src/tests/script_dom_resources.rs`, `crates/engine/src/tests/script_dom_paths.rs`.
- Scripts: `Document.print` prints the document to a file with `PrintOptions` and the job, color management, color separation, coordinate, flattener, font, page marks, paper and PostScript option classes the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/ and https://ai-scripting.docsforadobe.dev/jsobjref/PrintJobOptions/ describe, over the document's print settings, and `app.printPresetsList` lists the print presets (`docs/mcp.md`). `crates/engine/src/tests/script_print.rs`.
- Scripts: `Document.print` without a file prints to the printer `PrintOptions.printerName` names, or the default printer, and `app.printerList` lists the installed printers as `Printer` objects, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/, https://ai-scripting.docsforadobe.dev/jsobjref/Application/ and https://ai-scripting.docsforadobe.dev/jsobjref/Printer/ describe. VectorCraft's own rules: the jobs are sent after the run's changes are kept and the person at the keyboard clicks Print or presses Space on it, which takes no click or focus for the first second, nothing is sent from a failed run, and the web build, and MCP or the command line without the app, cannot print to a printer from a script (`docs/mcp.md`). `crates/engine/src/tests/script_print.rs`, `crates/ui-egui/src/tests/script_print.rs`.
- Scripts: `Document.saveAs`, `Document.exportFile` and `app.open` save, export and open documents, `Document.fullName` and `saved` give a document's file and saved state, setting `saved` records that state (`document.setSaved`), `Document.path` gives its folder as a `Folder` (VectorCraft's own type), and `Document.close` closes it, saving to its file first with `SaveOptions.SAVECHANGES`, with the option classes the help pages https://ai-scripting.docsforadobe.dev/jsobjref/IllustratorSaveOptions/, https://ai-scripting.docsforadobe.dev/jsobjref/EPSSaveOptions/, https://ai-scripting.docsforadobe.dev/jsobjref/PDFSaveOptions/, https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsPNG24/, https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsJPEG/, https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsSVG/, https://ai-scripting.docsforadobe.dev/jsobjref/PDFFileOptions/ and https://ai-scripting.docsforadobe.dev/jsobjref/Document/ describe (the enumerations of the options that keep their defaults included), and read and write only where the script's `File` objects may, refusing a path whose real file name is not valid UTF-8; the warnings of each save, export and open go to the console (`docs/mcp.md`). `crates/engine/src/tests/script_save_open.rs`.
- Scripts: the global `app` gives the open documents, new documents from a startup preset and a `DocumentPreset`, the active document, each document's selection and its page items with their names, notes, visibility, lock, opacity, position, size, bounds and stacking order, and moves and copies them into or beside other objects, as the help pages https://ai-scripting.docsforadobe.dev/jsobjref/Application/, https://ai-scripting.docsforadobe.dev/jsobjref/Documents/, https://ai-scripting.docsforadobe.dev/jsobjref/DocumentPreset/, https://ai-scripting.docsforadobe.dev/jsobjref/Document/, https://ai-scripting.docsforadobe.dev/jsobjref/PageItems/, https://ai-scripting.docsforadobe.dev/jsobjref/PageItem/ and https://ai-scripting.docsforadobe.dev/jsobjref/GroupItem/ describe them; each change runs a command inside the run's transaction (`docs/mcp.md`). A script can check a member with `hasOwnProperty`, and can read a collection by name and name `activeDocument`, `documents` and `selection` without `app.` (https://ai-scripting.docsforadobe.dev/scriptingJavascript/objectReferences/). A key such as `1` is an array index and reads that position; in `pageItems` and `documents`, a number that is not an array index, such as `-1` or `1.5`, is looked up by name when the key is the text JavaScript writes for that number. VectorCraft's own rule. `app.executeMenuCommand` runs the menu items Select All, Deselect, Group, Ungroup, Make and Release Clipping Mask, Make and Release Compound Path, and Fit to Artwork Bounds by their menu command names (https://community.adobe.com/questions-652/a-list-of-illustrator-menu-commands-we-can-call-from-javascript-769510, https://gist.github.com/shalakolee/df3246659d4289eb99149b9ed00a00ee). The `parent` of a page item at the top of a layer is a `Layer` with `name`, `typename` and `toString`. A page item's `blendingMode` reads and sets its blend mode with the `BlendModes` values (https://ai-scripting.docsforadobe.dev/jsobjref/scripting-constants/).
`Document.views` lists the document's drawn windows with their bounds, center, zoom and screen mode (https://ai-scripting.docsforadobe.dev/jsobjref/View/). Zoom follows each window's displayed percentage, including display density with Display Print Size at 100% Zoom enabled; bounds retain the physical camera scale. View objects keep their targets when windows are renumbered. View changes run no command, add no undo step, and remain when a script fails. A center outside the canvas after coordinate conversion throws a `RangeError`. `Document.layers`, `Document.activeLayer` and the other classes this list does not name are not there yet. `crates/engine/src/tests/script_dom.rs`.