Commit Graph
236 Commits
Author SHA1 Message Date
dotCooCoo a7c7dae179 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 17:25:26 -08:00
dotCooCoo e369013463 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:37:51 -08:00
dotCooCoo 60383e1ac1 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 15:28:08 -08:00
dotCooCoo d73dad7ee0 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 14:38:27 -08:00
dotCooCoo 326c88a8f3 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 14:12:01 -08:00
dotCooCoo cb98b72a58 Scripts: fix a run's linked files at its first step
A run whose first step is an exact document.open still reads the open
documents' linked files then, so a link retargeted while the run is paused
gives a later command no read access to the new target. The open itself
still gets no linked-file access.
2026-12-02 14:10:57 -08:00
dotCooCoo d583b8053f Merge main into feat/scripts-pageitem-transforms 2026-12-02 13:09:44 -08:00
dotCooCoo 930c02ce8f Merge main into feat/scripts-pageitem-transforms 2026-12-02 12:20:10 -08:00
dotCooCoo cd3a0da644 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 11:39:00 -08:00
.CooCoo d0d73ff553 Merge pull request #9131 from dotCooCoo/feat/js-es2017-async-await
JavaScript: .js scripts run async functions and await
2026-12-02 11:37:17 -08:00
dotCooCoo b14d841476 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 11:28:17 -08:00
.CooCoo dcb7085b2a Merge pull request #9139 from dotCooCoo/feat/plugin-api-events
Plug-ins: react to selection, layer, open and save events
2026-12-02 11:15:23 -08:00
dotCooCoo c2a2f38a4e Merge main into feat/js-es2017-async-await 2026-12-02 05:32:01 -08:00
dotCooCoo 9cff79a9ec Merge main into feat/scripts-api-d3-layers-artboards 2026-12-01 15:07:13 -08:00
dotCooCoo c012eb8ee9 Merge main into feat/scripts-pageitem-transforms 2026-12-01 15:00:42 -08:00
dotCooCoo 856d1a3870 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-01 14:59:55 -08:00
dotCooCoo 44c5c4ccd9 Scripts: insert returns nothing, stale collections fail toString, charges and reports fixed
- `artboards.insert` returns nothing, as the scripting reference says; `add`
  still returns the new artboard.
- `toString` of `Layers`, `GroupItems`, `CompoundPathItems` and `Artboards`
  checks the collection as `typename` does, so a collection whose container
  is gone throws instead of stringifying.
- The collections' `index` is described as returning their element class,
  with an `itemKey` of any type. `PageItems.parent` and `PathItems.parent`
  are described as any type, since scoped collections return a layer or
  group.
- `hasSelectedArtwork` charges the selection and every node of the layer it
  looks at to the script budget, also when it runs no command.
- A document made during the run whose active artboard the run chose is
  reported when an artboard inserted before it moves it.
- Tests: a test-only counter of built art lists bounds the group loop test,
  and the rejected-parameter checks of `object.newGroup` compare the whole
  layer tree.
2026-12-01 14:18:46 -08:00
dotCooCoo 9bf07c220e Merge main into fix/script-new-document-overprint-links 2026-12-01 13:53:12 -08:00
dotCooCoo 316a4b6bfa Scripts: file.new takes Overprint Preview and reads the profile's linked files
A script's addDocument with previewMode OverprintPreview failed: file.new
turned the view on with view.overprintPreview, which scripts may not
run. A script's file.new now asks for the view, and the run turns
Overprint Preview on when it ends; a run that fails does not turn it on.

The images a New Document profile's symbols, patterns and brushes link
to were read under the script's file gate, after the profile's own file
was read outside it, so images beside the profile showed only their
preview. They are now read the way the profile's file is, under the
automation roots in force.
2026-11-30 15:54:19 -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 24bd70fa08 Merge main into feat/scripts-api-d3-layers-artboards 2026-11-30 11:45:53 -08:00
dotCooCoo b3def332ff Merge main into feat/scripts-print-printer 2026-11-30 11:40:16 -08:00
dotCooCoo 8afd855040 Merge main into feat/plugin-api-events 2026-11-30 11:40:02 -08:00
dotCooCoo b6a9e8f363 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-11-30 11:34:24 -08:00
dotCooCoo b3b3e78a36 Merge main into feat/scripts-pageitem-transforms 2026-11-30 11:07:22 -08:00
dotCooCoo 75d4c949d2 Scripts: transform scales a compound member's stroke, and the warning confirm is known by its origin
- PageItem.transform with changeLineWidths at the matrix's own scale sets
  the stroke weight of a path whose paint the compound holds, as resize
  does.
  resize and transform set that weight by the scale itself, and an explicit
  100 keeps the weights even for a scale within the tolerance of 100%.
- A changeLineWidths of 0 no longer matches a tiny scale; a positive value
  is compared with the scale relative to its size.
- translate refuses an offset past the canvas only when the call moves the
  object or a pattern it uses; a non-finite offset is still refused.
- Number conversion of preference text no longer trims U+0085, as
  JavaScript does not.
- A real preference changes between 0 and -0: values are compared by their
  bits in the setter and when the run's keys are merged.
- A clipboard.importSvg whose result cannot reach the script puts the
  clipboard back.
- Moving an object works out its index without copying the list of its
  siblings.
- The app's question before the external script warning turns off is known
  by the confirm the app opened, not by its text, so a script's confirm
  with the same text answers Yes through automation and is not translated.
- docs: only calls that move or reshape the object run
  object.transform, and transform sets a compound member's stroke.
2026-11-29 23:14:06 -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 c85d16f3c5 Merge main into feat/plugin-api-events 2026-11-29 14:32:55 -08:00
dotCooCoo 05ec7e98e2 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-11-29 14:09:48 -08:00
dotCooCoo 52879dd78f Merge main into feat/scripts-api-d3-layers-artboards 2026-11-29 14:02:24 -08:00
dotCooCoo fda48b02d0 Merge main into feat/scripts-app-select-tool 2026-11-29 10:25:17 -08:00
dotCooCoo 5ec50ca863 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-11-29 09:29:37 -08:00
dotCooCoo a620aee2ea Merge main into feat/plugin-api-events 2026-11-29 09:27:26 -08:00
ruchirguitar a4659724f6 Merge main into feat/spell-check
Cargo.toml: #10049 moved craft-libs to 186a229c; the font store crates this
branch adds move with it, so every craft-libs crate stays at one rev.
2026-11-29 22:41:45 +05:30
dotCooCoo 97952e98a0 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-11-28 23:21:47 -08:00
dotCooCoo 0bd735f53d Merge main into feat/scripts-doc-defaults 2026-11-28 23:20:21 -08:00
dotCooCoo 6227297ae4 Merge main into feat/plugin-api-events
# Conflicts:
#	crates/engine/src/cmd/plugin.rs
#	crates/plugins/src/lib.rs
#	crates/plugins/src/manifest.rs
#	crates/ui-egui/src/tests/plugins.rs
#	docs/plugins.md
2026-11-28 23:13:20 -08:00
dotCooCoo 2276d56f94 Merge main into feat/scripts-api-d3-layers-artboards
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/src/script/mod.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/gaps.md
2026-11-28 23:13:09 -08:00
dotCooCoo 88d9a6e601 Scripts: script file writes and rasterize report their warnings
Document.rasterize, imageCapture, saveAs and exportFile send command
warnings to the Script Console, as app.open does. app.open no longer
inherits the linked-file permissions of documents open at the start of
the run. Rasterize by id refuses art on a locked artboard, and clip
bounds within floating-point error of whole pixels use that pixel count.
Capture sources leave out link paths the document cannot follow.
2026-11-28 23:02:05 -08:00
dotCooCoo 31bb1ae297 Merge main into feat/js-es2017-async-await 2026-11-28 21:52:55 -08:00
dotCooCoo 614881e874 Merge main into feat/js-es2017-async-await 2026-11-28 21:17:39 -08:00
dotCooCoo cac93ca107 Merge main into feat/js-es2015-modules 2026-11-28 20:44:06 -08:00
dotCooCoo 3d063a486a Merge main into feat/js-es2017-async-await
Async function activations now save and restore this_in_env, strict_class, new_target and this_env with main's Frame fields. The string spread test sets its fuel above what main's iterator-based spread takes.
2026-11-28 20:09:17 -08:00
dotCooCoo 3e2a615aee Merge main into feat/js-es2015-modules 2026-11-28 19:45:10 -08:00
dotCooCoo 19c1a69b32 Merge main into feat/scripts-print-printer 2026-11-28 19:26:18 -08:00
ruchirguitar 8d3895d491 Merge main into feat/spell-check
Cargo.toml: main moved craft-libs to 610c8679; the font store crates this
branch adds move with it, so every craft-libs crate stays at one rev.
2026-11-29 08:29:24 +05:30
dotCooCoo 70dab81925 Merge main into feat/scripts-api-d8c-rasterize-capture
Ports the branch's Document, Application and options-class members to
main's described member form (name, HostMember, MemberInfo).
2026-11-28 18:45:21 -08:00
dotCooCoo c6342cec0d Merge main into feat/scripts-pageitem-transforms 2026-11-28 18:32:46 -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