Commit Graph
4652 Commits
Author SHA1 Message Date
bflatastic fbeea11c4c M1: Shift with the Pencil draws a straight line at 45° steps (#2447)
Shift did nothing with the Pencil: the stroke stayed freehand, while the
Line tool and the Pen keep theirs to 45° steps. pencil_add, shared by the
drag and the release, now keeps one straight segment from where the
stroke started to the pointer at the nearest 45° step while Shift is
held (the Marker and Highlighter too); a Shift-click without a move still
draws nothing.
2026-11-19 06:30:36 +07:00
BFlat 41be247d9f Merge pull request #2477 from storytold/fix/main-svg-fmt
M6: svg import drops the scanners craft-svg replaced, so main passes fmt, clippy and its tests again
2026-11-19 06:30:13 +07:00
bflatastic fb21b3c389 M6: svg import drops the scanners craft-svg replaced, so main builds and passes fmt again (#2468)
#2468 moved SVG import onto craft_svg::tree::parse, which runs the size,
entity, attribute and nesting checks itself, but left FigCraft's own
scanners (too_wide, too_deep, nesting) and import/budget.rs unused and
import.rs unformatted: main failed cargo fmt, clippy -D warnings and the
svg tests, which still passed budget::Limits to import_within.

The dead code goes; budget_tests use craft-svg's tree::Limits (bytes,
embedded_bytes, embedded_depth) and its error texts, and hostile_tests
check attribute width with craft_svg::guard::too_wide at the default
limits and the nesting refusal at craft-svg's 256 levels.
2026-11-19 06:00:08 +07:00
BFlat f8b1dc7373 Merge pull request #2444 from B-uchi/pr/design-context
M8: design context for AI agents
2026-11-19 05:51:53 +07:00
BFlat cc64a74a72 Merge pull request #2438 from B-uchi/pr/inspect-dashcap
M8: inspect fields accepts dashCap, which node.get already writes
2026-11-19 05:49:45 +07:00
Dylan M. Taylor 5c69112684 svg: cut over SVG import parsing to craft-svg (#2468) 2026-11-18 17:21:52 -05:00
BFlat 202b748083 Merge pull request #2465 from storytold/fix/component-name-header-2347
M3: the Design panel's header names the selected component or set (#2347)
2026-11-19 04:21:09 +07:00
BFlat 322bf16c8e Merge pull request #2463 from storytold/fix/library-style-hops-2414
M3: a library's style that reaches a file through another library stays bound (#2414)
2026-11-19 04:19:30 +07:00
BFlat f2696e0dbf Merge pull request #2464 from storytold/fix/rest-binding-warnings-2441
M6: REST import reports node-level paint and effect bindings only when something is lost (#2441)
2026-11-19 04:05:50 +07:00
bflatastic e1b96dc5c8 M3: the Design panel's header names the selected component or set (#2347) 2026-11-19 03:59:15 +07:00
bflatastic 0e5070d6cf M3: a library's style that reaches a file through another library stays bound (#2414)
Publishing keeps the variables its styles bind and where its copies of other libraries' assets came
from; importing files such a copy under that library when the file links it.
2026-11-19 03:54:44 +07:00
BFlat f51606ca4e Merge pull request #2462 from storytold/fix/variant-own-value-2349
M3: a selected variant's property dropdown shows and sets its own value (#2349)
2026-11-19 03:50:51 +07:00
bflatastic a88580470b M6: REST import reports node-level paint and effect bindings only when something is lost (#2441) 2026-11-19 03:42:03 +07:00
BFlat 964e7da7ec Merge pull request #2460 from storytold/fix/fixed-in-window-2430
M5: a fixed header stays in the window to the end of the page without a device (#2430)
2026-11-19 03:39:27 +07:00
.CooCoo 260fd4d8ef Dependencies: take craft-libs main at 453b0da782 (#2412)
* Dependencies: take craft-libs main at 3af2280ee3

Every craft-libs crate in the workspace now comes from one commit,
3af2280ee3434a2c860012df2f440652621c2c81. They were on five revisions:
e11f9d9a, d13ac58a, 976eb51c, e9829954 (craft-update) and fd5e2fef
(craft-web-api and craft-web-host). Cargo.lock now holds one craft-zip
instead of two.

No FigCraft code changes. The new craft-font-store adds cap-primitives
and its dependencies to Cargo.lock.

* Dependencies: drop pin comments the craft-libs move made untrue

craft-update now uses the same craft-libs rev as the other crates, and
craft-window comes from craft-libs main. Remove the comment that says
craft-update is pinned separately and the comment that says craft-window
is pinned to an unmerged branch.

* Tests: look up craft-fig with cargo metadata filtered to the host

The i18n key test finds the craft-fig sources with `cargo metadata
--offline`. Since craft-font-store depends on cap-primitives, the graph
holds winx, which only Windows uses. Without a platform filter, cargo
metadata needs every platform's sources and failed on Linux CI with
"failed to download `winx v0.36.4`". The query now passes
`--filter-platform` with the host triple from `rustc -vV`.

* Dependencies: take craft-libs main at 453b0da782

Every craft-libs crate in the workspace moves from 3af2280ee3 to
craft-libs main at 453b0da782, and craft-sketch moves from ff142b3ad5
to the same commit. Cargo.lock now holds one craft-figma-rest and one
craft-zip instead of two of each; no other package changes.

* Dependencies: drop the design-file pin comment that no longer holds

craft-penpot, listed above the design-file crates, uses the same
craft-zip as craft-fig and craft-figcraft-format, and every craft-libs
crate is now on one rev, so the comment's reason for a separate rev is
removed.
2026-11-18 15:22:39 -05:00
bflatastic 116094a6db M3: a selected variant's property dropdown shows and sets its own value (#2349)
It showed the set's default, and choosing a value set the default, so the variants swapped places.
2026-11-19 03:16:35 +07:00
BFlat 86139e88fb Merge pull request #2459 from storytold/fix/code-language-names
M12: one table for a code language's id and name
2026-11-19 03:16:32 +07:00
BFlat 024fba5bd2 Merge pull request #2454 from storytold/fix/outline-text-2405
M4: Outline stroke on a text without a stroke outlines its glyphs (#2405)
2026-11-19 03:15:26 +07:00
bflatastic 48c9d3fb14 M5: a fixed header stays in the window to the end of the page without a device (#2430)
Without a device, a frame taller than the window scrolled its content and then panned whole, taking
fixed and sticky layers off the top. A frame with them now takes the window as its screen.
2026-11-19 03:14:39 +07:00
BFlat 2a936671b2 Merge pull request #2455 from storytold/carry/2104
M8: dragging near the canvas edge pans the view, as in Figma (#2015)
2026-11-19 03:13:15 +07:00
B-uchi 8dffbf87a1 M8: design context keeps its assets to the layers returned and says when a join stops
From review: the asset list follows the layers placed in the tree, so a
smaller tree (maxNodes, or the MCP tool's retry for maxBytes) means a smaller
list, and `truncated.assetsLeftOut` counts the rest; following aliases reports
`truncated.variables` when it stops at its budget with variables still to
read; and a font is checked with figcraft_text::has_family by its trimmed name,
as the missing-fonts list does, so a family stored with outer spaces isn't
taken for installed. A regression test for each fails without its fix.
2026-11-18 20:59:19 +01:00
bflatastic 05c719d0b1 M12: one table for a code language's id and name
The id and label matches listed every language twice (Sonar's duplication gate on #2457).
2026-11-19 02:41:28 +07:00
bflatastic 50d94f98c8 M4: an empty text stays as it is under Outline stroke (#2405) 2026-11-19 02:39:15 +07:00
B-uchi ae592a0d71 M8: design context joins aliased and style-bound variables, and reads only valid targets
From review: the variables a style binds and those an alias or colour
calculation reads are joined too, followed to any depth; fonts come from the
text layers placed in the tree, so a second target's font isn't lost to a
separate walk's budget; and a malformed `id` or `ids` entry is an error
instead of reading the selection or dropping the entry. A regression test for
each fails without its fix.
2026-11-18 20:37:44 +01:00
B-uchi de6c66838d Credit: add B-uchi's name for the About window 2026-11-18 20:37:44 +01:00
B-uchi 2d4309c9aa M8: design context for AI agents
inspect.designContext and the MCP tool design_context read the selection (or
ids, or a scope) in one call. Each layer keeps apart the values the designer
set (explicit), those layout or the file worked out (derived) and those with no
direct CSS equivalent (unsupported, with the reason). The variables (every
mode's stored and resolved value), styles, components, fonts and assets the
tree uses are joined once, and `missing` says what the design doesn't specify.
A connected instance gives its code snippet instead of its layers. Large trees
are capped and say so, and the MCP tool asks for fewer layers until the result
fits the client.
2026-11-18 20:37:44 +01:00
bflatastic 79a1ea4a42 M8: keep the canvas input under the complexity limit with edge panning (#2104)
The pan past the canvas edge moves into a helper of its own.
2026-11-19 02:36:08 +07:00
BFlat 0d7135c679 Merge pull request #2457 from storytold/carry/2282
M12: boards: code blocks (doc and engine): a board code block that hugs its lines, with a language (#2237)
2026-11-19 02:33:25 +07:00
B-uchi a4099033f7 M8: inspect fields accepts dashCap, which node.get already writes
node.get and document.inspect write `dashCap` on a layer with a dash cap, but
it was missing from NODE_KEYS, so `fields: ["dashCap"]` was refused as an
unknown key (and the MCP tools' `fields` schema left it out). A test now walks
the keys a varied layer tree writes and checks each is one `fields` accepts.
2026-11-18 20:26:55 +01:00
Trevor Brown 0d70c332b1 M12: boards: code blocks (doc and engine): a board code block that hugs its lines, with a language (#2237) (#2282)
The change from #2282 by @TrevorBrown-dev, as one commit.
2026-11-19 02:00:46 +07:00
BFlat d4b4387eb1 Merge pull request #2456 from storytold/carry/2337
M6: .fig export writes ruler guides (#2336)
2026-11-19 02:00:37 +07:00
Trevor Brown 6b625a0d46 M6: .fig export writes ruler guides (#2336) (#2337)
The change from #2337 by @TrevorBrown-dev, as one commit.
2026-11-19 01:28:57 +07:00
Trevor Brown 98c4714458 M8: dragging near the canvas edge pans the view, as in Figma (#2015) (#2104)
The change from #2104 by @TrevorBrown-dev, as one commit.
2026-11-19 01:19:39 +07:00
BFlat fd32005dd7 Merge pull request #2453 from storytold/carry/2330
M8: a Shift-click range in the Layers panel keeps a frame, not its covered children, as in Figma
2026-11-19 01:19:30 +07:00
bflatastic 64b0b45108 M4: Outline stroke on a text without a stroke outlines its glyphs (#2405)
A fill-only text was left as it was: Outline stroke skipped every layer
without a visible stroke. A text now flattens in place into a vector of
its glyphs, filled as the text was and keeping its colour style,
constraints, visibility and lock; a text with no glyphs stays.
2026-11-19 00:56:10 +07:00
Trevor Brown b5d43a7de2 M8: a Shift-click range in the Layers panel keeps a frame, not its covered children, as in Figma (#2330)
The change from #2330 by @TrevorBrown-dev, as one commit.
2026-11-19 00:47:42 +07:00
BFlat 94a3524a90 Merge pull request #2452 from storytold/carry/2377
M5: a drag from a child of a selected frame moves the frame (#2360)
2026-11-19 00:44:52 +07:00
Trevor BrownandClaude Opus 5.5 944fe8616c M5: the frame_with_child doc comment gives the layers' real positions (#2377 review)
The nested frame is 100 x 100 at (180, 180) and its rectangle is 40 x 40 at (200, 200), as the code creates them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 driver, no subagent
2026-11-19 00:21:12 +07:00
Trevor BrownandClaude Sonnet 5.5 4806b95e8e M5: a drag from a child of a selected frame moves the frame (#2360)
A press on a layer inside a selected one now drags the selection, and a click
without a drag selects that layer (also in Dev Mode and for a single selection),
as in Figma. Cmd/Ctrl, Shift and layers outside the selection are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-19 00:21:12 +07:00
BFlat ebb22e9539 Merge pull request #2448 from storytold/carry/2376
M5: the arrow keys move a layer along the canvas axes inside a rotated parent (#2372)
2026-11-19 00:21:02 +07:00
Trevor BrownandClaude Sonnet 5.5 e94ecfca7a M5: the arrow keys move a layer along the canvas axes inside a rotated parent (#2372)
transform.nudge applied the step in the parent's local space, so Down inside a frame
rotated 90 degrees moved the layer sideways. The step is now turned into the parent's
space first (falling back to the plain step if the parent's transform is not invertible).
Auto layout children are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-18 23:46:16 +07:00
BFlat 39da85ca8a Merge pull request #2439 from storytold/carry/2359
M1: Paste with a layer in a frame selected puts the copy next to it (#2355)
2026-11-18 23:44:36 +07:00
BFlat acf0b14da4 Merge pull request #1735 from storytold/feat/asset-analytics-actions
M3: library analytics count insertions and detachments of styles and variables
2026-11-18 20:03:41 +07:00
BFlat 18b4acfda9 Merge pull request #2440 from B-uchi/pr/inspect-stored-keys
M8: get_node reports text and stroke settings it stores
2026-11-18 19:46:38 +07:00
bflatastic 6c63071241 M3: the Show usage test keys its choice with Id::unique 2026-11-18 19:38:54 +07:00
FredApps 23e5877e6b Wait for style layers to clear, and cover a full asset-peak cap
inserts_and_detaches_count_per_style_and_variable_in_the_period returned
as soon as detachments reached 2, then asserted layers == 0. Asset-action
reports can arrive before the usage snapshot, so CI saw layers still at 1.
The wait now requires both.

Sonar on the same-repo vehicle (#2451) evaluated the coverage gate at
79.74% of 232 new lines (one line under 80%). A unit test covers grow's
branch that drops a new key once peaks are already at MAX_REPORTED.

Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-18 19:38:54 +07:00
FredApps 9e45db6885 Keep asset-action peaks when usage rows evict, and report every count
CodeRabbit's majors on #1735: evicting a file from the capped usage list
dropped asset_peaks, so a later identical report was counted twice.
Retention now includes asset_updated, and the file just heard from is
kept even when timestamps tie. The document keeps up to 1000 asset
counts, but each wire message is still capped at 250, so reports are
sent in batches an older server will accept.

Tests: evicting_capped_usage_rows_keeps_asset_peaks_so_a_repeat_report_is_not_counted_twice
and asset_action_reports_cover_every_count_past_the_message_cap.

Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-18 19:38:54 +07:00
bflatastic 2b175686ba M3: Show usage's answer is drawn by its own function, tested 2026-11-18 19:38:54 +07:00
bflatastic b63368e39c M3: a style or variable applied or detached inside an instance counts nothing
counting_links compared library_links, which walked every node, so applying or
detaching a library style or variable on an instance or a layer in it counted,
while duplicating that instance counts only its component. library_links now
walks the pages and skips instances with what they hold, as count_inserted does.
Test: library_asset_counts_tests::applying_and_detaching_inside_an_instance_counts_nothing
(an instance, its layer, a nested instance and its layer). The server test waits
for the detachments too, not only the insertions.
2026-11-18 19:38:54 +07:00
bflatastic 64b662b869 M3: Show usage's rows are drawn by small helpers 2026-11-18 19:38:54 +07:00