11 Commits
Author SHA1 Message Date
dotCooCoo 1a4b4be93e Merge main into feat/scripts-show-color-picker 2026-12-02 15:27:47 -08:00
dotCooCoo 420ec1503f Scripts: automated Yes keeps the script warning on; a Copy note keeps the recording limit shown
ScriptAnswer records whether automation gave the answer, so an automated
Yes is refused even when a later frame without injected input takes it.
After a script's Copy, the recording limit's message is set again so the
Copy's format notes do not replace it; a write failure reported at once
stays.
2026-12-02 10:26:03 -08:00
dotCooCoo 99cf25f90c Scripts: closing a Color Picker ends only the screen sample it started
Stopping or quitting the run that waits at app.showColorPicker, and
closing any Color Picker, now ends a screen color sample that picker
started and drops a sampled color it has not taken yet. A sample
started for the fill, the stroke or another picker keeps running.

The test that the script's picker shows no preview now has a selected
object and checks that no preview edit begins, so it fails when the
picker's Target::Script exclusion is removed.
2026-11-30 03:33:39 -08:00
dotCooCoo 7c7bdff24b Scripts: only the person turns off the external script warning
Automation could answer Yes to the question a script asks before it turns
off the external script warning, through the dialog's answer field or a
pass it drives, and the warning was turned off. Setting Yes as the answer
now fails with "Only the person at the keyboard can turn off the external
script warning", and a Yes given while automation is acting is refused:
the warning stays on and the question opens again. No is still taken from
anyone, as Deny is in a script's file dialog.
2026-11-28 03:32:28 -08:00
dotCooCoo e4d1dabf9e Scripts: path point reads scale with subpaths; the script color picker keeps its color
- app.showColorPicker opens on the script's color even when an earlier
  picker left Only Web Colors on, and a changed RGB pick takes the model
  of the run's own active document, which may be one the script made.
- Point reads and edits look a point up in a cached layout of where each
  subpath's points start, so a loop over a path with many subpaths no
  longer counts every subpath for each point. selectedPathPoints walks the
  selected anchors of a partial selection instead of every point.
- PathPoint.selected writes the waiting point changes whenever any of
  them added or removed points of the path.
- The path creators read the new path's id from the command's own result,
  so an id above 2^53 stays exact.
- typename of a stale PathPoint or PathPoints throws as the other members
  do.
- pageItems, pathItems and documents look up a key that reads as a number
  but is not an index, such as "-1", by name first.
- artboardLayout keeps the columns the rows gave the current artboards
  when a new layout replaces the rows without its own columns.
- Docs: pathItems.add() and the shape creators follow isolation; reading
  another path's points does not write the waiting changes; a gray within
  about 1e-14 % of white reads as 100; assigning documents throws in
  strict mode; when showColorPicker keeps the given color's model.
2026-11-28 01:31:48 -08:00
dotCooCoo daceaf99d6 Merge main into feat/scripts-show-color-picker
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	crates/ui-egui/src/dialogs/color_picker.rs
#	docs/mcp.md
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-27 22:42:08 -08:00
dotCooCoo 54c84108a1 Dialogs: Split Into Grid keeps one pass's edits, and the Picked files test uses the shared frame
Split Into Grid's fields edit a copy of the dialog values inside the grid
and keep it only when the pass takes effect, as form::stacked does, so a
measuring pass no longer changes the values the real pass reads.

tests::script_dialogs::frame returns the last pass's output, and the
Picked files group test reads the accessibility tree from it instead of
running its own frame.
2026-11-25 18:13:02 -08:00
dotCooCoo 58292d605a Scripts: app.showColorPicker asks for a color
app.showColorPicker(color) opens the Color Picker on an RGBColor,
CMYKColor, GrayColor or LabColor and returns the color picked for OK.
Cancel, and OK with the color unchanged, return a new object of the
color the script gave. Anything else throws a TypeError.

- In the app the run waits at the picker, which previews nothing on
  the selection. Stop and quitting end the run as at the other script
  dialogs and close the picker.
- A run with nobody to ask takes {kind: "colorPicker", value: color |
  null} from answers. The report lists the picker with the color it
  opened on and the answer.
- script.run's params text, docs/mcp.md and the Scripts line in
  docs/target-app-parity.md describe it.
2026-11-25 02:23:19 -08:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo c09e1d3ebe Scripts: closing the quit question when the script it asked about has ended
A window-close request while a script waits at its alert, confirm or
prompt opens the quit question over that dialog, and Cancel shows the
script's dialog again. When the run then ended another way (script.stop,
or the run finishing), the quit question stayed open, and Cancel showed
a dialog for a script that was no longer running.

The running-script poll now closes the quit question once the run ends,
and forgets the script's dialog under it once the run no longer waits at
that dialog.
2026-11-11 00:33:28 -08:00
dotCooCoo df0373aa26 Scripts: alert, confirm and prompt open dialogs with Stop, and headless runs take their answers from script.run
alert(message[, title, errorIcon]), confirm(message[, noAsDflt, title])
and prompt(message, preset[, title]) are globals in a script run. In the
app the run waits at the call for the person's answer, spends no
instructions while it waits, and every dialog has Stop, which ends the
run and puts every document back. A run over MCP or the command line
takes its answers in order from script.run's answers, a list of
{kind, value} records; a missing, mismatched or unused answer ends the
run. The report lists each dialog with its answer in dialogs, with
dialogCount and dialogsTruncated.

The interpreter gains a host call that waits at the call for its
result, from the script's own code only; a dialog called in a callback
of a built-in, a getter or a conversion throws in the app.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-10 22:14:01 -08:00