Commit Graph
1560 Commits
Author SHA1 Message Date
Trevor BrownandClaude Fable 5.1 56ad0ba14f Placement crosshair: kept with its page and document, gone with a pointer placement, kept when the same tool is chosen again
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 05:08:41 -05:00
Trevor BrownandClaude Fable 5.1 367f188b34 M6: the arrows show and move a placement crosshair with a shape or frame tool chosen, and Enter places there (#1839)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 04:39:07 -05:00
Trevor BrownandClaude Fable 5.1 96cd54b556 Fill section: mixed text has no fill rows to remove or crop, and a crop lifts the characters' fills only when it edits
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 04:09:51 -05:00
Trevor BrownandClaude Fable 5.1 a4b07876a3 M2: a Cmd/Ctrl-click on a padding field reads the modifier at the press, clears its mark when no edit follows and commits a retyped value to all sides
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 03:32:39 -05:00
Trevor BrownandClaude Fable 5.1 badbe64440 Fill section: a removal that names no paint leaves the characters' fills, and Copy fill and Crop image use the list the rows show
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 03:23:36 -05:00
Trevor BrownandClaude Fable 5.1 50eb28e0ac M2: a Cmd/Ctrl-click on a padding field sets all four sides with the value typed
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 02:06:57 -05:00
Trevor BrownandClaude Fable 5.1 abf2eb9b3a M1: the Fill section shows a text's characters' fills, mixed when they differ, and a layer fill edit reaches every character (#1856)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 01:24:32 -05:00
f9b5693621 M2: a text keeps a max height or a number of max lines, not both (#1832)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-02 00:02:56 -05:00
9c3ec8c1d1 M4: typing 1) and a space starts a numbered list, as 1. does (#1842)
* M4: typing 1) and a space starts a numbered list, as 1. does

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

* Parity: the Text area row names the list creation characters

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

* Parity: the list creation characters without spaces inside the code spans

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-02 00:00:19 -05:00
a953a04e33 Shortcuts: Cmd/Ctrl+Shift+Alt+= / - / 0 make the interface larger, smaller and default-sized (#1846)
* Shortcuts: Cmd/Ctrl+Shift+Alt+= / - / 0 make the interface larger, smaller and default-sized

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

* Interface size keys: live while editing text too, and the new size draws on the next frame

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

* A preference set during a frame repaints this window too, so the interface size applies on the next frame

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

* Control channel: a preference changed by a hidden window's command repaints every window

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-01 23:59:08 -05:00
f58e022ed7 Shortcuts: Cmd/Ctrl+Alt+arrows rotate a degree at a time, 15 with Shift (#1845)
* Shortcuts: Cmd/Ctrl+Alt+arrows rotate a degree at a time, 15 with Shift

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

* The rotate gesture's label in the English catalog

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

* Rotate keys: about the selection's rotation origin, not while editing points, Dev Mode refusal on the control path too

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-01 23:56:06 -05:00
Trevor BrownandClaude Fable 5.1 5050631bcf M5: Hide UI in the presenter: the bars go away and Cmd/Ctrl+\ brings them back (#1820) (#1826)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 23:50:03 -05:00
Trevor BrownandClaude Fable 5.1 65bd00f739 M3: Delete on a layer inside an instance hides it instead of being refused (#1834)
* M3: Delete on a layer inside an instance hides it instead of being refused

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

* The components structure test: Delete inside an instance hides

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 23:49:58 -05:00
Trevor BrownandClaude Fable 5.1 2abd8c5f52 M2: Remove all auto layout takes it off a frame and every frame nested in it (#1833)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 23:49:53 -05:00
Trevor BrownandClaude Fable 5.1 3b8ded69c0 M4: a link on text is underlined by default, and Underline takes it off (#1841)
* M4: a link on text is underlined by default, and Underline takes it off

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

* text.link: only a new link takes the default underline; Underline reads the texts inside a target

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 23:49:48 -05:00
Trevor BrownandClaude Fable 5.1 fdd27a0b88 Shortcuts: the Layers panel opens with Ctrl+1 as well as Alt+1 on Windows and Linux (#1844)
* Shortcuts: the Layers panel opens with Ctrl+1 as well as Alt+1 on Windows and Linux

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

* Parity note: in the browser Ctrl+1 is the browser's tab key

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 23:49:43 -05:00
dotCooCoo 8b3ded373e Merge main into feat/export-color-profile 2026-11-01 17:05:42 -08:00
Trevor BrownandClaude Fable 5.1 12c9acbf0c events test: the stamp is within a minute of a second clock read, not ordered against it
Review follow-up on #1766: a backward wall-clock step between the push and the test read made the ordering assertion flaky.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 00:17:54 -04:00
Trevor BrownandClaude Fable 5.1 25b128e538 Pencil colour: document the dark threshold; tests for a frame without a fill, a see-through fill and the threshold
Review follow-up on #1775: the dark rule is the one text uses (on_dark_background); a frame with no fill, or a fill under 50% alpha, is looked through to what is behind it, and the threshold is Color::is_dark (#757575 is dark, #767676 is light).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 00:14:22 -04:00
NetterSilverandClaude Haiku 5.5 f26226590a Reject negative and fractional index in variable.moveMode
Found while testing crates/engine/src/cmd/variables.rs:267 (move_mode)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 05:13:36 +01:00
NetterSilverandClaude Haiku 5.5 650601593e Reject negative or fractional index in page.move
Found while testing crates/engine/src/cmd/page.rs:132

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 21:05:43 +01:00
NetterSilverandClaude Haiku 5.5 1aa6b81d01 Reject invalid entries in vector.create points instead of dropping them
Found while testing crates/engine/src/cmd/create.rs:~286 (create, the `points` branch using filter_map)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 17:23:54 +01:00
Trevor BrownandClaude Fable 5.1 fcab85ddd0 M4: the Pencil draws white on a dark page or frame, and previews in that colour (#1741)
Figma: "a round 3px stroke weight in black, unless you are sketching on a dark canvas or frame". The Pencil always drew black. It now takes the colour from the same dark-background rule new text uses (the nearest ancestor with a mostly opaque solid fill, else the page), and the overlay carries that colour for the stroke in progress so the preview matches. Engine and UI regression tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 11:34:55 -04:00
Trevor BrownandClaude Fable 5.1 7bee269c4d M8: posting a comment in the browser no longer stops the app (#1764)
The event log read the clock through std::time::SystemTime and Instant, which panic on wasm32-unknown-unknown ("time not implemented on this platform"). Every mutating comment.* command appends an event, so the first comment posted in the web build hit it. The log now takes SystemTime, UNIX_EPOCH and Instant from web_time, as the rest of the engine does. A test checks the stamp is a current Unix time read through the same clock.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 10:58:09 -04:00
NetterSilverandClaude Opus 5.5 96dcb3eda9 Give each variable a unique custom property in CSS export (#1738)
Found while testing crates/engine/src/cmd/variables_io.rs:~80-105 (css, non-tailwind `name` closure using css_var_of) with crates/engine/src/dev/codegen/css.rs:41 (css_var_name)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:37:26 -04:00
NetterSilverandClaude Haiku 5.5 556d44d47a Reject '+' sign in comment parse_link thread ids (#1740)
Found while testing crates/engine/src/cmd/comment.rs:55 (parse_link)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-31 10:37:22 -04:00
NetterSilverandClaude Haiku 5.5 9a7e5d1a16 Apply paint opacity to CSS gradient stops in code export (#1750)
Found while testing crates/engine/src/dev/codegen/css.rs:121 (css_decls, the PaintKind::Gradient arm calling css_gradient at :255)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-31 10:37:18 -04:00
45e5a25370 Escape backslashes and line breaks in CSS font-family export (#1752)
* Escape backslashes and line breaks in CSS font-family export

Found while testing crates/engine/src/dev/codegen/css.rs:223 (text_decls, the font-family put)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Escape quotes and < in CSS font-family export

A double quote in a family name is escaped instead of turned into a single quote (CodeRabbit on
#1752), and < is written as \3C so a name can't end the generated page's <style> block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-31 10:37:13 -04:00
b957160379 Fix code export printing inf for very large finite numbers (#1757)
* Fix code export printing inf for very large finite numbers

Found while testing crates/engine/src/dev/codegen.rs:185 (num)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Keep rem values finite past num6's scaling overflow

num6 had the same x1e6 overflow as num: a huge finite length printed 0rem (CodeRabbit on #1757).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-31 10:37:01 -04:00
dotCooCoo cb429813f3 Selection colors: Create style keeps the variables bound to the row's paint
selection.createColorStyle gives the new style the variable bindings of the fill or stroke it is made from, the color and the gradient stops, so linked layers keep following the variables. Targets bound to different variables are refused, and the Styles menu leaves Create style out for them.
2026-10-31 04:58:28 -07:00
dotCooCoo 1b7d9221e2 Selection colors: a library that is not a string is refused instead of linking a local style
selection.applyColorStyle chose the library path only when `library` read as a string, so an
object or array fell through and linked a local style of the same name. Any non-null `library`
now goes to the library lookup, which refuses a non-string before any change.
2026-10-31 04:47:01 -07:00
dotCooCoo 889983ffe2 Selection colors: Create style refuses a row whose fill or stroke list holds other paints
A created style holds the row's one paint, and linking it replaces the target's whole fill or
stroke list, so a layer with other fills or strokes lost them. selection.createColorStyle now
refuses such targets before any change, and the Styles menu leaves Create style out for those
rows.
2026-10-31 04:41:03 -07:00
dotCooCoo c7cd72b09e M3: Selection colors rows apply library color styles and create a style
A row's Styles menu lists this file's color styles (library copies are no
longer listed as local), then each enabled library's published color
styles under the library's name. Choosing a library style copies it in,
linked and read-only, and applies it to every fill and stroke the row
stands for in one undo step (selection.applyColorStyle with `library`).
A row linked to a style or variable now has the Styles button too, so it
can switch to another style.

Create style on an ordinary row opens a window with the next free
"Color n" name. Create makes a style of the row's whole paint (gradient
stops, opacity and blend mode included) and links it to every target in
one undo step (selection.createColorStyle {targets, name, description?}).
A name another style has, an empty name, or a row whose slots no longer
share one paint is refused, and the window stays open. Text ranges with
fills of their own take the style's value without a link.
2026-10-31 04:28:23 -07:00
NetterSilverandClaude Opus 5.5 0e6fcf9bf7 Make undo while drawing with the pen remove only the last anchor
Fixes #1745

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:03:45 +01:00
dotCooCoo 099cc03754 Vector: simplify, offset and Penpot export keep a closed vector's smoothed corners
vector.simplify and vector.offset rebuild a closed vector from its rounded
outline with the layer's corner smoothing, as the canvas draws it. A vector
whose regions have paints of their own was rebuilt from its sharp points
before; it now keeps its rounded corners. The Penpot export writes a stroked
vector's path with its smoothed corners.
2026-10-31 03:21:43 -07:00
dotCooCoo b8fa8b87be Export: a converted JPG flattens translucent pixels before the conversion
A JPG exported in a profile other than the document's was converted while
still translucent and then composited over white, so translucent fills,
shadows and antialiased edges came out a few levels off what the document
shows. The render is now flattened over white in the document's profile
first. PNG and WebP keep their alpha and are unchanged.
2026-10-31 03:20:20 -07:00
dotCooCoo afc5e13972 Export: each export setting chooses a color profile
Each export setting has a color profile: Same as file (the default, the
document's profile when it exports), sRGB or Display P3. PNG, JPG and
WebP settings list it in their advanced settings, and export.add,
export.update, file.export, file.exportLayers (for every setting) and
the MCP export tool take it as colorProfile. The rendered pixels are
converted to the chosen profile (out-of-gamut colors clip) and the file
is tagged as before: an sRGB chunk for sRGB PNG, the generated ICC
profile (and cICP in PNG) for Display P3; sRGB JPG and WebP stay
untagged. A setting keeps its choice when its format changes, and
settings saved without one read as Same as file.

SVG, PDF and Android XML show no choice and stay sRGB; PDF has no
output intent yet.
2026-10-31 03:07:17 -07:00
dotCooCoo 000d39b042 M4: closed vectors take corner smoothing
A vector's corner smoothing was stored, imported and exported, but its
rounded points were drawn as plain circular arcs, and the Design panel
hid the Corner smoothing control for vectors.

A vector with a closed region now draws its rounded points with the
layer's corner smoothing, on the canvas, in hit testing, in PNG, SVG and
PDF exports, and in the fill and stroke geometry of .fig exports. Each
point keeps its own radius; a point without one stays sharp. The corner
uses the profile of smoothed polygon corners, and smoothing is reduced
before the radius when a corner does not fit in half of each segment.

FigCraft's own rules for cases the help page does not describe: only a
point between two straight segments that both bound a closed region is
smoothed; points on open branches and points next to a curved segment
keep the plain arc; concave corners are smoothed like convex ones.

The Design panel shows Corner smoothing and its iOS (60%) button for
vectors with a closed region, and not for open paths.
2026-10-31 02:33:38 -07:00
BFlat 12e9b409ed M12: a connector end on any part of an object with Cmd/Ctrl (#1733) 2026-10-31 10:27:56 +07:00
BFlat 6b28ef57dc M4: Dash cap setting for Dash and Custom strokes (#1728) 2026-10-31 09:41:39 +07:00
BFlat 3b77c236af Merge pull request #1731 from zral/docs/vector-path-xy-offset
M0.9: document that x/y offset a vector path by its own box
2026-10-31 09:14:25 +07:00
BFlat 87254913af M3: library analytics list how each style and variable is used (#1730)
* M3: library analytics list how each style and variable is used

A file reports how many of its layers use each of a team library's styles and
variables, and Show usage lists them by a Type choice with their layers and
files. Layers in instances count for their component. Also ignores plugins/target.

* M3: the style analytics test waits for the instance report too
2026-10-31 09:13:08 +07:00
BFlat 1c5c9e04c3 M11: widgets draw lines and SVG pictures (plugin API 6) (#1727)
A widget description can have a line, 100 long and black and 1 thick unless told
otherwise, and an SVG that comes in as locked layers, scaled to fit a size and
within the widget's 256 layers. The Counter example uses both.
2026-10-31 08:13:08 +07:00
BFlat 59c7624569 M12: a connector end dropped along a side of a shape attaches to that side (#1708) (#1714) 2026-10-31 07:57:03 +07:00
BFlat 3837b08a71 M8: a damaged image is refused with a reason instead of showing as an empty box (#1724)
* M8: a damaged image is refused with a reason instead of showing as an empty box (#1474)

* M8: replacing an image refuses a damaged file too
2026-10-31 07:22:44 +07:00
BFlat 2e92d36af0 M6: SwiftUI and Compose code name a bound variable by its code syntax (#1716)
Bound variables with an iOS or Android code syntax are named in generated SwiftUI and Compose in place of their value: paints, stroke weight, sizes, corner radius, gaps, padding, opacity and text. A variable with none for the platform keeps the value.
2026-10-31 06:49:41 +07:00
BFlat 920aafb805 M1: the colour picker's Image tab has a placeholder, a preview and takes a dropped file (#1682) (#1713)
Choosing Image shows a checkered placeholder and Upload from computer instead of a dialog at once; an image paint shows its asset preview. A file dropped on the open picker replaces the image, keeping the fill mode, crop, position and adjustments (image.replace, one undo step; paths capped as image.place's). The browser's file picker reaches the tab too. Also fixes a race in library_detach_tests.
2026-10-31 06:32:59 +07:00
BFlat 1ea19482d3 M1: the Frame tool's Phone presets have the iPhone 17 family (#1691) (#1720)
iPhone 17, 17 Pro, 17 Pro Max and Air, at the sizes the prototype device list uses; a test keeps presets named like a device at its size.
2026-10-31 06:13:47 +07:00
BFlat b462a48346 M12: a connector's path can be reshaped by dragging its path handles (#1710) (#1717) 2026-10-31 04:53:36 +07:00
BFlat 4bcfd5247f M12: boards have 16 more shapes, in grid pickers (#1705)
* M12: boards have 16 more shapes, in grid pickers

* M12: a board shape's id and name sit in one table
2026-10-31 04:27:12 +07:00