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>
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.
main's canvas keeps the texture's pixels (the eyedropper reads them) and its
worker marks an image that leaves layers out. A render handed over as patches
puts them on that kept copy as on the texture, and carries the mark.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tiny-skia, tiny-skia-path and figcraft-render at opt-level 3 in the web-release profile: their
loops run for every pixel of the canvas on the page's one thread. The rest stays at "z" for the
size gate.
Every finished render was converted to a texture image and uploaded whole: after an edit that
redrew a part of the view, all of the view and its margin again, every frame of a drag. The
retained renderer now says where a patched image differs from the one before (nothing after a
full render or a pan, which moves every pixel), the browser's worker numbers its images and is
told which one the canvas's texture holds, and a render that only patches that image hands over
the patches, which go onto the texture in place. The image around the view and the desktop's
render thread hand over whole images, as before.
A re-rendered area was cut out of its render into a pixmap of its own, and that drawn onto the
kept image: two more passes over the area, which for simple content took far longer than
rendering it. Its rows are now copied straight into place.
A 4.7 megapixel patch of two flat fills (a 4112 x 2292 view, release, one thread): 16.9 -> 2.8
ms a frame.
Close up, the view (or the band or patch of it being drawn) lies inside its clipping frames.
Each still copied the pixmap, filled a mask for it and put the copy back through the mask,
pixel by pixel: a frame with an edge off screen on a fraction of a pixel never took the
whole-pixel path. Now a clip that takes in the whole pixmap draws its children as they are;
edges at or past the pixmap's count as whole; and rows of a mask that are all in or all out are
copied or kept in one piece.
A view inside four nested clipping frames at 1,933% on a 2x display (4112 x 2292, release, one
thread): 119 -> 87 ms, a band of it 18 -> 12 ms.
A point dragged in the vector editor changed the vector, so its whole box was drawn again.
Zoomed to the vector (as the editor does) that is most of the view, past the share a patch may
cover: every frame of the drag was a full render, drawn in bands over several frames. A
vector that differs only in where its points and handles are now redraws the segments that
moved and their neighbours (joins and rounded corners follow them), as far out as its stroke
reaches. Dashes, width profiles, brushes, gradients and images, effects, masks and open filled
paths depend on the whole outline: those are drawn again whole, as before.
A layer with a drop shadow was drawn with the shadow's reach around the pixmap (1,392 pixels
each way for a 16 px blur at 1,933% on a 2x display) and the shadow blurred from a copy of
all of it, once for every band of a full render. A shape or frame with opaque paints now
casts its shadows from its outline: only over the pixels that show, and a blur of 8 device
pixels or more is drawn smaller, blurred and scaled back up, on a grid that follows the shape so
bands, patches and whole views agree. A frame that doesn't clip (a stack) counts while
everything its children paint stays inside its box; its shadows that spread still come from
its pixels, as they did.
zoomed_card_timings (release, one thread, 4112 x 2292): the view in 8 bands 4576 -> 152 ms,
the slowest band 598 -> 21 ms.
In a right-to-left UI language the rows inside the panels run from the
right as well: the shared Design panel row (right::block), section
headers, tight_end, sub-labels, checkboxes, radios, disclosures and the
selection header, and the layers and pages lists (indent, disclosure,
icon and name from the right, eye and padlock on the left). Names and
rename fields align to their start.
Hand-placed layouts stay written left to right and are mirrored inside
their row with widgets::flip_x / flip_rect, so an English window takes
the same code path unchanged. Inside a control nothing turns round.
A layers list made wider than the panel by a long name (#1904)
mirrors across its whole width, so it starts scrolled to its right
end, where its rows start (stick_to_right, with a scroll state per
direction so a language switch doesn't leave it at the left end).
The Assets panel, version history, Dev Mode's layouts, the colour
picker, the toolbar, the tab bar and the home screen stay left to right.
Gap 5 had two copies of its "Missing" paragraph, left by merges: one
now.
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.
The browser's requests to a server now open library and plugin directory
connections, so the panels work there as on the desktop. A plugin installed in
the browser lasts as long as the page.
After a zoom step's preview the render thread only checked once, right away,
for a newer request, then started the full render. That render can't be
stopped, so on a heavy page every later step of a held zoom waited for it
(110-520 ms per render on a 9,000-layer page with images and shadows).
It now waits like the browser worker does: SETTLE_MS, or the last full
render's time when that's shorter. Pans and edits have no preview and are
refined straight away as before.
Vectors, booleans and shapes are a Microsoft.UI.Xaml.Shapes.Path with path
data from the node's outline (F1 non-zero, F0 even-odd, at most 5,000
elements), one solid fill and one solid stroke; stroke inside or outside is a
note. Gradients, several paints, effects and over-cap outlines fall back to a
PNG Image. Docs: parity, MCP, gaps, ROADMAP.
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