Commit Graph
224 Commits
Author SHA1 Message Date
dotCooCoo 72e99d1c3b Merge main into feat/scripts-layer-text-frames 2026-12-02 21:17:26 -08:00
dotCooCoo c1470adfc6 Merge main into feat/scripts-text-paint 2026-12-02 18:14:59 -08:00
dotCooCoo e4e6dd517d Merge main into feat/scripts-layer-text-frames 2026-12-02 17:49:12 -08:00
dotCooCoo 70504f6dfe Merge main into feat/scripts-layer-text-frames 2026-12-02 16:02:05 -08:00
dotCooCoo 98c6e5fb20 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:57:11 -08:00
dotCooCoo 44b238b814 Merge main into feat/scripts-text-paint 2026-12-02 15:51:24 -08:00
.CooCoo 822651dc7a Merge pull request #9266 from dotCooCoo/feat/scripts-export-autocad
Scripts: exportFile writes DXF with ExportOptionsAutoCAD
2026-12-02 15:42:04 -08:00
dotCooCoo e369013463 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:37:51 -08:00
dotCooCoo 217c33d46e Merge main into feat/scripts-layer-text-frames 2026-12-02 15:29:55 -08:00
dotCooCoo 80eb658aa9 Merge main into feat/scripts-layer-text-frames 2026-12-02 14:12:48 -08:00
dotCooCoo 326c88a8f3 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 14:12:01 -08:00
dotCooCoo 1f2e9bff33 Merge main into feat/scripts-export-autocad 2026-12-02 14:02:36 -08:00
dotCooCoo 3140831da9 Merge main into feat/scripts-text-paint 2026-12-02 13:57:18 -08:00
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 7f10f7aa96 Merge main into feat/scripts-export-autocad 2026-12-01 15:10:18 -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 7abdcad40e Merge main into feat/scripts-text-paint 2026-12-01 14:57:03 -08:00
dotCooCoo be98c65ae7 Merge main into feat/scripts-layer-text-frames 2026-12-01 14:17:36 -08:00
dotCooCoo a7129f3eed Merge main into feat/scripts-api-d8b-tracing 2026-12-01 14:07:15 -08:00
dotCooCoo ff1333c756 Merge main into feat/scripts-layer-text-frames 2026-11-30 21:15:53 -08:00
dotCooCoo ee1e5bf2e5 Merge main into feat/scripts-api-d3-layers-artboards 2026-11-30 21:04:45 -08:00
dotCooCoo b833903e70 Merge main into feat/scripts-text-paint 2026-11-30 21:03:58 -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 270ffca6ef Merge main into feat/scripts-export-autocad 2026-11-30 15:26:54 -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 6d4454a73e Merge main into feat/scripts-api-d3-layers-artboards 2026-11-30 15:22:46 -08:00
dotCooCoo 59eff04041 Merge main into feat/scripts-text-paint 2026-11-30 15:21:19 -08:00
dotCooCoo ef52adf1b6 Merge main into feat/scripts-layer-text-frames 2026-11-30 15:18:10 -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 280477d1b8 Merge main into feat/scripts-export-autocad 2026-11-30 11:26:36 -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 312bee4731 Merge main into feat/scripts-layer-text-frames 2026-11-30 11:04:44 -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 a447847245 Merge main into feat/scripts-layer-text-frames
Main took its own host class engine, member descriptions for reflect, a
topmost-first pageItems order, revert-aware handles and the New Document
More Settings rework. The merge keeps main's versions of crates/js and
crates/ui-egui/src/dialogs/new_document.rs and moves the branch onto them:

- The layers, groups, compound paths and artboards members carry their
  reflect types, and Layer gains toString. The Layer class from layers.rs
  replaces main's name-only Layer class.
- Layer, Layers, Artboard and container collection handles carry the
  document's revert count, so they go stale after File > Revert as page
  items do (a layer then throws "Stale page item", as main's tests expect).
- A layer's or group's pageItems and the GroupItems and CompoundPathItems
  collections read names, index and toString as the document's pageItems
  does on main.
- controlBounds keeps the branch's rule (anchors and handles of shown
  paths, a clip group's clipping path only) and main's zeros for an empty
  object.
- areaText and pathText into a layer or group keep main's threading.
- group.clipped is refused on a locked artboard, a compound path keeps
  itself when its pathItems are cleared, a path in a locked layer is not
  converted into a layer's textFrames, layers.removeAll refuses more rows
  than layer.delete takes, and a path moved into a pixel-aligned compound
  path is snapped.
- A compound path's pathItems read the typename PageItems, the class they
  are, and the TextFrames reflect types name a TextFrame from index and any
  type from parent.

Tests whose rule main changed now assert main's rule: pageItems and
textFrames list topmost first, an empty selection is an empty list, a
segment-only path is restored with no anchors (the objects stay selected,
order not asserted), and the members not available yet are swatches, not
views or layers. The branch's tests of its own host class engine in
crates/js were dropped with that engine, since main's implementation
replaces it.
2026-11-30 04:27:16 -08:00
dotCooCoo a4bd58e181 Merge main into feat/scripts-text-paint 2026-11-29 22:15: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 0507cfade0 Scripts: clipping, artboard fallback and collection fixes
- A scoped removeAll() or Edit > Clear that leaves a clipping group or
  layer without art releases its mask in the same undo step, also when
  the mask was a compound path's last member.
- GroupItem.clipped refuses changes to a hidden or locked group, layer
  or artboard.
- After the script deletes the artboard it chose, action steps use the
  same active artboard as getActiveArtboardIndex() and the view. File >
  Revert discards the script's choice.
- A compound path's pathItems is a PathItems object; its creation
  methods throw an error. PathItems and PageItems methods refuse the
  other class's scoped collections.
- Scoped collections convert to strings.
- Layer.color returns an RGBColor, so it can be assigned to paint.
- Each zOrderPosition read counts its scan toward the script's budget.
2026-11-29 16:58:27 -08:00
dotCooCoo 13b8b4a325 Merge main into feat/scripts-export-autocad 2026-11-29 16:23:58 -08:00
dotCooCoo 60c1eb34af Merge main into feat/scripts-print-printer 2026-11-29 14:36:49 -08:00