Commit Graph

2531 Commits

Author SHA1 Message Date
bflatastic c5ea22df9f M8: a layer whose own shadow blends by another mode keeps the old drag path (#2853)
A multiply (or other non-Normal) drop or inner shadow blends with what lies beneath the layer.
The sprite is rendered on a transparent surface, so the shadow would look different while dragging.
2026-12-01 20:17:01 +07:00
BFlat adcb55d679 Merge pull request #2857 from storytold/fix/2853-glass-drag
M8: a layer with effects drags smoothly: glass and background blur are rendered again for where they are, off the canvas render (#2853)
2026-12-01 19:56:43 +07:00
BFlat 73cd44a5ee Merge pull request #2687 from brytoncooper/perf/lazy-images-1313
perf(format,doc,engine): load .figcraft images lazily with bounded LRU and streaming save (#1313)
2026-12-01 19:29:45 +07:00
bflatastic 5085e438d4 Merge main: build the live glass backdrop on #2858's drag sprite, keeping its dark-section rule 2026-12-01 19:22:06 +07:00
BFlat c41d890156 Merge pull request #2656 from storytold/fix/2435-text-style-overrides
M4: a text run keeps its text style under local changes (#2435)
2026-12-01 19:02:36 +07:00
BFlat 500e13be65 M8: a layer with effects of its own, a glass included, drags as a sprite with its outline (#2853) (#2858) 2026-12-01 18:57:26 +07:00
BFlat 9995cdbb97 Merge pull request #2855 from pgaultier/server-trusted-proxy-range
M9: a server behind a container platform's proxy trusts its whole address range (#2854)
2026-12-01 18:55:06 +07:00
bflatastic 5875ca5522 fix(doc,engine,render): unreadable lazy images aren't equal, share save prep, video bytes after rebase (#1313)
- ImageData equality: two lazy images that both fail to load no longer compare equal; equal
  content-hash keys compare without reading either store (as the PR describes).
- save_to and encode_at share FileSnapshot::prepared instead of duplicating the doc prep.
- render: video players read lazy bytes through ImageData::bytes (new on main since the PR).
- docs/file-format-parity.md: revision row for #1313.
2026-12-01 18:32:42 +07:00
bflatastic a76aba9278 M8: a layer with effects drags smoothly: its own effects move in the drag sprite, and glass or a background blur is rendered again for where it is on a thread of its own (#2853)
A dragged layer with any effect on it used to give up the drag sprite, so every pointer
move asked the canvas for a new render (about 20 ms each for a 600 x 360 glass pane over
stripes in a debug build here; 48 ms per move in the release glass bench at 200 %), and the
layer stuttered behind the pointer.

- The sprite now takes layers with effects of their own (drop and inner shadows, blurs,
  noise, texture, glass): render_area draws them as the page does.
- A background blur or glass in the sprite reads what lies under it where the layer is now:
  figcraft_render::render_area_moved draws the layers where they started but reads their
  backdrop at the drag's shift. A thread of the sprite's own renders it for the latest shift
  and hands the image back; the sprite keeps moving with the outline every frame and shows
  the newest render. The canvas renders nothing until the drop.
- The glass shading loop runs its rows in parallel outside a parallel render (exports and
  the sprite), as blurs already do; bands of a canvas render stay on their own thread.
2026-12-01 17:15:47 +07:00
Philippe Gaultier 2dadb3fd33 M9: figcraft-server takes every setting from a FIGCRAFT_SERVER_* environment variable too (#2044, part)
On a container platform the settings file is part of the image, so giving a server its public
address or its proxy meant building an image of its own. Each key of the settings file can now
also come from FIGCRAFT_SERVER_ and the key in capitals (public_url is FIGCRAFT_SERVER_PUBLIC_URL,
max_file_mb is FIGCRAFT_SERVER_MAX_FILE_MB). The variables override the file and flags override
them; an empty variable counts as unset, and a value that doesn't fit its key stops the server
with an error naming the variable. The prefix is FIGCRAFT_SERVER_ rather than FIGCRAFT_, as with
FIGCRAFT_CONTROL_*, so the server's settings never meet the app's own variables. The list of keys
names every field of the settings, so a new key that isn't given its variable doesn't compile.

Part of #2044.
2026-12-01 10:53:54 +01:00
Philippe Gaultier 363a7a257e M9: a server behind a container platform's proxy trusts its whole address range (#2854)
trusted_proxy took one IP address, compared for equality with the connection's peer. Behind the
nginx of a Docker Swarm overlay network (CapRover and other Swarm-based platforms) the proxy's
address changes when its container is recreated, so from then on X-Forwarded-For was silently
ignored and every client counted as the proxy's one address. trusted_proxy now also takes a range
(10.0.0.0/8, fd00::/8), checked against the connection's peer; one address keeps working as before,
so existing settings are unchanged.

Fixes #2854
2026-12-01 10:53:53 +01:00
bflatastic c53a3b06d2 Merge origin/main into fix/2435-text-style-overrides 2026-12-01 16:48:45 +07:00
BFlat 1984628a9e Merge pull request #2848 from storytold/fix/936-cjk-ui-size
M10: Chinese, Japanese and Korean interface text draws a pixel larger so it no longer reads faint
2026-12-01 15:40:29 +07:00
BFlat 0bb1183a8f Merge pull request #2846 from storytold/fix/2837-dark-sections
M1: sections draw in dark tones of their colour while the interface is dark
2026-12-01 15:27:28 +07:00
BFlat f9bc1c45a7 Merge pull request #2838 from storytold/feat/2325-tidy-sweep
Auto layout: tidy sweep commands round spacing and return stray absolute layers to the flow
2026-12-01 15:12:04 +07:00
BFlat 261a0cb71d Merge pull request #2841 from storytold/feat/2237-code-gutter
M12: boards: code blocks number their lines in a gutter
2026-12-01 15:09:24 +07:00
bflatastic a395d05128 M10: Chinese, Japanese and Korean interface text draws a pixel larger so it no longer reads faint
At the interface's 11 px, ideographs pack many strokes into the same em as a Latin letter and
the default system faces (Microsoft YaHei UI on Windows) have no medium weight, so the strokes
read thin, most of all dark on light. The CJK fallback faces of the interface now draw one
twelfth larger (11 px text: 12 px ideographs); Latin text and the canvas keep their sizes.

Fixes #936
2026-12-01 15:05:58 +07:00
BFlat b2c09d6e36 Merge pull request #2844 from storytold/feat/1592-preview-window
M5: Prototype preview opens in a window of its own for another screen
2026-12-01 14:53:53 +07:00
BFlat 50d62b8e55 Merge pull request #2843 from storytold/feat/2781-autolayout-grid
M2: Add auto layout gives layers in rows and columns a grid
2026-12-01 14:48:40 +07:00
bflatastic 142ed2d1fd M1: sections draw in dark tones of their colour while the interface is dark (#2837)
On a dark interface the canvas draws white sections, the section colour presets and the default
section border in dark tones instead of bright light blocks, and the Section color swatches show
those tones. A custom colour draws as it is. The stored colour stays, so the light theme, exports,
thumbnails and the file are unchanged; switching the theme redraws the canvas.
2026-12-01 14:47:26 +07:00
BFlat 3678bfb402 Merge pull request #2842 from storytold/feat/1013-video-fills
M6: video fills: MP4 and MOV videos fill layers and play in the presenter
2026-12-01 14:43:09 +07:00
BFlat 0bdc1eb40e Merge pull request #2829 from storytold/fix/1560-right-click-locked
M5: a right-click on a locked layer picks it, so the menu's Lock/Unlock unlocks it
2026-12-01 14:37:53 +07:00
BFlat 0916f9f65c Merge pull request #2839 from storytold/feat/2384-fidelity-diff
figcraft-cli diff: compare what two files hold so a round trip can be checked in CI
2026-12-01 14:29:59 +07:00
bflatastic 30c4650392 M12: boards: code blocks number their lines in a gutter (#2237, part)
The padding left of a code block's code now holds its line numbers, right-
aligned in the code's font and level with it; a wrapped line takes one number
and its other rows stay blank. The normalize pass that keeps a block's height
and plain code keeps them after every edit, resize and undo, and keeps them
behind the code among the block's layers, so typing always finds the code.
2026-12-01 14:22:10 +07:00
bflatastic 456a67978e Auto layout: tidy sweep commands round spacing and put stray absolute layers back in the flow (#2325)
layout.fixSweep rounds the gap, the gap between lines and the padding of
the auto layout frames in the given layers (and inside them) to whole
pixels, then runs layout.detachAbsolutes, which takes visible absolute
layers back into the flow when the flow would leave them where they are
(within half a pixel). One undo step, no layer changes parent, instance
contents and variable-bound spacing are left alone, and a second run
changes nothing and records no step. Both return the ids they changed.
2026-12-01 14:22:02 +07:00
bflatastic fc64d38284 Prototype preview: open it in a window of its own for another screen (#1592)
The preview pane's bar gets a pop-out button next to Close. It moves the
preview into an OS window of its own (same size as the pane), where the
same prototype keeps playing and follows edits and the selection live,
so it can sit on a second screen. The button there, or closing that
window, puts the preview back over the canvas.

`proto.preview {window: true}` opens it straight in its window, and
`ui.set {previewWindow}` / `ui.inspect` `previewWindow` move it and read
it over the control channel. The browser build (one window) and a
running screen reader (other windows have no accessibility tree yet)
keep the pane over the canvas, without the button.
2026-12-01 14:20:08 +07:00
BFlat 83404f2567 Merge pull request #2833 from storytold/feat/2642-mind-outline
M12: a mind map's outline beside the canvas, to edit and reorder its topics
2026-12-01 14:16:41 +07:00
BFlat 14bd07d6ce Merge pull request #2825 from storytold/feat/2642-org-chart-outline
M12: a mind map turns into a top-down org chart
2026-12-01 14:06:09 +07:00
BFlat b32d083427 Merge pull request #2831 from storytold/feat/2752-docked-plugin-panels
M11: plugin panels can dock in the sidebar (#2752, part 1)
2026-12-01 14:00:56 +07:00
bflatastic 66db30a96a Add auto layout gives layers in rows and columns a grid (#2781) 2026-12-01 13:57:41 +07:00
BFlat a395415542 Merge pull request #2834 from storytold/feat/2496-delete-server-files
M9: delete files published with the server key from the app (#2496)
2026-12-01 13:57:07 +07:00
bflatastic a01837a84e M5: a right-click on a locked layer picks it, so the menu's Lock/Unlock unlocks it (#1560)
The right-click's pick skipped locked layers, so its menu acted on the
selection or on the layer underneath, and unlocking from the canvas meant
finding the layer in the Layers panel. It now reaches locked layers
(Session::hit_pick_opts with HitOpts::locked); left clicks, hover and the
marquee still pass through them.
2026-12-01 13:50:01 +07:00
bflatastic fd9546a177 figcraft-cli diff: compare what two files hold, so a round trip can be checked in CI (#2384)
`figcraft-cli diff A B [--json]` counts layers by type, fills, strokes,
effects, layout grids, auto layout frames, export settings, prototype
interactions and flows, variable bindings, style links, styles by kind,
variables, collections, modes, images and comments in both files and
prints the counts that differ. It exits 1 when one differs, so a job
can run `convert in.fig out.fig` and `diff in.fig out.fig` and fail on
anything the save dropped. Takes the automation roots like `info`.
2026-12-01 13:49:02 +07:00
BFlat 945be43c36 Merge pull request #2818 from storytold/fix/2774-frame-cost
M1: Windows: a GPU without a Direct3D 12 driver draws with OpenGL again, not on the processor (#2774)
2026-12-01 13:47:19 +07:00
BFlat 78315e4e10 Merge pull request #2832 from storytold/fix/649-color-emoji-ui
M1: emoji in layer names and comments draw in colour (#649)
2026-12-01 13:44:40 +07:00
bflatastic d98ddb5f89 M6: video fills: MP4 and MOV videos fill layers and play in the presenter
A video is kept as an image fill's source, the file itself, like an
animated GIF: place it, import it, drop it on the canvas or pick it in the
fill picker, on any layer that takes an image fill. The canvas,
thumbnails and exports show its first frame; the presenter and the
preview play it muted and looping, one frame decoded at a time on the
GIF clock. H.264 video in MP4 and MOV, read and decoded in pure Rust by
craft-libs' craft-media and craft-video (no new third-party crates).
2026-12-01 13:42:17 +07:00
bflatastic a3b68a51d6 M12: a mind map's outline beside the canvas (#2642, part)
With the board's side panel open (the bar's Layout menu > Outline), a selected
mind map node's map shows as an Outline section: every node's text on a row,
indented by depth, the selected node's row highlighted. A row edits its node's
text and selects it; + adds a subtopic; Enter adds the next topic and types in
it; Tab and Shift+Tab indent and outdent; Alt+Up and Alt+Down reorder; a row
dragged by its grip lands beside the row it is let go above, with everything
under it. Each move is one undo step and the map lays itself out in the new
order. Commands: board.mindMapOutline and board.mindMapMove.
2026-12-01 13:28:54 +07:00
bflatastic 6d869ff5c1 M12: a mind map turns into a top-down org chart (#2642, part)
The Layout menu of the bar over a mind map node now ends in Org chart
(`board.mindMapLayout {layout: down}`). Every level becomes a row under its
parent, siblings side by side with the parent centred over them, joined by
right-angled lines. Turning between columns and rows keeps every node's place
among its siblings (top to bottom becomes left to right, and back), and the
lines turn back into curves. In a chart a new child lands at the end of its
row and a sibling right after its node, however wide its text. One undo step.
2026-12-01 13:28:40 +07:00
bflatastic da1cfe3fdd M12: a mind map grows right, left or on both sides of its first node (#2642, part)
The bar over a selected mind map node now ends in a Layout menu: Right, Left or Both sides
(`board.mindMapLayout {id?, layout: right|left|both}`). The map's branches change side and it lays
itself out again: every node keeps its parent, deeper nodes follow their side, and on both sides the
first half of the first node's children go right. A new child of the first node, or a node dropped
on it, goes on the map's side (on a two-sided map, the side with fewer children). One undo step.
2026-12-01 13:21:23 +07:00
BFlat 17dbd2a1ea Merge pull request #2826 from storytold/feat/2205-link-cards
M12: boards: a pasted web address becomes a link card with the page's title, site and picture (#2205)
2026-12-01 13:17:46 +07:00
bflatastic b13f34b287 M9: delete files published with the server key from the app (#2496)
Home > Online > Files on a server... takes a server's address and key,
lists every file the server keeps (those published with the key
included) and offers Remove from server... on each, behind the same
confirmation the Online list uses; the row goes once the server confirms.
The key stays in that window only and goes only to its server.

Share > Advanced > Remove from server... also shows for a file in a
session published or shared with the key.

Agents: collab.serverFiles {server, key?} lists a server's files, and
collab.manageFile takes the server key (key, or ?key= in server) in
place of an owner token. A file request without an owner token whose
address carries the key opens a managing connection with the key; the
browser build does the same.
2026-12-01 13:09:04 +07:00
BFlat 0f706b9753 Merge pull request #2827 from storytold/feat/2502-allow-server-publish
M9: a confined headless MCP session can publish to its allowed server (#2502)
2026-12-01 13:06:17 +07:00
bflatastic 42526ae441 UI: emoji in layer names and comments draw in colour (#649)
On desktop, a layer name, comment or typed text with emoji now loads the
system's colour emoji face (Apple Color Emoji, Segoe UI Emoji or Noto Color
Emoji) and draws emoji from it in colour, ahead of egui's bundled monochrome
emoji. The face loads only once something shows emoji, the same lazy path the
CJK faces take. The web build keeps the monochrome emoji.
2026-12-01 13:02:59 +07:00
bflatastic 8efb0809ad M11: plugin panels can dock in the sidebar (#2752, part 1)
A plugin panel whose spec says "placement": "sidebar" shows in the left
sidebar under a Plugins tab on the rail instead of a floating window. The
tab is there only while such a panel is open, and a newly docked panel
opens it; each docked panel has a close button that ends its plugin's
session, and its fields take the sidebar's width. Floating stays the
default, and plugin.ui reports the placement.
2026-12-01 13:02:15 +07:00
bflatastic d6b5e477e0 Windows: a GPU without a Direct3D 12 driver draws with OpenGL again, not on the processor
On a machine whose GPU has no Direct3D 12 driver, Direct3D 12 offers only
its software adapter (WARP), which draws on the processor. Since #2264
FigCraft started on Direct3D 12 alone, so these machines drew every frame
on the CPU: all cores busy and the app lagging (#2774). A window that
opens on WARP now starts the app again with OpenGL offered beside
Direct3D 12, as 0.18.0 did, so the GPU's OpenGL driver draws. Machines
with a Direct3D 12 GPU start as before.
2026-12-01 12:59:51 +07:00
BFlat 7df0cfce70 Merge pull request #2824 from storytold/feat/1749-draw-mode-toolbar
M3: Draw mode gives the Pen and the Pencil a toolbar button each and stays on while either is picked
2026-12-01 12:59:12 +07:00
BFlat f6518c9efc Merge pull request #2822 from storytold/fix/2432-wayland-pinch
M1: Linux: a touchpad pinch zooms the canvas under Wayland (winit 0dfcec0, craft-libs d45308b)
2026-12-01 12:53:20 +07:00
BFlat 5b7c85de08 Merge pull request #2823 from storytold/feat/1025-font-catalog
M7: the font menu's search lists free fonts to download (#1025)
2026-12-01 12:48:05 +07:00
bflatastic e368669be8 M12: boards: a pasted web address becomes a link card with the page's title, site and picture (#2205)
Pasting one http or https address on a board now makes a link card at
once: the address as its title and the site under it. The desktop app
then reads the page in the background (10 s, 4 MB, no cookies) and shows
the title, site name and picture the page names. Offline, in the browser
build or when the page can't be read the card stays as it was and a note
says why. The bar over one card has Open link.

Commands: board.link, board.linkPreview, board.openLink.
2026-12-01 12:45:20 +07:00
BFlat 88bf380aca Merge pull request #2821 from storytold/feat/2497-vectorize
M1: Vectorize turns image layers into editable vector layers, one per colour
2026-12-01 12:42:35 +07:00