#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
The browser version still recognises camera raw files and says they open in the desktop app
only; its pickers don't offer them. The Plugins menu, the plugin palette rows and the plugin
commands are hidden there, and running a plugin says it needs the desktop app. Native builds
are unchanged.
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>
`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>
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.
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.
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).
#2616 measures each exported layer's drawn outlines through
Document::world_render_bounds_with. The export framing from this branch
(drop shadows to their blur radius, layers that draw nothing left out)
now goes through the same callback instead of a separate walk: the
callback returns None for a layer that doesn't count and takes a second
function for what a group's effects add round its children.
#2631's outline shadow path now groups blended drop shadows as the
pixel path does, so two linear-burn shadows darken where they overlap,
not the backdrop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
RW2, CR2, CR3, NEF, ARW, RAF, ORF, DNG and the other containers craft-raw
decodes now open, import, place and fill shapes. add_image develops a raw
once with craft-develop's stages (AHD demosaic, highlight rebuild, as-shot
white balance and colour matrices, neutral tone curve, sRGB, orientation)
and the document keeps the picture as a quality 95 JPEG, so every way an
image comes in takes raws. file.open and the Open, Import, Place and image
fill dialogs know the raw extensions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Figma's REST API names a text's feature toggles style.opentypeFlags; the
importer looked for openTypeFlags, so features in real files (SF Pro's
SS16 large symbols on an iOS kit's back chevron) were dropped. The old
spelling is still read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
A design kit's Light/Dark components switch variant through a `Mode`
string variable bound to the variant property. Imports dropped that:
dark screens showed the light variants.
- REST import reads boundVariables.componentProperties (variant, text
and boolean properties) as componentProperties/<name> bindings.
- An opened REST or .fig file settles them: each bound instance shows
the variant the variable names in its mode, outer instances first,
keeping its own overrides and the ones the mains around it make.
- A text reads a property its instance sets even when the variant set
lists it under another id (imported library copies do).
.fig needs craft-libs craft-fig with the RESOLVE_VARIANT mapping (local
commit edcc9d6d3). On a real-world iOS kit file: dark alerts 28%/20% and
the dark keyboard 38% differing pixels -> 2%, 1.4%, 1.7%.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
In a hugging parent, Fill on the other axis follows the line the way
Figma does, instead of forcing the parent Fixed. This also covers item 2
of #2090 on both axes: a hugging main that becomes Fixed is followed by
its instances' roots.
Fixes#2091 item 3. Fixes#2034. Fixes item 2 of #2090.
boundVariables.individualStrokeWeights was skipped with a warning, so a 1 px bottom divider bound to a variable came across as a plain number. Each side now binds strokeTopWeight ... strokeLeftWeight, read from the live API's BORDER_TOP_WEIGHT ... keys or the published spec's top ... keys.