Fixes main's two red Linux gate legs.
- **Leg 5 (`pdf-deps`)**: `xtask/src/pdf_deps.rs` pinned craft-libs `945e849cb`, the revision before #9211, so the check failed once the app moved to `3238a3eca`. It now expects `3238a3eca`; `cargo xtask pdf-deps` passes.
- **Leg 1 (`original_editor::tests`)**: the test helper `editor()` called `set_mode` on a copy of the file's permissions and never applied it, so on Linux the stand-in editor had no executable bit and the platform's application check (craft-libs `platform/src/open.rs`, `mode() & 0o111 != 0`) refused it. `native_choice_commits_persists_cancels_and_resets` and `original_editor_async_picker_validates_and_commits_only_on_ok` failed on Linux only; this leg was already red before the re-pin. The helper now writes the mode with `set_permissions`.
Checks: `original_editor` tests pass on Windows (6/6; the Linux path is what this PR's CI checks); clippy (`vectorcraft-ui-egui`, `xtask`, all targets, `-D warnings`) and `cargo fmt --check` are clean.
The app bar's Discord button loses its outline: it now takes the app's default push-button look, a filled tile with no edge at rest and the hover fill on hover, as production's app bar drew it (`t.button` fill, `t.hover` on hover, no stroke). Discord's colour stays on its icon alone.
Checks: `chrome::` and `community` tests 62 passed; clippy (`vectorcraft-ui-egui`, all targets, `-D warnings`) and `cargo fmt --check` are clean.
With Discard White Overprint on, PDF export, Overprint Preview,
Separations Preview and printed separations took the overprint off any
white paint, including a tint above 0% of a spot swatch whose color is
white, which prints as that ink. Such a tint now keeps its overprint in
fills, strokes, character paints and a colorized image's color; process
white and a 0% tint still knock out.
DiscardWhite holds the setting and the document's spot inks, and
Document::discards_white_overprint gives the same answer for the PDF and
EPS writers.
- A script's global let and const names are added only after the room
for them and the declarations is checked, so a run that stops at the
heap limit leaves no uninitialized name behind and the same script
runs once the limit is raised.
- Spread of an array with a length too long for an array literal throws
RangeError at once when every prototype getter with an index name is
hidden by an own property of the same name earlier in the chain. The
scan takes one unit of fuel for each earlier object it looks in, and
stops where the fuel runs out.
- A spread test now checks the heap total right after the limit stops
the spread, before a later step could collect, and a larger limit
lets the same spread complete.
Push buttons and number fields look like production's VectorCraft, through craft-libs options set once at the app's root.
- Push buttons that ask for no look are filled tiles with no edge at rest (`PushButtonLook::Filled`); hover adds the control edge and pressing tints them, as production's were. The Contextual Task Bar's actions ask for the outline, as production drew them.
- Number fields show their value and unit as one run at the field's start, in the interface face ("720 pt", "0°", "100%"; `NumberLook::Inline`), with production's precision (whole percentages, lengths to a thousandth of a point).
Tests: five field tests read production's text again. Select All covers "37 pt", Copy copies "37 pt", and Opacity reads "60%", "50%" and "100%", which is what production's own tests asserted. The port had moved them to its centred look ("37", "60 %").
Checks: `vectorcraft-ui-egui` lib tests 3775 passed, 0 failed (the last two test fixes were re-run in their modules). Clippy (`vectorcraft-ui-egui`, `vectorcraft`, all targets, `-D warnings`) and `cargo fmt --check` are clean.
VectorCraft moves to craft-libs `next` at 3238a3eca (from bf62d509f), and follows the framework's changes so production's behaviour holds.
Framework fixes this brings in (all on `next`):
- Save for Web's hosted answers, Tab out of selectable label text, Escape in text fields, a focused stop in a closing layer losing the focus, grid labels beside a menu.
- A toolbar button's command runs as a command (clicking the active Blend tool finishes the blend again).
- A Page key bound to a command runs it ahead of the canvas page scroll.
- A command no longer closes and reopens a dock panel's flyout, so Cmd+A in the Artboards flyout selects every artboard.
- Presses in Export for Screens land on the control under them again (a tile grid measured too narrow clipped the pane).
- VectorCraft Modern's selected, pressed and disabled colours take production's values.
App changes that follow the framework:
- Properties dialogs pass their key to `PropertiesDialog::new`; hosted parameter dialogs take footer presses through `take_action`; the Print dialog reads and sets the Settings destination; job queues keep the default order; Preferences custom rows report changes; Home's Learn section uses `StartScreen::app_section`; `ui.screenshot` replies with `ScreenshotParams`; the Appearance list copies on Alt drag through `ReorderRule::copy_with`; the Character panel gives the font picker its settings; Zoom with Mouse Wheel picks the canvas `WheelScheme`; Recovery reads the `RecoveryChoice` answer.
- The document canvas takes arrows with every modifier (Alt+arrow copies, Shift+arrow nudges ten), and an arrow bound to an app command runs it.
- The toolbar drawer takes a tool dragged off its slot (`RemoveFrom`, `MoveFrom`).
- Number fields show percentages whole ("60 %") and lengths to a thousandth of a point, as production did (`NumberPrecision::Measured`).
Tests rewritten (assertions unchanged): the three file-drop tests run the pass the drop asks for; the Appearance Characters test clicks the link by role.
Checks: `vectorcraft-ui-egui` lib tests 3775 passed, 0 failed. Clippy (`vectorcraft-ui-egui`, `vectorcraft`, all targets, `-D warnings`) and `cargo fmt --check` are clean.
More of the port's look matches production's VectorCraft, in the parts the app owns.
- Section headings (dialogs, Align, Pathfinder, Separations, …) are regular label text, as production drew them, through one helper instead of per site.
- The Tools rail takes the chrome's Compact density, production's 36×29 cells, so the whole tool column fits again.
- Icons for the names no set had: Fold Preview, the Links panel's status marks, the swatch kinds and Cycle Display Sizes.
- The app catalog leaves Undo, Redo, Cut, Copy, Paste and the panels toggles to the framework's command sets, keeping Cut, Copy and Paste's extra F2/F3/F4 keys outside macOS. This removes the start-up warnings about duplicate definitions.
- Properties: Document Setup and Preferences buttons read without the menu's ellipsis.
- The Control bar and Properties draw the align buttons with the Lucide align glyphs, as production did.
Checks: `vectorcraft-ui-egui` lib tests 3772 passed, 3 failed. The 3 also fail on `main` and are fixed by the coming craft-libs update. Clippy (`vectorcraft-ui-egui`, all targets, `-D warnings`) and `cargo fmt --check` are clean.
The port's window looks closer to production's VectorCraft (0.18 and its source), and the app's live screenshots work again.
Icons
- The app's icon and cursor sets are registered when the app is made (`VectorcraftApp::new`), so the web build, the tests and offscreen renders draw them, as the desktop app does.
- Each tool command carries its tool's icon, so the tool rail and its flyouts draw the tools instead of the "more" glyph.
- The hint bar's help icon is drawn (`dc-help`, a question mark in a circle, which no set had).
Screenshots
- `ui.screenshot` captures are issued from the app's kept UI passes, and the app repaints until they are issued; before, every capture timed out after 8 s. New test `tests::automation::a_screenshot_is_issued_by_the_apps_frames_and_written`.
Title bar and tabs
- Home is a bare icon toggle without the options-bar rule; the window title shows only beside the macOS menu bar.
- The Discord button is a soft neutral button with a border.
- Document tabs drop their own `*`, since the strip's modified mark shows it.
Properties panel
- Section headings in label text; form labels with colons beside fields that keep their own width; the Character section keeps its panel layout.
- Rotate and Shear show their icon and keep their own width; the Constrain Pie Angle link sits beside the pie angle fields.
Buttons and the Contextual Task Bar
- Push buttons have production's 4-point corners (the app's sizes set `radius.button`), so they are as narrow as production's.
- The task bar's actions are outlined push buttons.
Artboards panel
- Select All's keys select every artboard only while the list is drawn with the keys.
Checks: `vectorcraft-ui-egui` lib tests 3772 passed, 3 failed. The 3 failures also fail on `main` and need a newer craft-libs (Save for Web palette, two Select All tests). Clippy (`vectorcraft-ui-egui`, `vectorcraft`, all targets, `-D warnings`) and `cargo fmt --check` are clean.
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.
The first line of $.stack names the running script. The helper now
passes it through unchanged instead of reading it as a frame, and its
doc comment says so.
$.stack is the current stack trace
(https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object/).
It now starts with a line holding the run's name in square brackets, such
as `[main.jsx]`, the name the console shows for the run: the `name` given
to `script.run`, else the `#script` name, else the file's name, else
`script`. The frames follow as before. Scripts that look for a bracketed
line in the trace to find their own name, for example to name a
preferences file, now find it.
The name line comes before the `…` line that stands for frames past 64.
A realm without a name (`Realm::set_script_name(None)`) writes no such
line.
Docs: docs/mcp.md ($ object table), docs/target-app-parity.md.
The check leaves out `length`, `hidden` and `readonly` set on `new
Folder(...)`, a `Folder` place, or a variable holding one, but a script
can give that name a File object in ways the check does not read. Such a
setter now counts as a file write in a check whose files:
- use `with`, or name `eval`, `Function`, `evalFile` or `constructor`,
as a word or as a string literal in brackets (`this['eval'](s)`,
`$['evalFile'](f)`, `(function () {}).constructor(s)`)
- read, call or assign a property in brackets when the brackets hold
anything but one string or number literal (`this[k](s)`,
`this['ev' + 'al'](s)`, `this[('eval')](s)`, `this[0, 'eval'](s)`,
`$[k](f)`, `g[k] = ...`), including a preprocessor line inside the
brackets
- assign a property in brackets whose name is a string literal longer
than 256 characters, or properties of more than 1,000 names
- assign or declare `Folder`
A variable whose name a member assignment writes (`$.global.d = ...`,
`this.d = ...`, `this['d'] = ...`) counts as one that may hold a File
object. Array literals, `o['plain']` and `a[0]` leave the Folder alone.
docs/mcp.md and the progress line in docs/target-app-parity.md state the
rule.
Discard White Overprint removed the overprint of a colorized image whose
color was white, even when that color was a tint of a spot swatch, which
the EPS writer still writes as that spot ink. A spot white now keeps its
overprint; process white still knocks out.
Document::spot_ink tells a tint above 0% of a spot swatch with a solid
color apart from paper white.
A linked image whose file is missing shows its full-color preview as it
is, without its colorize paint, and separations and PDF export already
print it that way. Overprint Preview and simulated overprints in
composite output still darkened the whole image. darken_overprints and
image_overprints_whole now take the document's images and leave such an
image at its own blend mode, and the helpers that find the pixels a
colorized image shows move from the separations code to
vectorcraft_doc::overprint so both use them. The preview's cached art is
made again when the document's images change.
main added the file_font field to ImageBlob, and the separations test
for an image whose pixels refuse its color built one without it, so the
vectorcraft-pdf tests did not compile after the merge of main.
Bring in the 205042e Rule-10 pin (#9160) and the #9157 Sonar note so
this branch contains current main.
# Conflicts:
# Cargo.lock
# Cargo.toml
# apps/vectorcraft-web/Cargo.toml
# crates/text/Cargo.toml
# xtask/src/pdf_deps.rs
A placed file whose own Show Images in Outline Mode is off shows its linked
image's pixels in grayscale, uncrossed, when this document's setting is on.
docs/plugins.md now says that each new member keeps only the id of the
old member in its place, with its name, live shape, opacity, blending
mode, appearance, opacity mask and other settings of its own reset, and
that `guide: false` on a compound path makes each guide member an
ordinary path.
The compound path test also checks that `type: "path"` without `guide`
is refused for a compound path with a guide member and leaves the member
a guide, and its doc comment names members that are not paths.
In Outline mode, with File > Document Setup > Show Images in Outline Mode
off, a linked image's frame is crossed from corner to corner, following
the corners of a turned or distorted image. A placed document shows its
box crossed, and its file's art no longer draws in Outline mode unless
the option is on. Embedded images keep a plain frame, and so do the
pieces that an envelope cuts an image into.
A placed document with raster effects or color adjustments stays
crossed. One with an effect that changes geometry, its own or its
group's, still draws its file's art reshaped and is not crossed yet.
With the option on, images show their pixels in gray and placed
documents show their art. The art inside a placed document now follows
the option of the document it is placed in rather than the placed
file's own setting.
Linked files showing as a box with an X in Outline mode is described at
https://helpx.adobe.com/illustrator/using/viewing-artwork.html; the
other rules are VectorCraft's own.
Docs: docs/ui-parity.md, docs/mcp.md; document.setup params text for
outlineImages.
A member that is not a path (a compound path inside a compound path) is
not in the input's `path`, so a changed `path` or `type: "path"` deleted
it, together with any hidden or locked members it held. The host now
refuses such an output with an error naming the compound path. A
compound handed back as it was still keeps the member.
docs/plugins.md also says that new members keep the old ids by position
but not their names or live shapes. The test covers a nested compound
member and turning a compound with a guide member into a guide path.
Rule 10: every storytold/craft-libs crate is at the same rev, now
205042e406b630cda653990649264a78fea6296b, the merge of #3136 on
craft-libs main. That rev still skips a form already on the drawing
stack (ISO 32000-2 §8.10.1) but no longer reports it as
ContentTruncated, so a 200-shape knockout-mask PDF imports completely.
Also moves the leftover per-crate pins of craft-font-catalog and
craft-web-api onto the same rev.