Commit Graph
166 Commits
Author SHA1 Message Date
dotCooCoo d583b8053f Merge main into feat/scripts-pageitem-transforms 2026-12-02 13:09:44 -08:00
dotCooCoo a1b8b01383 Scripts: refuse moves that make a tracing, and a release that drops added art
- move, remove() and zOrder throw "Only Image Trace can make a tracing",
  with nothing changed, when they would leave an image at the bottom of
  an ordinary group named Image Trace: a path moved out of the group or
  to its top, Send to Back or Send Backward on the image, and Bring to
  Front or Bring Forward on the object below it.
- releaseTracing() throws "Cannot release a tracing containing added
  artwork", with nothing changed, when the tracing holds an object its
  trace did not make. imageTrace.release keeps only the source image, so
  the added object would be deleted.
- The TracingOptions members with no setting and TracingObject.areaCount
  are left out of hasOwnProperty and reflect. Reading them still throws.

Docs: docs/mcp.md.
2026-12-02 01:26:30 -08:00
dotCooCoo c012eb8ee9 Merge main into feat/scripts-pageitem-transforms 2026-12-01 15:00:42 -08:00
dotCooCoo a7129f3eed Merge main into feat/scripts-api-d8b-tracing 2026-12-01 14:07:15 -08:00
dotCooCoo 21aeb77367 Merge main into feat/scripts-pageitem-transforms 2026-11-30 21:02:41 -08:00
dotCooCoo ea8352c5d7 Merge main into feat/scripts-print-printer 2026-11-30 20:57:56 -08:00
dotCooCoo 805dceafce Merge main into feat/scripts-api-d8b-tracing
# Conflicts:
#	crates/engine/src/tests/script_dom.rs
2026-11-30 17:55:16 -08:00
dotCooCoo 7b6c730df6 Merge main into feat/scripts-api-d8b-tracing 2026-11-30 15:48:31 -08:00
dotCooCoo b8ee4686b0 Scripts: getIsFileOpen keeps backslashes in Unix file names; DocumentPreset checks its receiver
app.getIsFileOpen treated any path with a backslash as a Windows path,
turning each backslash into a folder separator and ignoring letter case.
On macOS and Linux a backslash is a character of a file name, so
getIsFileOpen answered true for the path /work/a\b.ai while /work/a/b.ai
was open.
Paths now get the Windows rules only on Windows or when they start with a
drive letter.

DocumentPreset.typename and toString() answered for a preset kept from
an earlier run with #targetengine, while its settings throw a TypeError.
Both now check the preset the way the settings do.

Documents.addDocumentNoUI(startupPreset) was missing. It now makes the
document addDocument(startupPreset) makes.
2026-11-30 15:39:56 -08:00
dotCooCoo 1b2da536cc Merge main into feat/scripts-print-printer 2026-11-30 15:25:50 -08:00
dotCooCoo 540f49b52d Merge main into feat/scripts-pageitem-transforms 2026-11-30 15:24:11 -08:00
dotCooCoo 0c13a1edb2 Scripts: close the review gaps in print, saveAs, File paths and presets
- The 1000% scale limit applies only when Fit to Page is off, since the
  scale factors are not used with it on.
- A script run clears the print command allowance when it ends, so a
  panic inside print cannot leave file.print open to later runs.
- saveAs without options takes the format from the path the script
  names, so a link at that path cannot change it.
- A File the host gives back charges its path to the heap.
- DocumentPreset.typename throws for a preset from an earlier run.
- Documents.addDocumentNoUI throws that it is not available yet.
- The print tests remove their folders when an assertion fails.
2026-11-30 14:54:47 -08:00
dotCooCoo b3def332ff Merge main into feat/scripts-print-printer 2026-11-30 11:40:16 -08:00
dotCooCoo c1af5511fb Merge main into feat/scripts-api-d8b-tracing 2026-11-30 11:24:27 -08:00
dotCooCoo b3b3e78a36 Merge main into feat/scripts-pageitem-transforms 2026-11-30 11:07:22 -08:00
dotCooCoo 8a5f206e3c Merge main into feat/scripts-api-d6-save-export-open 2026-11-30 10:55:42 -08:00
dotCooCoo ed0859d0d0 Scripts: kept-default option enumerations and refusal of non-UTF-8 real paths
The enumerations whose default member an option keeps (OutputFlattening,
CompressionQuality, the PDF color, compression, mark and security enums,
and the SVG encoding, DTD, CSS and font enums) are now defined, so a
script that sets an option to its default no longer throws a
ReferenceError; another member still throws as not available yet.

saveAs, exportFile, app.open and close with SAVECHANGES refuse a path
whose real file name is not valid UTF-8 instead of writing to or opening
a file named with a lossy copy of it.
2026-11-30 07:51:17 -08:00
dotCooCoo c0eb5b898b Merge main into feat/scripts-pageitem-transforms
PathItem now takes PageItem's translate, rotate and resize: main's PathItem versions are removed, and resize on a path keeps main's changeLineWidths percent for the stroke weight. Hidden objects are refused, and an identity transform of an empty path checks its Transformation value and does nothing.
2026-11-29 17:19:24 -08:00
dotCooCoo 60c1eb34af Merge main into feat/scripts-print-printer 2026-11-29 14:36:49 -08:00
dotCooCoo b1e9a4cbb3 Merge main into feat/scripts-api-d6-save-export-open
main's Document member list held saveAs and close as members that are not
available yet; this branch's save_open members implement them, so the
merge drops them from that list and keeps main's other entries. The
script host test lists take main's members together with this branch's
open, userInteractionLevel, fullName, path, saved and option classes,
and the heap accounting keeps main's ModuleNamespace arm beside the
FsEntry string arm.
2026-11-29 14:13:21 -08:00
dotCooCoo e59994ead4 Scripts: placed and raster members use main's described member lists; a placedItems.add() result goes stale after File > Revert
The images, tracing and save/open members now carry the type and
argument descriptions that main's Described lists expect, and
PlacedItem.contentVariable comes from the variables members. A
placedItems.add() handle now records the document's revert count, so
reading or assigning its file after File > Revert throws Stale page
item and places nothing, as other page items do.
2026-11-29 13:42:47 -08:00
dotCooCoo fda48b02d0 Merge main into feat/scripts-app-select-tool 2026-11-29 10:25:17 -08:00
dotCooCoo 73499bb62f Merge main into feat/scripts-api-d8b-tracing 2026-11-29 09:57:07 -08:00
dotCooCoo 6ef6df3407 Scripts: round artboard rows as main's New Document test expects, and drop pathItems= from the host table
Cause of the CI failures on 212090fd7a:
- main's dialogs::new_document test a_presets_rows_reach_the_document_create_makes
  sets artboardLayout.rows to 3.6 and expects 4, but this branch refused a
  rows value that was not a whole number. rows now rounds like columns and is
  still refused outside 1 to 1000.
- script_host_vs_scriptcheck listed Document.prototype.pathItems=, the
  setter of main's placeholder. This branch makes pathItems a read-only
  collection, like pageItems, so the row goes.
2026-11-29 06:45:32 -08:00
dotCooCoo 0bd735f53d Merge main into feat/scripts-doc-defaults 2026-11-28 23:20:21 -08:00
dotCooCoo ecf193cc06 Merge main into feat/scripts-app-undo-redo
# Conflicts:
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/target-app-parity.md
2026-11-28 19:47:12 -08:00
dotCooCoo 19c1a69b32 Merge main into feat/scripts-print-printer 2026-11-28 19:26:18 -08:00
dotCooCoo c6342cec0d Merge main into feat/scripts-pageitem-transforms 2026-11-28 18:32:46 -08:00
dotCooCoo 6112616e13 Merge main into feat/scripts-app-undo-redo 2026-11-28 18:30:41 -08:00
.CooCoo dc2c6ff30f Merge pull request #9061 from dotCooCoo/feat/scripts-api-d4b-text-styles
Scripts: character and paragraph styles for scripts
2026-11-28 18:26:11 -08:00
dotCooCoo c70974d6bd Merge main into feat/scripts-print-printer 2026-11-28 18:21:29 -08:00
dotCooCoo d2a14e2ef5 Merge main into feat/scripts-doc-defaults
# Conflicts:
#	crates/engine/src/script/dom.rs
2026-11-28 18:11:57 -08:00
dotCooCoo a1ae894fc1 Merge #9073 into feat/scripts-pageitem-transforms 2026-11-28 18:11:52 -08:00
dotCooCoo d471933b0d Merge main into feat/scripts-doc-defaults 2026-11-28 18:11:42 -08:00
dotCooCoo 44c89a7912 Merge main into feat/scripts-api-d4b-text-styles 2026-11-28 18:11:24 -08:00
dotCooCoo eb41460cd5 Merge main into feat/scripts-api-d6-save-export-open
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
2026-11-28 18:11:12 -08:00
dotCooCoo 52c731bb2f Merge main into feat/scripts-api-d6-save-export-open 2026-11-28 18:10:43 -08:00
.CooCoo 0ac2b74614 Merge pull request #9055 from dotCooCoo/feat/scripts-api-d9-do-script
Scripts: app.doScript plays an action of the Actions panel
2026-11-28 17:55:11 -08:00
dotCooCoo 4999199bd5 Merge main into feat/scripts-api-d4c-threads-stories
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/src/script/dom/text.rs
#	crates/engine/src/tests.rs
#	crates/engine/src/tests/script_text.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/gaps.md
#	docs/mcp.md
#	docs/target-app-parity.md
2026-11-28 17:15:13 -08:00
dotCooCoo 1869b099ee Merge main into feat/scripts-api-d1b-prefs-matrix-clipboard 2026-11-28 17:15:05 -08:00
dotCooCoo 1729de3109 Merge main into feat/scripts-api-d9-do-script 2026-11-28 16:57:36 -08:00
dotCooCoo fbb0f2d5ff Merge main into feat/scripts-api-d4b-text-styles 2026-11-28 16:57:12 -08:00
dotCooCoo 98e51a3811 Merge main into feat/scripts-app-select-tool
# Conflicts:
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
2026-11-28 16:56:44 -08:00
.CooCoo d4b6d7f10d Merge pull request #9050 from dotCooCoo/feat/scripts-api-d4-text
Scripts: text frames, text ranges and fonts for scripts
2026-11-28 16:50:36 -08:00
dotCooCoo 31844b57dd Merge feat/scripts-api-d4-text into feat/scripts-api-d4b-text-styles 2026-11-28 16:13:51 -08:00
dotCooCoo e449a91380 Merge main into feat/scripts-app-select-tool
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/src/tests/script_dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/mcp.md
#	docs/target-app-parity.md
2026-11-28 14:50:06 -08:00
dotCooCoo 64c985d328 Merge main into feat/scripts-api-d4c-threads-stories
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/target-app-parity.md
2026-11-28 14:36:12 -08:00
dotCooCoo e2c4d0bbbe Merge main into feat/scripts-api-d9-do-script 2026-11-28 14:28:32 -08:00
dotCooCoo 02ef75749e Merge main into feat/scripts-api-d1b-prefs-matrix-clipboard
# Conflicts:
#	crates/engine/src/cmd/scripts.rs
#	crates/engine/src/script/dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	crates/ui-egui/src/tests/script_run.rs
2026-11-28 14:26:05 -08:00
dotCooCoo 5728ff39cd Merge main into feat/scripts-page-item-blending-mode
# Conflicts:
#	crates/engine/src/tests/script_dom.rs
#	docs/mcp.md
#	docs/target-app-parity.md
2026-11-28 14:17:28 -08:00