364 Commits

Author SHA1 Message Date
BFlat 9dc9ec44aa Merge pull request #2749 from storytold/feat/2424-code-connect-raw
M10, #2424: code connect takes a raw template, with no import line or escaping
2026-11-29 23:48:46 +07:00
bflatastic c9d37c21a7 M10, #2424: code connect takes a raw template, with no import line or escaping 2026-11-29 22:22:03 +07:00
hoangquocvietuet 94680b38bf M1, #2564: a click selects an image only where its pixels show 2026-11-29 14:10:52 +00:00
Jindřich Šaršon 071fe03776 Merge main: image averaging after #2673
#2673 draws an image shown at half its size or less from a filtered,
halved copy. The per-pixel area average from this branch now applies to
that copy below half size and to the image itself above it; the export
test of the average across fractional positions moves to 0.625 of the
image's size, where no copy is made (it still fails without the
average). Test fixtures build text through Shared<TextData> (#1819).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-29 10:44:55 +01:00
bflatastic 2d7370017c Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:26:19 +07:00
Bryton Cooper d9deec7b12 perf(doc): share TextData and VectorNetwork copy-on-write via Shared<T> (#1819) 2026-11-28 01:27:27 -07:00
FredApps add4e27b4b Merge branch 'main' into codex/native-corner-styles
The ring stroke moved into draw::ring on main; its round-corner guard keeps this
branch's corner-style check. pt-BR.toml goes back to main's: translations are
added in storytold/craft-i18n, and this branch had renamed "Individual corners"
to "Ajustes da borda" (edge settings).
2026-11-28 07:47:21 +01:00
BFlat 771d48cd8b Merge pull request #2669 from storytold/fix/2237-code-highlight
M12: boards: code blocks colour keywords, strings, numbers and comments by their language (#2237, step 3)
2026-11-28 09:26:48 +07:00
bflatastic 74848a7982 M12: boards: code blocks colour keywords, strings, numbers and comments by their language (#2237, step 3) 2026-11-28 08:43:27 +07:00
bflatastic e07c9944eb M4: superscript and subscript per range of characters (text.style textPosition, Type settings while editing, text styles, CSS) (#2338) 2026-11-28 08:06:10 +07:00
Jindřich Šaršon 086e709170 Merge main: export rules through world_render_bounds_with
#2616 measures each exported layer's drawn outlines through
Document::world_render_bounds_with. The export framing from this branch
(drop shadows to their blur radius, layers that draw nothing left out)
now goes through the same callback instead of a separate walk: the
callback returns None for a layer that doesn't count and takes a second
function for what a group's effects add round its children.

#2631's outline shadow path now groups blended drop shadows as the
pixel path does, so two linear-burn shadows darken where they overlap,
not the backdrop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-27 14:23:24 +01:00
bflatastic 4b99b1930e Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	contributors/people.toml
2026-11-27 16:25:37 +07:00
bflatastic 0ddaf822fa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	docs/prototyping-parity.md
2026-11-27 15:33:29 +07:00
bflatastic 1e403564d8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/canvas/tools/drag.rs
#	docs/ui-parity.md
2026-11-27 15:28:02 +07:00
BFlat 91501b2be7 Merge pull request #2466 from B-uchi/pr/code-connect-agents
M8: Code Connect for agents
2026-11-27 14:30:09 +07:00
bflatastic 89f3b29a22 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:25:48 +07:00
BFlat d543ad2658 Merge pull request #2194 from phonedu/feat/design-review-engine
M13: design review commands (engine, MCP and collab)
2026-11-27 14:08:46 +07:00
bflatastic e309dee7d4 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/mcp/src/tools.rs
#	docs/mcp.md
2026-11-27 13:57:58 +07:00
BFlat b52c55e670 Merge pull request #2616 from denisg0mes/export-bounds-tight-strokes
M8: a layer exports at the size of what it draws, strokes as drawn
2026-11-27 13:45:12 +07:00
FredApps 4cfed8dc63 Merge main into fix/kscale-bound-values-2090
Doc conflicts only (docs/components-parity.md, docs/ui-parity.md): kept main's header and changelog rows and added this PR's #2090 Scale tool clause and row next to them.
2026-11-26 19:22:14 +07:00
Denis Gomes 81eb01e821 M8: a layer exports at the size of what it draws, strokes as drawn
SVG, PNG, PDF and Vector Drawable exports took their size from the
renderer's bounds, and Node::outline_reach grows a line's, vector's or
polygon's box by the weight times the miter limit (up to 4) to leave room
for a mitre at any corner. An icon frame whose outlined strokes stay
inside it exported at 26 x 26 to 30.8 x 24 instead of 24 x 24, its content
moved off the frame's origin.

export_bounds now walks the tree as world_render_bounds does
(Document::world_render_bounds_with) and measures each layer's own paint
on the outlines it draws: its shape and its stroke area from stroke_fill,
in page space, grown by its effects. A dashed stroke counts as a solid one
as well as its dashes, so where the dashes fall doesn't change the size.
Text and drop shadows with a spread keep the renderer's bounds. The
renderer's own bounds, used for drawing and culling, are unchanged.

Shrinking outline_reach itself was rejected: the renderer culls and
caches by it, and an exact stroke there would cost a stroke outline per
layer per bounds query.
2026-11-24 02:32:28 -05:00
phonedu 13cd2f7d6b M13: merge upstream main again 2026-11-22 20:46:38 +08:00
Jindřich Šaršon e26b0aa223 M3: second review round for export framing, blend-through and budgets
- Text painted only through its runs' fills counts for export framing.
- A hidden layer inside a pass-through frame no longer makes it draw straight
  onto the canvas.
- The scratch surface for plus lighter and plus darker comes from the layer
  budget; refused, the paint draws in tiny-skia's nearest mode.
- Averaging an image shown smaller bounds the weight setup before working it
  out, and reserves its output first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-22 10:40:18 +01:00
Oleksii Sukholita 7fdb996062 M1: Cmd/Ctrl-click reaches the layers under an unfilled nested frame or instance
With Cmd/Ctrl held, a frame, component or instance nested in another layer caught the pick
across its whole box. An unfilled overlay, such as a device chrome instance (a status bar and a
home indicator over a screen), took every deep click and hover inside it, so the screen's own
layers could not be picked through it. In Figma's web app, measured with synthetic files, such
a layer counts only where it has a visible fill (a hidden or 0% fill and its stroke don't), and
the pick reaches the layer under it, or the top-level frame when nothing else is there.

`HitOpts::deep` makes the hit test do that for a press, a hover, the shape builder's pick and a
right-click with Cmd/Ctrl held. Boards (top-level frames and frames directly in a section) keep
their box, and a plain click is unchanged.

`cmd_click_reaches_through_an_unfilled_nested_frame` fails without the change.
2026-11-21 14:11:55 +01:00
Jindřich Šaršon ff3cd3f9fe M3: review fixes for blend modes, export framing, image averaging, text cut
- A pass-through frame drawn onto the canvas after its shadows draws what it
  casts them from without letting the layers inside draw twice as well, so
  nested shadowed frames no longer double the work at each level.
- That decision also looks at vector region fills and at the paints of
  pass-through layers inside.
- A paint at zero opacity or a fully transparent shadow no longer changes how
  the others composite; the shadow group takes its pixmap from the layer budget,
  and paints past the budget still draw.
- A vector that paints only through its regions counts for export framing.
- Averaging an image shown smaller keeps one row of scratch instead of the
  whole pass, takes its pixmap from the layer budget, walks only the image's
  own pixels, and averages only the part of each pixel inside the shape, so a
  fitted image's edge fades once.
- Text cut to its box height keeps a whole-pixel height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-21 11:14:30 +01:00
Jindřich Šaršon 6041744247 M3: exports frame a shadow to its blur radius and skip layers that draw nothing
The reference tool's exports (and absoluteRenderBounds) take a drop
shadow as far as its blur radius, and leave out a layer without any
visible paint, effect or children. FigCraft framed shadows at three
standard deviations (1.5 x radius) and counted empty placeholders, so a
glass button exported 92 px instead of 76 and an illustration with an
empty 1448 px box exported at that size. Canvas culling keeps the full
reach; only Document::world_export_bounds frames this way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
2026-11-21 00:09:21 +01:00
varabudi b85b944df3 M5: исправить адресное управление прототипами
Сохранять явный выбор документа при адресных вызовах и вложенных пакетах.
Откатывать запросы интерфейсу отказавшей группы, сохраняя обычные диалоги.
Распознавать оба имени стрелок и показывать предпросмотр поверх редактора.
Добавить воспроизводящие тесты и уточнить документацию протокола.

По замечаниям сопровождающего перевести новые комментарии и пояснения тестов
на английский. Перенести изменение поверх актуальной main без коммита слияния,
сохранив обе записи состояния: сначала нашу, затем записи основной ветки.
2026-11-19 20:26:11 +05:00
B-uchi d23c8b6456 M8: Code Connect for agents
A link can say where the code component lives (`source`, a path inside the
repository), what a property's design values are called in code (`values`:
{"State": {"Hover": "hovered"}} renders `hovered`; a value without an entry
keeps its design name) and `notes`, through codeConnect.set, the connect file
and Inspect ▸ Connect to code (a Source file field and a row per variant
value). The fields are skipped when empty, so existing files and exports don't
change.

codeConnect.list and the MCP tool component_mappings say which code
component each design component is: import line, name, ready snippet,
properties and variants, and with a repository root whether each source file
is there. sync_mappings imports or exports a repository's connect file.
codeConnect.export {path} keeps the file's other top-level keys and the links
of components this design doesn't have, so several designs can share one file.
2026-11-19 01:39:29 +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
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
bflatastic e4bc567855 M3: library analytics count insertions and detachments of styles and variables
Applying a style or variable, or copying or duplicating content that uses it,
inserts it; the Detach button detaches it; an instance counts as its component
alone. Show usage and library.usage give them over the chosen period.
2026-11-18 19:38:54 +07:00
Trevor Brown 873e9998a8 Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 driver, no subagent
2026-11-17 06:34:07 -05:00
BFlat 38a287e36c Merge pull request #2341 from ljkx/fix/point-radius-full-edge-2334
M4: a rounded vector point reaches along the whole of a segment whose other end is sharp (#2334)
2026-11-17 18:03:36 +07:00
phonedu 8a77266f84 M13: sharing refuses a file whose review settings pass the limits 2026-11-16 16:26:30 +08:00
Trevor Brown 78f1a10851 Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:35:23 -05:00
Trevor Brown 3bbd1d3ce5 Pages: Set as opening page, so a shared file opens on the page the team chooses (#1817) (#1972)
* M9: page.setOpening sets the page a shared file opens on, for everyone who joins (#1817)

A file on a figcraft-server opened on the page current at publish time, with no way to change it:
`DocProp::CurrentPage` was synced but nothing wrote it (`page.select` is each viewer's own page,
only a local save stamps the document). `page.setOpening {id?}` writes `doc.current_page` as a
document edit: one undo step, a synced change in a live session, so every later join opens on it;
the current page when none is named; a divider or a layer refused; nobody's own page moves. The
pages list's context menu gets "Set as opening page". Docs: mcp.md, collaboration-parity.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* M9: the pages menu's new string is in the English catalog (#1817)

The gate's i18n test wants every tr() key in locales/en.toml.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: the parity doc states the default when no opening page is set (#1972 issue)

With none set, a file opens on its saved current page, not the first page, and a link cannot name a page, so the row is partial.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: one sharing row, and the spotlight exception on the opening-page row (#1972 issue)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: the parity row states where the joiner's page comes from (#1972 issue)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: a no-op set adds no step, deleting the opening page falls back, and the tests cover junk ids, refusals, undo and the menu item (#1817)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* M5: the chosen opening page is saved with the file and opens it for everyone (#1817)

The opening-page flag now lives on the page node (NodeKind::Page opening), so it syncs
through the existing node kind. Saving writes the flagged page as current_page instead of
the page the saver was viewing. A duplicated page does not copy the flag, and deleting the
page removes it.

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-15 00:05:48 -06:00
Trevor Brown 0d4845e21e Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:49:15 -05:00
ljkx 1c88f84acf Merge remote-tracking branch 'origin/main' into fix/point-radius-full-edge-2334
# Conflicts:
#	docs/ui-parity.md
2026-11-13 18:46:44 +01:00
bflatastic 35aa524f8a Merge main into #2291 2026-11-13 23:42:21 +07:00
Trevor Brown ba712cea2a Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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-13 11:41:15 -05:00
ljkx dc7bc62c5e M4: rustfmt the radius test's arc check (#2334) 2026-11-13 17:35:34 +01:00
ljkx 4d60cfbcf9 Merge remote-tracking branch 'origin/main' into fix/point-radius-full-edge-2334
# Conflicts:
#	docs/ui-parity.md
2026-11-13 17:34:58 +01:00
ljkx e62b140845 M4: the radius tests pick each arc by its middle too (opposite corners share both ends, #2334) 2026-11-13 17:34:37 +01:00
ljkx 8336043787 M4: a rounded vector point reaches along the whole of a segment whose other end is sharp (#2334) 2026-11-13 15:16:59 +01:00
phonedu 15d0a4683c M13: cap the disabled-rule list at the wire like radii and brand 2026-11-13 11:48:53 +08:00
Trevor Brown 3be1a6a60b Merge upstream/main into feat/select-layer-locked-1560
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:19:23 -05:00
Trevor Brown 38c68e6714 Merge upstream/main into fix/fig-list-start-2273
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:17:54 -05:00
Trevor Brown eb4cec986f Merge upstream/main into fix/kscale-bound-values-2090
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-12 20:41:20 -05:00
NetterSilver 7b34dbab00 Keep library links working when the project folder is moved or cloned (#2132)
Fixes #2122

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 01:48:30 +01:00
Trevor Brown 4e9b414cc7 M6: tests for where a list starts counting, through the issue's own steps (#2273)
The engine test now follows the issue: a list typed at 5, saved as .fig and opened, split by Backspace at the start of "b". The REST fixture is a top-level list, the junk sweep reaches the new loop through a listed text layer, and the document crate tests the new rule for nested, bullet, plain and over-deep levels. ParaList gets its doc comment back, and the revision row names the item written with 0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.2 queued; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-12 05:56:47 -05:00