Commit Graph
5524 Commits
Author SHA1 Message Date
dotCooCoo 3c3cf90e79 MCP docs: export's EPS row names its one-file default and rect refuses artboards
Without an artboard choice an EPS export writes one file of the visible
art, not one file per artboard. options.rect is also refused with
options.artboards, as page_rect checks every artboard param.
2026-10-24 18:44:21 -07:00
aiongg 8bf090b253 Shortcuts: use the shared craft-keymap crate for the catalogue, overrides, dispatch and .kys import (#3119)
* Shortcuts: the keymap, overrides and dispatch come from craft-keymap

The editor's catalogue (commands, UI commands, panels, tools; one tool
group per tool; show/hide commands marked as toggles) builds a
craft-keymap Keymap. UiState::shortcut_overrides is a craft_keymap
Overrides stored through keymap::stored, which writes the same map of
entry key -> one string as before, with panel: keys and VectorCraft's
spellings, so earlier versions read the file; a value that is not text
drops that entry instead of every preference.

Key presses run through craft_keymap's Dispatcher with accept filters:
keys that type text go to the one-key text path, and while the Type
tool edits only command-key chords run. Held keys repeat. Conflicts
and assignment use the crate's conflicts and set_bindings. Extra Shift
no longer falls back to the chord without it.

* Shortcuts: .kys import matches and applies through craft-keymap

The review proposes targets with craft_keymap's namematch, and Apply
hands the ready rows to craft_keymap::plan as one set, each row's
target passed as the remembered answer for its entry. The later row
takes a chord, and commands outside the set lose the chords the set
gives. Rows with one name in one block keep their own targets.
The engine's own namematch module is removed.

* Shortcuts: Cmd+, beside other hits, web Mac platform, cached dialog view

- Pin craft-keymap at 362eb59f.
- Cmd+, opens Settings on a Mac after the frame's other shortcuts run, with the
  Mac read from egui's OS; drop settings_chord, which dispatch no longer used.
- The web build follows the browser's OS, so Ctrl stays Ctrl on a Mac.
- The Keyboard Shortcuts dialog keeps its keymap, row texts and conflict count
  between frames while the working set is unchanged.
- Every default shortcut text becomes its entry's binding (test).
- craft-keymap counts as a UI crate for the layer check.
- Translate "too many changed shortcuts"; the parse error reuses the existing
  "can't parse shortcut `{c}`" message.

* Shortcuts: the chords the operating system takes can't be assigned

The keymap reserves craft_keymap::reserved::system for its platform:
window switching and closing, and the virtual consoles off the Mac.
The Keyboard Shortcuts dialog and shortcuts.set refuse them with
"<chord> is reserved by the system", and a saved override on one keeps
the entry's default. No default shortcut uses a reserved chord.

* Shortcuts: craft-keymap at craft-libs 2eca9b3a

craft-keymap comes from storytold/craft-libs (craft-libs #164 and #186), at the rev craft-pdf
already uses. The web build keeps the browser's full platform, so Windows browsers get Windows'
reserved chords, and each platform caches its own default keymap.
2026-10-24 15:01:26 -04:00
BFlat bccf4de722 Merge pull request #4045 from addibble/fix/render-tests-system-font-lock
Renderer tests: the Arabic alternate-glyph tests take the font lock
2026-10-25 00:02:12 +07:00
BFlat 2dac209487 Merge pull request #3955 from dotCooCoo/feat/save-file-native-options
MCP: save_file takes the native save options compress, version and preview
2026-10-25 00:00:33 +07:00
Drew DibbleandClaude Opus 5.5 31b653b70f Renderer tests: the Arabic alternate-glyph tests take the font lock
`tests_alternate`'s Arabic tests look up installed fonts by name
(`FontDb::face`), which loads each one into the global database and so
changes its generation, without `tests_fontchange::adding_fonts()`.
When that lands in the first frame of
`tests_charstroke::character_stroke_outlines_are_kept_between_frames`,
the second frame lays the type out again and expands the stroke again,
and the test fails (3 runs in 30 on macOS, where Arial and Geeza Pro
are installed; where no Arabic font is, those tests return early and
nothing changes). They now hold the lock, and its documentation says
looking up an installed font counts as changing the fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:49:34 +07:00
dotCooCoo b998ae623c MCP: save_file takes the native save options compress, version and preview
Squashed from #3955 onto main.
2026-10-24 23:43:54 +07:00
BFlat 410fc4caa7 Merge pull request #4044 from Silvertree2010/fix/h2070-svg-href-percent-decoder-treats
Require two hex digits in SVG href percent escapes
2026-10-24 23:39:55 +07:00
BFlat 6cbd388514 Merge pull request #4043 from Silvertree2010/fix/h2038-batch-step-reference-accepts-a-p
Reject non-digit array indexes in batch step references
2026-10-24 23:39:45 +07:00
BFlat f81359903c Merge pull request #4042 from dotCooCoo/fix/shape-builder-live-paint-faces
Shape Builder: uses a Live Paint group's filled faces and stroked edges
2026-10-24 23:39:31 +07:00
NetterSilverandClaude Haiku 5.5 a579ca7073 Require two hex digits in SVG href percent escapes
Found while testing crates/svg/src/import/files.rs:82 (percent_decoded)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 23:32:52 +07:00
BFlat feb7ae56d8 Merge pull request #4041 from dotCooCoo/fix/shape-builder-hover-map-once
Shape Builder: hover and Alt hover share one region map
2026-10-24 23:32:45 +07:00
NetterSilverandClaude Haiku 5.5 bd96665f44 Reject non-digit array indexes in batch step references
Found while testing crates/engine/src/steps.rs:74 (parse)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 23:26:50 +07:00
dotCooCoo 62a9c5e240 Shape Builder: uses a Live Paint group's filled faces and stroked edges
With a Live Paint group in the selection, the Shape Builder took every
visible path in the group as an input. Unfilled faces became regions of
their own and came back from a merge as invisible paths. An edge that
closes on itself, such as the outline of a single rectangle, became a
second shape over its face: a click on the face gave the merged shape
the edge's look, a stroke with no fill.

The Shape Builder now takes the group's visible filled faces as shapes
and its visible stroked edges as open lines; a closed edge is opened at
its first anchor. A merge replaces the group with the merged shape, the
filled faces it did not use and the edges, except the edges between
merged faces, as it does for other selected paths and lines. An area
that the edges enclose around an unfilled face is still a region. The
Live Paint commands still collect every face and edge.
2026-10-24 23:26:49 +07:00
dotCooCoo 0921b8629e Shape Builder: hover and Alt hover share one region map
Holding Alt over a selection the Shape Builder had already mapped built
the planar map a second time, to add the outline edges that erasing
hits. A merge, and a Live Paint Bucket fill of a plain selection, also
dropped the map, so a gesture that left the document unchanged was
followed by another full build.

The Shape Builder now builds its map with the outline edges the first
time, and both tools keep the map until the document, its revision or
the selection changes.

When the inputs have more than 128 segments, a hover with the Shape
Builder or the Live Paint Bucket now builds the map on another thread
and highlights no region until it arrives, instead of holding up the
frame; the canvas checks for it each frame. A press waits for the map,
and the headless MCP host waits for it after a move. The web build has
no threads and builds the map at once. The Live Paint Selection tool's
hover no longer builds a map of the selection, which it did not use.
2026-10-24 23:15:51 +07:00
BFlat c7d65ae7e7 Merge pull request #4039 from dotCooCoo/fix/flatten-threaded-text-keeps-its-text
Threaded text: Flatten Transparency on a frame no longer duplicates its text
2026-10-24 23:09:25 +07:00
dotCooCoo ebd512d2a4 Threaded text: Flatten Transparency on a frame no longer duplicates its text
Object › Flatten Transparency replaced a frame of threaded text by its
outlines with Convert All Text to Outlines, and by flat regions or an
image where the frame was transparent. The thread's re-flow then added
the frame's text to the story, as it does for a frame that was deleted,
so the other frames held that text a second time while the outlines,
regions or image drew it.

A frame that Flatten Transparency outlines or flattens now leaves its
thread with the text it shows, and the other frames keep the text they
hold, as with Create Outlines and Expand. When the thread's last frame
is flattened, the text it has no room for goes after the text of the
last frame that stays. A thread left with one frame is no longer a
thread, and undo restores the thread.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-10-24 23:04:33 +07:00
BFlat 34bd910a9b Merge pull request #4037 from dotCooCoo/fix/shape-builder-line-inside-shape
Shape Builder: a line that ends inside a shape stays whole
2026-10-24 22:39:31 +07:00
dotCooCoo 01380ba669 Shape Builder: a line that ends inside a shape stays whole
A merge removed every piece of an open line that had a merged region on
both sides. The end of a line that stops inside a shape has the same
region on both sides, so a click or a drag on the shape, or deleting it
in erase mode, cut the line back to where it enters the shape.

A piece is now removed only when it runs between two different merged
or deleted regions. A line that crosses a shape still splits it, and
merging the two halves still removes the piece between them.
2026-10-24 22:33:33 +07:00
BFlat f3cd541ad1 Merge pull request #4035 from dotCooCoo/fix/shape-builder-drag-narrow-regions
Shape Builder: a drag picks every region it crosses, however narrow
2026-10-24 22:19:21 +07:00
dotCooCoo 3b0f626a4f Shape Builder: a drag picks every region it crosses, however narrow
A drag tested points spaced by a step that grew with the selection (at
least 0.25 pt), and the tool's highlight tested points 2 screen pixels
apart. A region narrower than the step, such as a thin overlap, fell
between samples: it kept its piece of each source, the merge left strips
behind, or the drag failed with "no region under the pointer" while the
highlight showed the region. Zoomed out, the highlight could miss a
region the merge then took.

The drag now finds where each segment crosses a region outline and tests
the middle of every stretch between crossings, so every region it
crosses is picked. The tool's highlight and shapeBuilder.merge use the
same picking, and Shaper's scribble picks the faces it crosses the same
way. In erase mode the line pieces and edges are still found within the
tolerance, and a segment that crosses one also tests the crossing point.

Shaper's scribble found the strokes to erase at points at least 0.5 pt
apart, so with a tolerance below 1 pt it could pass over a stroke
without erasing it. It now also tests where the scribble crosses each
stroke and points tolerance / 2 apart.
2026-10-24 22:02:39 +07:00
BFlat 7cf9df0045 Merge pull request #4032 from dotCooCoo/fix/mcp-docs-wait-and-connect-error
MCP docs: wait for the app window before starting the client, and the full --connect error
2026-10-24 21:44:21 +07:00
BFlat 87a8798d4a Merge pull request #4031 from dotCooCoo/fix/threaded-paragraph-continues-without-first-line-indent
Type: threaded frames do not repeat a continued paragraph's first-line indent or list marker
2026-10-24 21:44:07 +07:00
dotCooCoo 066d525425 MCP docs: wait for the app window, and the full --connect error
`open -a` and PowerShell's `&` return before the app opens its control
port, and `vectorcraft-cli mcp` tries the port only once, so the docs
now say to wait for the VectorCraft window before starting the MCP
client. The `--connect` failure is documented as the full line the CLI
prints, `vectorcraft-cli: cannot connect to 127.0.0.1:7979: ` followed
by the system's connection error.
2026-10-24 21:43:44 +07:00
dotCooCoo 0520e9da86 Type: threaded frames do not repeat a continued paragraph's first-line indent or list marker
A paragraph split between two threaded frames took its first-line
indent again at the top of the next frame, and a list paragraph drew
its bullet or number there again. Each frame is laid out on its own,
and its first paragraph kept every paragraph attribute there.

A text object now marks a frame whose first paragraph continues from
the frame before (first_para_continues, not saved). The thread re-flow
sets the mark where each frame's share starts inside a paragraph and
measures each share with it, and a restored document reads the marks
from its saved text. Area type and type on a path set the first line of
such a paragraph as a wrapped line: no first-line indent and no bullet
or number. The paragraph after it takes the next number. Release
Selection, Remove Threading, Convert To Point Type and copies of a
frame clear the mark, so the first paragraph there has its indent and
bullet or number again. When Create Outlines, Expand or Expand
Appearance takes frames out of a thread, a frame that stays keeps the
mark only while it is threaded and the frames before it end inside a
paragraph. A frame whose mark changes lays out its first line again,
and when it is still threaded, its thread re-flows. When the outlined
frame is the last one, the text it has no room for is measured as the
frame lays it out: without the first-line indent when it continues a
paragraph, and with its numbers counted on from the frames before it.
The frame before it now takes exactly the text the last frame has no
room for. Duplicates, copies dragged in the Layers panel, the copies
that Release to Layers (Build), Release Opacity Mask and Edit Opacity
Mask make, and Draw Inside's clipping copy then have their cached
bounds computed again, as paste already does for pasted type.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-10-24 21:43:44 +07:00
Brandon Thomas f37d5d5d16 Merge pull request #4034 from storytold/fix/colourfont-pdf-id-flake
Tests: the colour-font PDF test counts only text objects, not the random file ID
2026-10-24 10:39:01 -04:00
Brandon ThomasandClaude Opus 5.5 186a1b140e Tests: the colour-font PDF test counts only text objects, not the random file ID
pdf_real_text_draws_svg_glyphs_as_art_and_keeps_their_characters counted
every line containing Tj or TJ. The file ID in the trailer and the XMP is
base64 derived from the timestamp, so about one run in a hundred it spells
one of them and the test saw two extra lines (main CI, 5c1185dd). Only
lines that begin a text object count now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:38:42 -04:00
Brandon Thomas dccab56372 Merge pull request #3421 from kler/swedish-ui
i18n(sv): translate 1 new string, use the agreed terms in 148
2026-10-24 10:22:32 -04:00
Brandon Thomas 7e805f7ffc Merge remote-tracking branch 'origin/main' into pr-3421 2026-10-24 10:22:26 -04:00
BFlat e5182f3f96 Merge pull request #4030 from dotCooCoo/fix/shape-builder-map-per-revision
Shape Builder: rebuild the region map for each document revision
2026-10-24 21:22:09 +07:00
BFlat af97548fec Merge pull request #4002 from dotCooCoo/feat/pencil-close-near-start-cursor
Pencil: the closing cursor shows while a stroke is drawn back near its start
2026-10-24 21:21:55 +07:00
dotCooCoo efff645a8e Shape Builder: rebuild the region map for each document revision
The Shape Builder, Live Paint Bucket and Live Paint Selection keep the
selection's region map between pointer events, keyed on the document's
address and the selected ids. Every edit replaces the document, and after
an undo followed by an edit a later document can be allocated at the
address of the one the map was built from. The key then matched a map of
an earlier revision, so a drag across the art merged nothing and a Live
Paint Bucket click filled nothing.

The key now also holds the tool context's revision, which moves with every
edit, undo and selection change.
2026-10-24 21:21:37 +07:00
Brandon ThomasandClaude Opus 5.5 aabf48728e Pencil: the closing ring tests the point a release keeps
A Paintbrush sample dropped for being under a pixel from the last point
left the ring computed from the pointer, while the release keeps the last
point; the ring now follows that point (CodeRabbit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:21:37 +07:00
dotCooCoo c607d2b448 Pencil: the closing cursor shows while a stroke is drawn back near its start
A Pencil or Paintbrush stroke released within Close Paths When Ends Are
Within of its start closes, but the cursor gave no sign of it. While the
pointer is where a release would close the stroke, the cursor is now
PencilClose (PaintbrushClose for the Paintbrush), the crosshair with a
ring, as Draw straight lines with the Pencil tool describes:
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/draw-straight-lines-with-the-pencil-tool.html

The check is the one the release makes, on the end the stroke would
take (snapped for the Pencil). A straight line (Shift or Alt held at the
press), a stroke that continues a selected path, a stroke that redraws
one and a smoothing drag show no ring.

Docs: docs/target-app-parity.md, docs/ui-parity.md.
2026-10-24 21:21:37 +07:00
Brandon Thomas 8b2d3aefa5 Merge pull request #3812 from storytold/dependabot/github_actions/actions-6dcc66fbd4
ci(deps): bump Swatinem/rust-cache from 2.9.2 to 2.9.3 in the actions group
2026-10-24 10:21:03 -04:00
BFlat d0f095c1d4 Merge pull request #4029 from vangel76/fix/scriptcheck-fixpoint-always
fix(scriptcheck): same report with and without a loader for scripts without includes
2026-10-24 21:18:58 +07:00
BFlat 505ffd270a Merge pull request #4027 from Silvertree2010/fix/h1953-xml-id-name-round-trip-turns-a-s
Escape spaces before x<hex> and a separator in XML ids
2026-10-24 21:18:44 +07:00
BFlat d818109a87 Merge pull request #4026 from dotCooCoo/fix/control-app-nap
Control: requests are answered at full speed while the window is hidden on macOS
2026-10-24 21:18:34 +07:00
BFlat cd97e54f9c Merge pull request #4000 from Silvertree2010/fix/h1987-dxf-mtext-an-escaped-backslash-f
Keep escaped backslash literal before U+XXXX in DXF MTEXT
2026-10-24 21:13:26 +07:00
BFlat cf031a84e7 Merge pull request #4025 from vangel76/refactor/scriptcheck-feature-enums
refactor(scriptcheck): feature enums, split analyze.rs
2026-10-24 21:13:11 +07:00
BFlat e572f010f0 Merge pull request #4019 from vangel76/perf/scriptcheck-lex-once
perf(scriptcheck): lex each file once, fewer copies
2026-10-24 21:12:56 +07:00
BFlat ac9147b498 Merge pull request #4024 from Silvertree2010/fix/h2025-dxf-mtext-stacked-fraction-s1-2
Keep the denominator of DXF MTEXT stacked fractions written with ^
2026-10-24 21:12:41 +07:00
vangel76andClaude Opus 5.5 aa8adf0891 fix(scriptcheck): settle what variables hold without a loader too
Without a loader, check() scanned the script once, so a function using a
variable the global code assigns after it (`function g(){ f.write('x'); }
var f = new File('a');`) missed file.write, while the loader path found it.
The no-loader path now runs the same fix-point, keeping a scan that finds
nothing new as the report scan, so a script that includes nothing gets the
same report with and without a loader.

Fixes #4011

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:10:06 +07:00
NetterSilverandClaude Haiku 5.5 4e9cd60540 Escape spaces before x<hex> and a separator in XML ids
Found while testing crates/doc/src/xml_id.rs:32 (from_object_name), decoded by escaped() at :72

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 21:03:43 +07:00
Brandon Thomas 06116452bc Merge remote-tracking branch 'origin/main' into pr-3421
# Conflicts:
#	crates/ui-egui/src/i18n/sv.tsv
2026-10-24 10:03:14 -04:00
dotCooCoo 4821ec92c2 Control: requests are answered at full speed while the window is hidden on macOS
Within about a minute of its window no longer being visible, macOS App
Nap lowers the app's threads to the lowest priority and coalesces its
timers. On a loaded machine, control requests then took seconds to
answer, and the 60 s timeout reply arrived up to 26 s late.

When the control channel is on (--control or VECTORCRAFT_CONTROL_PORT),
the app now holds an NSProcessInfo activity (user initiated, allowing
idle system sleep, latency critical) for as long as it runs, so App Nap
does not apply. The activity does not keep the Mac awake.
docs/control-protocol.md states this in the paragraph on the 60 s
timeout.
2026-10-24 20:58:05 +07:00
BFlat b092a5211f Merge pull request #4022 from dotCooCoo/feat/mcp-alias-tools-and-window-max-side
MCP: each alias tool names its pair, and ui_screenshot takes max_side
2026-10-24 20:56:36 +07:00
BFlat 5c1185dd12 Merge pull request #4021 from Ronfo2013/fix/planar-grid-index
G11: Shape Builder's edge-source index is a grid, so diagonal hatches are no longer quadratic
2026-10-24 20:56:21 +07:00
NetterSilver 472cd812f9 Keep escaped backslash literal before U+XXXX in DXF MTEXT
Squashed from #4000 onto main.
2026-10-24 20:54:42 +07:00
vangel76andClaude Sonnet 5.5 e57773d45f refactor(scriptcheck): split analyze.rs, share the token filter
Move the declaration pass, the significant-token helpers and the feature
recognisers into analyze/declared.rs, sig.rs and features.rs without
changing their code, and replace the duplicated line-break and directive
dispatch of scan and declarations with LineBreaks::read.

Part of #4014

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 20:53:54 +07:00
vangel76andClaude Sonnet 5.5 4d2b628b9e refactor(scriptcheck): feature and outside ids as enums
FeatureId and OutsideId replace the string ids the analyzer passed around.
One table each gives the id, the need and the report order, so
catalog::FEATURES and catalog::need() are gone. Feature.id and the engine
JSON are unchanged; OUTSIDE is generated from the same table.

Fixes #4013

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 20:53:54 +07:00