Commit Graph
2398 Commits
Author SHA1 Message Date
Timo Klerx 41ee2d7e92 Merge branch 'main' of https://github.com/storytold/figcraft into codex/fig-import-confirmation
# Conflicts:
#	crates/engine/src/cmd/file/load.rs
#	docs/file-format-parity.md
2026-11-29 13:33:22 +01:00
BFlat 738a2d77e2 Merge pull request #2737 from LS254/perf/shadow-gradient
M8, #2736: a soft shadow under an opaque gradient is cast from the outline, as under an opaque colour
2026-11-29 19:30:51 +07:00
Timo Klerx 3b0e091f98 Merge branch 'main' into codex/fig-import-confirmation 2026-11-29 12:36:58 +01:00
Livio Sidler ff3bcfd2a6 M8, #2736: a soft shadow under an opaque gradient is cast from the outline, as under an opaque colour 2026-11-29 12:23:05 +01:00
Jindřich ŠaršonandClaude Opus 5.5 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
BFlat 33d4cb3cda Merge pull request #2615 from denisg0mes/selection-colors-style-picker
M7: a Selection colors row's Styles button opens the style picker
2026-11-29 15:50:05 +07:00
BFlat 01f2f347f7 Merge pull request #2719 from mikaelweiss/fix/server-kept-no-save
M9: a file joined on a server that keeps it asks for no save
2026-11-29 08:03:05 +07:00
BFlat 01a6c0e08d Merge pull request #2716 from brytoncooper/feat/fig-fidelity-harness-and-tail
M6: .fig import tail (table cells, connector label pill) and fidelity/visual-diff harness
2026-11-29 08:02:48 +07:00
BFlat 3cd13b93d5 Merge pull request #2715 from brytoncooper/fix/lan-tls-1131
M9: encrypt LAN-hosted sessions with ephemeral pinned TLS (#1131)
2026-11-29 08:02:40 +07:00
Denis Gomes 4e31dda79c Merge main: the row's style picker keeps library styles and Create style
Main's Selection colors Styles menu (style_items, create_form) is the
menu this branch replaces with the style picker, so the merge keeps the
picker and drops the menu, with main's focus change inside create_form.
What the menu offered stays in the picker opened from a row: this file's
paint styles and each enabled library's published ones under its name,
Create style for the row's paint (selection.createColorStyle, left out
where create_refusal refuses), colour variables, and Detach.

The picker test now also checks that a library's unpublished style is not
offered, as the menu's test did. "No color styles" goes from he.toml too,
which main added with the key.
2026-11-28 15:03:47 -05:00
Aathish 21a4b7e9d2 M8: preview each export setting with its own Ignore overlapping layers option 2026-11-29 01:05:41 +05:30
Bryton CooperandClaude Opus 5.5 1157a843f8 fig: snap table cells to their grid, pill fallback connector labels, add a fidelity harness
Import tail (docs/gaps.md Gap 1), as FigCraft-side passes over the mapped
REST JSON in crates/format/src/fig/map.rs (the craft-fig mapper is pinned
and unchanged):

- A connector label without a saved snapshot gets a white, fully rounded
  stand-in pill centred under it, padded by the font size, within the layer
  budget (labels past it stay bare under the mapper's original note).
- TABLE cells are put back on the table's grid from their own geometry:
  offsets within 2 px share a track, a sizeless or misaligned cell takes its
  row and column, and no two cells overlap. Fills, strokes and text are kept.
  Rotated, non-finite, colliding or oversized tables keep their saved bounds
  with a warning. No row or column fields of the file are read.
- The new import notes are counted like the mapper's (`note (×n)`) and
  have English keys in crates/ui-egui/locales/en.toml.
- Vector-region style and variable links were already resolved with a
  fall-back to the region's own paint; no change.

Fidelity harness (Gap 3), no new dependencies:

- fig::fidelity: compare_documents (layer counts, box L-infinity error,
  text/fill/stroke/opacity match rates, warnings) and compare_rgba (SSD,
  RMSE, PSNR, luminance SSIM, channels past a tolerance), with JSON and
  Markdown scorecards.
- fidelity_tests: metric properties, a built-in corpus that round-trips
  through .fig with every layer matched and no new warnings, and an ignored
  FIGCRAFT_FIG_CORPUS runner for local real files.
- render: a multi-layer scene drawn before and after a .fig round trip is
  compared with compare_rgba (SSIM > 0.99; measured identical).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:53:20 -07:00
Bryton CooperandClaude Opus 5.5 37ff872305 collab-net: serve pinned TLS for app sessions hosted on the network (#1131)
An app hosting a live session for other machines sent the session token
in the clear over plain ws://. Such a host now serves TLS with an
ephemeral self-signed Ed25519 certificate (DER written by hand with ring,
no new crates), and its invite links pin the certificate's SHA-256
(`cert=`, URL-safe base64): figcraft://join?server=wss://…&cert=… and
wss://…/?cert=…

- tls: the shared session is a rustls::Connection (client or server),
  keeping the split reader/writer locking; `accept` answers a server
  handshake by the hello deadline; `handshake_pinned` uses a verifier
  that compares the end-entity certificate's SHA-256 in constant time
  and still checks the TLS 1.2/1.3 handshake signature, refusing any
  other certificate before the Hello with a clear reason.
- invite: Endpoint::cert (None for Endpoint::plain), Endpoint::pinned;
  a malformed pin, one on ws://, or two that disagree is an error that
  never echoes the link. The pin stays out of the WebSocket request URL.
  An automation allowlist entry allows only its own pin.
- host/hub: HostConfig::tls, Host::cert_sha256, Host::endpoint; the hub
  carries the server config to each connection. Hosting::serve (the
  server) is unchanged.
- link: NetLink::host serves TLS for non-loopback binds without a join
  code. Join-code (short) shares stay plain ws://: a 20-symbol code has
  no room for the pin, and its joiners share the token with the link.
- web: the browser refuses a pinned link with a clear reason.

Tests: pinned join and edit sync both ways, a plain client against a
TLS host, a host presenting another certificate (refused, not admitted),
the request carrying neither token nor pin, link round trips and
malformed cert= values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:43:29 -07:00
bflatastic 31477a5273 docs: describe the multi-selection rotate box in our own words 2026-11-29 00:47:27 +07:00
Aathish bd68da55cc M8, #2329: use page-aligned selection box and single rotation centre for multi-selection 2026-11-28 23:16:24 +05:30
Mikael Weiss 7ddc533dd1 fix: keep server-kept tabs clean across previews
During a version or text preview, ds.doc is the temporary preview while document_itself() holds the underlying synced document, so mark_saved() recorded the wrong baseline and version.exitPreview re-normalised the restored document off saved_doc. Recording synced directly, skipping re-normalisation on version.exitPreview, and rechecking live_kept in live_sync_in after deferred batches or holds clear keeps confirmed server-kept tabs clean.
2026-11-28 10:00:03 -07:00
PuFGGs efb8e3d666 M9: a file joined on a server that keeps it asks for no save
A tab in a live session counted every edit, everyone's, as unsaved, so closing a tab joined on figcraft-server or quitting asked to save a copy on this computer. The server already keeps the file: once it confirmed every edit (no batch pending or deferred, the tab's document the synced one), the tab is marked saved.
2026-11-28 09:51:11 -07:00
Timo Klerx 957d255641 fix(import): offer a bounded retry for large .fig files 2026-11-28 17:29:35 +01:00
571c0a57c0 Preserve macOS app signatures in shipped DMGs (#590)
* M9: preserve app signatures in macOS DMGs (#387)

* M9: handle EXIT trap diagnostics in CI ShellCheck

* #590: use [[ ]] tests in the DMG scripts

* #590: SHA-pin actions/checkout in the DMG test job

* #590: keep "DMG stapled" in the strict verification summary

* Release: DMG integrity job uses harden-runner v2.23.0, matching the other workflows

---------

Co-authored-by: bflatastic <bombayapirat@gmail.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-28 15:52:30 +01:00
bflatastic ba151a7087 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-28 21:16:34 +07:00
BFlat c20649cbf8 Merge pull request #2703 from brytoncooper/feat/fig-export-roundtrip-2384
figcraft-cli: --strict on export, convert and run; .fig fill outline per winding rule (#2384)
2026-11-28 21:14:07 +07:00
bflatastic fa8cb7a382 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	crates/mcp/src/tools.rs
#	docs/mcp.md
2026-11-28 20:32:18 +07:00
bflatastic c3e87801b8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/file-format-parity.md
2026-11-28 20:28:50 +07:00
bflatastic 9ae491f9ea Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
#	docs/components-parity.md
2026-11-28 20:28:39 +07:00
BFlat 719592b5d1 Merge pull request #2700 from storytold/fix/1110-control-slots-and-budget
Control channel: an idle connection gives up its slot, and request lines share one memory budget (#1110, #1111)
2026-11-28 19:46:10 +07:00
bflatastic 5ec442a94b Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/file-format-parity.md
2026-11-28 19:03:34 +07:00
bflatastic 433a6e1484 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-28 19:02:28 +07:00
BFlat bd36be5042 Merge pull request #2701 from storytold/fix/2342-system-trust-store
M9: wss:// connections also trust the operating system's certificate store (#2342)
2026-11-28 19:01:57 +07:00
BFlat 3615b07544 Merge pull request #2702 from storytold/fix/2187-detail-waits-for-still-view
M5: the presenter's sharp detail waits until a zoom or resize has settled (#2187)
2026-11-28 18:57:32 +07:00
bflatastic f65516e0ee Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/file-format-parity.md
2026-11-28 18:41:19 +07:00
bflatastic 93e0cbfca0 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-28 18:40:35 +07:00
Bryton CooperandClaude Opus 5.5 96a2067684 figcraft-cli: --strict on export, convert and run; .fig fill outline per winding rule (#2384)
`export`, `convert` and `run --out` take `--strict`. When the .fig,
.penpot or Android Vector Drawable writer reports anything left out or
changed, nothing is written or replaced and the command exits 1 with the
reasons on the error line. A folder of drawables is written only once
none of its files leaves anything out. `--strict` with an output whose
writer reports nothing (png, svg, pdf, ...) or with `--vd-compat ignore`
is a usage error (exit 2), so it never passes without checking anything.
A .figcraft output is accepted for convert and run: it keeps everything.

.fig export writes a vector whose filled areas use both winding rules as
one fillGeometry path per rule, so other readers fill each area as the
network does. The warning that the outline used the first area's rule is
gone.

Image adjustments, list spacing, hanging punctuation and lists, and
vertical trim were already written on main. OpenType features,
variables' publishing, code syntax and inheritance settings, prototype
device settings and text styles on part of a text keep their warnings:
the .fig import (craft_fig's mapping at the pinned craft-libs rev) does
not read them back, so they cannot round-trip yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 04:37:07 -07:00
BFlat 97bc1da390 Merge pull request #2693 from storytold/fix/2178-sizing-side-effect-warnings
M2: node.set reports the sizing it changes on other layers and variants their set clips (#2178, #2182)
2026-11-28 18:22:52 +07:00
BFlat a276652996 Merge pull request #2690 from storytold/fix/2524-paste-dangling-bindings
M6: Pasted layers drop bindings to variables the file doesn't have and keep their values (#2524)
2026-11-28 18:22:37 +07:00
bflatastic b6540e2cab M5: the presenter's sharp detail waits until a zoom or resize has settled (#2187)
The device-scale detail drawn over a tall frame's capped texture waited
out only a fling, a drag and the wheel. A zoom, a window resize, a move
to a display of another scale or any other change of the view rendered a
new detail, up to 16.8 million pixels on the UI thread, on every frame it
changed. Any change of the page area in view or of its pixel scale from
one frame to the next now counts as motion: the capped texture shows
alone meanwhile, and a frame is asked for so the detail for the still
view is rendered next.
2026-11-28 18:22:36 +07:00
bflatastic 0b97d09211 M9: wss:// connections also trust the operating system's certificate store (#2342)
The desktop app and figcraft-cli trusted only the compiled-in public
roots and FIGCRAFT_CA_FILE, so a server behind a proxy with a private
authority needed that variable on every computer. They now also add the
authorities in the operating system's certificate store, unless
FIGCRAFT_NO_SYSTEM_ROOTS is set. Certificates are still always
verified.
2026-11-28 18:21:11 +07:00
bflatastic 6b3c4c2bf4 Control channel: idle connections give up their slot; request lines share one memory budget (#1110, #1111)
With all 8 connection slots taken, a new client now takes the slot of
the connection that has waited longest for its client; a connection
whose request the app is running keeps its slot. Request lines are
counted as they arrive against 64 MiB shared by all connections until
they are answered, so eight clients can no longer make the app hold
eight 32 MiB lines and their parsed trees.
2026-11-28 18:19:02 +07:00
bflatastic 8750ba81bb M9: .jam import: connectors on the page come in as board connectors attached to what they join (#1808)
A whiteboard file's connectors came in as loose vectors, so moving a
shape left them behind. On a whiteboard the mapper's adapter now writes
a board connector on each connector drawn as one line on the page: its
ends name the layers it joins (a named magnet is that side, an automatic
one the side facing the other end, an end without a magnet keeps its
point on the layer) or a free page point, with its routing. The REST
importer makes the vector a native board connector once every layer is
in, so the board routes it again when what it joins moves. The import
report counts only the connectors that stayed vectors. Labelled
connectors, connectors inside frames and connectors in design files are
unchanged.
2026-11-28 18:16:03 +07:00
bflatastic 225d6810bb M7: variables export and import as DTCG design tokens (#1687)
variable.export {format: "dtcg", mode?} writes a group per collection and
a token per variable, nested by the parts of its name: colours as
colorSpace/components objects, numbers as px dimensions or plain numbers
where they are used unitless, aliases as {group.token}, colour
calculations as the colour they show. Strings, booleans, every mode's
value and scopes go under $extensions, so the file reads back whole;
`mode` picks the mode written as $value. Variables > Export offers it,
saved as .tokens.json.

variable.import reads a file holding a $value as tokens: top-level groups
are collections, types are handed down from groups, and color, dimension
(px, rem at 16 px), number, fontWeight, duration, fontFamily, strings,
booleans and aliases become variables, merged as the variables JSON is.
A plain file fills the default mode of the same-named collection.
Composite tokens are skipped and counted in the warnings.
2026-11-28 18:08:53 +07:00
BFlat 350ee9f728 Merge pull request #2688 from brytoncooper/fix/win-wgl-hang-2264
M1: Windows doesn't start OpenGL beside Direct3D 12 (#2264)
2026-11-28 17:53:05 +07:00
bflatastic fdf0224808 M1: node.create makes a layer with its children in one command (#2185)
node.create (and the MCP create_node tool) takes children: node.create
params made inside the new layer, each with its own children, in one
command and one undo step. The result mirrors the tree, so a batch step
names any layer in it with a field path (children/1/id). A refused
child names its place (children[1].children[0]: ...) and nothing is
made.
2026-11-28 17:52:17 +07:00
bflatastic 81b507a052 M4: a missing well-known UI or code font draws in a close stand-in in its own style (#1237)
Text in a family that isn't installed drew in the default face (Inter,
Helvetica... in Regular) whatever the family and style, so code set in
Menlo came out proportional and SF Pro Bold came out regular. A small
table now picks an installed stand-in of similar design and width for
the common UI and code families, in the style asked. The family stays
reported as missing.
2026-11-28 17:52:08 +07:00
BFlat 5330237381 Merge pull request #2686 from B-uchi/pr/docs-design-review-prompt
docs: the Prompts table lists design_review
2026-11-28 17:50:26 +07:00
BFlat 179f7cffff Merge pull request #2681 from Oni-zerone/claude/magical-archimedes-li1vu4
mcp: create_node and set_properties take fields and outline
2026-11-28 17:43:52 +07:00
BFlat 8660a71a43 Merge pull request #2684 from storytold/fix/2166-bend-slop
M8: a wobbly Bend click on a point or segment is a click, not a drag (#2166)
2026-11-28 17:43:48 +07:00
bflatastic 22fe0ceda1 M2: node.set reports the sizing it changes on other layers and variants its set clips (#2178, #2182)
An edit that turned another layer Fixed (a child set to Fill turning its
hugging parent Fixed, a frame set to Hug turning the children that filled
it Fixed) only showed the canvas notice, so a script got no hint why a
frame stopped growing. node.set now lists each such layer in `warnings`
with its id, name, key and old sizing.

A variant grown or moved past a component set that clips and has no auto
layout keeps being cut off (the set is sized only when variants are
combined or added). node.set now names such a variant in `warnings` and
points at layout.add on the set.
2026-11-28 17:33:14 +07:00
bflatastic 681b8180ac M1: scrubbing a field hides the selection's frame until it is let go (#1319)
Changing a stroke weight, corner radius or any other value by scrubbing
its field left the selection's frame and handles over the layer, so the
result couldn't be judged without deselecting. While a field is scrubbed
(the shared widgets::scrub gesture, used by every number field and the
typography icons) the canvas now hides the selection's frame, handles
and size label, as it already did while the colour picker is used, and
draws them again once the drag is let go. A press without a drag leaves
them.
2026-11-28 17:25:04 +07:00
bflatastic e57f9a385d M6: pasted layers drop bindings to variables the file doesn't have and keep their values (#2524, part 3) 2026-11-28 17:16:40 +07:00
bflatastic 5ca94d7496 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:06:57 +07:00
bflatastic fd24ba3d55 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:03:08 +07:00