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.
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.
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.
- 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.
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.
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.
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.
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.
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.