Commit Graph
9 Commits
Author SHA1 Message Date
dotCooCoo 29187c520d Merge main into feat/print-per-job-settings 2026-12-04 18:53:20 -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 406a612d7b Merge main into feat/scripts-export-for-screens 2026-11-30 16:01:57 -08:00
dotCooCoo 0da268733e Merge main into feat/scripts-export-for-screens 2026-11-28 18:37:15 -08:00
dotCooCoo 55ea9696c4 Scripts: refuse a real path with no UTF-8 form, keep .svgz names compressed, and export into a picked volume root
- save, export, open and exportForScreens throw "Script file path is not
  valid Unicode" when the real path has no UTF-8 form, instead of passing
  a lossy copy of it to the command.
- exportFile as SVG to a name that ends with .svgz writes a compressed
  file at that name, also without options or with compressed false.
- exportForScreens takes a picked volume root (/, E:\) as its folder when
  the grants and the automation write roots allow its real path.
- The save and open tests clean up their folders when they fail, and the
  PDF open test checks the page and crop box by the artboard's size.
2026-11-27 18:40:45 -08:00
dotCooCoo fa78985247 Forward script file command warnings to the console 2026-11-26 12:21:58 -08:00
dotCooCoo 66cbebac3a Preserve PNG8 transparency and reject unsupported SVG links 2026-11-26 08:48:51 -08:00
dotCooCoo 60eb7e002b Scripts: exportForScreens numbers a file that an earlier item of the same call named
Document.exportForScreens exports the artboards, the assets and the document
that itemToExport names one after another into the folder. A later export now
names its files around the names the earlier ones took, so an asset named as
an artboard writes Logo-2.svg next to Logo.svg instead of writing over it.
2026-11-25 15:06:16 -08:00
dotCooCoo 48a09ccae3 Scripts: Document.exportForScreens writes artboards, assets or the document into a folder
Document.exportForScreens(exportFolder, exportFormat, options?, itemToExport?,
fileNamePrefix?) runs document.exportForScreens with one format row. The
option classes ExportForScreensOptionsJPEG, ExportForScreensOptionsPNG24,
ExportForScreensOptionsPNG8, ExportForScreensOptionsWebOptimizedSVG and
ExportForScreensPDFOptions, ExportForScreensItemToExport and the enumerations
they use follow the public reference pages. An omitted options object takes a
new one's defaults; a bad argument, an options object of another class and an
item that names nothing throw before anything is written.

The folder gets the same write-access check as a File opened for writing: a
folder outside the script's folders is refused, and so is an existing file.
A prefix character that a file name may not hold is written as "-".

A Folder object passed to a host method now carries its path, as a File does;
before, it arrived as an empty object. The script checker counts
exportForScreens under filesWritten.

Docs: docs/mcp.md, docs/target-app-parity.md, docs/gaps.md.
2026-11-25 07:05:03 -08:00