Commit Graph
2074 Commits
Author SHA1 Message Date
Aathish bd68da55cc M8, #2329: use page-aligned selection box and single rotation centre for multi-selection 2026-11-28 23:16:24 +05:30
bflatastic ba151a7087 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-28 21:16:34 +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 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 f316a32c59 Merge pull request #2704 from brytoncooper/feat/web-host-confirmed-saves-2366
figcraft-web: opt-in confirmed saves for host mode (#2366)
2026-11-28 19:47:36 +07:00
Bryton CooperandClaude Opus 5.5 927408fe16 figcraft-web: confirmed saves for hosts that opt in (#2366)
A host page that opts in with `?save=managed` (or `data-save="managed"`
on the canvas) now gets each Save and Save As of the document with an
`id` (`save-1`, `save-2`, ...), and the document keeps its unsaved
changes until the host answers `figcraft:saved` with that `id`. Hosts
that don't opt in see no change: a file still counts as saved once it is
posted.

- `host_saves.rs`: the bookkeeping, apart from the browser so it is
  tested natively. One save waits at a time; a newer one replaces it;
  answers for any other `id` are ignored; a file the host opens forgets
  the waiting save; a save unanswered after 30 s counts as not stored
  (the clock is passed in). A Save As becomes the document's file only
  once confirmed, so a retry after a failure is still `saveAs: true`.
- `host.rs`: the listener only queues what the host sent; the shell
  handles it in order each frame. Exports and copies carry no `id` and
  `saveAs: false`. A timeout tells the user and posts `figcraft:failed`
  with the `id`, and the app wakes itself for it.
- ui-egui: `Services::deliver_document` hands the document's own file
  over (its default is `download`, so desktop and plain browser saves
  are unchanged). `Delivery::Pending` skips `file.markSaved`;
  `FigApp::document_stored` and `document_not_stored` finish the save.
- engine: `FileSnapshot::delivered` marks the snapshot's tab saved as of
  the snapshot, so edits made while the save was in flight stay unsaved,
  and a tab closed or saved since is left alone. It shares its tail with
  `FileSnapshot::save`.

`craft-web-host` at the pinned rev has no host-to-app refusal message
and no `host {confirmsSaves}` handshake (storytold/craft-libs#1338), so
a host's refusal shows as the timeout until the crate adds them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 04:59:42 -07:00
BFlat 5135b3c4b9 Merge pull request #2177 from victorazesc/codex/native-corner-styles
M4: editable chamfered and concave corners
2026-11-28 18:25:31 +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
BFlat aaed433ddd Merge pull request #2587 from storytold/formats/penpot-craft-zip-9-8-2
Read Penpot archives through craft-zip
2026-11-28 18:09:43 +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
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
BFlat 905850504a Merge pull request #2689 from brytoncooper/fix/web-join-perf-2041
M9: avoid full-snapshot copy and WASM page-by-page memory.grow storm on join (#2041)
2026-11-28 17:49:00 +07:00
bflatastic d5033c9f10 Pasting into another file keeps the copied corner style
Unlinking the copied styles for a paste into another file cleared
cornerStyle too, which then failed as a bad value: it is a value
(round, chamfer, concave), not a link. Both paths now share one check.
2026-11-28 17:37:50 +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 2cd906ddd8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/format/Cargo.toml
2026-11-28 17:32:22 +07:00
bflatastic 2d7370017c Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 17:26:19 +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 086594604c M8: a wobbly Bend click on a point or segment is a click, not a drag (#2166) 2026-11-28 17:02:57 +07:00
Bryton Cooper 46ff7d9595 fix(engine): wrap TextData with Shared::from in join_bench_tests after #2679 2026-11-28 02:57:36 -07:00
Bryton CooperandClaude Opus 5.5 6c638908c9 M9: time joining a large shared file (#2041)
An ignored release test that builds a 120k-layer file over 15 pages and
times the server's welcome, Client::join and the engine opening it
through live_poll, for the delta catch-up and the full snapshot:
cargo test --release -p figcraft-engine --lib join_timings -- --ignored --nocapture

It runs natively, where the web heap's page-by-page growth doesn't
happen, so it times decode and apply work only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 02:55:09 -07:00
Bryton CooperandClaude Opus 5.5 b33b75275c M9: open a full snapshot without copying it first (#2041)
Replica::from_snapshot borrowed the changes and cloned the whole
Vec<Change> before applying it, because the review-settings clamp
rewrites some of them in place. Every caller already owns the snapshot
(Client::join, the rejoin path, Server::restore), so it now takes the
Vec by value: a large file's snapshot is no longer copied and then
dropped twice on the way in. The server's publish path still borrows
and copies explicitly.

In a wasm32 build joining a 120k-layer file through the full-snapshot
catch-up (what an older server sends), this cut peak memory from 722 MiB
to 455 MiB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 02:54:44 -07:00
BFlat aaf900a6b3 Merge pull request #2679 from brytoncooper/perf/doc-cow-sharing
perf(doc): share TextData and VectorNetwork copy-on-write via Shared<T> (#1819)
2026-11-28 16:14:51 +07:00
BFlat 3d88d9475f Merge pull request #2676 from storytold/fix/2495-stop-keyed
M9: Stop sharing works for a file shared with the server key typed under Advanced (#2495)
2026-11-28 15:53:17 +07:00
bflatastic 406e71f182 Copied properties keep a corner style: it isn't a link to a shared style 2026-11-28 15:45:43 +07:00
bflatastic 86092cddda Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	contributors/people.toml
2026-11-28 15:45:40 +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
bflatastic 87fee2835c M9: Stop sharing works for a file shared with the server key typed under Advanced (#2495) 2026-11-28 15:07:48 +07:00
BFlat dbe9eeb1bd Merge pull request #2607 from Utakata/feat/open-camera-raw
format: open camera raw files as their developed picture
2026-11-28 15:06:51 +07:00
bflatastic 2161144dad Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-28 15:06:05 +07:00
BFlat f9bfabad36 Merge pull request #2573 from imanderson/feat/automation-allow-server-join
MCP: allow confined sessions to join an approved server
2026-11-28 15:01:23 +07:00
BFlat f673320c42 Merge pull request #2137 from TrevorBrown-dev/feat/shift-a-defaults
Auto layout: Shift+A picks Figma's sizing, gap and padding defaults
2026-11-28 15:00:59 +07:00
bflatastic d82670ce4e Merge remote-tracking branch 'origin/main' into HEAD 2026-11-28 14:56:36 +07:00
FredApps bc9c97c7d2 Merge branch 'main' into uno/U1-01-layer-code 2026-11-28 08:11:36 +01:00
FredApps 1f73395b90 Merge branch 'main' into feat/automation-allow-server-join 2026-11-28 08:11:36 +01:00
FredApps a8c90689b0 Merge branch 'main' into feat/variables-json-text-styles-2173 2026-11-28 08:11:36 +01:00
FredApps a7486a5dce Merge branch 'main' into feat/shift-a-defaults 2026-11-28 08:11:35 +01:00
FredApps 921cdd058c Merge branch 'main' into codex/native-corner-styles 2026-11-28 08:11:35 +01:00
FredApps a992fdeb74 Merge branch 'main' into formats/penpot-craft-zip-9-8-2 2026-11-28 08:11:34 +01:00
FredApps 025133e4b0 Merge branch 'main' into feat/open-camera-raw 2026-11-28 08:11:34 +01:00
FredApps f278b428cb Merge branch 'main' into feat/automation-allow-server-join
main moved figcraft-cli to RFC-0018 (#2645): main.rs is a thin wrapper and the
dispatch lives in lib.rs, so mcp_roots, the --automation-allow-server handling
and its test move there; headless mcp is checked before the fonts are scanned.
2026-11-28 08:01:38 +01: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
FredApps b6469cd439 Merge branch 'main' into formats/penpot-craft-zip-9-8-2 2026-11-28 07:46:25 +01:00
FredApps 4561b31166 Merge branch 'main' into feat/open-camera-raw
main's craft-libs pin (8fa4db64) already contains 249a41bd, so the pins stay at
main's and the camera raw crates are added at that same rev.
2026-11-28 07:46:25 +01:00
FredApps bb7e878e69 Merge branch 'main' into feat/variables-json-text-styles-2173 2026-11-28 07:40:43 +01:00
FredApps 9562640d75 Merge branch 'main' into uno/U1-01-layer-code 2026-11-28 07:40:32 +01:00
FredApps 784b6e6e69 Merge branch 'main' into feat/shift-a-defaults 2026-11-28 07:38:41 +01:00
FredApps 4caba4a7d3 Merge branch 'main' into pr/visual-compare 2026-11-28 07:26:27 +01:00
bflatastic 2ed7d06bcb M12: boards: the Pencil, Marker, Highlighter and Eraser show a round tip in the ink's colour and width (#2641, part 1) 2026-11-28 11:32:00 +07:00
bflatastic d20a121f23 M12: boards: code blocks from the toolbar and the ` key, a language menu, and handles on the left and right edges only (#2237, step 2) 2026-11-28 10:54:57 +07:00