From 297426c595b7b681d537d92bc39f2e4b593e9853 Mon Sep 17 00:00:00 2001
From: dotCooCoo
Date: Fri, 6 Nov 2026 22:21:51 -0800
Subject: [PATCH 01/61] Export: color profile text states which formats are
tagged and that CMYK PDF is DeviceCMYK
The export tool and command descriptions, docs/mcp.md and the file-format
table said PDF is always sRGB, that sRGB JPG is untagged and that every
exported file is tagged with its profile. RGB PDF is sRGB and PDF with cmyk
is DeviceCMYK; JPG embeds an ICC profile for sRGB and Display P3; WebP embeds
one for Display P3 only. The JPG quality (1 to 100, default 90) now has one
row in the format table.
---
crates/engine/src/cmd/file.rs | 2 +-
crates/mcp/src/tools.rs | 2 +-
docs/file-format-parity.md | 7 +++----
docs/mcp.md | 4 ++--
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/crates/engine/src/cmd/file.rs b/crates/engine/src/cmd/file.rs
index 0ed12b8d3..e52960d43 100644
--- a/crates/engine/src/cmd/file.rs
+++ b/crates/engine/src/cmd/file.rs
@@ -120,7 +120,7 @@ pub fn specs() -> Vec {
spec!(
"file.export",
"Export",
- "{ids? (default selection, else the page), format? (png|jpg|svg|pdf|webp|xml (an Android Vector Drawable, with `warnings` for what it changed or left out), or fig: the whole file as .fig, experimental, with `warnings` for what was left out; other apps may not open every file; or penpot: the whole file as a Penpot 2.x archive, with warnings for unsupported content), scale? (default 1) | size? (2x|512w|512h or {by: scale|width|height, value}: a scale, or a width or height in pixels), path? (else returns base64 `data`), bleed? (PDF: points, or with a unit: \"3mm\", \"0.125in\", \"9pt\"), cropMarks?, bleedMarks?, cmyk? (PDF print options), contentsOnly? (default true; false also draws the layers that show in their area), includeBoundingBox? (true: only the layers' own boxes, cutting off shadows and outside strokes), svgOutlineText? (default true), svgSimplifyStroke? (default true), svgIdAttribute? (SVG ids, XML android:name), vdCompat? (XML: bestEffort (default: approximate with a warning)|exact (leave out what can't be exact, with a warning)|ignore (no warnings)), colorProfile? (PNG, JPG and WebP: sameAsFile (default: the document's profile)|srgb|displayP3; colors convert, out-of-gamut ones clip; SVG, PDF and XML are always sRGB), quality? (JPG: 1-100, default 90)}",
+ "{ids? (default selection, else the page), format? (png|jpg|svg|pdf|webp|xml (an Android Vector Drawable, with `warnings` for what it changed or left out), or fig: the whole file as .fig, experimental, with `warnings` for what was left out; other apps may not open every file; or penpot: the whole file as a Penpot 2.x archive, with warnings for unsupported content), scale? (default 1) | size? (2x|512w|512h or {by: scale|width|height, value}: a scale, or a width or height in pixels), path? (else returns base64 `data`), bleed? (PDF: points, or with a unit: \"3mm\", \"0.125in\", \"9pt\"), cropMarks?, bleedMarks?, cmyk? (PDF print options), contentsOnly? (default true; false also draws the layers that show in their area), includeBoundingBox? (true: only the layers' own boxes, cutting off shadows and outside strokes), svgOutlineText? (default true), svgSimplifyStroke? (default true), svgIdAttribute? (SVG ids, XML android:name), vdCompat? (XML: bestEffort (default: approximate with a warning)|exact (leave out what can't be exact, with a warning)|ignore (no warnings)), colorProfile? (PNG, JPG and WebP: sameAsFile (default: the document's profile)|srgb|displayP3; colors convert, out-of-gamut ones clip; SVG, XML and RGB PDF output are always sRGB; PDF with cmyk is DeviceCMYK), quality? (JPG: 1-100, default 90)}",
false,
export
),
diff --git a/crates/mcp/src/tools.rs b/crates/mcp/src/tools.rs
index 9e901f5bb..5d4296f01 100644
--- a/crates/mcp/src/tools.rs
+++ b/crates/mcp/src/tools.rs
@@ -280,7 +280,7 @@ fn tools() -> Vec {
"svgIdAttribute": boolean("SVG: layer names as unique `id` attributes (default false)"),
"svgSimplifyStroke": boolean("SVG: strokes as `stroke` attributes where exact (default true); false writes outlines"),
"vdCompat": {"type": "string", "enum": ["bestEffort", "exact", "ignore"], "description": "XML: what a Vector Drawable can't draw exactly is approximated with a warning (bestEffort, default), left out with a warning (exact), or written as far as it maps without warnings (ignore: overlapping layer opacity dropped, even-odd fills kept as fillType=evenOdd, diamond gradients left out)"},
- "colorProfile": {"type": "string", "enum": ["sameAsFile", "srgb", "displayP3"], "description": "PNG, JPG and WebP: the color profile of the file (default sameAsFile: the document's); colors are converted and out-of-gamut ones clip. SVG, PDF and XML are always sRGB"},
+ "colorProfile": {"type": "string", "enum": ["sameAsFile", "srgb", "displayP3"], "description": "PNG, JPG and WebP: the color profile of the file (default sameAsFile: the document's); colors are converted and out-of-gamut ones clip. SVG, XML and RGB PDF output are always sRGB; PDF with cmyk is DeviceCMYK"},
"quality": {"type": "integer", "minimum": 1, "maximum": 100, "description": "JPG: the encoder's quality, 1 (smallest file) to 100; default 90"},
}),
&[],
diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md
index bce90b008..335115ad1 100644
--- a/docs/file-format-parity.md
+++ b/docs/file-format-parity.md
@@ -54,12 +54,11 @@ export limit, not a native document nesting limit.
| Format | Figma | FigCraft | Notes | Hours |
|---|---|---|---|---|
| PNG | yes, scales/suffixes | yes | export settings per layer, presets (`2x`, `512w`, `512h`), preview, "Export N layers"; ignore overlapping layers (on by default; off: every layer showing in the area) and include bounding box (the layer's own box; the Export section offers it for text layers, and `file.export` and `export.update` take it for any layer); slashes in layer names export into folders. The exported area is what the layer paints: shadows towards their offset, outside and centre strokes, unclipped children, a mask group's mask, nothing for hidden layers; slices export everything under them, except that with ignore overlapping layers on a slice inside a frame or group exports only that frame or group; sides round up to whole pixels | — |
-| JPG | yes | yes | white where transparent; quality 1 to 100 (`quality` on `file.export`, export settings and MCP `export`; default 90; the Export panel has no control for it yet); the file's colour profile embedded as ICC (APP2), sRGB too | — |
+| JPG | yes | yes | white where transparent; quality 1 to 100 (`quality` on `file.export`, export settings and MCP `export`; default 90; the Export panel has no control for it yet); a color profile per setting as for PNG (`colorProfile`), the file tagged with an ICC profile (APP2) for sRGB and for Display P3 | — |
| PNG | yes, scales/suffixes | yes | export settings per layer, presets (`2x`, `512w`, `512h`), preview, "Export N layers"; ignore overlapping layers (on by default; off: every layer showing in the area) and include bounding box (the layer's own box; the Export section offers it for text layers, and `file.export` and `export.update` take it for any layer); slashes in layer names export into folders. The exported area is what the layer paints: shadows towards their offset, outside and centre strokes, unclipped children, a mask group's mask, nothing for hidden layers; slices export everything under them, except that with ignore overlapping layers on a slice inside a frame or group exports only that frame or group; sides round up to whole pixels; a color profile per setting (Same as file, the default, sRGB or Display P3: `colorProfile`), the pixels converted and the file tagged (`sRGB` chunk, or ICC and `cICP`) | — |
-| JPG | yes | yes | white where transparent; fixed quality (90); a color profile per setting as for PNG (sRGB untagged, Display P3 with its ICC profile) | — |
| SVG | yes (outline text option, ids) | yes | alpha/luminance masks kept; noise, texture, progressive and background blur, glass embedded as images; outline text (off: `` with one `` per line, one style per layer), unique id attributes from layer names, explicit depth-limit refusal, nested frames clipped by their parent's clip (#327), simplified strokes (stroke attributes for centred strokes and for inside and outside strokes on boxes and ellipses) | — |
| PDF | yes | yes | one page per frame, real selectable text in subset fonts, links, vectors and gradients as vectors, effects as images; bleed, crop/bleed marks, page boxes, naive CMYK; checked by rendering the PDF back against PNG exports; explicit depth-limit refusal; RGB is always sRGB (no color profile setting and no output intent) | CMYK output intent 2–4 |
-| WebP | — | yes (ours) | a color profile per setting as for JPG | — |
+| WebP | — | yes (ours) | a color profile per setting as for PNG; sRGB files untagged, Display P3 files with the generated ICC profile | — |
| Android Vector Drawable (XML) | — | yes (ours) | an `.xml` drawable resource (`file.export {format: "xml"}`, export settings, File ▸ Export…, the CLI and MCP), pretty-printed, sized in dp with the viewport in layer units, for AndroidX (VectorDrawableCompat: gradients and even-odd need API 24 without it). Shapes, booleans and text as path data with transforms baked in; solid fills and linear, radial and sweep gradients (`aapt:attr`, exact for any handles: radial and sweep in a `` that maps the unit circle); centred strokes as stroke attributes where Android draws them the same (uniform scale, one cap, no dashes or variable width), other strokes as filled outlines; clipping frames and masks as `` with ``; `android:name` from layer names with the id attribute option. What the format can't hold goes by the compatibility mode (`vdCompat`): best effort (default) applies layer opacity to each shape, rewrites even-odd fills and clip outlines as non-zero, draws diamond gradients as radial and alpha masks as outline clips, each with a warning; exact leaves out what it can't draw exactly, with a warning; ignore writes what maps without warnings: layer opacity over overlapping shapes is dropped (drawn opaque), even-odd fills keep `fillType="evenOdd"`, even-odd clip outlines clip as non-zero, diamond gradients are left out and alpha masks clip to their outline. Effects, image and pattern fills and blend modes are always left out (warned except in ignore); an export that draws nothing writes one empty path (Android refuses a drawable without a path), with a warning. Checked by parsing the XML, against FigCraft's renderer (gradients pixel by pixel), with `aapt2 compile` and `link`, and by rendering samples (linear, skewed radial and sweep gradients, a sweep with mirrored handles, even-odd booleans, centred and inside strokes, rotated text, a clipping frame, an alpha mask, a translucent group, each compatibility mode) with Android 13's (API 33) VectorDrawable on an emulator, next to FigCraft's PNG export: they match, including where the sweep starts and which way it turns, except what the compatibility mode and its warnings say (best effort: overlapping shapes in a translucent group look denser; exact and ignore leave out or draw opaque what they list). Not checked on API 21–23 (VectorDrawableCompat) | — |
| Copy as CSS / SVG / PNG / text / link | yes | yes | Copy as PNG: the whole selection at 2x | — |
| Dev Mode code (CSS, iOS SwiftUI, Android Compose) | yes | yes, plus HTML, React, Vue, Leptos, ArkUI and Flutter | see [dev-mode-parity](dev-mode-parity.md) | — |
@@ -193,7 +192,7 @@ source paint coordinates.
| 2026-11-04 | minor | JPG export: `quality` (1 to 100, default 90) on `file.export`, `export.add` / `export.update` and MCP `export`, kept in the export setting; an sRGB file's JPGs embed the sRGB ICC profile, as Display P3 files' JPGs already embedded theirs, since an untagged JPG is only assumed to be sRGB (#2004). |
| 2026-11-04 | minor | `.fig` and `.jam` import, #1910: an elbowed connector saved with its path keeps it. FigJam stores `connectorControlPoints`, one per run between the first and the last, each a point on its run (in the connector's parent's coordinates) with the run's axis; the first run leaves the start's side and the last arrives at the end's. They become the `ConnectorPath::Runs` a board connector reshaped by hand has (`figcraft_doc::route_along`), so a connector drawn around a layer in FigJam stays around it instead of being routed through it. Points that don't make such a path (off both axes, two runs in a row the same way, a first or last run sideways to its side or going back into its object, more runs than a hand could make) leave the connector to the router as before, and only connectors routed here count in the "follow FigCraft's own routing" note. A curved connector's `connectorBezierControlPoints` are still not read. Tests: `tail_tests::an_elbow_connector_saved_with_its_path_keeps_it`, `tail_tests::an_elbow_whose_saved_path_doesnt_fit_its_sides_is_routed_here`. |
| 2026-11-01 | patch | `.fig` and `.jam` import: a connector without a saved snapshot (elbowed and curved ones are routed here) took no stroke, so it was invisible (#1807); its line's paint, weight, cap and dashes now come from the file's generated line record, as a saved snapshot's do, and the connector's own values, when it has any, win. Test: `fig::connector_label_tests::a_routed_connector_takes_its_line_style_from_the_generated_record`. Numbers unchanged |
-| 2026-10-31 | minor | Export settings: each PNG, JPG and WebP setting has a color profile, Same as file (the default; the document's profile when it exports), sRGB or Display P3, in its advanced settings and as `colorProfile` on `export.add`, `export.update`, `file.export`, `file.exportLayers` and MCP `export`. The pixels convert to the chosen profile (out-of-gamut colors clip) and the file is tagged as before: sRGB PNG with an `sRGB` chunk, Display P3 with the generated ICC profile (and `cICP` in PNG); sRGB JPG and WebP stay untagged. A setting keeps its choice when its format changes; settings saved without one read as Same as file. SVG, PDF and XML show no choice and stay sRGB (PDF has no output intent yet). Numbers unchanged |
+| 2026-10-31 | minor | Export settings: each PNG, JPG and WebP setting has a color profile, Same as file (the default; the document's profile when it exports), sRGB or Display P3, in its advanced settings and as `colorProfile` on `export.add`, `export.update`, `file.export`, `file.exportLayers` and MCP `export`. The pixels convert to the chosen profile (out-of-gamut colors clip) and the file is tagged as before: sRGB PNG with an `sRGB` chunk, Display P3 with the generated ICC profile (and `cICP` in PNG); sRGB JPG embeds the sRGB ICC profile (#2004) and sRGB WebP stays untagged. A setting keeps its choice when its format changes; settings saved without one read as Same as file. SVG, PDF and XML show no choice and stay sRGB (PDF has no output intent yet). Numbers unchanged |
| 2026-10-31 | patch | M4: Dash and Custom strokes have a Dash cap (None, Round, Square) in the advanced stroke settings and `node.set {dashCap}`, on both ends of every dash on the canvas and in PNG, PDF and SVG. Unset, dashes keep taking the end point caps, so older files look the same; the saved file writes it only when set. Numbers unchanged |
| 2026-10-30 | minor | `.fig` import: a connector's label without a saved snapshot was skipped; now the connector imports as a frame holding its line and the label, as a connector with a saved snapshot does, the label centred on the line's middle by length (in a 200-wide box, laid out again with the fonts at hand), in the connector's fill paints or black. Its background isn't known without the snapshot and is left out. Not checked on real files. Test: `fig::tests::tail::a_labelled_connector_without_a_snapshot_keeps_its_label` |
| 2026-10-30 | minor | Pasted content row: an image the clipboard doesn't carry keeps its name and shows a placeholder that reads as missing; the paste names those layers in its message and opens the import report with its notes (#1646). Numbers unchanged |
diff --git a/docs/mcp.md b/docs/mcp.md
index aebcbf46d..11945a76c 100644
--- a/docs/mcp.md
+++ b/docs/mcp.md
@@ -255,7 +255,7 @@ Or in a project's `.mcp.json`:
profile into the file's space: an embedded ICC profile (PNG, JPG, WebP, TIFF; RGB or grey), a PNG's
`sRGB` / `gAMA` / `cHRM` chunks, else sRGB (also for CMYK or damaged profiles); `image.place` reports
the profile's name as `imageProfile` (`null`: none usable, taken as sRGB). PNG exports are tagged (`sRGB` chunk, or a Display P3 ICC profile plus
- `cICP`), Display P3 JPG and WebP embed the ICC profile, and SVG and PDF export Display P3 files
+ `cICP`), JPG embeds the ICC profile for sRGB and for Display P3, WebP embeds it for Display P3 only (sRGB WebP is untagged), and SVG and PDF export Display P3 files
converted to sRGB (out-of-gamut colours clip). The app's canvas shows sRGB (P3 colours outside sRGB clip on screen):
`view.proofSrgb {on?}` (View ▸ Soft-proof sRGB) stripes those pixels so `screenshot {window:
true}` shows where they are (after the next canvas render), and the colour picker says Outside
@@ -380,7 +380,7 @@ a later step can use `{"$step": 0, "field": "ids/0"}` to target the first match.
| `inspect_document {depth, allPages, fields?, outline?}` | The document as JSON (its `id`, layer tree, styles, selection, history); `fields` selects layer properties, `outline: true` gives a compact tree (below). The tools that act on a document also take `document` (see Naming the document below). |
| `get_node {id, depth, fields?, outline?}` | One layer as JSON; takes the same `fields` and `outline` options; `pluginData` (`{key: value}`, values as strings) when the layer or page has layer data written with `set_properties {props: {pluginData}}`. |
| `select {ids}` | Replace the selection (`[]` deselects). |
-| `export {ids, format, scale \| size, path?, bleed?, cropMarks?, bleedMarks?, cmyk?, contentsOnly?, includeBoundingBox?, svgOutlineText?, svgIdAttribute?, svgSimplifyStroke?, vdCompat?, colorProfile?, quality?}` | png, jpg, svg, webp, pdf, xml (an Android Vector Drawable: `svgIdAttribute` writes `android:name`, `vdCompat` is `bestEffort` (default: approximated with a warning), `exact` (left out with a warning) or `ignore` (no warnings: overlapping layer opacity dropped, even-odd fills kept as `fillType="evenOdd"`, diamond gradients left out), and the result lists `warnings` for what was changed or left out), or `fig`: the whole file as `.fig`, experimental (see Exporting `.fig` files below); `size` is `2x`, `512w` or `512h`; `quality` is the JPG quality, 1 to 100 (default 90). The image covers what the layers paint (shadows towards their offset, strokes, unclipped children, a mask group's mask; hidden layers take no room; a slice is its area with everything under it, or only the frame or group it sits in while `contentsOnly` is on); `contentsOnly: false` also draws every other layer showing in that area, `includeBoundingBox` exports the layers' own boxes; SVG: `svgOutlineText: false` keeps ``, `svgIdAttribute` writes unique ids from layer names, `svgSimplifyStroke: false` writes every stroke as an outline; png, jpg and webp: `colorProfile` is `sameAsFile` (default: the document's profile), `srgb` or `displayP3`, the pixels converted (out-of-gamut colors clip) and the file tagged for it (SVG, PDF and XML are always sRGB). The same options go in export settings (`export.add` / `export.update`). PDF: frames one page each (sized in points), anything else together on one page; print options: `bleed` (points or a length like `"3mm"`, `"0.125in"`), crop and bleed marks, CMYK colour (see Exports below), also taken by `file.export`, `file.exportLayers`, `file.exportFramesPdf` and stored per export setting by `export.add` / `export.update`; `run_command` `file.exportFramesPdf {page?, path?}` writes every top-level frame of a page. Without `path`, images come back as MCP image content, SVG as text, XML as text followed by `{format, bytes, warnings}`. Layers' own export settings: `run_command` with `export.add` / `export.update {index, size?, suffix?, format?}` / `export.remove` and `file.exportLayers {ids?, dir?, assets?}` (every layer once per setting, named `.`, a slash in a layer name making a folder; `assets: true` exports the Inspect tab's assets instead: icons as SVG, images as PNG). |
+| `export {ids, format, scale \| size, path?, bleed?, cropMarks?, bleedMarks?, cmyk?, contentsOnly?, includeBoundingBox?, svgOutlineText?, svgIdAttribute?, svgSimplifyStroke?, vdCompat?, colorProfile?, quality?}` | png, jpg, svg, webp, pdf, xml (an Android Vector Drawable: `svgIdAttribute` writes `android:name`, `vdCompat` is `bestEffort` (default: approximated with a warning), `exact` (left out with a warning) or `ignore` (no warnings: overlapping layer opacity dropped, even-odd fills kept as `fillType="evenOdd"`, diamond gradients left out), and the result lists `warnings` for what was changed or left out), or `fig`: the whole file as `.fig`, experimental (see Exporting `.fig` files below); `size` is `2x`, `512w` or `512h`; `quality` is the JPG quality, 1 to 100 (default 90). The image covers what the layers paint (shadows towards their offset, strokes, unclipped children, a mask group's mask; hidden layers take no room; a slice is its area with everything under it, or only the frame or group it sits in while `contentsOnly` is on); `contentsOnly: false` also draws every other layer showing in that area, `includeBoundingBox` exports the layers' own boxes; SVG: `svgOutlineText: false` keeps ``, `svgIdAttribute` writes unique ids from layer names, `svgSimplifyStroke: false` writes every stroke as an outline; png, jpg and webp: `colorProfile` is `sameAsFile` (default: the document's profile), `srgb` or `displayP3`, the pixels converted (out-of-gamut colors clip) and the file tagged for it (PNG: `sRGB` chunk, or ICC and `cICP` for Display P3; JPG: ICC profile; WebP: ICC profile for Display P3, none for sRGB) (SVG, XML and RGB PDF output are always sRGB; PDF with `cmyk` is DeviceCMYK). The same options go in export settings (`export.add` / `export.update`). PDF: frames one page each (sized in points), anything else together on one page; print options: `bleed` (points or a length like `"3mm"`, `"0.125in"`), crop and bleed marks, CMYK colour (see Exports below), also taken by `file.export`, `file.exportLayers`, `file.exportFramesPdf` and stored per export setting by `export.add` / `export.update`; `run_command` `file.exportFramesPdf {page?, path?}` writes every top-level frame of a page. Without `path`, images come back as MCP image content, SVG as text, XML as text followed by `{format, bytes, warnings}`. Layers' own export settings: `run_command` with `export.add` / `export.update {index, size?, suffix?, format?}` / `export.remove` and `file.exportLayers {ids?, dir?, assets?}` (every layer once per setting, named `.`, a slash in a layer name making a folder; `assets: true` exports the Inspect tab's assets instead: icons as SVG, images as PNG). |
| `screenshot {ids?, scale?, maxSize?, window?}` | PNG of the page (with background) or of layers, scaled to fit `maxSize` (default 1600). `window: true` captures the app window in front when attached, a window id (see Windows below) that window. |
| `open_file {path, variables?, reload?}` / `save_file {path?}` | Open `.figcraft`, `.json` (FigCraft JSON or REST API file JSON with its variables, see below), `.fig` or FigJam `.jam` (best effort, see below), `.sketch` (Sketch 48 and newer, best effort), `.svg` (see Importing SVG below) or an image; save as `.figcraft`. `open_file` returns `opened` (for a file opened anew, a `summary` of `name`, `pages`, `layers` and `images`, and `warnings` or `repairs`; a file that was already open gives its `index`, with `stale: true` when the file changed on disk since that tab read or saved it; `reload: true` reads it again into the tab, refused while the tab has unsaved changes) and the document's `document` outline. |
| `undo` / `redo` | Step through history. |
From bc2984a998dcef49844878871640ead076c9ed35 Mon Sep 17 00:00:00 2001
From: Patrik Lermon
Date: Sat, 7 Nov 2026 07:55:28 +0100
Subject: [PATCH 02/61] i18n(sv): translate 69 new strings
Brings the Swedish catalog up to date with upstream main (3635c230).
Co-Authored-By: Claude Opus 5.5
---
crates/ui-egui/locales/sv.toml | 69 ++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/crates/ui-egui/locales/sv.toml b/crates/ui-egui/locales/sv.toml
index a94feb2a9..c3834d2b6 100644
--- a/crates/ui-egui/locales/sv.toml
+++ b/crates/ui-egui/locales/sv.toml
@@ -127,6 +127,7 @@ name = "Svenska"
"Another server, or one that needs its key. The usual server is set in Preferences." = "En annan server, eller en som kräver sin nyckel. Standardservern anges i Inställningar."
"Any status" = "Valfri status"
"Anyone on your network with this code can edit the file, while this app stays open." = "Alla i ditt nätverk som har den här koden kan redigera filen så länge appen är öppen."
+"Anyone on your network with this code can look at the file, not change it, while this app stays open." = "Alla i ditt nätverk som har den här koden kan titta på filen, men inte ändra den, så länge appen är öppen."
"Anyone with the edit link can change the file; the view link only lets people look. The links carry their secrets: share them like passwords. `figcraft-server links` makes more and revokes them." = "Alla med redigeringslänken kan ändra filen; visningslänken låter bara andra titta. Länkarna innehåller sina hemligheter: dela dem som lösenord. `figcraft-server links` skapar fler och återkallar dem."
"Anyone with this code can edit the file." = "Alla med den här koden kan redigera filen."
"Anyone with this code can look at the file, not change it." = "Alla med den här koden kan titta på filen, men inte ändra den."
@@ -387,6 +388,8 @@ name = "Svenska"
"Crop marks" = "Skärmärken"
"Ctrl+arrows" = "Ctrl+piltangenter"
"Ctrl+click" = "Ctrl+klick"
+"Ctrl+click a padding field" = "Ctrl+klicka på ett padding-fält"
+"⌘ click a padding field" = "⌘ klicka på ett padding-fält"
"Ctrl+scroll" = "Ctrl+rullning"
"Current name" = "Aktuellt namn"
"Current version" = "Aktuell version"
@@ -406,6 +409,40 @@ name = "Svenska"
"Decoration style" = "Dekorationsstil"
"Decoration" = "Dekoration"
"Deep select" = "Djupmarkering"
+"Scrub a field faster (2x) or slower (1/2, 1/4)" = "Dragjustera ett fält snabbare (2x) eller långsammare (1/2, 1/4)"
+"Move up or down while dragging its label" = "Flytta upp eller ned medan du drar dess etikett"
+"Scrubbing at 2x" = "Dragjustering med 2x hastighet"
+"Scrubbing at 1x" = "Dragjustering med 1x hastighet"
+"Scrubbing at 1/2" = "Dragjustering med 1/2 hastighet"
+"Scrubbing at 1/4" = "Dragjustering med 1/4 hastighet"
+"Delete {n} variables" = { one = "Radera {n} variabel", other = "Radera {n} variabler" }
+"Move out of any group" = "Flytta ut ur alla grupper"
+"Move to group {group}" = "Flytta till gruppen {group}"
+"Scope: all supported properties" = "Omfång: alla egenskaper som stöds"
+"Scope: hidden from pickers" = "Omfång: dold i väljare"
+"Scope: only {scope}" = "Omfång: endast {scope}"
+"Disconnected. Reconnecting…" = "Frånkopplad. Återansluter…"
+"Disconnected. Your edits stay here and sync when the connection returns. Reconnecting…" = "Frånkopplad. Dina redigeringar finns kvar här och synkas när anslutningen är tillbaka. Återansluter…"
+"Dismiss" = "Stäng"
+"Not connected: {reason}. Your work is still in this tab." = "Inte ansluten: {reason}. Ditt arbete finns kvar i den här fliken."
+"Retry now" = "Försök igen nu"
+"Save a copy…" = "Spara en kopia…"
+"Wrap style" = "Radbrytningsstil"
+"Text direction" = "Textriktning"
+"Auto: by the first letter with a direction" = "Auto: efter den första bokstaven som har en riktning"
+"Left to right" = "Vänster till höger"
+"Right to left" = "Höger till vänster"
+"Balance" = "Balans"
+"Pretty" = "Snygg"
+"Auto: as many words as fit on each line" = "Auto: så många ord som får plats på varje rad"
+"Balance: every line close to the same length" = "Balans: alla rader ungefär lika långa"
+"Pretty: full lines, no one word alone on the last" = "Snygg: fulla rader, inget ensamt ord på den sista"
+"Set hug contents" = "Ställ in Omslut innehåll"
+"Set fill container" = "Ställ in Fyll behållaren"
+"Double-click an edge of an auto layout frame" = "Dubbelklicka på en kant av en auto layout-frame"
+"{name}, disconnected from its live session" = "{name}, frånkopplad från sin livesession"
+"⌥ double-click an edge of an auto layout child" = "⌥ dubbelklicka på en kant av ett underordnat objekt i auto layout"
+"Alt+double-click an edge of an auto layout child" = "Alt+dubbelklicka på en kant av ett underordnat objekt i auto layout"
"Default" = "Standard"
"Default content" = "Standardinnehåll"
"Default value (the top-left variant)" = "Standardvärde (varianten längst upp till vänster)"
@@ -493,6 +530,7 @@ name = "Svenska"
"Edit dev resource" = "Redigera utvecklarresurs"
"Edit link" = "Redigeringslänk"
"Edit link copied" = "Redigeringslänken har kopierats"
+"Edit padding on all sides" = "Redigera padding på alla sidor"
"Edit style" = "Redigera stil"
"Edit variable" = "Redigera variabel"
"Edit with the builder" = "Redigera med byggaren"
@@ -530,6 +568,7 @@ name = "Svenska"
"Exclusion" = "Uteslutning"
"Exit focus view (Esc)" = "Lämna fokusvyn (Esc)"
"Expand" = "Expandera"
+"Expand the interface" = "Expandera gränssnittet"
"Export" = "Exportera"
"Export all" = "Exportera alla"
"Export frames and layers as PNG, JPG, SVG or PDF" = "Exportera frames och lager som PNG, JPG, SVG eller PDF"
@@ -1072,6 +1111,7 @@ name = "Svenska"
"Pages: {pages}" = "Sidor: {pages}"
"Paint bucket" = "Färghink"
"Pan the canvas" = "Panorera arbetsytan"
+"Show and move the placement crosshair (its tool chosen, nothing selected)" = "Visa och flytta placeringshårkorset (med dess verktyg valt och inget markerat)"
"Pan with nothing selected (Shift: farther)" = "Panorera när inget är markerat (Shift: längre)"
"Panels" = "Paneler"
"Paper" = "Papper"
@@ -1296,6 +1336,7 @@ name = "Svenska"
"See all templates" = "Se alla mallar"
"Select layers and they space themselves as their content changes" = "Markera lager så fördelar de avståndet själva när innehållet ändras"
"SHA-256: {sha}…" = "SHA-256: {sha}…"
+"Same as file ({profile})" = "Samma som filen ({profile})"
"Same as layer" = "Samma som lagret"
"Saturation" = "Mättnad"
"Save" = "Spara"
@@ -1968,6 +2009,17 @@ name = "Svenska"
"⌘ click" = "⌘ klicka"
"⌘ scroll" = "⌘ rulla"
"⌥ drag" = "⌥ dra"
+"Selection box: switch to pick select" = "Markeringsruta: växla till plockmarkering"
+"Pick select: next or previous layer" = "Plockmarkering: nästa eller föregående lager"
+"Pick select: into a layer, out to its parent" = "Plockmarkering: in i ett lager, ut till dess överordnade"
+"Pick select: select the picked layer" = "Plockmarkering: markera det valda lagret"
+"⇥ or ⌥ Space again" = "⇥ eller ⌥ Blanksteg igen"
+"Tab or Ctrl+Space again" = "Tab eller Ctrl+Blanksteg igen"
+"↵ / ⇧↵" = "↵ / ⇧↵"
+"Enter / Shift+Enter" = "Enter / Shift+Enter"
+"Space" = "Blanksteg"
+"Nothing to pick: the page is empty" = "Inget att välja: sidan är tom"
+"Pick select: Tab and Shift+Tab move between layers, Enter goes into one, Shift+Enter out, Space selects, Escape cancels" = "Plockmarkering: Tab och Shift+Tab flyttar mellan lager, Enter går in i ett, Shift+Enter ut, Blanksteg markerar, Esc avbryter"
[commands]
@@ -2004,6 +2056,7 @@ name = "Svenska"
"board.label" = "Kopplingsetikett"
"board.nextSticky" = "Nästa lapp"
"board.reattach" = "Koppla om koppling"
+"board.reshape" = "Omforma koppling"
"board.setColor" = "Whiteboardfärg"
"board.setStyle" = "Whiteboardstil"
"board.shape" = "Form med text"
@@ -2046,6 +2099,7 @@ name = "Svenska"
"collab.openFile" = "Öppna onlinefil"
"collab.peers" = "Personer i den här filen"
"collab.publish" = "Publicera på server"
+"collab.reconnect" = "Återanslut livesessionen"
"collab.recoverFile" = "Återställ onlinefil"
"collab.registerLinks" = "Öppna inbjudningslänkar i FigCraft"
"collab.removePerson" = "Ta bort från session"
@@ -2193,6 +2247,7 @@ name = "Svenska"
"image.deletePreset" = "Radera förinställning"
"image.place" = "Placera bild"
"image.presets" = "Bildförinställningar"
+"image.replace" = "Ersätt bild"
"image.savePreset" = "Spara förinställning"
"inspect.assets" = "Resurser"
"inspect.code" = "Kod"
@@ -2210,6 +2265,7 @@ name = "Svenska"
"layers.collapseAll" = "Fäll ihop alla"
"layout.add" = "Lägg till auto layout"
"layout.remove" = "Ta bort auto layout"
+"layout.removeAll" = "Ta bort all auto layout"
"layout.setTrack" = "Ange spår"
"layout.suggest" = "Föreslå layout"
"libraries.open" = "Öppna bibliotek"
@@ -2304,6 +2360,9 @@ name = "Svenska"
"pref.showDimensions" = "Visa dimensioner på objekt"
"pref.startOnHome" = "Börja på Start"
"pref.uiScale" = "Gränssnittsstorlek"
+"pref.uiScaleDown" = "Mindre gränssnitt"
+"pref.uiScaleReset" = "Standardstorlek för gränssnittet"
+"pref.uiScaleUp" = "Större gränssnitt"
"pref.userName" = "Ditt namn"
"proto.action.add" = "Lägg till prototypåtgärd"
"proto.action.move" = "Ändra ordning på prototypåtgärd"
@@ -2351,6 +2410,7 @@ name = "Svenska"
"selection.applyColorStyle" = "Använd färgformatmall på markeringen"
"selection.bindColorVariable" = "Använd färgvariabel på markeringen"
"selection.colors" = "Markeringsfärger"
+"selection.createColorStyle" = "Skapa färgstil från markeringen"
"selection.detachColor" = "Koppla bort markeringsfärg"
"selection.selectColor" = "Markera lager med den här färgen"
"selection.setPaint" = "Ändra markeringens färg"
@@ -2397,6 +2457,10 @@ name = "Svenska"
"text.caseUpper" = "Versaler"
"text.create" = "Text"
"text.decoration" = "Dekoration"
+"text.direction" = "Textriktning"
+"text.directionAuto" = "Textriktning: auto"
+"text.directionLtr" = "Textriktning: vänster till höger"
+"text.directionRtl" = "Textriktning: höger till vänster"
"text.edit.begin" = "Redigera text"
"text.edit.caret" = "Placera markören"
"text.edit.end" = "Sluta redigera text"
@@ -2421,6 +2485,7 @@ name = "Svenska"
"text.missingFonts" = "Saknade typsnitt"
"text.numberList" = "Numrerad lista"
"text.onPath" = "Text på bana"
+"text.openLink" = "Öppna länk"
"text.paragraphIndent" = "Styckeindrag"
"text.paragraphSpacing" = "Styckeavstånd"
"text.pathOptions" = "Alternativ för textbana"
@@ -2440,9 +2505,11 @@ name = "Svenska"
"text.underline" = "Understrykning"
"text.weightDown" = "Minska teckenvikten"
"text.weightUp" = "Öka teckenvikten"
+"text.wrapStyle" = "Radbrytningsstil"
"tool.arrow" = "Pil"
"tool.comment" = "Kommentar"
"tool.connector" = "Koppling"
+"tool.crosshair" = "Flytta placeringshårkorset"
"tool.ellipse" = "Ellips"
"tool.eraser" = "Suddgummi"
"tool.frame" = "Frame"
@@ -2486,6 +2553,7 @@ name = "Svenska"
"variable.deleteCollection" = "Radera samling"
"variable.duplicate" = "Duplicera variabel"
"variable.export" = "Exportera variabler"
+"variable.extendCollection" = "Utöka samlingen"
"variable.import" = "Importera variabler"
"variable.list" = "Lista variabler"
"variable.moveMode" = "Flytta läge"
@@ -2559,6 +2627,7 @@ name = "Svenska"
"view.layoutGrids" = "Layoutrutnät"
"view.leftSidebar" = "Visa/dölj vänster sidofält"
"view.maskOutlines" = "Konturlinjer för masker"
+"view.minimize" = "Minimera gränssnittet"
"view.multiplayerCursors" = "Samarbetsmarkörer"
"view.nextFrame" = "Zooma till nästa frame"
"view.nextPage" = "Nästa sida"
From d252d35f27f8baad062dfc93c058b1c230f00fa7 Mon Sep 17 00:00:00 2001
From: Helen Kwok <107752876+helenkwok@users.noreply.github.com>
Date: Sat, 7 Nov 2026 10:28:06 +0800
Subject: [PATCH 03/61] figcraft-web: inspect and openFile go through
craft-web-api, so they time out and cancel like the other functions
inspect is docInspect under its earlier name, and openFile calls the crate's execute with file.open, so a call the app does not answer within 30 seconds rejects and a request the app has not started is cancelled.
---
apps/figcraft-web/src/api.rs | 31 +++++++++++--------------------
1 file changed, 11 insertions(+), 20 deletions(-)
diff --git a/apps/figcraft-web/src/api.rs b/apps/figcraft-web/src/api.rs
index 167ea7687..cb82820b7 100644
--- a/apps/figcraft-web/src/api.rs
+++ b/apps/figcraft-web/src/api.rs
@@ -37,7 +37,7 @@ use figcraft_ui_egui::{ControlReply, ControlRequest, RequestGate};
use serde_json::{Value, json};
use wasm_bindgen::JsCast;
use wasm_bindgen::prelude::*;
-use wasm_bindgen_futures::{JsFuture, future_to_promise};
+use wasm_bindgen_futures::JsFuture;
use crate::saved_files::SavedFiles;
@@ -150,15 +150,6 @@ async fn sleep(ms: i32) {
let _ = JsFuture::from(promise).await;
}
-/// A reply as a promise outcome: the `result`, or an `Error` carrying the `error`.
-fn outcome(reply: &Value) -> Result {
- if reply.get("ok").and_then(Value::as_bool) == Some(true) {
- Ok(to_js(reply.get("result").unwrap_or(&Value::Null)))
- } else {
- Err(js_sys::Error::new(reply.get("error").and_then(Value::as_str).unwrap_or("error")).into())
- }
-}
-
fn set_fn(obj: &js_sys::Object, name: &str, f: JsValue) -> Result<(), JsValue> {
js_sys::Reflect::set(obj, &name.into(), &f).map(|_| ())
}
@@ -169,20 +160,20 @@ pub fn install() -> Result<(), JsValue> {
Rc::new(PageApi::new(APP, Methods::default(), request)).install()?;
let window = web_sys::window().ok_or("no window")?;
let obj: js_sys::Object = js_sys::Reflect::get(&window, &APP.into())?.unchecked_into();
- set_fn(
- &obj,
- "inspect",
- Closure:: js_sys::Promise>::new(|| future_to_promise(async { outcome(&send("document.inspect", json!({})).await) }))
- .into_js_value(),
- )?;
+ // `inspect` is `docInspect` under its earlier name: the crate's function, so it times out too.
+ let doc_inspect = js_sys::Reflect::get(&obj, &"docInspect".into())?;
+ js_sys::Reflect::set(&obj, &"inspect".into(), &doc_inspect)?;
+ // `openFile` runs `file.open` through the crate's `execute`, so a call the app does not answer times out and is cancelled.
+ let execute: js_sys::Function = js_sys::Reflect::get(&obj, &"execute".into())?.unchecked_into();
+ let this = obj.clone();
set_fn(
&obj,
"openFile",
- Closure:: js_sys::Promise>::new(|name: String, bytes: js_sys::Uint8Array| {
+ Closure:: JsValue>::new(move |name: String, bytes: js_sys::Uint8Array| {
let data = base64::engine::general_purpose::STANDARD.encode(bytes.to_vec());
- future_to_promise(async move {
- outcome(&send("engine.execute", json!({"command": "file.open", "params": {"name": name, "data": data}})).await)
- })
+ execute
+ .call2(&this, &"file.open".into(), &to_js(&json!({"name": name, "data": data})))
+ .unwrap_or_else(|e| js_sys::Promise::reject(&e).into())
})
.into_js_value(),
)?;
From 12ade9c78c62783dfe539bbbfb62c1fbae03d9ab Mon Sep 17 00:00:00 2001
From: dotCooCoo
Date: Fri, 6 Nov 2026 23:31:02 -0800
Subject: [PATCH 04/61] Docs: the 2026-10-31 export entry keeps the JPG tagging
it had on that date
---
docs/file-format-parity.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md
index 335115ad1..0d51910f0 100644
--- a/docs/file-format-parity.md
+++ b/docs/file-format-parity.md
@@ -192,7 +192,7 @@ source paint coordinates.
| 2026-11-04 | minor | JPG export: `quality` (1 to 100, default 90) on `file.export`, `export.add` / `export.update` and MCP `export`, kept in the export setting; an sRGB file's JPGs embed the sRGB ICC profile, as Display P3 files' JPGs already embedded theirs, since an untagged JPG is only assumed to be sRGB (#2004). |
| 2026-11-04 | minor | `.fig` and `.jam` import, #1910: an elbowed connector saved with its path keeps it. FigJam stores `connectorControlPoints`, one per run between the first and the last, each a point on its run (in the connector's parent's coordinates) with the run's axis; the first run leaves the start's side and the last arrives at the end's. They become the `ConnectorPath::Runs` a board connector reshaped by hand has (`figcraft_doc::route_along`), so a connector drawn around a layer in FigJam stays around it instead of being routed through it. Points that don't make such a path (off both axes, two runs in a row the same way, a first or last run sideways to its side or going back into its object, more runs than a hand could make) leave the connector to the router as before, and only connectors routed here count in the "follow FigCraft's own routing" note. A curved connector's `connectorBezierControlPoints` are still not read. Tests: `tail_tests::an_elbow_connector_saved_with_its_path_keeps_it`, `tail_tests::an_elbow_whose_saved_path_doesnt_fit_its_sides_is_routed_here`. |
| 2026-11-01 | patch | `.fig` and `.jam` import: a connector without a saved snapshot (elbowed and curved ones are routed here) took no stroke, so it was invisible (#1807); its line's paint, weight, cap and dashes now come from the file's generated line record, as a saved snapshot's do, and the connector's own values, when it has any, win. Test: `fig::connector_label_tests::a_routed_connector_takes_its_line_style_from_the_generated_record`. Numbers unchanged |
-| 2026-10-31 | minor | Export settings: each PNG, JPG and WebP setting has a color profile, Same as file (the default; the document's profile when it exports), sRGB or Display P3, in its advanced settings and as `colorProfile` on `export.add`, `export.update`, `file.export`, `file.exportLayers` and MCP `export`. The pixels convert to the chosen profile (out-of-gamut colors clip) and the file is tagged as before: sRGB PNG with an `sRGB` chunk, Display P3 with the generated ICC profile (and `cICP` in PNG); sRGB JPG embeds the sRGB ICC profile (#2004) and sRGB WebP stays untagged. A setting keeps its choice when its format changes; settings saved without one read as Same as file. SVG, PDF and XML show no choice and stay sRGB (PDF has no output intent yet). Numbers unchanged |
+| 2026-10-31 | minor | Export settings: each PNG, JPG and WebP setting has a color profile, Same as file (the default; the document's profile when it exports), sRGB or Display P3, in its advanced settings and as `colorProfile` on `export.add`, `export.update`, `file.export`, `file.exportLayers` and MCP `export`. The pixels convert to the chosen profile (out-of-gamut colors clip) and the file is tagged as before: sRGB PNG with an `sRGB` chunk, Display P3 with the generated ICC profile (and `cICP` in PNG); sRGB JPG and WebP stay untagged (builds before 2026-11-04; from that date sRGB JPGs embed the sRGB ICC profile, see the 2026-11-04 JPG export entry). A setting keeps its choice when its format changes; settings saved without one read as Same as file. SVG, PDF and XML show no choice and stay sRGB (PDF has no output intent yet). Numbers unchanged |
| 2026-10-31 | patch | M4: Dash and Custom strokes have a Dash cap (None, Round, Square) in the advanced stroke settings and `node.set {dashCap}`, on both ends of every dash on the canvas and in PNG, PDF and SVG. Unset, dashes keep taking the end point caps, so older files look the same; the saved file writes it only when set. Numbers unchanged |
| 2026-10-30 | minor | `.fig` import: a connector's label without a saved snapshot was skipped; now the connector imports as a frame holding its line and the label, as a connector with a saved snapshot does, the label centred on the line's middle by length (in a 200-wide box, laid out again with the fonts at hand), in the connector's fill paints or black. Its background isn't known without the snapshot and is left out. Not checked on real files. Test: `fig::tests::tail::a_labelled_connector_without_a_snapshot_keeps_its_label` |
| 2026-10-30 | minor | Pasted content row: an image the clipboard doesn't carry keeps its name and shows a placeholder that reads as missing; the paste names those layers in its message and opens the import report with its notes (#1646). Numbers unchanged |
From fbd313f4e7b9157c60f30f9e010e284df82cc5a2 Mon Sep 17 00:00:00 2001
From: Davit Matchakhelidze
Date: Sat, 7 Nov 2026 12:50:18 +0400
Subject: [PATCH 05/61] i18n(ka): Georgian for 126 new strings
---
crates/ui-egui/locales/ka.toml | 126 +++++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)
diff --git a/crates/ui-egui/locales/ka.toml b/crates/ui-egui/locales/ka.toml
index 2af58f385..8a4a70475 100644
--- a/crates/ui-egui/locales/ka.toml
+++ b/crates/ui-egui/locales/ka.toml
@@ -111,6 +111,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Along the top" = "ზედა კიდის გასწვრივ"
"Alpha" = "ალფა"
"Alphabetical" = "ანბანის მიხედვით"
+"Alt+double-click an edge of an auto layout child" = "Alt+ორმაგი დაწკაპუნება ავტოგანლაგების შვილობილი ელემენტის კიდეზე"
"Alt+drag" = "Alt+გადათრევა"
"An analytics screen on a grid: figures, charts drawn from vectors and a table" = "ანალიტიკა ბადეზე: ციფრები, დიაგრამები და ცხრილი"
"An earlier vote" = "ადრინდელი კენჭისყრა"
@@ -124,6 +125,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Another server, or one that needs its key. The usual server is set in Preferences." = "სხვა სერვერი ან სერვერი, რომელსაც გასაღები სჭირდება. ჩვეულებრივი სერვერი პარამეტრებში ირჩევა."
"Any status" = "ნებისმიერი სტატუსი"
"Anyone on your network with this code can edit the file, while this app stays open." = "თქვენს ქსელში ნებისმიერს, ვისაც ეს კოდი აქვს, შეუძლია ფაილის რედაქტირება, სანამ ეს აპი ღიაა."
+"Anyone on your network with this code can look at the file, not change it, while this app stays open." = "თქვენს ქსელში ნებისმიერს, ვისაც ეს კოდი აქვს, შეუძლია ფაილის ნახვა, მაგრამ არა შეცვლა, სანამ ეს აპი ღიაა."
"Anyone with the edit link can change the file; the view link only lets people look. The links carry their secrets: share them like passwords. `figcraft-server links` makes more and revokes them." = "რედაქტირების ბმულის მქონე ნებისმიერს შეუძლია ფაილის შეცვლა; ნახვის ბმული მხოლოდ დათვალიერების საშუალებას იძლევა. ბმულები საიდუმლო გასაღებებს შეიცავს: გააზიარეთ ისინი პაროლების მსგავსად. `figcraft-server links` ქმნის ახალ ბმულებს და აუქმებს მათ."
"Anyone with this code can edit the file." = "ნებისმიერს, ვისაც ეს კოდი აქვს, შეუძლია ფაილის რედაქტირება."
"Anyone with this code can look at the file, not change it." = "ნებისმიერს, ვისაც ეს კოდი აქვს, შეუძლია ფაილის ნახვა, მაგრამ არა შეცვლა."
@@ -158,6 +160,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Auto layout" = "ავტოგანლაგება"
"Auto rows" = "ავტომატური სტრიქონები"
"Auto width" = "ავტომატური სიგანე"
+"Auto: by the first letter with a direction" = "ავტომატური: მიმართულების მქონე პირველი ასოს მიხედვით"
"Back to the FigCraft server" = "FigCraft-ის სერვერზე დაბრუნება"
"Back to the font's value" = "შრიფტის მნიშვნელობაზე დაბრუნება"
"Back" = "უკან"
@@ -330,6 +333,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Copied as PNG" = "დაკოპირდა როგორც PNG"
"Copied as SVG" = "დაკოპირდა როგორც SVG"
"Copied as text" = "დაკოპირდა როგორც ტექსტი"
+"Copied comments for AI" = "კომენტარები დაკოპირდა AI-სთვის"
"Copied {value}" = "დაკოპირდა: {value}"
"Copy" = "კოპირება"
"Copy as" = "კოპირება როგორც"
@@ -337,6 +341,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Copy as PNG" = "კოპირება როგორც PNG"
"Copy as SVG" = "კოპირება როგორც SVG"
"Copy code" = "კოდის კოპირება"
+"Copy for AI" = "კოპირება AI-სთვის"
"Copy link" = "ბმულის კოპირება"
"Copy the {label}" = "კოპირება: {label}"
"Copy {value}" = "კოპირება: {value}"
@@ -364,8 +369,10 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Created" = "შექმნილია"
"Crop" = "ჩამოჭრა"
"Crop marks" = "ჭრის ნიშნები"
+"Ctrl+Alt+← ↑ → ↓" = "Ctrl+Alt+← ↑ → ↓"
"Ctrl+arrows" = "Ctrl+ისრები"
"Ctrl+click" = "Ctrl+დაწკაპუნება"
+"Ctrl+click a padding field" = "Ctrl+დაწკაპუნება შიდა დაშორების ველზე"
"Ctrl+scroll" = "Ctrl+გადახვევა"
"Current name" = "მიმდინარე სახელი"
"Current version" = "მიმდინარე ვერსია"
@@ -385,6 +392,47 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Decoration style" = "გაფორმების სტილი"
"Decoration" = "გაფორმება"
"Deep select" = "ღრმა მონიშვნა"
+"Delete {n} variables" = { one = "ცვლადის წაშლა: {n}", other = "ცვლადის წაშლა: {n}" }
+"Disconnected. Reconnecting…" = "კავშირი გაწყდა. ხელახლა დაკავშირება…"
+"Disconnected. Your edits stay here and sync when the connection returns. Reconnecting…" = "კავშირი გაწყდა. თქვენი ცვლილებები აქ რჩება და სინქრონიზდება, როცა კავშირი აღდგება. ხელახლა დაკავშირება…"
+"Dismiss" = "უგულებელყოფა"
+"Double-click an edge of an auto layout frame" = "ორმაგი დაწკაპუნება ავტოგანლაგების ჩარჩოს კიდეზე"
+"Edit padding on all sides" = "შიდა დაშორების რედაქტირება ყველა მხარეს"
+"Enter / Shift+Enter" = "Enter / Shift+Enter"
+"Expand the interface" = "ინტერფეისის გაშლა"
+"Hide UI" = "ინტერფეისის დამალვა"
+"Left to right" = "მარცხნიდან მარჯვნივ"
+"Move out of any group" = "ჯგუფიდან გამოტანა"
+"Move to group {group}" = "ჯგუფში გადატანა: {group}"
+"Move up or down while dragging its label" = "ზემოთ ან ქვემოთ გადაადგილება მისი იარლიყის გადათრევისას"
+"Not connected: {reason}. Your work is still in this tab." = "კავშირი არ არის: {reason}. თქვენი ნამუშევარი ისევ ამ ჩანართშია."
+"Nothing to pick: the page is empty" = "ასარჩევი არაფერია: გვერდი ცარიელია"
+"Pick select: Tab and Shift+Tab move between layers, Enter goes into one, Shift+Enter out, Space selects, Escape cancels" = "შრის არჩევა: Tab და Shift+Tab შრეებს შორის გადაადგილდება, Enter შრეში შედის, Shift+Enter გამოდის, Space მონიშნავს, Escape გააუქმებს"
+"Pick select: into a layer, out to its parent" = "შრის არჩევა: შრეში შესვლა, მშობელზე გასვლა"
+"Pick select: next or previous layer" = "შრის არჩევა: შემდეგი ან წინა შრე"
+"Pick select: select the picked layer" = "შრის არჩევა: არჩეული შრის მონიშვნა"
+"Remove all auto layout" = "ყველა ავტოგანლაგების მოხსნა"
+"Retry now" = "ახლავე ხელახლა ცდა"
+"Right to left" = "მარჯვნიდან მარცხნივ"
+"Rotate a degree (Shift: 15)" = "ერთი გრადუსით შემობრუნება (Shift: 15)"
+"Same as file ({profile})" = "როგორც ფაილში ({profile})"
+"Save a copy…" = "ასლის შენახვა…"
+"Scope: all supported properties" = "არე: ყველა მხარდაჭერილი თვისება"
+"Scope: hidden from pickers" = "არე: ამომრჩევებში დამალული"
+"Scope: only {scope}" = "არე: მხოლოდ {scope}"
+"Scrub a field faster (2x) or slower (1/2, 1/4)" = "ველის მნიშვნელობის გადათრევით ცვლა უფრო სწრაფად (2x) ან ნელა (1/2, 1/4)"
+"Scrubbing at 1/2" = "გადათრევით ცვლა: 1/2"
+"Scrubbing at 1/4" = "გადათრევით ცვლა: 1/4"
+"Scrubbing at 1x" = "გადათრევით ცვლა: 1x"
+"Scrubbing at 2x" = "გადათრევით ცვლა: 2x"
+"Selection box: switch to pick select" = "მონიშვნის ჩარჩო: შრის არჩევაზე გადართვა"
+"Set fill container" = "ზომა: კონტეინერის შევსება"
+"Set hug contents" = "ზომა: შიგთავსზე მორგება"
+"Show and move the placement crosshair (its tool chosen, nothing selected)" = "განთავსების ჯვრის ჩვენება და გადაადგილება (არჩეული ხელსაწყოთი, როცა არაფერია მონიშნული)"
+"Space" = "Space"
+"Tab or Ctrl+Space again" = "Tab ან ხელახლა Ctrl+Space"
+"Text direction" = "ტექსტის მიმართულება"
+"The bars are hidden. {shortcut} shows them again" = "ზოლები დამალულია. {shortcut} ისევ აჩვენებს მათ"
"Wrap style" = "გადატანის სტილი"
"Balance" = "დაბალანსებული"
"Pretty" = "მოწესრიგებული"
@@ -890,6 +938,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"No color styles" = "ფერის სტილები არ არის"
"No colour variables fit here." = "აქ არცერთი ფერის ცვლადი არ ერგება."
"No colour variables yet. Create them in Local variables." = "ფერის ცვლადები ჯერ არ არის. შექმენით ისინი ლოკალურ ცვლადებში."
+"No comments to copy" = "დასაკოპირებელი კომენტარები არ არის"
"No comments yet" = "კომენტარები ჯერ არ არის"
"No compatibility warnings reported" = "თავსებადობის გაფრთხილებები არ დაფიქსირებულა"
"No components yet. Select layers and press {keys}." = "კომპონენტები ჯერ არ არის. მონიშნეთ შრეები და დააჭირეთ {keys}."
@@ -1804,6 +1853,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"{name} is forgotten on this computer; the file stays on {server}" = "{name} დავიწყებულია ამ კომპიუტერზე; ფაილი {server}-ზე რჩება"
"{name} is on the server." = "{name} სერვერზეა."
"{name} is spotlighting" = "ყურადღება {name}-ზეა"
+"{name}, disconnected from its live session" = "{name}, ცოცხალ სესიასთან კავშირი გაწყვეტილია"
"{name}\nClick to apply to the selection" = "{name}\nდაწკაპეთ მონიშნულზე გამოსაყენებლად"
"{name}\nDrag onto the canvas, or click to place in the middle of the view.\nHold Alt (Option) while dropping onto an instance to swap it." = "{name}\nგადაათრიეთ ტილოზე ან დაწკაპეთ ხედის შუაში განსათავსებლად.\nინსტანსის ჩასანაცვლებლად მასზე ჩაგდებისას დააჭირეთ Alt-ს (Option)."
"{name} (from {library})" = "{name} ({library}-იდან)"
@@ -1876,10 +1926,14 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"←" = "←"
"→, Space or N" = "→, Space ან N"
"↵" = "↵"
+"↵ / ⇧↵" = "↵ / ⇧↵"
"⇥ / ⇧⇥" = "⇥ / ⇧⇥"
+"⇥ or ⌥ Space again" = "⇥ ან ხელახლა ⌥ Space"
"⌘ arrows" = "⌘ ისრები"
"⌘ click" = "⌘ დაწკაპუნება"
+"⌘ click a padding field" = "⌘ დაწკაპუნება შიდა დაშორების ველზე"
"⌘ scroll" = "⌘ გადახვევა"
+"⌥ double-click an edge of an auto layout child" = "⌥ ორმაგი დაწკაპუნება ავტოგანლაგების შვილობილი ელემენტის კიდეზე"
"⌥ drag" = "⌥ გადათრევა"
"Android Vector Drawable" = "Android Vector Drawable"
"Best effort" = "მაქსიმალური მიახლოება"
@@ -1908,6 +1962,67 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Update check is not supported in the web browser." = "ვებბრაუზერში განახლებების შემოწმება მხარდაჭერილი არ არის."
"instance swap properties whose default component was past the layer limit were skipped" = "ინსტანსის ჩანაცვლების თვისებები, რომელთა ნაგულისხმევი კომპონენტი შრეების ზღვარს მიღმა იყო, გამოტოვებულია"
"instances whose component was past the layer limit were imported as frames" = "ინსტანსები, რომელთა კომპონენტი შრეების ზღვარს მიღმა იყო, ჩარჩოებად იმპორტირდა"
+"1 year" = "1 წელი"
+"30 days" = "30 დღე"
+"90 days" = "90 დღე"
+"Allow and download" = "დაშვება და ჩამოტვირთვა"
+"Allow downloading fonts?" = "დაიშვას შრიფტების ჩამოტვირთვა?"
+"Board grid" = "დაფის ბადე"
+"Changed {date}" = "შეცვლილია: {date}"
+"Copy browser link" = "ბრაუზერის ბმულის კოპირება"
+"Couldn't reach {server} for its team list." = "{server}-იდან გუნდის სიის მიღება ვერ მოხერხდა."
+"Calculated from other variables; it follows them" = "გამოითვლება სხვა ცვლადებიდან და მათ მიჰყვება"
+"Crop image" = "გამოსახულების ჩამოჭრა"
+"Detach calculation" = "გამოთვლის გამოყოფა"
+"Download" = "ჩამოტვირთვა"
+"Downloading… {percent}%" = "ჩამოტვირთვა… {percent}%"
+"Drop to use this image" = "ჩააგდეთ ამ გამოსახულების გამოსაყენებლად"
+"Everyone who reaches this server can open these files while they are shared." = "ამ სერვერთან წვდომის მქონე ყველას შეუძლია ამ ფაილების გახსნა, სანამ ისინი გაზიარებულია."
+"FigCraft stopped because of an internal error." = "FigCraft-ის მუშაობა შიდა შეცდომის გამო შეწყდა."
+"Free fonts come from Google Fonts and Noto, through jsDelivr and GitHub. Each file is checked against the font index before it is installed into the font folder the Craft apps share. Nothing is downloaded until you allow it." = "უფასო შრიფტები Google Fonts-იდან და Noto-დან მოდის, jsDelivr-ისა და GitHub-ის გავლით. თითოეული ფაილი შრიფტების ინდექსთან მოწმდება, სანამ Craft-აპების საერთო შრიფტების საქაღალდეში დაინსტალირდება. სანამ არ დაუშვებთ, არაფერი ჩამოიტვირთება."
+"Graph paper" = "მილიმეტრიანი ქაღალდი"
+"Joining live session…" = "ცოცხალ სესიასთან შეერთება…"
+"Link copied: it opens the file in FigCraft" = "ბმული დაკოპირდა: ის ფაილს FigCraft-ში ხსნის"
+"Link copied: it opens the file in the browser" = "ბმული დაკოპირდა: ის ფაილს ბრაუზერში ხსნის"
+"Nobody shares a file there now." = "იქ ახლა არავინ აზიარებს ფაილს."
+"Past 30 days" = "ბოლო 30 დღე"
+"Past 90 days" = "ბოლო 90 დღე"
+"Past year" = "ბოლო წელი"
+"Shared by your team on {server}" = "თქვენი გუნდის მიერ {server}-ზე გაზიარებული"
+"Not now" = "ახლა არა"
+"Nothing counted yet" = "ჯერ არაფერი დათვლილა"
+"Reload the page to get back the unsaved files the browser had room for." = "განაახლეთ გვერდი, რომ დაიბრუნოთ ის შეუნახავი ფაილები, რომლებიც ბრაუზერში დაეტია."
+"Reload the page to get your unsaved files back." = "განაახლეთ გვერდი, რომ შეუნახავი ფაილები დაიბრუნოთ."
+"Reload the page to start again." = "თავიდან დასაწყებად განაახლეთ გვერდი."
+"Reset grid" = "ბადის ჩამოყრა"
+"This server doesn't count insertions" = "ეს სერვერი ჩასმებს არ ითვლის"
+"This server doesn't count styles and variables" = "ეს სერვერი სტილებსა და ცვლადებს არ ითვლის"
+"Upload from computer" = "კომპიუტერიდან ატვირთვა"
+"Strong line every" = "მუქი ხაზის ბიჯი"
+"This link opens your mail app to write a message:" = "ეს ბმული წერილის დასაწერად თქვენს საფოსტო აპს ხსნის:"
+"This server doesn't count detached instances" = "ეს სერვერი გამოყოფილ ინსტანსებს არ ითვლის"
+"Your unsaved files were too large for the browser to keep." = "თქვენი შეუნახავი ფაილები ბრაუზერისთვის შესანახად ზედმეტად დიდი იყო."
+"connector labels without a saved snapshot are centred on the line, without their background" = "შენახული სნეპშოტის გარეშე შემაერთებლის იარლიყები ხაზზე ცენტრდება, ფონის გარეშე"
+"elbowed and curved connectors without a saved path follow FigCraft's own routing" = "შენახული ტრაექტორიის გარეშე კუთხოვანი და მრუდი შემაერთებლები FigCraft-ის საკუთარ მარშრუტს მიჰყვება"
+"invalid vector region fill paint list; layer fill used" = "ვექტორული არის შევსების საღებავების სია არასწორია; გამოყენებულია შრის შევსება"
+"invalid vector region paints were skipped" = "ვექტორული არის არასწორი საღებავები გამოტოვებულია"
+"linked vector region fill styles keep resolved appearance; live style links were left out" = "ვექტორული არის მიბმული შევსების სტილები გამოთვლილ იერსახეს ინარჩუნებს; სტილების ცოცხალი კავშირები არ გადმოვიდა"
+"note or shape generated child has invalid bounds; child skipped" = "შენიშვნის ან ფიგურის გენერირებულ შვილობილ ელემენტს არასწორი საზღვრები აქვს; ელემენტი გამოტოვებულია"
+"note or shape generated child is missing its style or bounds; child skipped" = "შენიშვნის ან ფიგურის გენერირებულ შვილობილ ელემენტს სტილი ან საზღვრები აკლია; ელემენტი გამოტოვებულია"
+"note or shape generated children exceed the layer or nesting limit; remaining children skipped" = "შენიშვნის ან ფიგურის გენერირებული შვილობილი ელემენტები შრეების ან ჩადგმის ლიმიტს აჭარბებს; დანარჩენი ელემენტები გამოტოვებულია"
+"note or shape generated layout is missing or unsupported; using its outer frame" = "შენიშვნის ან ფიგურის გენერირებული განლაგება აკლია ან მხარდაუჭერელია; გამოიყენება მისი გარე ჩარჩო"
+"shape generated outline is missing or damaged; using its rectangle" = "ფიგურის გენერირებული კონტური აკლია ან დაზიანებულია; გამოიყენება მისი მართკუთხედი"
+"variable-bound vector region paints keep resolved appearance; live bindings were left out" = "ცვლადებზე მიბმული ვექტორული არის საღებავები გამოთვლილ იერსახეს ინარჩუნებს; ცოცხალი მიბმები არ გადმოვიდა"
+"vector region paint data exceeded import limits and was skipped" = "ვექტორული არის საღებავის მონაცემებმა იმპორტის ლიმიტებს გადააჭარბა და გამოტოვებულია"
+"vector region references a missing fill style; layer fill used" = "ვექტორული არე მიუთითებს შევსების არარსებულ სტილზე; გამოყენებულია შრის შევსება"
+"{count} in it now · Changed {date}" = "ახლა მასშია: {count} · შეცვლილია: {date}"
+"{insertions} · {detachments}" = "{insertions} · {detachments}"
+"{period}: {counts}" = "{period}: {counts}"
+"{used} · {detached}" = "{used} · {detached}"
+"{used} · {inserted}" = "{used} · {inserted}"
+"{n} detached" = { one = "გამოყოფილი: {n}", other = "გამოყოფილი: {n}" }
+"{n} inserted" = { one = "ჩასმული: {n}", other = "ჩასმული: {n}" }
+"⌥⌘ ← ↑ → ↓" = "⌥⌘ ← ↑ → ↓"
[commands]
"align.bottom" = "ქვემოთ სწორება"
@@ -2003,6 +2118,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"comment.next" = "შემდეგი კომენტარი"
"comment.open" = "კომენტარის გახსნა"
"comment.people" = "კომენტარებში მონაწილე ადამიანები"
+"comment.prompt" = "კომენტარების კოპირება AI-სთვის"
"comment.react" = "კომენტარზე რეაგირება"
"comment.reply" = "კომენტარზე პასუხი"
"comment.resolve" = "კომენტარის გადაწყვეტა"
@@ -2081,6 +2197,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"file.exportFramesPdf" = "ჩარჩოების PDF-ად ექსპორტირება"
"file.exportLayers" = "შრეების ექსპორტირება"
"file.exportSvg" = "მონიშნულის SVG-ად ექსპორტირება"
+"file.fontReport" = "დოკუმენტის შრიფტების ინსპექტირება"
"file.import" = "იმპორტი"
"file.moveTab" = "ჩანართის გადატანა"
"file.new" = "ახალი დიზაინის ფაილი"
@@ -2533,6 +2650,15 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"file.markSaved" = "შენახულად მარკირება"
"text.fit" = "ტექსტის ჩატევა თავის საზღვრებში"
"data.fill" = "ასლების მონაცემებით შევსება"
+"board.grid" = "დაფის ბადე"
+"font.download" = "შრიფტის ჩამოტვირთვა"
+"font.downloads" = "შრიფტების ჩამოტვირთვები"
+"image.crop" = "გამოსახულების ჩამოჭრა"
+"library.check" = "გუნდის ბიბლიოთეკების განახლებების შემოწმება"
+"board.reshape" = "შემაერთებლის ფორმის შეცვლა"
+"image.replace" = "გამოსახულების ჩანაცვლება"
+"variable.extendCollection" = "კოლექციის გაფართოება"
+"widget.hover" = "ვიჯეტზე მაჩვენებლის მიტანა"
[menu]
"bool.exclude" = "გამორიცხვა"
From 386c6c1d3eb923459111e9df0fb75c231a5c3722 Mon Sep 17 00:00:00 2001
From: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
Date: Sat, 7 Nov 2026 13:45:31 +0100
Subject: [PATCH 06/61] Reject negative and fractional index in
image.savePreset
Found while testing crates/engine/src/cmd/image.rs:239 (save_preset, `index = num(p, "index").filter(..).map(|k| k as usize)`)
Co-Authored-By: Claude Haiku 5.5
Co-Authored-By: Claude Sonnet 5.5
---
crates/engine/src/cmd/image.rs | 7 +++++--
crates/engine/src/paint_tests.rs | 10 ++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/crates/engine/src/cmd/image.rs b/crates/engine/src/cmd/image.rs
index 865e4d19a..37472b2d4 100644
--- a/crates/engine/src/cmd/image.rs
+++ b/crates/engine/src/cmd/image.rs
@@ -5,7 +5,7 @@ use figcraft_doc::{Document, ImagePreset, Node};
use serde_json::{Value, json};
use super::{CommandSpec, ok};
-use crate::params::{f64_of, get, num, req_index, req_string, req_targets, string, targets};
+use crate::params::{f64_of, get, req_index, req_string, req_targets, string, targets};
use crate::{EngineError, Result, Session, bad, spec};
pub fn specs() -> Vec {
@@ -236,7 +236,10 @@ fn save_preset(s: &mut Session, p: &Value) -> Result {
Some(v) => with_values(cmd, ImageFilters::NONE, v)?,
None => {
let stroke = strokes(cmd, p)?;
- let index = num(p, "index").filter(|k| k.is_finite() && *k >= 0.0).map(|k| k as usize);
+ let index = match get(p, "index") {
+ None | Some(Value::Null) => None,
+ Some(_) => Some(req_index(cmd, p, "index")?),
+ };
let doc = s.doc()?;
targets(s, p)
.iter()
diff --git a/crates/engine/src/paint_tests.rs b/crates/engine/src/paint_tests.rs
index 1e97b05ca..00ada8d79 100644
--- a/crates/engine/src/paint_tests.rs
+++ b/crates/engine/src/paint_tests.rs
@@ -135,6 +135,16 @@ fn image_adjust_refuses_what_it_cannot_do() {
assert_eq!(s.execute("image.adjust", &json!({"ids": [plain, r], "index": 1, "preset": "vivid"})).unwrap()["changed"], 1);
}
+#[test]
+fn save_preset_rejects_bad_index() {
+ let mut s = Session::new();
+ let r = image_rect(&mut s);
+ assert!(s.execute("image.savePreset", &json!({"ids": [r], "name": "B", "index": 0})).is_err());
+ assert!(s.execute("image.savePreset", &json!({"ids": [r], "name": "B", "index": -1})).is_err(), "negative index accepted");
+ assert!(s.execute("image.savePreset", &json!({"ids": [r], "name": "B", "index": 1.5})).is_err(), "fractional index accepted");
+ assert!(s.execute("image.savePreset", &json!({"ids": [r], "name": "B", "index": 1})).is_ok());
+}
+
#[test]
fn saved_image_presets() {
let mut s = Session::new();
From b33da8a7b0f3dd92d0a2a88ec22ab72f9d028a1d Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 11:52:52 -0500
Subject: [PATCH 07/61] Ellipse: an unsliced ellipse edits as four anchor
points, not six (#2080)
A whole ellipse and each ring contour are built as four cubics through the extremes instead of a tolerance-subdivided arc. Sliced ellipses are unchanged.
Co-Authored-By: Claude Fable 5.1
---
crates/geom/src/lib.rs | 23 ++++++++++++++++-----
crates/geom/src/tests.rs | 43 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 60 insertions(+), 6 deletions(-)
diff --git a/crates/geom/src/lib.rs b/crates/geom/src/lib.rs
index a775a4170..f290882d8 100644
--- a/crates/geom/src/lib.rs
+++ b/crates/geom/src/lib.rs
@@ -472,15 +472,28 @@ pub fn ellipse(width: f64, height: f64, start: f64, sweep: f64, inner: f64) -> B
let mut path = BezPath::new();
// A whole turn as an arc with these radii: kurbo's `Ellipse` recovers its radii from an
// affine map, which overflows to infinity for radii near f64's limit (and infinite cubics).
- let whole = |rx: f64, ry: f64| kurbo::Arc::new(c, (rx, ry), 0.0, TAU, 0.0);
+ // Four cubics through the right, bottom, left and top extremes (clockwise from 3 o'clock),
+ // the same four anchors an ellipse has when edited as a vector; an arc subdivided by
+ // tolerance would give five or six.
+ let whole = |rx: f64, ry: f64| {
+ const K: f64 = 0.552_284_749_830_793_4;
+ let (kx, ky) = (rx * K, ry * K);
+ let mut p = BezPath::new();
+ p.move_to(c + Vec2::new(rx, 0.0));
+ p.curve_to(c + Vec2::new(rx, ky), c + Vec2::new(kx, ry), c + Vec2::new(0.0, ry));
+ p.curve_to(c + Vec2::new(-kx, ry), c + Vec2::new(-rx, ky), c + Vec2::new(-rx, 0.0));
+ p.curve_to(c + Vec2::new(-rx, -ky), c + Vec2::new(-kx, -ry), c + Vec2::new(0.0, -ry));
+ p.curve_to(c + Vec2::new(kx, -ry), c + Vec2::new(rx, -ky), c + Vec2::new(rx, 0.0));
+ p
+ };
if full && inner <= 0.0 {
- return whole(rx, ry).to_path(tol);
+ return whole(rx, ry);
}
if full {
// A ring: outer clockwise, inner counter-clockwise.
- path.extend(whole(rx, ry).path_elements(tol));
- let inner_path = whole(rx * inner, ry * inner).to_path(tol);
- path.extend(inner_path.reverse_subpaths());
+ path.extend(whole(rx, ry).elements().iter().copied());
+ let inner_path = whole(rx * inner, ry * inner);
+ path.extend(inner_path.reverse_subpaths().elements().iter().copied());
return path;
}
let outer = kurbo::Arc::new(c, (rx, ry), start, sweep, 0.0);
diff --git a/crates/geom/src/tests.rs b/crates/geom/src/tests.rs
index 459b2b101..909a3c475 100644
--- a/crates/geom/src/tests.rs
+++ b/crates/geom/src/tests.rs
@@ -263,7 +263,7 @@ fn smoothed_polygon_smooths_every_corner() {
#[test]
fn ellipse_ring_area() {
let full = area(&ellipse(100.0, 100.0, 0.0, TAU, 0.0));
- assert!((full - PI * 2500.0).abs() < 2.0);
+ assert!((full - PI * 2500.0).abs() < 5.0, "{full}");
let ring = ellipse(100.0, 100.0, 0.0, TAU, 0.5);
// Winding area of a ring with a reversed inner contour: outer - inner.
let a = ring.area().abs();
@@ -321,6 +321,47 @@ fn reverse_subpaths_preserves_open_and_closed() {
assert!(matches!(r.elements().last(), Some(kurbo::PathEl::ClosePath)), "{:?}", r.elements());
}
+fn cubics(path: &BezPath) -> Vec {
+ path.segments()
+ .filter_map(|s| match s {
+ kurbo::PathSeg::Cubic(c) => Some(c),
+ _ => None,
+ })
+ .collect()
+}
+
+#[test]
+fn a_whole_ellipse_is_four_cubics_through_the_extremes() {
+ for (w, h) in [(100.0, 100.0), (200.0, 60.0), (3.0, 900.0)] {
+ let segs = cubics(&ellipse(w, h, 0.0, TAU, 0.0));
+ assert_eq!(segs.len(), 4, "{w}x{h}");
+ let (rx, ry) = (w / 2.0, h / 2.0);
+ let want = [Point::new(rx, h), Point::new(0.0, ry), Point::new(rx, 0.0), Point::new(w, ry)];
+ for (i, s) in segs.iter().enumerate() {
+ assert!((s.p3 - want[i]).hypot() < 1e-9, "{w}x{h}: anchor {i} is {:?}", s.p3);
+ // Handle length is 0.5523 of the radius along the tangent.
+ let k = 0.552_284_749_830_793_4;
+ let (r_along, r_across) = if i % 2 == 0 { (ry, rx) } else { (rx, ry) };
+ let _ = r_across;
+ assert!(((s.p1 - s.p0).hypot() - k * r_along).abs() < 1e-9, "{w}x{h}: handle {i}");
+ }
+ }
+}
+
+#[test]
+fn a_whole_ring_is_four_cubics_per_contour() {
+ let segs = cubics(&ellipse(100.0, 100.0, 0.0, TAU, 0.5));
+ assert_eq!(segs.len(), 8);
+}
+
+#[test]
+fn a_sliced_ellipse_still_builds_its_arc() {
+ let pie = ellipse(100.0, 100.0, 0.0, PI, 0.0);
+ assert!(!cubics(&pie).is_empty());
+ assert!(matches!(pie.elements().last(), Some(kurbo::PathEl::ClosePath)));
+ assert!((area(&pie) - PI * 1250.0).abs() < 2.0);
+}
+
#[test]
fn a_huge_ellipse_arc_is_a_few_cubics() {
let big = ellipse(1e300, 1e300, 0.3, 2.0, 0.5);
From 4118be890c2e15c9183293104a8a7e20e77e25b7 Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 12:42:44 -0500
Subject: [PATCH 08/61] Ellipse: the four-cubic contour is closed, and the band
test allows apex antialiasing (#2080)
The band test compared row 10, the ellipse top, where the cubic now ends exactly at its level extreme; 8 pixels antialias slightly differently between a short band and the whole view. The row mean limit now grows by 0.05 per such pixel; whole-row artifacts still fail.
Co-Authored-By: Claude Fable 5.1
---
crates/geom/src/lib.rs | 1 +
crates/render/src/band_tests.rs | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/crates/geom/src/lib.rs b/crates/geom/src/lib.rs
index f290882d8..41669488f 100644
--- a/crates/geom/src/lib.rs
+++ b/crates/geom/src/lib.rs
@@ -484,6 +484,7 @@ pub fn ellipse(width: f64, height: f64, start: f64, sweep: f64, inner: f64) -> B
p.curve_to(c + Vec2::new(-kx, ry), c + Vec2::new(-rx, ky), c + Vec2::new(-rx, 0.0));
p.curve_to(c + Vec2::new(-rx, -ky), c + Vec2::new(-kx, -ry), c + Vec2::new(0.0, -ry));
p.curve_to(c + Vec2::new(kx, -ry), c + Vec2::new(rx, -ky), c + Vec2::new(rx, 0.0));
+ p.close_path();
p
};
if full && inner <= 0.0 {
diff --git a/crates/render/src/band_tests.rs b/crates/render/src/band_tests.rs
index b9a7bfbcc..e01fad5d7 100644
--- a/crates/render/src/band_tests.rs
+++ b/crates/render/src/band_tests.rs
@@ -83,7 +83,8 @@ fn bands_match_one_piece_rendering() {
assert_eq!((banded.width(), banded.height()), (one.width(), one.height()));
for (y, (mean, off)) in row_diffs(&one, &banded).into_iter().enumerate() {
assert!(
- mean < 0.25 && off * 20 <= v.width as usize,
+ // Each pixel antialiased differently (the level top of an ellipse, where a cubic ends at its extreme) may add up to 0.05 to the row's mean.
+ mean < 0.25 + 0.05 * off as f64 && off * 20 <= v.width as usize,
"scale {scale}, {bands} bands: row {y} differs ({off} pixels, {mean:.2} on average)"
);
}
From 0774e44fa8c4218821a300e341237cfcb071f822 Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 13:41:25 -0500
Subject: [PATCH 09/61] Render band test: only small antialiasing differences
are forgiven, a real band artifact still fails (#2080)
Pixels whose largest channel differs by 24 or less are noise and left out of the row mean, which keeps its original 0.25 limit; the differing-pixel limit is unchanged. A unit test shows a 44-pixel row off by 60 still fails.
Co-Authored-By: Claude Fable 5.1
---
crates/render/src/band_tests.rs | 68 ++++++++++++++++++++++++---------
1 file changed, 51 insertions(+), 17 deletions(-)
diff --git a/crates/render/src/band_tests.rs b/crates/render/src/band_tests.rs
index e01fad5d7..4ea9fb1f6 100644
--- a/crates/render/src/band_tests.rs
+++ b/crates/render/src/band_tests.rs
@@ -56,20 +56,58 @@ fn view(scale: f64) -> View {
View { origin: (-10.0, -10.0), scale, width: (440.0 * scale) as u32, height: (240.0 * scale) as u32 }
}
-/// Per row: the mean channel difference and how many pixels differ by more than 2. A band artifact
-/// differs along a whole row; edge antialiasing may differ in a few pixels per edge (a curve
-/// clipped at a band's edge rasterises a hair differently, most where it runs nearly level).
+/// A pixel whose largest channel differs by at most this much between two renders is edge
+/// antialiasing noise (a curve clipped at a band's edge rasterises a hair differently, most where
+/// it runs level, as at the top of an ellipse), not a band artifact.
+const NOISE: u8 = 24;
+
+/// One row of two renders: the mean channel difference over the pixels that are not noise (see
+/// `NOISE`), and how many pixels differ by more than 2 at all. A band artifact differs along a
+/// whole row, by more than noise.
+fn row_stats(x: &[u8], y: &[u8]) -> (f64, usize) {
+ let mut sum = 0.0;
+ let mut off = 0;
+ for (p, q) in x.chunks(4).zip(y.chunks(4)) {
+ let worst = p.iter().zip(q).map(|(c, d)| c.abs_diff(*d)).max().unwrap_or(0);
+ if worst > 2 {
+ off += 1;
+ }
+ if worst > NOISE {
+ sum += p.iter().zip(q).map(|(c, d)| f64::from(c.abs_diff(*d))).sum::();
+ }
+ }
+ (sum / x.len().max(1) as f64, off)
+}
+
fn row_diffs(a: &Pixmap, b: &Pixmap) -> Vec<(f64, usize)> {
let row = a.width() as usize * 4;
- a.data()
- .chunks(row)
- .zip(b.data().chunks(row))
- .map(|(x, y)| {
- let sum: f64 = x.iter().zip(y).map(|(p, q)| f64::from(p.abs_diff(*q))).sum();
- let off = x.chunks(4).zip(y.chunks(4)).filter(|(p, q)| p.iter().zip(*q).any(|(c, d)| c.abs_diff(*d) > 2)).count();
- (sum / row as f64, off)
- })
- .collect()
+ a.data().chunks(row).zip(b.data().chunks(row)).map(|(x, y)| row_stats(x, y)).collect()
+}
+
+/// Whether a row passes: the original mean limit over non-noise pixels, and at most a twentieth
+/// of the row differing at all.
+fn row_ok(mean: f64, off: usize, width: usize) -> bool {
+ mean < 0.25 && off * 20 <= width
+}
+
+#[test]
+fn a_real_band_artifact_fails_but_edge_noise_passes() {
+ let width = 880; // scale 2
+ let flat = vec![100u8; width * 4];
+ // 44 pixels differing by 60 per channel: under the old mean allowance, but a real artifact.
+ let mut artifact = flat.clone();
+ for px in artifact.chunks_mut(4).take(44) {
+ px.iter_mut().for_each(|c| *c += 60);
+ }
+ let (mean, off) = row_stats(&flat, &artifact);
+ assert!(!row_ok(mean, off, width), "{mean} {off}");
+ // 8 pixels differing by 16 (the ellipse top's antialiasing): forgiven.
+ let mut noise = flat.clone();
+ for px in noise.chunks_mut(4).take(8) {
+ px.iter_mut().for_each(|c| *c += 16);
+ }
+ let (mean, off) = row_stats(&flat, &noise);
+ assert!(row_ok(mean, off, width), "{mean} {off}");
}
#[test]
@@ -82,11 +120,7 @@ fn bands_match_one_piece_rendering() {
let banded = render_bands(&d, p, &v, &Options::default(), bands).unwrap();
assert_eq!((banded.width(), banded.height()), (one.width(), one.height()));
for (y, (mean, off)) in row_diffs(&one, &banded).into_iter().enumerate() {
- assert!(
- // Each pixel antialiased differently (the level top of an ellipse, where a cubic ends at its extreme) may add up to 0.05 to the row's mean.
- mean < 0.25 + 0.05 * off as f64 && off * 20 <= v.width as usize,
- "scale {scale}, {bands} bands: row {y} differs ({off} pixels, {mean:.2} on average)"
- );
+ assert!(row_ok(mean, off, v.width as usize), "scale {scale}, {bands} bands: row {y} differs ({off} pixels, {mean:.2} on average)");
}
}
}
From 97f086e091d712548a3415bceb344284b62302b8 Mon Sep 17 00:00:00 2001
From: dotCooCoo
Date: Sat, 7 Nov 2026 16:36:59 -0800
Subject: [PATCH 10/61] Docs: the Display P3 export sentence names RGB PDF and
says CMYK PDF ends as DeviceCMYK
The colour profile paragraph in docs/mcp.md said SVG and PDF export
Display P3 files converted to sRGB, without the RGB qualifier the export
tool text now carries. It now says SVG and RGB PDF convert to sRGB, and
PDF with `cmyk` converts to sRGB the same way and then to DeviceCMYK.
The comment above the export match in file.rs says the same.
---
crates/engine/src/cmd/file.rs | 3 ++-
docs/mcp.md | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/crates/engine/src/cmd/file.rs b/crates/engine/src/cmd/file.rs
index e52960d43..ca83292ec 100644
--- a/crates/engine/src/cmd/file.rs
+++ b/crates/engine/src/cmd/file.rs
@@ -372,7 +372,8 @@ pub fn export_file(doc: &Document, ids: &[NodeId], setting: &ExportSetting, scal
&& !setting.include_bounding_box
&& !ids.iter().any(|i| doc.node(*i).is_some_and(|n| matches!(n.kind, NodeKind::Slice)));
match setting.format {
- // SVG and PDF colours are sRGB: a Display P3 file exports converted (out-of-gamut colours clip).
+ // SVG and RGB PDF colors are sRGB: a Display P3 file exports converted (out-of-gamut colours clip).
+ // PDF with `cmyk` converts from those sRGB colors to DeviceCMYK.
ExportFormat::Svg => {
let opts = figcraft_svg::SvgOptions {
include_ids: setting.svg_id_attribute,
diff --git a/docs/mcp.md b/docs/mcp.md
index 11945a76c..5b4efa3f7 100644
--- a/docs/mcp.md
+++ b/docs/mcp.md
@@ -255,8 +255,8 @@ Or in a project's `.mcp.json`:
profile into the file's space: an embedded ICC profile (PNG, JPG, WebP, TIFF; RGB or grey), a PNG's
`sRGB` / `gAMA` / `cHRM` chunks, else sRGB (also for CMYK or damaged profiles); `image.place` reports
the profile's name as `imageProfile` (`null`: none usable, taken as sRGB). PNG exports are tagged (`sRGB` chunk, or a Display P3 ICC profile plus
- `cICP`), JPG embeds the ICC profile for sRGB and for Display P3, WebP embeds it for Display P3 only (sRGB WebP is untagged), and SVG and PDF export Display P3 files
- converted to sRGB (out-of-gamut colours clip). The app's canvas shows sRGB (P3 colours outside sRGB clip on screen):
+ `cICP`), JPG embeds the ICC profile for sRGB and for Display P3, WebP embeds it for Display P3 only (sRGB WebP is untagged), and SVG and RGB PDF export Display P3 files
+ converted to sRGB (out-of-gamut colours clip). PDF with `cmyk` converts them to sRGB the same way and then to DeviceCMYK. The app's canvas shows sRGB (P3 colours outside sRGB clip on screen):
`view.proofSrgb {on?}` (View ▸ Soft-proof sRGB) stripes those pixels so `screenshot {window:
true}` shows where they are (after the next canvas render), and the colour picker says Outside
sRGB for such a colour.
From 0c1fb11c4800d98090c00b4e531cec81e12507b0 Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 19:37:16 -0500
Subject: [PATCH 11/61] Render band test: the comments say what row_stats
divides by and what the artifact case measures (#2080)
row_stats sums the differences of the pixels above noise and divides by the whole row's channel count; the doc now says so. The artifact case changes only the colour channels, so its mean is 2.25, which the earlier allowance let through, and its comment now says it fails on the mean while its count stays within a twentieth of the row.
Co-Authored-By: Claude Opus 5.5
Model-Effort: Opus 5.5 drove and wrote at high; no brief
---
crates/render/src/band_tests.rs | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/crates/render/src/band_tests.rs b/crates/render/src/band_tests.rs
index 4ea9fb1f6..9fcf29f20 100644
--- a/crates/render/src/band_tests.rs
+++ b/crates/render/src/band_tests.rs
@@ -61,9 +61,10 @@ fn view(scale: f64) -> View {
/// it runs level, as at the top of an ellipse), not a band artifact.
const NOISE: u8 = 24;
-/// One row of two renders: the mean channel difference over the pixels that are not noise (see
-/// `NOISE`), and how many pixels differ by more than 2 at all. A band artifact differs along a
-/// whole row, by more than noise.
+/// One row of two renders: the channel differences of the pixels above noise (see `NOISE`) summed
+/// and divided by the whole row's channel count, so noise pixels add nothing but still count in
+/// the denominator; and how many pixels differ by more than 2 at all. A band artifact differs along
+/// a whole row, by more than noise.
fn row_stats(x: &[u8], y: &[u8]) -> (f64, usize) {
let mut sum = 0.0;
let mut off = 0;
@@ -84,8 +85,8 @@ fn row_diffs(a: &Pixmap, b: &Pixmap) -> Vec<(f64, usize)> {
a.data().chunks(row).zip(b.data().chunks(row)).map(|(x, y)| row_stats(x, y)).collect()
}
-/// Whether a row passes: the original mean limit over non-noise pixels, and at most a twentieth
-/// of the row differing at all.
+/// Whether a row passes: the original 0.25 limit on the mean from `row_stats`, and at most a
+/// twentieth of the row differing at all.
fn row_ok(mean: f64, off: usize, width: usize) -> bool {
mean < 0.25 && off * 20 <= width
}
@@ -94,10 +95,13 @@ fn row_ok(mean: f64, off: usize, width: usize) -> bool {
fn a_real_band_artifact_fails_but_edge_noise_passes() {
let width = 880; // scale 2
let flat = vec![100u8; width * 4];
- // 44 pixels differing by 60 per channel: under the old mean allowance, but a real artifact.
+ // 44 pixels whose colour channels differ by 60 (alpha unchanged): the mean is
+ // 44 * 3 * 60 / (880 * 4) = 2.25, which the earlier `0.25 + 0.05 * off` allowance (2.45 here)
+ // let through; the count, 44, is within a twentieth of the row. A real artifact, so it fails
+ // on the mean now.
let mut artifact = flat.clone();
for px in artifact.chunks_mut(4).take(44) {
- px.iter_mut().for_each(|c| *c += 60);
+ px.iter_mut().take(3).for_each(|c| *c += 60);
}
let (mean, off) = row_stats(&flat, &artifact);
assert!(!row_ok(mean, off, width), "{mean} {off}");
From f5a52ea528e3e597e753f458d4fde92422b4583c Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 21:20:56 -0500
Subject: [PATCH 12/61] Components: several layers selected, the component
button offers Create multiple components (#2088)
With two or more layers selected, the Design panel header's component button opens a menu with Create component and Create multiple components, as Figma's does; one layer keeps the plain button. Headless UI tests cover both cases (three frames: menu order, names kept, all selected, one undo; one frame: plain click), and an engine test pins createMultiple's names, positions and single undo step.
Co-Authored-By: Claude Sonnet 5.5
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
---
.../engine/src/components_behaviour_tests.rs | 33 +++++
.../ui-egui/src/create_multiple_menu_tests.rs | 115 ++++++++++++++++++
crates/ui-egui/src/lib.rs | 2 +
crates/ui-egui/src/panels/right.rs | 13 ++
docs/components-parity.md | 5 +-
5 files changed, 166 insertions(+), 2 deletions(-)
create mode 100644 crates/ui-egui/src/create_multiple_menu_tests.rs
diff --git a/crates/engine/src/components_behaviour_tests.rs b/crates/engine/src/components_behaviour_tests.rs
index 3458b0b22..198151768 100644
--- a/crates/engine/src/components_behaviour_tests.rs
+++ b/crates/engine/src/components_behaviour_tests.rs
@@ -7,6 +7,7 @@
use serde_json::{Value, json};
use crate::Session;
+use crate::automation::params::id_of;
use crate::components::tests::{chars, copy_of, ex, fill, healthy, idv, kids, node};
use figcraft_doc::*;
@@ -1000,3 +1001,35 @@ fn deleting_a_layer_inside_an_instance_hides_it_instead() {
s.execute("edit.delete", &json!({"ids": [k.inst]})).unwrap();
assert!(s.doc().unwrap().node(k.inst).is_none());
}
+
+/// Create multiple components (#2088): each selected layer becomes its own component in place,
+/// keeping its name and position; all stay selected and one undo reverts them all.
+#[test]
+fn create_multiple_components_keeps_names_and_places_and_is_one_undo_step() {
+ let mut s = Session::new();
+ let mut frames = Vec::new();
+ for (i, name) in ["Card", "Badge", "Tile"].into_iter().enumerate() {
+ let x = 150.0 * i as f64;
+ let v = s.execute("frame.create", &json!({"x": x, "y": 20, "width": 100, "height": 60})).unwrap();
+ let f = id_of(&v["id"]).unwrap();
+ s.execute("object.rename", &json!({"ids": [f], "name": name})).unwrap();
+ frames.push(f);
+ }
+ let before = undo_len(&s);
+ let out = s.execute("component.createMultiple", &json!({"ids": frames})).unwrap();
+ assert_eq!(undo_len(&s), before + 1, "one undo step");
+ let made: Vec = out["ids"].as_array().unwrap().iter().filter_map(id_of).collect();
+ assert_eq!(made.len(), 3);
+ assert_eq!(s.selection(), made, "all of them stay selected");
+ let doc = s.doc().unwrap();
+ for (i, (c, name)) in made.iter().zip(["Card", "Badge", "Tile"]).enumerate() {
+ let n = doc.node(*c).unwrap();
+ assert!(matches!(n.kind, NodeKind::Component { .. }), "{name} is a component");
+ assert_eq!(n.name, name);
+ let b = doc.world_bounds(*c).unwrap();
+ assert_eq!((b.x0, b.y0), (150.0 * i as f64, 20.0), "{name} stays in place");
+ }
+ s.undo().unwrap();
+ let doc = s.doc().unwrap();
+ assert!(frames.iter().all(|f| matches!(doc.node(*f).map(|n| &n.kind), Some(NodeKind::Frame))), "one undo restores the frames");
+}
diff --git a/crates/ui-egui/src/create_multiple_menu_tests.rs b/crates/ui-egui/src/create_multiple_menu_tests.rs
new file mode 100644
index 000000000..a8c2b3a56
--- /dev/null
+++ b/crates/ui-egui/src/create_multiple_menu_tests.rs
@@ -0,0 +1,115 @@
+//! With two or more layers selected the Design panel's component button opens a menu (Create
+//! component, Create multiple components); one layer keeps the plain click (#2088): drawn headless.
+
+use egui::accesskit::Node;
+use egui::{Event, PointerButton, Pos2, Rect, pos2};
+use figcraft_doc::{NodeId, NodeKind};
+use figcraft_engine::Session;
+use serde_json::json;
+
+use crate::layers_drag_tests::Ui;
+
+const NAMES: [&str; 3] = ["Card", "Badge", "Tile"];
+
+fn id(v: serde_json::Value) -> NodeId {
+ serde_json::from_value(v["id"].clone()).unwrap()
+}
+
+/// Frames named `NAMES[..n]`, all selected, headless.
+fn frames(n: usize) -> (Ui, Vec) {
+ let mut s = Session::new();
+ let mut ids = Vec::new();
+ for (i, name) in NAMES.into_iter().take(n).enumerate() {
+ let f = id(s.execute("frame.create", &json!({"x": 150 * i, "y": 0, "width": 100, "height": 60})).unwrap());
+ s.execute("object.rename", &json!({"ids": [f], "name": name})).unwrap();
+ ids.push(f);
+ }
+ s.execute("select.set", &json!({"ids": ids})).unwrap();
+ let mut u = Ui::new(s);
+ u.frame(vec![]);
+ (u, ids)
+}
+
+fn nodes(u: &mut Ui) -> Vec {
+ u.ctx.enable_accesskit();
+ u.frame(vec![]);
+ u.frame_output(vec![]).platform_output.accesskit_update.expect("an AccessKit update").nodes.into_iter().map(|(_, n)| n).collect()
+}
+
+fn bounds(n: &Node) -> Rect {
+ let b = n.bounds().unwrap();
+ Rect::from_min_max(pos2(b.x0 as f32, b.y0 as f32), pos2(b.x1 as f32, b.y1 as f32))
+}
+
+fn click(u: &mut Ui, at: Pos2) {
+ for pressed in [true, false] {
+ u.frame(vec![
+ Event::PointerMoved(at),
+ Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Default::default() },
+ ]);
+ }
+}
+
+fn settle(u: &mut Ui) {
+ for _ in 0..10 {
+ u.frame(vec![]);
+ }
+}
+
+/// The header's component button (its tooltip may carry the shortcut).
+fn click_button(u: &mut Ui) {
+ let all = nodes(u);
+ let button = all.iter().find(|n| n.label().is_some_and(|l| l.starts_with("Create component"))).expect("the Design panel's component button");
+ click(u, bounds(button).center());
+ settle(u);
+}
+
+fn undo_len(u: &Ui) -> usize {
+ u.app.session.ds().unwrap().history.undo.len()
+}
+
+#[test]
+fn several_layers_open_a_menu_and_create_multiple_components_in_one_undo_step() {
+ let (mut u, ids) = frames(3);
+ let before = undo_len(&u);
+ click_button(&mut u);
+ assert_eq!(undo_len(&u), before, "opening the menu changes nothing");
+ let all = nodes(&mut u);
+ // The menu's rows share an x with Create multiple components: exactly these two, in this order.
+ let multiple = all.iter().find(|n| n.label() == Some("Create multiple components")).expect("the menu's second entry");
+ let mb = bounds(multiple);
+ let mut rows: Vec<(f32, String)> = all
+ .iter()
+ .filter(|n| n.label().is_some() && (bounds(n).min.x - mb.min.x).abs() < 1.0 && (bounds(n).min.y - mb.min.y).abs() < 60.0)
+ .map(|n| (bounds(n).min.y, n.label().unwrap_or("").to_owned()))
+ .collect();
+ rows.sort_by(|a, b| a.0.total_cmp(&b.0));
+ let labels: Vec<&str> = rows.iter().map(|(_, l)| l.as_str()).collect();
+ assert_eq!(labels, ["Create component", "Create multiple components"], "the menu's entries");
+ click(&mut u, bounds(multiple).center());
+ settle(&mut u);
+ let sel = u.app.session.selection();
+ assert_eq!(sel.len(), 3);
+ let doc = u.app.session.doc().unwrap();
+ let names: Vec<&str> = sel.iter().map(|i| doc.node(*i).unwrap().name.as_str()).collect();
+ assert_eq!(names, NAMES);
+ assert!(sel.iter().all(|i| matches!(doc.node(*i).unwrap().kind, NodeKind::Component { .. })));
+ assert_eq!(undo_len(&u), before + 1);
+ u.app.session.undo().unwrap();
+ let doc = u.app.session.doc().unwrap();
+ assert!(ids.iter().all(|i| matches!(doc.node(*i).map(|n| &n.kind), Some(NodeKind::Frame))), "one undo reverts all three");
+}
+
+#[test]
+fn one_layer_keeps_the_plain_button() {
+ let (mut u, ids) = frames(1);
+ click_button(&mut u);
+ let all = nodes(&mut u);
+ assert!(all.iter().all(|n| n.label() != Some("Create multiple components")), "no menu opens");
+ let sel = u.app.session.selection();
+ assert_eq!(sel.len(), 1);
+ let doc = u.app.session.doc().unwrap();
+ assert!(matches!(doc.node(sel[0]).unwrap().kind, NodeKind::Component { .. }));
+ assert_eq!(doc.node(sel[0]).unwrap().name, NAMES[0]);
+ let _ = ids;
+}
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index 11c96da74..b47f05fbb 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -88,6 +88,8 @@ mod context_menu_tests;
#[cfg(test)]
mod corner_individual_tests;
#[cfg(test)]
+mod create_multiple_menu_tests;
+#[cfg(test)]
mod crop_image_tests;
#[cfg(test)]
mod cursors_tests;
diff --git a/crates/ui-egui/src/panels/right.rs b/crates/ui-egui/src/panels/right.rs
index bba57c778..b408491a2 100644
--- a/crates/ui-egui/src/panels/right.rs
+++ b/crates/ui-egui/src/panels/right.rs
@@ -530,6 +530,19 @@ fn header(app: &mut FigApp, ui: &mut Ui, doc: &Document, sel: &[NodeId]) {
ui.close();
}
});
+ } else if cmd == "component.create" && sel.len() > 1 {
+ // Several layers: the button opens a menu, as Figma's does (#2088). One layer keeps the plain click.
+ // TODO: "Create component set" is the third entry, to add once its naming is measured.
+ menu_popup(&bresp).width(220.0).show(|ui| {
+ let multiple = crate::i18n::command("component.createMultiple", "Create multiple components");
+ for (c, label) in [("component.create", tr("Create component")), ("component.createMultiple", &multiple)] {
+ let key = crate::shortcuts::shortcut(c).unwrap_or("");
+ if menu_icon_item(ui, None, None, label, key) {
+ app.run(c, json!({}));
+ ui.close();
+ }
+ }
+ });
} else if bresp.clicked() {
app.run(cmd, json!({}));
}
diff --git a/docs/components-parity.md b/docs/components-parity.md
index d6b1ee5e6..3ecdae292 100644
--- a/docs/components-parity.md
+++ b/docs/components-parity.md
@@ -1,6 +1,6 @@
# Components, variants, styles and variables parity
-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-06 · **Change:** minor (the Local variables window selects several variables (click, Shift+click for a range, Cmd/Ctrl+click to toggle, Escape to clear) and delete, move to a group and scope act on the selected local variables in one undo step (#2002); text styles carry paragraph spacing and indent, the list style and the OpenType features, as the Supported in text styles table of Create and apply text styles says (#1829); a layer's effect binding takes only a field its effect has; Go to main component on an instance of a library component opens the library file in a tab and selects the main there; glass effects take variables; Delete on a layer inside an instance hides it as an override instead of being refused, as the help center says: "Figma will only toggle the layer's visibility instead of removing it"; library analytics list how many layers and files use each style and variable; SwiftUI and Compose code names a bound variable by its iOS or Android code syntax; library analytics count insertions and show insertions and detachments over the past 30 days, 90 days or year; a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; a typed or stored variable, collection or mode id names only the object with that id (#1613); colour variables can be calculated from other colours per mode — `{alpha}` replaces a colour's alpha, `{mix}` blends two — and follow them (#1280); stored variable and collection references keep their identity when another object is named like their id (follow-up to #1542); a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; opening a file contacts no team library server it names until you check it (#1097); an explicit variables file path (`variable.import`, the `variables` of `file.open` and `file.import`) is refused past 256 MiB or when it isn't a regular file, as the sibling `variables.json` already was (part of #1114); component properties keep the order they were made in when one is renamed, and Make slot asks for the slot's name first (#1536, #1537); components can't contain their own instances, directly or through others (#1084); the instance-swap menus have a search field (#1338); an instance-swap property's default menu scrolls (#1338); variables on a text style's fields from the style editor; instance-swap properties in the component playground; duplicating or Alt-dragging a main component makes an instance of it (#892); a bound colour variable's alpha applies once (#802); variables import reads `variables` outside `meta` and warns when it imports none (#790); variant properties reorder by drag; library files saved right after a read are read again; Hide when publishing note corrected; size and resizing overrides of layers inside instances (#731); variables export in the browser as a download; core editor leftovers: component playground, variables inside styles; layers and assets panels behaviour suite and fixes; extended collections tail; styles and variables behaviour suite and fixes; components behaviour suite and fixes; team libraries on the server, library usage and swapping a library; extended collections, variables import/export, gradient stops and variant properties bound to variables) · **Target:** Figma Design (desktop app 126.10.7)
+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-07 · **Change:** minor (with several layers selected the Design panel header's component button offers Create multiple components (#2088); the Local variables window selects several variables (click, Shift+click for a range, Cmd/Ctrl+click to toggle, Escape to clear) and delete, move to a group and scope act on the selected local variables in one undo step (#2002); text styles carry paragraph spacing and indent, the list style and the OpenType features, as the Supported in text styles table of Create and apply text styles says (#1829); a layer's effect binding takes only a field its effect has; Go to main component on an instance of a library component opens the library file in a tab and selects the main there; glass effects take variables; Delete on a layer inside an instance hides it as an override instead of being refused, as the help center says: "Figma will only toggle the layer's visibility instead of removing it"; library analytics list how many layers and files use each style and variable; SwiftUI and Compose code names a bound variable by its iOS or Android code syntax; library analytics count insertions and show insertions and detachments over the past 30 days, 90 days or year; a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; a typed or stored variable, collection or mode id names only the object with that id (#1613); colour variables can be calculated from other colours per mode — `{alpha}` replaces a colour's alpha, `{mix}` blends two — and follow them (#1280); stored variable and collection references keep their identity when another object is named like their id (follow-up to #1542); a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; opening a file contacts no team library server it names until you check it (#1097); an explicit variables file path (`variable.import`, the `variables` of `file.open` and `file.import`) is refused past 256 MiB or when it isn't a regular file, as the sibling `variables.json` already was (part of #1114); component properties keep the order they were made in when one is renamed, and Make slot asks for the slot's name first (#1536, #1537); components can't contain their own instances, directly or through others (#1084); the instance-swap menus have a search field (#1338); an instance-swap property's default menu scrolls (#1338); variables on a text style's fields from the style editor; instance-swap properties in the component playground; duplicating or Alt-dragging a main component makes an instance of it (#892); a bound colour variable's alpha applies once (#802); variables import reads `variables` outside `meta` and warns when it imports none (#790); variant properties reorder by drag; library files saved right after a read are read again; Hide when publishing note corrected; size and resizing overrides of layers inside instances (#731); variables export in the browser as a download; core editor leftovers: component playground, variables inside styles; layers and assets panels behaviour suite and fixes; extended collections tail; styles and variables behaviour suite and fixes; components behaviour suite and fixes; team libraries on the server, library usage and swapping a library; extended collections, variables import/export, gradient stops and variant properties bound to variables) · **Target:** Figma Design (desktop app 126.10.7)
Design systems are why teams adopt Figma. **Components: breadth ~96%, ready ~72%. Styles and
variables: breadth ~95%, ready ~76% (estimated).** QA'd with a synthetic design system of ~300
@@ -12,7 +12,7 @@ accounts).
| Feature | Status | Notes |
|---|---|---|
-| Create component, instances, detach, reset, go to main, restore main, push changes | done | push from a nested layer goes to the outer main |
+| Create component, instances, detach, reset, go to main, restore main, push changes | done | push from a nested layer goes to the outer main; with two or more layers selected the Design panel header's component button opens a menu with Create component and Create multiple components (each layer its own component in place, one undo step), one layer keeps the plain click (#2088); Create component set is not in the menu yet |
| Per-layer overrides with reset; kept across main edits, nested swaps, copy/paste | done | main edits match a full rebuild exactly at 2,000 instances |
| What an instance overrides: fills, strokes, effects, visibility, layer names, text content and every text property (resizing included), auto layout padding, gap and alignment, layout grids, export settings, prototype interactions, nested swaps and property values; the size and resizing (hug, fill, fixed, min and max) of layers inside it | done | each kept when the main changes that property, reset per group; opacity and corner radius too (documentation silent); size and resizing are kept through relayout, undo, save, `.fig` and REST import and detach, and stay with the instance on push |
| What it doesn't: position, rotation, constraints and absolute or grid placement of layers inside it, its auto layout direction and other settings, its structure | done | refused with a message, the fields greyed out (Delete on a layer inside an instance hides it instead of removing it, as the help center says it does); the instance itself resizes and its layers follow the main's constraints |
@@ -79,6 +79,7 @@ updates with overrides kept: `library_tests.rs`, `components_scale_tests.rs`.
| Date | Change | Summary |
|---|---|---|
+| 2026-11-07 | patch | M3, #2088: with two or more layers selected the Design panel header's component button opens a menu with Create component and Create multiple components, as Figma's does; one layer keeps the plain button. Create component set is left out until its naming is measured. Tests: `create_multiple_menu_tests`, `components_behaviour_tests::create_multiple_components_keeps_names_and_places_and_is_one_undo_step`. Grade unchanged. |
| 2026-11-05 | minor | M3, #2002: the Local variables window selects several variables, as the Layers panel selects layers. A click selects one row, Shift+click the range from the anchor through the rows shown, Cmd/Ctrl+click toggles a row, Escape or a click on the empty space below the rows clears; selected rows use the sidebar's selected-row colour. Right-clicking a row that is part of a selection of several offers Delete, Move to group and Scope (all supported properties, hidden from pickers, or only one scope) for the selected local variables, each sent as one `command.batch`, so one undo step; no engine command changed. Renaming and value edits stay single-row. Tests: `variables_select_tests` (headless UI). Grade unchanged |
| 2026-11-02 | minor | M3, #1829: text styles carry paragraph spacing and indent, the list style and the OpenType features ("Supported in text styles": "Paragraph spacing and indentation", "Lists", "OpenType features", Create and apply text styles) beside the character properties: `style.create` takes them from the layer (or the selected paragraphs' list) or from a `value` (`paragraphSpacing`, `paragraphIndent`, `listStyle`, `features`), `style.apply` sets them (on a range, the list goes to the paragraphs touched; the rest is the layer's, as in Figma), `style.update` moves them on every linked layer, editing one on a styled text unlinks it as editing its font does, the style editor lists them, and a `.fig` file keeps them with the style (its sample layer). Grade unchanged. |
| 2026-11-06 | patch | M3: a glass's light angle bound to a number past ±180 turns round to the same direction (270 is -90), as the angle drawn from it does, instead of stopping at 180. Tests: `effects_tests::a_bound_light_angle_turns_round_instead_of_stopping`. Grade unchanged. |
From 524ad8b1ddfd576ad86dd13d7c1b71f4deaad3e1 Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 21:38:30 -0500
Subject: [PATCH 13/61] Components: Create component set in the component
button's menu (#2088)
The third entry of the menu several selected layers get: each layer becomes a component and they are wrapped in a component set in place, 20 px around, named as Figma names them (measured): "Property 1=" in left-to-right order, prop=value names kept, and layers that all share a name give a set of that name with "Default" variants. Engine tests cover the three measured cases, geometry, selection, one undo and the refusal of instances; the UI test checks the three menu entries in order and that the third makes one set.
Co-Authored-By: Claude Sonnet 5.5
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
---
crates/engine/src/cmd/component.rs | 9 +-
crates/engine/src/cmd/component/variants.rs | 55 ++++++++-
.../engine/src/components_behaviour_tests.rs | 106 ++++++++++++++++++
.../ui-egui/src/create_multiple_menu_tests.rs | 27 ++++-
crates/ui-egui/src/panels/right.rs | 6 +-
docs/components-parity.md | 4 +-
6 files changed, 197 insertions(+), 10 deletions(-)
diff --git a/crates/engine/src/cmd/component.rs b/crates/engine/src/cmd/component.rs
index e0b2e02f4..06e6bf166 100644
--- a/crates/engine/src/cmd/component.rs
+++ b/crates/engine/src/cmd/component.rs
@@ -24,7 +24,7 @@ use instance::{detach, make_slot, push_changes, remove_slot, reset_instance, res
pub(crate) use instance::{swap_at, swap_instance};
use props::{add_prop, bind_prop, delete_prop, edit_prop, set_props};
pub(crate) use props::{apply_prop_bindings, check_prop_binding, describe_props};
-use variants::{add_variant, combine};
+use variants::{add_variant, combine, create_set};
pub use variants::{can_add_variant, can_combine_variants};
/// `component.hideWhenPublishing`: the leading `.` of the names of this file's components and
@@ -72,6 +72,13 @@ pub fn specs() -> Vec {
s.set_selection(out.iter().filter_map(id_of).collect());
Ok(json!({"ids": out}))
}),
+ spec!(
+ "component.createSet",
+ "Create component set",
+ "{ids? (layers, not components, sets or instances)} (each becomes a component, wrapped in place in a component set: variants \"Property 1=\" left to right, 20 px around)",
+ true,
+ create_set
+ ),
spec!(
"component.combineVariants",
"Combine as variants",
diff --git a/crates/engine/src/cmd/component/variants.rs b/crates/engine/src/cmd/component/variants.rs
index 5f9e218ac..53e00ca6d 100644
--- a/crates/engine/src/cmd/component/variants.rs
+++ b/crates/engine/src/cmd/component/variants.rs
@@ -1,6 +1,6 @@
use super::{
- BTreeMap, BTreeSet, Document, EngineError, Node, NodeId, NodeKind, Result, Session, Value, bad, inside_instance, json, owning_instance,
- req_targets, roots, set_name_from, string, targets, variant_name, variant_options, variant_props, variant_set, z_sorted,
+ BTreeMap, BTreeSet, Document, EngineError, Node, NodeId, NodeKind, Result, Session, Value, bad, create, id_of, inside_instance, json,
+ owning_instance, req_targets, roots, set_name_from, string, targets, variant_name, variant_options, variant_props, variant_set, z_sorted,
};
/// Wrap components in a new component set (named after the first) placed around them.
@@ -94,6 +94,57 @@ pub(super) fn combine(s: &mut Session, p: &Value) -> Result {
Ok(json!({"id": set}))
}
+/// `component.createSet`: each target becomes a component (as `component.createMultiple` makes
+/// them) and all are wrapped in place in a component set, 20 px around, named as Figma names them:
+/// variants "Property 1=" in left-to-right order (a name holding `=` is kept); layers
+/// that all share a name give a set of that name with "Property 1=Default" variants; otherwise the
+/// set is "Component N".
+pub(super) fn create_set(s: &mut Session, p: &Value) -> Result {
+ let cmd = "component.createSet";
+ let mut seen = BTreeSet::new();
+ let ids: Vec = req_targets(cmd, s, p)?.into_iter().filter(|i| seen.insert(*i)).collect();
+ let doc = s.doc()?;
+ if ids.iter().any(|i| inside_instance(doc, *i)) {
+ return Err(EngineError::Disabled(cmd.into(), "layers inside an instance can't become components".into()));
+ }
+ if ids.iter().any(|i| doc.is_remote(*i)) {
+ return Err(EngineError::Disabled(cmd.into(), crate::library::READ_ONLY.into()));
+ }
+ if ids.iter().any(|i| {
+ doc.node(*i).is_some_and(|n| matches!(n.kind, NodeKind::Instance { .. } | NodeKind::Component { .. } | NodeKind::ComponentSet { .. }))
+ }) {
+ return Err(EngineError::Disabled(cmd.into(), "select layers that aren't components, component sets or instances".into()));
+ }
+ let mut made = Vec::new();
+ for i in roots(doc, &ids) {
+ let r = create(s, &json!({"ids": [i]}))?;
+ made.push(id_of(&r["id"]).ok_or_else(|| bad(cmd, "component creation failed"))?);
+ }
+ let doc = s.doc_mut()?;
+ // Left to right by world x, ties by y: the variants' order, and the values' order.
+ let mut by_x: Vec<(NodeId, f64, f64)> = made.iter().map(|i| doc.world_bounds(*i).map_or((*i, 0.0, 0.0), |b| (*i, b.x0, b.y0))).collect();
+ by_x.sort_by(|a, b| a.1.total_cmp(&b.1).then(a.2.total_cmp(&b.2)));
+ let names: Vec = by_x.iter().map(|(i, ..)| doc.node(*i).map(|n| n.name.clone()).unwrap_or_default()).collect();
+ let same = names.windows(2).all(|w| w.first() == w.get(1)) && names.first().is_some_and(|n| !n.is_empty() && !n.contains('='));
+ let set_name = match names.first() {
+ Some(n) if same => n.clone(),
+ _ => doc.next_name("Component"),
+ };
+ for ((i, ..), name) in by_x.iter().zip(&names) {
+ let node = doc.get_mut(*i)?;
+ if same {
+ node.name = "Property 1=Default".into();
+ } else if !name.contains('=') {
+ node.name = format!("Property 1={name}");
+ }
+ }
+ let ordered = z_sorted(doc, &made);
+ let set = wrap_in_set(cmd, doc, &ordered)?;
+ doc.get_mut(set)?.name = set_name;
+ s.set_selection(vec![set]);
+ Ok(json!({"id": set}))
+}
+
/// Grow a component set so it wraps its variants with 20 px of padding (right and bottom).
pub(super) fn fit_set(doc: &mut Document, set: NodeId) {
let Some(kids) = doc.node(set).map(|n| n.children.clone()) else { return };
diff --git a/crates/engine/src/components_behaviour_tests.rs b/crates/engine/src/components_behaviour_tests.rs
index 198151768..f65049de5 100644
--- a/crates/engine/src/components_behaviour_tests.rs
+++ b/crates/engine/src/components_behaviour_tests.rs
@@ -1033,3 +1033,109 @@ fn create_multiple_components_keeps_names_and_places_and_is_one_undo_step() {
let doc = s.doc().unwrap();
assert!(frames.iter().all(|f| matches!(doc.node(*f).map(|n| &n.kind), Some(NodeKind::Frame))), "one undo restores the frames");
}
+
+/// Frames named `names` at x = 150 * i (mirrored when `reverse`), y 20, 100 x 60.
+fn named_frames(s: &mut Session, names: &[&str], reverse: bool) -> Vec {
+ let n = names.len();
+ names
+ .iter()
+ .enumerate()
+ .map(|(i, name)| {
+ let x = 150.0 * if reverse { n - 1 - i } else { i } as f64;
+ let v = s.execute("frame.create", &json!({"x": x, "y": 20, "width": 100, "height": 60})).unwrap();
+ let f = id_of(&v["id"]).unwrap();
+ s.execute("object.rename", &json!({"ids": [f], "name": name})).unwrap();
+ f
+ })
+ .collect()
+}
+
+/// The set's name and its children's names in layer order.
+fn set_names(s: &Session, set: NodeId) -> (String, Vec) {
+ let doc = s.doc().unwrap();
+ let n = doc.node(set).unwrap();
+ (n.name.clone(), n.children.iter().map(|c| doc.node(*c).unwrap().name.clone()).collect())
+}
+
+/// The set's variant names ordered by world x.
+fn names_by_x(s: &Session, set: NodeId) -> Vec {
+ let doc = s.doc().unwrap();
+ let mut v: Vec<(f64, String)> =
+ doc.node(set).unwrap().children.iter().map(|c| (doc.world_bounds(*c).unwrap().x0, doc.node(*c).unwrap().name.clone())).collect();
+ v.sort_by(|a, b| a.0.total_cmp(&b.0));
+ v.into_iter().map(|(_, n)| n).collect()
+}
+
+/// Create component set (#2088, measured in Figma): variants "Property 1=" in left-to-right
+/// order, the set "Component 1", wrapped in place 20 px around, selected, one undo step.
+#[test]
+fn create_set_names_variants_by_layer_name_and_wraps_in_place() {
+ let mut s = Session::new();
+ let frames = named_frames(&mut s, &["Primary", "Secondary", "Ghost"], false);
+ let before = undo_len(&s);
+ let out = s.execute("component.createSet", &json!({"ids": frames})).unwrap();
+ assert_eq!(undo_len(&s), before + 1, "one undo step");
+ let set = id_of(&out["id"]).unwrap();
+ assert_eq!(s.selection(), vec![set], "the set is selected");
+ assert_eq!(set_names(&s, set).0, "Component 1");
+ assert_eq!(names_by_x(&s, set), ["Property 1=Primary", "Property 1=Secondary", "Property 1=Ghost"]);
+ let doc = s.doc().unwrap();
+ for (i, c) in doc.node(set).unwrap().children.iter().enumerate() {
+ assert!(matches!(doc.node(*c).unwrap().kind, NodeKind::Component { .. }));
+ let b = doc.world_bounds(*c).unwrap();
+ assert_eq!((b.x0, b.y0), (150.0 * i as f64, 20.0), "frames stay put");
+ }
+ let sb = doc.world_bounds(set).unwrap();
+ assert_eq!((sb.x0, sb.y0, sb.x1, sb.y1), (-20.0, 0.0, 420.0, 100.0), "20 px on every side");
+ s.undo().unwrap();
+ let doc = s.doc().unwrap();
+ assert!(doc.node(set).is_none());
+ assert!(frames.iter().all(|f| matches!(doc.node(*f).map(|n| &n.kind), Some(NodeKind::Frame))), "one undo restores the frames");
+}
+
+#[test]
+fn create_set_orders_left_to_right_whatever_the_selection_order() {
+ let mut s = Session::new();
+ let frames = named_frames(&mut s, &["A", "B", "C"], true);
+ let out = s.execute("component.createSet", &json!({"ids": frames})).unwrap();
+ let set = id_of(&out["id"]).unwrap();
+ assert_eq!(names_by_x(&s, set), ["Property 1=C", "Property 1=B", "Property 1=A"]);
+ let (_, kids) = set_names(&s, set);
+ assert_eq!(kids.len(), 3);
+}
+
+#[test]
+fn create_set_keeps_names_already_in_prop_value_form() {
+ let mut s = Session::new();
+ let frames = named_frames(&mut s, &["Size=Small", "Size=Large", "Size=Medium"], false);
+ let out = s.execute("component.createSet", &json!({"ids": frames})).unwrap();
+ let set = id_of(&out["id"]).unwrap();
+ assert_eq!(set_names(&s, set).0, "Component 1");
+ assert_eq!(names_by_x(&s, set), ["Size=Small", "Size=Large", "Size=Medium"]);
+}
+
+#[test]
+fn create_set_with_one_shared_name_names_the_set_and_makes_default_variants() {
+ let mut s = Session::new();
+ let frames = named_frames(&mut s, &["Card", "Card", "Card"], false);
+ let out = s.execute("component.createSet", &json!({"ids": frames})).unwrap();
+ let set = id_of(&out["id"]).unwrap();
+ let (name, kids) = set_names(&s, set);
+ assert_eq!(name, "Card");
+ assert_eq!(kids, ["Property 1=Default", "Property 1=Default", "Property 1=Default"]);
+}
+
+#[test]
+fn create_set_refuses_instances_and_leaves_the_document_alone() {
+ let mut s = Session::new();
+ let frames = named_frames(&mut s, &["A", "B"], false);
+ let c = s.execute("component.create", &json!({"ids": [frames[0]]})).unwrap();
+ let comp = id_of(&c["id"]).unwrap();
+ let inst = s.execute("instance.create", &json!({"component": comp})).unwrap();
+ let inst = id_of(&inst["id"]).unwrap();
+ let before = undo_len(&s);
+ let e = s.execute("component.createSet", &json!({"ids": [inst, frames[1]]})).unwrap_err();
+ assert!(matches!(e, crate::EngineError::Disabled(..)), "{e:?}");
+ assert_eq!(undo_len(&s), before);
+ assert!(matches!(s.doc().unwrap().node(frames[1]).unwrap().kind, NodeKind::Frame));
+}
diff --git a/crates/ui-egui/src/create_multiple_menu_tests.rs b/crates/ui-egui/src/create_multiple_menu_tests.rs
index a8c2b3a56..409b67e54 100644
--- a/crates/ui-egui/src/create_multiple_menu_tests.rs
+++ b/crates/ui-egui/src/create_multiple_menu_tests.rs
@@ -1,5 +1,5 @@
//! With two or more layers selected the Design panel's component button opens a menu (Create
-//! component, Create multiple components); one layer keeps the plain click (#2088): drawn headless.
+//! component, Create multiple components, Create component set); one layer keeps the plain click (#2088): drawn headless.
use egui::accesskit::Node;
use egui::{Event, PointerButton, Pos2, Rect, pos2};
@@ -80,12 +80,12 @@ fn several_layers_open_a_menu_and_create_multiple_components_in_one_undo_step()
let mb = bounds(multiple);
let mut rows: Vec<(f32, String)> = all
.iter()
- .filter(|n| n.label().is_some() && (bounds(n).min.x - mb.min.x).abs() < 1.0 && (bounds(n).min.y - mb.min.y).abs() < 60.0)
+ .filter(|n| n.label().is_some() && (bounds(n).min.x - mb.min.x).abs() < 1.0 && (bounds(n).min.y - mb.min.y).abs() < 90.0)
.map(|n| (bounds(n).min.y, n.label().unwrap_or("").to_owned()))
.collect();
rows.sort_by(|a, b| a.0.total_cmp(&b.0));
let labels: Vec<&str> = rows.iter().map(|(_, l)| l.as_str()).collect();
- assert_eq!(labels, ["Create component", "Create multiple components"], "the menu's entries");
+ assert_eq!(labels, ["Create component", "Create multiple components", "Create component set"], "the menu's entries");
click(&mut u, bounds(multiple).center());
settle(&mut u);
let sel = u.app.session.selection();
@@ -113,3 +113,24 @@ fn one_layer_keeps_the_plain_button() {
assert_eq!(doc.node(sel[0]).unwrap().name, NAMES[0]);
let _ = ids;
}
+
+#[test]
+fn the_third_entry_creates_one_component_set() {
+ let (mut u, ids) = frames(3);
+ let before = undo_len(&u);
+ click_button(&mut u);
+ let all = nodes(&mut u);
+ let entry = all.iter().find(|n| n.label() == Some("Create component set")).expect("the menu's third entry");
+ click(&mut u, bounds(entry).center());
+ settle(&mut u);
+ let sel = u.app.session.selection();
+ assert_eq!(sel.len(), 1, "the set is selected");
+ let doc = u.app.session.doc().unwrap();
+ let set = doc.node(sel[0]).unwrap();
+ assert!(matches!(set.kind, NodeKind::ComponentSet { .. }));
+ assert_eq!(set.children.len(), 3);
+ assert_eq!(undo_len(&u), before + 1);
+ u.app.session.undo().unwrap();
+ let doc = u.app.session.doc().unwrap();
+ assert!(ids.iter().all(|i| matches!(doc.node(*i).map(|n| &n.kind), Some(NodeKind::Frame))), "one undo reverts it all");
+}
diff --git a/crates/ui-egui/src/panels/right.rs b/crates/ui-egui/src/panels/right.rs
index b408491a2..55b36ebf5 100644
--- a/crates/ui-egui/src/panels/right.rs
+++ b/crates/ui-egui/src/panels/right.rs
@@ -532,10 +532,12 @@ fn header(app: &mut FigApp, ui: &mut Ui, doc: &Document, sel: &[NodeId]) {
});
} else if cmd == "component.create" && sel.len() > 1 {
// Several layers: the button opens a menu, as Figma's does (#2088). One layer keeps the plain click.
- // TODO: "Create component set" is the third entry, to add once its naming is measured.
menu_popup(&bresp).width(220.0).show(|ui| {
let multiple = crate::i18n::command("component.createMultiple", "Create multiple components");
- for (c, label) in [("component.create", tr("Create component")), ("component.createMultiple", &multiple)] {
+ let set = crate::i18n::command("component.createSet", "Create component set");
+ for (c, label) in
+ [("component.create", tr("Create component")), ("component.createMultiple", &multiple), ("component.createSet", &set)]
+ {
let key = crate::shortcuts::shortcut(c).unwrap_or("");
if menu_icon_item(ui, None, None, label, key) {
app.run(c, json!({}));
diff --git a/docs/components-parity.md b/docs/components-parity.md
index 3ecdae292..a28ca6d0e 100644
--- a/docs/components-parity.md
+++ b/docs/components-parity.md
@@ -12,7 +12,7 @@ accounts).
| Feature | Status | Notes |
|---|---|---|
-| Create component, instances, detach, reset, go to main, restore main, push changes | done | push from a nested layer goes to the outer main; with two or more layers selected the Design panel header's component button opens a menu with Create component and Create multiple components (each layer its own component in place, one undo step), one layer keeps the plain click (#2088); Create component set is not in the menu yet |
+| Create component, instances, detach, reset, go to main, restore main, push changes | done | push from a nested layer goes to the outer main; with two or more layers selected the Design panel header's component button opens a menu with Create component, Create multiple components (each layer its own component in place, one undo step) and Create component set (each layer a component, wrapped in place in a set 20 px around: variants `Property 1=` left to right, `prop=value` names kept, layers that all share a name give a set of that name with `Property 1=Default` variants; measured in Figma), one layer keeps the plain click (#2088) |
| Per-layer overrides with reset; kept across main edits, nested swaps, copy/paste | done | main edits match a full rebuild exactly at 2,000 instances |
| What an instance overrides: fills, strokes, effects, visibility, layer names, text content and every text property (resizing included), auto layout padding, gap and alignment, layout grids, export settings, prototype interactions, nested swaps and property values; the size and resizing (hug, fill, fixed, min and max) of layers inside it | done | each kept when the main changes that property, reset per group; opacity and corner radius too (documentation silent); size and resizing are kept through relayout, undo, save, `.fig` and REST import and detach, and stay with the instance on push |
| What it doesn't: position, rotation, constraints and absolute or grid placement of layers inside it, its auto layout direction and other settings, its structure | done | refused with a message, the fields greyed out (Delete on a layer inside an instance hides it instead of removing it, as the help center says it does); the instance itself resizes and its layers follow the main's constraints |
@@ -79,7 +79,7 @@ updates with overrides kept: `library_tests.rs`, `components_scale_tests.rs`.
| Date | Change | Summary |
|---|---|---|
-| 2026-11-07 | patch | M3, #2088: with two or more layers selected the Design panel header's component button opens a menu with Create component and Create multiple components, as Figma's does; one layer keeps the plain button. Create component set is left out until its naming is measured. Tests: `create_multiple_menu_tests`, `components_behaviour_tests::create_multiple_components_keeps_names_and_places_and_is_one_undo_step`. Grade unchanged. |
+| 2026-11-07 | patch | M3, #2088: with two or more layers selected the Design panel header's component button opens a menu with Create component, Create multiple components and Create component set (`component.createSet`, naming measured in Figma), as Figma's does; one layer keeps the plain button. Tests: `create_multiple_menu_tests`, `components_behaviour_tests::create_multiple_components_keeps_names_and_places_and_is_one_undo_step`, `components_behaviour_tests::create_set_*`. Grade unchanged. |
| 2026-11-05 | minor | M3, #2002: the Local variables window selects several variables, as the Layers panel selects layers. A click selects one row, Shift+click the range from the anchor through the rows shown, Cmd/Ctrl+click toggles a row, Escape or a click on the empty space below the rows clears; selected rows use the sidebar's selected-row colour. Right-clicking a row that is part of a selection of several offers Delete, Move to group and Scope (all supported properties, hidden from pickers, or only one scope) for the selected local variables, each sent as one `command.batch`, so one undo step; no engine command changed. Renaming and value edits stay single-row. Tests: `variables_select_tests` (headless UI). Grade unchanged |
| 2026-11-02 | minor | M3, #1829: text styles carry paragraph spacing and indent, the list style and the OpenType features ("Supported in text styles": "Paragraph spacing and indentation", "Lists", "OpenType features", Create and apply text styles) beside the character properties: `style.create` takes them from the layer (or the selected paragraphs' list) or from a `value` (`paragraphSpacing`, `paragraphIndent`, `listStyle`, `features`), `style.apply` sets them (on a range, the list goes to the paragraphs touched; the rest is the layer's, as in Figma), `style.update` moves them on every linked layer, editing one on a styled text unlinks it as editing its font does, the style editor lists them, and a `.fig` file keeps them with the style (its sample layer). Grade unchanged. |
| 2026-11-06 | patch | M3: a glass's light angle bound to a number past ±180 turns round to the same direction (270 is -90), as the angle drawn from it does, instead of stopping at 180. Tests: `effects_tests::a_bound_light_angle_turns_round_instead_of_stopping`. Grade unchanged. |
From 34c44e6063e4eb70f801bf3b8bffc6d6398faf6c Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 22:15:22 -0500
Subject: [PATCH 14/61] Text: a font loaded with text.loadFont wins over the
built-in and installed faces of the same family and style (#2092)
FigCraft chose the first face added for a family and style, so the embedded Inter 4.x kept Regular, SemiBold and Bold after Inter 3.19 was loaded and only Medium refitted. A loaded font is the counterpart of a font uploaded to the organization, which Figma's help center ranks first ("Manage conflicting fonts"). The test builds its faces from any embedded or installed font (skipped when there is none) and checks a loaded face beats a built-in one, the latest load beats earlier ones, and other styles resolve as before.
Co-Authored-By: Claude Sonnet 5.5
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
---
crates/text/src/fontdb.rs | 29 +++++++++++++++++++++---
crates/text/src/fontdb_tests.rs | 39 +++++++++++++++++++++++++++++++++
docs/file-format-parity.md | 2 ++
3 files changed, 67 insertions(+), 3 deletions(-)
diff --git a/crates/text/src/fontdb.rs b/crates/text/src/fontdb.rs
index 3c82cd261..5159a68d1 100644
--- a/crates/text/src/fontdb.rs
+++ b/crates/text/src/fontdb.rs
@@ -92,6 +92,10 @@ pub struct Face {
pub italic: bool,
pub bytes: FontBytes,
pub index: u32,
+ /// 0 for a built-in or installed face; else the order it was loaded in with `text.loadFont`
+ /// ([`FontDb::add_loaded`]). A loaded face wins over any other of its family and style, the
+ /// latest load over earlier ones (#2092).
+ pub loaded: u32,
pub upem: f64,
/// Ascent and descent in font units, both positive.
pub ascent: f64,
@@ -207,6 +211,7 @@ impl Face {
family,
style,
index,
+ loaded: 0,
upem,
ascent,
descent,
@@ -620,6 +625,8 @@ pub struct FontDb {
loaded_files: std::collections::BTreeSet<(std::path::PathBuf, u32)>,
/// Font files added as bytes (hash and length → families), so loading one again adds nothing.
loaded_bytes: std::collections::HashMap<(u64, usize), Vec>,
+ /// Loads so far ([`Face::loaded`]).
+ load_seq: u32,
system_scanned: bool,
/// Browser fonts text asked for and not yet taken by the browser layer.
wanted: Vec,
@@ -716,8 +723,20 @@ impl FontDb {
face
}
+ /// [`add`](Self::add) a face loaded explicitly (`text.loadFont`): it wins over the other faces
+ /// of its family and style, and over those loaded before it.
+ pub fn add_loaded(&mut self, mut face: Face) -> Arc {
+ self.load_seq += 1;
+ face.loaded = self.load_seq;
+ self.add(face)
+ }
+
/// Add font file bytes (all faces of a collection). Returns the faces added.
pub fn add_bytes(&mut self, bytes: Vec) -> Vec> {
+ self.add_bytes_with(bytes, false)
+ }
+
+ fn add_bytes_with(&mut self, bytes: Vec, loaded: bool) -> Vec> {
let shared = Arc::new(bytes);
let count = match FileRef::new(shared.as_slice()) {
// A collection's header may name any number of faces, each a few bytes pointing at
@@ -727,7 +746,9 @@ impl FontDb {
Ok(FileRef::Font(_)) => 1,
Err(_) => 0,
};
- (0..count).filter_map(|i| Face::from_bytes(FontBytes::Shared(shared.clone()), i, None, None)).map(|f| self.add(f)).collect()
+ (0..count).filter_map(|i| Face::from_bytes(FontBytes::Shared(shared.clone()), i, None, None))
+ .map(|f| if loaded { self.add_loaded(f) } else { self.add(f) })
+ .collect()
}
/// The family and style of the face whose PostScript name is `ps` (ignoring case), loaded or
@@ -1035,7 +1056,9 @@ impl FontDb {
/// The loaded face of `family` nearest `style`.
fn best(&self, family: &str, style: &str) -> Option> {
let (_, idx) = self.families.get(&self.key(family))?;
- let faces: Vec<&Arc> = idx.iter().filter_map(|i| self.faces.get(*i)).collect();
+ let mut faces: Vec<&Arc> = idx.iter().filter_map(|i| self.faces.get(*i)).collect();
+ // A loaded font comes first (the latest load first): of faces as near, the first wins.
+ faces.sort_by_key(|f| std::cmp::Reverse(f.loaded));
let want = norm_style(style);
if let Some(f) = faces.iter().find(|f| norm_style(&f.style) == want).or_else(|| faces.iter().find(|f| has_style(f, style))) {
return Some((*f).clone());
@@ -1595,7 +1618,7 @@ pub fn load_font_bytes(bytes: Vec) -> Vec {
if let Some(families) = db.loaded_bytes.get(&key) {
return families.clone();
}
- let faces = db.add_bytes(bytes);
+ let faces = db.add_bytes_with(bytes, true);
let mut families: Vec = faces.iter().map(|f| f.family.clone()).collect();
families.dedup();
if !families.is_empty() {
diff --git a/crates/text/src/fontdb_tests.rs b/crates/text/src/fontdb_tests.rs
index 38e04c790..a3dd15396 100644
--- a/crates/text/src/fontdb_tests.rs
+++ b/crates/text/src/fontdb_tests.rs
@@ -382,6 +382,45 @@ fn font_bytes_load_into_the_db() {
}
}
+/// #2092: a font loaded with `text.loadFont` wins over the built-in and installed faces of its family
+/// and style, the latest load over earlier ones; other styles resolve as before.
+#[test]
+fn a_loaded_face_wins_over_the_built_in_one_of_its_family_and_style() {
+ // Any embedded or installed font stands in for the faces (none without craft-fonts on CI).
+ let stand_in = CRAFT_FONTS.first().map(|f| f.bytes.to_vec()).or_else(|| {
+ let mut installed = BTreeMap::new();
+ for dir in system_font_dirs() {
+ scan_dir(&dir, 0, &mut installed);
+ }
+ installed.values().flat_map(|(_, v)| v).find_map(|p| std::fs::read(&p.path).ok())
+ });
+ let Some(bytes) = stand_in.map(Arc::new) else {
+ eprintln!("skipping: no font to stand in");
+ return;
+ };
+ let face = |style: &str, name: &str| {
+ let mut f = Face::from_bytes(FontBytes::Shared(bytes.clone()), 0, Some("Brand Sans"), Some(style)).unwrap();
+ f.instances.clear();
+ f.postscript = Some(name.into());
+ f
+ };
+ let name = |db: &FontDb, style: &str| db.best("Brand Sans", style).and_then(|f| f.postscript.clone());
+ let mut db = FontDb::default();
+ db.add(face("Regular", "Built-in-Regular"));
+ db.add(face("Bold", "Built-in-Bold"));
+ assert_eq!(name(&db, "Regular").as_deref(), Some("Built-in-Regular"));
+ db.add_loaded(face("Regular", "Loaded-Regular"));
+ assert_eq!(name(&db, "Regular").as_deref(), Some("Loaded-Regular"));
+ // Bold wasn't loaded: the built-in one stays. Nor does the loaded Regular stand in for it.
+ assert_eq!(name(&db, "Bold").as_deref(), Some("Built-in-Bold"));
+ // The latest load wins.
+ db.add_loaded(face("Regular", "Loaded-Regular-2"));
+ assert_eq!(name(&db, "Regular").as_deref(), Some("Loaded-Regular-2"));
+ // A face added after a load, not loaded, doesn't displace it.
+ db.add(face("Regular", "Installed-Regular"));
+ assert_eq!(name(&db, "Regular").as_deref(), Some("Loaded-Regular-2"));
+}
+
/// Apple's system font answers to the names designs and CSS use for it (SF Pro, SF UI Text,
/// system-ui, …), unless a font of that name is installed.
#[test]
diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md
index bce90b008..0aaf249ca 100644
--- a/docs/file-format-parity.md
+++ b/docs/file-format-parity.md
@@ -181,6 +181,7 @@ source paint coordinates.
| | Figma | FigCraft |
|---|---|---|
| Local fonts | yes (font helper / desktop app) | yes (system scan) |
+| Conflicting fonts | an uploaded organization font comes first, then fonts installed on the device, then Figma's web fonts (help center, "Manage conflicting fonts") | a font loaded with `text.loadFont` wins over the built-in and installed faces of the same family and style, the latest load over earlier ones (#2092); installed versus built-in order is unchanged, and browser local fonts count as installed |
| Bundled/shared fonts | Google Fonts in the cloud | optional `CRAFT_FONTS_DIR` build input (storytold/craft-fonts) |
| Variable fonts | yes | yes (axes, named instances, per-range axis values) |
| Missing-font replacement on open | yes | listed, not replaced: in the desktop app the Missing fonts window opens after a file that uses them opens and from Text ▸ Missing fonts (`text.missingFonts`; `figcraft-cli info` prints `missing font` lines), and their text draws in a fallback font. A family the font store has (Google Fonts, Noto) downloads from the window once the user allows downloading fonts (`font.download`, #754): pinned, checksum-verified files into the Craft apps' shared font folder, after which the text draws in it. A family is found however a file names it: by the legacy name of one of its weights ("Family Medium") or by the typographic name of a family installed one family per weight, and spelt with other case, spaces or hyphens (#1292). No substitute picker |
@@ -189,6 +190,7 @@ source paint coordinates.
| Date | Change | Summary |
|---|---|---|
+| 2026-11-07 | patch | Fonts, #2092: a font loaded with `text.loadFont` is the counterpart of a font uploaded to the organization, which Figma's help center ("Manage conflicting fonts") ranks first, ahead of installed fonts and the web fonts. FigCraft chose the first face added for a family and style, so the built-in Inter 4.x kept Regular, SemiBold and Bold after Inter 3.19 was loaded and only Medium refitted. A loaded face now wins over the other faces of its family and style, the latest load over earlier ones; style matching and fallbacks are unchanged, and `refitted` lists the text whose size changes. Installed versus built-in order is not changed here. Test: `fontdb::tests::a_loaded_face_wins_over_the_built_in_one_of_its_family_and_style`. Numbers unchanged. |
| 2026-11-03 | patch | M6, #1909: `.jam` import: a connector end whose magnet is `AUTO` (FigJam picks the side when it draws) or `CENTER` (the end aims at the layer's middle) left the side its stale `relativePosition` named, the left one in the reporter's file, so the connectors looped behind their shape or crossed it. It now leaves the side facing the other end, as a board connector drawn here does (`Side::Auto`), for straight, elbowed and curved connectors alike; a named magnet (`TOP`, `RIGHT`, `BOTTOM`, `LEFT`) is unchanged, and an end without a magnet still takes the edge its point lies on. The Plugin API lists the magnets (`ConnectorEndpoint.magnet`: "Which side of the node it attaches to"; NONE, AUTO, TOP, LEFT, BOTTOM, RIGHT, CENTER; "Straight connectors may use only CENTER or NONE magnets"). Test: `connectors_with_an_automatic_side_leave_the_side_facing_the_target`. Numbers unchanged. |
| 2026-11-04 | minor | JPG export: `quality` (1 to 100, default 90) on `file.export`, `export.add` / `export.update` and MCP `export`, kept in the export setting; an sRGB file's JPGs embed the sRGB ICC profile, as Display P3 files' JPGs already embedded theirs, since an untagged JPG is only assumed to be sRGB (#2004). |
| 2026-11-04 | minor | `.fig` and `.jam` import, #1910: an elbowed connector saved with its path keeps it. FigJam stores `connectorControlPoints`, one per run between the first and the last, each a point on its run (in the connector's parent's coordinates) with the run's axis; the first run leaves the start's side and the last arrives at the end's. They become the `ConnectorPath::Runs` a board connector reshaped by hand has (`figcraft_doc::route_along`), so a connector drawn around a layer in FigJam stays around it instead of being routed through it. Points that don't make such a path (off both axes, two runs in a row the same way, a first or last run sideways to its side or going back into its object, more runs than a hand could make) leave the connector to the router as before, and only connectors routed here count in the "follow FigCraft's own routing" note. A curved connector's `connectorBezierControlPoints` are still not read. Tests: `tail_tests::an_elbow_connector_saved_with_its_path_keeps_it`, `tail_tests::an_elbow_whose_saved_path_doesnt_fit_its_sides_is_routed_here`. |
From a375ac06893ed41af6916508c18bb5896e1e527b Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 22:15:41 -0500
Subject: [PATCH 15/61] Format (#2092)
Co-Authored-By: Claude Sonnet 5.5
---
crates/text/src/fontdb.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crates/text/src/fontdb.rs b/crates/text/src/fontdb.rs
index 5159a68d1..65df051e7 100644
--- a/crates/text/src/fontdb.rs
+++ b/crates/text/src/fontdb.rs
@@ -746,7 +746,8 @@ impl FontDb {
Ok(FileRef::Font(_)) => 1,
Err(_) => 0,
};
- (0..count).filter_map(|i| Face::from_bytes(FontBytes::Shared(shared.clone()), i, None, None))
+ (0..count)
+ .filter_map(|i| Face::from_bytes(FontBytes::Shared(shared.clone()), i, None, None))
.map(|f| if loaded { self.add_loaded(f) } else { self.add(f) })
.collect()
}
From 253e0c3df3951f4a6e6f4f85e6d2ae0a08dfd309 Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 22:49:04 -0500
Subject: [PATCH 16/61] Components: Create component set refuses nested layers
and is translated (#2095 review)
component.createSet now refuses a selection where one layer is inside another, as component.combineVariants does, before changing the document (the nested layer was silently dropped from the set). Adds the component.createSet label to the 22 locale catalogs that list component.createMultiple.
Co-Authored-By: Claude Sonnet 5.5
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
---
crates/engine/src/cmd/component/variants.rs | 3 +++
crates/engine/src/components_behaviour_tests.rs | 14 ++++++++++++++
crates/ui-egui/locales/ar.toml | 1 +
crates/ui-egui/locales/bs.toml | 1 +
crates/ui-egui/locales/cs.toml | 1 +
crates/ui-egui/locales/de.toml | 1 +
crates/ui-egui/locales/es.toml | 1 +
crates/ui-egui/locales/fi.toml | 1 +
crates/ui-egui/locales/fr.toml | 1 +
crates/ui-egui/locales/id.toml | 1 +
crates/ui-egui/locales/it.toml | 1 +
crates/ui-egui/locales/ja.toml | 1 +
crates/ui-egui/locales/ka.toml | 1 +
crates/ui-egui/locales/ko.toml | 1 +
crates/ui-egui/locales/nl.toml | 1 +
crates/ui-egui/locales/pl.toml | 1 +
crates/ui-egui/locales/pt-BR.toml | 1 +
crates/ui-egui/locales/ru.toml | 1 +
crates/ui-egui/locales/sv.toml | 1 +
crates/ui-egui/locales/th.toml | 1 +
crates/ui-egui/locales/tr.toml | 1 +
crates/ui-egui/locales/vi.toml | 1 +
crates/ui-egui/locales/zh-Hans.toml | 1 +
crates/ui-egui/locales/zh-Hant.toml | 1 +
24 files changed, 39 insertions(+)
diff --git a/crates/engine/src/cmd/component/variants.rs b/crates/engine/src/cmd/component/variants.rs
index 53e00ca6d..cfba5accf 100644
--- a/crates/engine/src/cmd/component/variants.rs
+++ b/crates/engine/src/cmd/component/variants.rs
@@ -115,6 +115,9 @@ pub(super) fn create_set(s: &mut Session, p: &Value) -> Result {
}) {
return Err(EngineError::Disabled(cmd.into(), "select layers that aren't components, component sets or instances".into()));
}
+ if roots(doc, &ids).len() != ids.len() {
+ return Err(EngineError::Disabled(cmd.into(), "a layer can't be in a set with one inside it".into()));
+ }
let mut made = Vec::new();
for i in roots(doc, &ids) {
let r = create(s, &json!({"ids": [i]}))?;
diff --git a/crates/engine/src/components_behaviour_tests.rs b/crates/engine/src/components_behaviour_tests.rs
index f65049de5..510fb2e74 100644
--- a/crates/engine/src/components_behaviour_tests.rs
+++ b/crates/engine/src/components_behaviour_tests.rs
@@ -1139,3 +1139,17 @@ fn create_set_refuses_instances_and_leaves_the_document_alone() {
assert_eq!(undo_len(&s), before);
assert!(matches!(s.doc().unwrap().node(frames[1]).unwrap().kind, NodeKind::Frame));
}
+
+#[test]
+fn create_set_refuses_a_target_inside_another_target_and_leaves_the_document_alone() {
+ let mut s = Session::new();
+ let frames = named_frames(&mut s, &["Outer", "Inner"], false);
+ s.execute("node.reparent", &json!({"ids": [frames[1]], "parent": frames[0]})).unwrap();
+ let before = undo_len(&s);
+ let e = s.execute("component.createSet", &json!({"ids": [frames[0], frames[1]]})).unwrap_err();
+ assert!(matches!(e, crate::EngineError::Disabled(..)), "{e:?}");
+ assert_eq!(undo_len(&s), before);
+ let doc = s.doc().unwrap();
+ assert!(matches!(doc.node(frames[0]).unwrap().kind, NodeKind::Frame));
+ assert!(matches!(doc.node(frames[1]).unwrap().kind, NodeKind::Frame));
+}
diff --git a/crates/ui-egui/locales/ar.toml b/crates/ui-egui/locales/ar.toml
index da4474e79..cbbe8e07d 100644
--- a/crates/ui-egui/locales/ar.toml
+++ b/crates/ui-egui/locales/ar.toml
@@ -2009,6 +2009,7 @@ status = "draft — needs native review"
"component.combineVariants" = "جمع كتنويعات"
"component.create" = "إنشاء مكوّن"
"component.createMultiple" = "إنشاء مكونات متعددة"
+"component.createSet" = "إنشاء مجموعة مكونات"
"component.deleteProperty" = "حذف خاصية المكوّن"
"component.detach" = "فصل النسخة المثيلة"
"component.editProperty" = "تحرير خاصية المكوّن"
diff --git a/crates/ui-egui/locales/bs.toml b/crates/ui-egui/locales/bs.toml
index 36d71664c..e39053f08 100644
--- a/crates/ui-egui/locales/bs.toml
+++ b/crates/ui-egui/locales/bs.toml
@@ -2038,6 +2038,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Kombinuj kao varijante"
"component.create" = "Kreiraj komponentu"
"component.createMultiple" = "Kreiraj više komponenti"
+"component.createSet" = "Kreiraj skup komponenti"
"component.deleteProperty" = "Izbriši svojstvo komponente"
"component.detach" = "Odvoji instancu"
"component.editProperty" = "Uredi svojstvo komponente"
diff --git a/crates/ui-egui/locales/cs.toml b/crates/ui-egui/locales/cs.toml
index d401654ac..de7f9cc89 100644
--- a/crates/ui-egui/locales/cs.toml
+++ b/crates/ui-egui/locales/cs.toml
@@ -1913,6 +1913,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Sloučit jako varianty"
"component.create" = "Vytvořit komponentu"
"component.createMultiple" = "Vytvořit více komponent"
+"component.createSet" = "Vytvořit sadu komponent"
"component.deleteProperty" = "Smazat vlastnost komponenty"
"component.detach" = "Odpojit instanci"
"component.editProperty" = "Upravit vlastnost komponenty"
diff --git a/crates/ui-egui/locales/de.toml b/crates/ui-egui/locales/de.toml
index 6fd1838d6..6256fc1e0 100644
--- a/crates/ui-egui/locales/de.toml
+++ b/crates/ui-egui/locales/de.toml
@@ -2079,6 +2079,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Als Varianten kombinieren"
"component.create" = "Komponente erstellen"
"component.createMultiple" = "Mehrere Komponenten erstellen"
+"component.createSet" = "Komponentensatz erstellen"
"component.deleteProperty" = "Komponenteneigenschaft löschen"
"component.detach" = "Instanz lösen"
"component.editProperty" = "Komponenteneigenschaft bearbeiten"
diff --git a/crates/ui-egui/locales/es.toml b/crates/ui-egui/locales/es.toml
index 2baa2b31e..6c2d171c3 100644
--- a/crates/ui-egui/locales/es.toml
+++ b/crates/ui-egui/locales/es.toml
@@ -2002,6 +2002,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Combinar como variantes"
"component.create" = "Crear componente"
"component.createMultiple" = "Crear varios componentes"
+"component.createSet" = "Crear conjunto de componentes"
"component.deleteProperty" = "Eliminar propiedad de componente"
"component.detach" = "Separar instancia"
"component.editProperty" = "Editar propiedad de componente"
diff --git a/crates/ui-egui/locales/fi.toml b/crates/ui-egui/locales/fi.toml
index 2f5db319a..a1b33417f 100644
--- a/crates/ui-egui/locales/fi.toml
+++ b/crates/ui-egui/locales/fi.toml
@@ -2086,6 +2086,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Yhdistä varianteiksi"
"component.create" = "Luo komponentti"
"component.createMultiple" = "Luo useita komponentteja"
+"component.createSet" = "Luo komponenttijoukko"
"component.deleteProperty" = "Poista komponentin ominaisuus"
"component.detach" = "Irrota ilmentymä"
"component.editProperty" = "Muokkaa komponentin ominaisuutta"
diff --git a/crates/ui-egui/locales/fr.toml b/crates/ui-egui/locales/fr.toml
index d47ad9597..e5feebc9b 100644
--- a/crates/ui-egui/locales/fr.toml
+++ b/crates/ui-egui/locales/fr.toml
@@ -1958,6 +1958,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Combiner en variantes"
"component.create" = "Créer un composant"
"component.createMultiple" = "Créer plusieurs composants"
+"component.createSet" = "Créer un ensemble de composants"
"component.deleteProperty" = "Supprimer la propriété de composant"
"component.detach" = "Détacher l’instance"
"component.editProperty" = "Modifier la propriété de composant"
diff --git a/crates/ui-egui/locales/id.toml b/crates/ui-egui/locales/id.toml
index cbebaf1c4..3bb5d027c 100644
--- a/crates/ui-egui/locales/id.toml
+++ b/crates/ui-egui/locales/id.toml
@@ -1917,6 +1917,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Gabungkan sebagai variant"
"component.create" = "Buat component"
"component.createMultiple" = "Buat beberapa component"
+"component.createSet" = "Buat set component"
"component.deleteProperty" = "Hapus properti component"
"component.detach" = "Lepaskan instance"
"component.editProperty" = "Edit properti component"
diff --git a/crates/ui-egui/locales/it.toml b/crates/ui-egui/locales/it.toml
index 364aeedf8..f6b6dfe0d 100644
--- a/crates/ui-egui/locales/it.toml
+++ b/crates/ui-egui/locales/it.toml
@@ -1861,6 +1861,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Combina come varianti"
"component.create" = "Crea componente"
"component.createMultiple" = "Crea più componenti"
+"component.createSet" = "Crea set di componenti"
"component.deleteProperty" = "Elimina proprietà del componente"
"component.detach" = "Scollega istanza"
"component.editProperty" = "Modifica proprietà del componente"
diff --git a/crates/ui-egui/locales/ja.toml b/crates/ui-egui/locales/ja.toml
index 5a8918a20..c53b03e25 100644
--- a/crates/ui-egui/locales/ja.toml
+++ b/crates/ui-egui/locales/ja.toml
@@ -1938,6 +1938,7 @@ status = "draft — needs native review"
"component.combineVariants" = "バリアントとして結合"
"component.create" = "コンポーネントを作成"
"component.createMultiple" = "複数のコンポーネントを作成"
+"component.createSet" = "コンポーネントセットを作成"
"component.deleteProperty" = "コンポーネントプロパティを削除"
"component.detach" = "インスタンスを切り離す"
"component.editProperty" = "コンポーネントプロパティを編集"
diff --git a/crates/ui-egui/locales/ka.toml b/crates/ui-egui/locales/ka.toml
index 2af58f385..fa681b9fd 100644
--- a/crates/ui-egui/locales/ka.toml
+++ b/crates/ui-egui/locales/ka.toml
@@ -2013,6 +2013,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"component.combineVariants" = "ვარიანტებად გაერთიანება"
"component.create" = "კომპონენტის შექმნა"
"component.createMultiple" = "რამდენიმე კომპონენტის შექმნა"
+"component.createSet" = "კომპონენტების ნაკრების შექმნა"
"component.deleteProperty" = "კომპონენტის თვისების წაშლა"
"component.detach" = "ინსტანსის გამოყოფა"
"component.editProperty" = "კომპონენტის თვისების რედაქტირება"
diff --git a/crates/ui-egui/locales/ko.toml b/crates/ui-egui/locales/ko.toml
index ebea678d1..6b5a39b60 100644
--- a/crates/ui-egui/locales/ko.toml
+++ b/crates/ui-egui/locales/ko.toml
@@ -1978,6 +1978,7 @@ status = "draft — needs native review"
"component.combineVariants" = "배리언트로 결합"
"component.create" = "컴포넌트 만들기"
"component.createMultiple" = "여러 컴포넌트 만들기"
+"component.createSet" = "컴포넌트 세트 만들기"
"component.deleteProperty" = "컴포넌트 속성 삭제"
"component.detach" = "인스턴스 분리"
"component.editProperty" = "컴포넌트 속성 편집"
diff --git a/crates/ui-egui/locales/nl.toml b/crates/ui-egui/locales/nl.toml
index e43d40b5e..a1d39c7fd 100644
--- a/crates/ui-egui/locales/nl.toml
+++ b/crates/ui-egui/locales/nl.toml
@@ -1956,6 +1956,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Combineren als varianten"
"component.create" = "Component maken"
"component.createMultiple" = "Meerdere componenten maken"
+"component.createSet" = "Componentenset maken"
"component.deleteProperty" = "Componenteigenschap verwijderen"
"component.detach" = "Instance loskoppelen"
"component.editProperty" = "Componenteigenschap bewerken"
diff --git a/crates/ui-egui/locales/pl.toml b/crates/ui-egui/locales/pl.toml
index 68fe136d7..c479cd1be 100644
--- a/crates/ui-egui/locales/pl.toml
+++ b/crates/ui-egui/locales/pl.toml
@@ -1969,6 +1969,7 @@ name = "Polski"
"component.combineVariants" = "Połącz jako warianty"
"component.create" = "Utwórz komponent"
"component.createMultiple" = "Utwórz wiele komponentów"
+"component.createSet" = "Utwórz zestaw komponentów"
"component.deleteProperty" = "Usuń właściwość komponentu"
"component.detach" = "Odłącz instancję"
"component.editProperty" = "Edytuj właściwość komponentu"
diff --git a/crates/ui-egui/locales/pt-BR.toml b/crates/ui-egui/locales/pt-BR.toml
index c2ccba835..efcde47fe 100644
--- a/crates/ui-egui/locales/pt-BR.toml
+++ b/crates/ui-egui/locales/pt-BR.toml
@@ -1975,6 +1975,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Combinar como variantes"
"component.create" = "Criar componente"
"component.createMultiple" = "Criar vários componentes"
+"component.createSet" = "Criar conjunto de componentes"
"component.deleteProperty" = "Excluir propriedade de componente"
"component.detach" = "Desvincular instância"
"component.editProperty" = "Editar propriedade de componente"
diff --git a/crates/ui-egui/locales/ru.toml b/crates/ui-egui/locales/ru.toml
index 01e1d86ac..97980eaed 100644
--- a/crates/ui-egui/locales/ru.toml
+++ b/crates/ui-egui/locales/ru.toml
@@ -1969,6 +1969,7 @@ name = "Русский"
"component.combineVariants" = "Объединить в варианты"
"component.create" = "Создать компонент"
"component.createMultiple" = "Создать несколько компонентов"
+"component.createSet" = "Создать набор компонентов"
"component.deleteProperty" = "Удалить свойство компонента"
"component.detach" = "Отсоединить экземпляр"
"component.editProperty" = "Изменить свойство компонента"
diff --git a/crates/ui-egui/locales/sv.toml b/crates/ui-egui/locales/sv.toml
index a94feb2a9..0a97701f8 100644
--- a/crates/ui-egui/locales/sv.toml
+++ b/crates/ui-egui/locales/sv.toml
@@ -2076,6 +2076,7 @@ name = "Svenska"
"component.combineVariants" = "Kombinera som varianter"
"component.create" = "Skapa komponent"
"component.createMultiple" = "Skapa flera komponenter"
+"component.createSet" = "Skapa komponentuppsättning"
"component.deleteProperty" = "Radera komponentegenskap"
"component.detach" = "Koppla bort instans"
"component.editProperty" = "Redigera komponentegenskap"
diff --git a/crates/ui-egui/locales/th.toml b/crates/ui-egui/locales/th.toml
index 81b581ce0..d5e98915f 100644
--- a/crates/ui-egui/locales/th.toml
+++ b/crates/ui-egui/locales/th.toml
@@ -1934,6 +1934,7 @@ status = "draft — needs native review"
"component.combineVariants" = "รวมเป็นแวเรียนต์"
"component.create" = "สร้างคอมโพเนนต์"
"component.createMultiple" = "สร้างหลายคอมโพเนนต์"
+"component.createSet" = "สร้างชุดคอมโพเนนต์"
"component.deleteProperty" = "ลบพร็อพเพอร์ตีของคอมโพเนนต์"
"component.detach" = "ถอดอินสแตนซ์"
"component.editProperty" = "แก้ไขพร็อพเพอร์ตีของคอมโพเนนต์"
diff --git a/crates/ui-egui/locales/tr.toml b/crates/ui-egui/locales/tr.toml
index b07d25462..25bf777ce 100644
--- a/crates/ui-egui/locales/tr.toml
+++ b/crates/ui-egui/locales/tr.toml
@@ -1917,6 +1917,7 @@ name = "Türkçe"
"component.combineVariants" = "Varyant olarak birleştir"
"component.create" = "Bileşen oluştur"
"component.createMultiple" = "Birden çok bileşen oluştur"
+"component.createSet" = "Bileşen kümesi oluştur"
"component.deleteProperty" = "Bileşen özelliğini sil"
"component.detach" = "Örneği ayır"
"component.editProperty" = "Bileşen özelliğini düzenle"
diff --git a/crates/ui-egui/locales/vi.toml b/crates/ui-egui/locales/vi.toml
index 9a4d600fe..98420ba48 100644
--- a/crates/ui-egui/locales/vi.toml
+++ b/crates/ui-egui/locales/vi.toml
@@ -1862,6 +1862,7 @@ status = "draft — needs native review"
"component.combineVariants" = "Kết hợp thành các biến thể"
"component.create" = "Tạo thành phần"
"component.createMultiple" = "Tạo nhiều thành phần"
+"component.createSet" = "Tạo bộ thành phần"
"component.deleteProperty" = "Xóa thuộc tính thành phần"
"component.detach" = "Tách bản thể"
"component.editProperty" = "Chỉnh sửa thuộc tính thành phần"
diff --git a/crates/ui-egui/locales/zh-Hans.toml b/crates/ui-egui/locales/zh-Hans.toml
index b48345acc..7d6bfb0b7 100644
--- a/crates/ui-egui/locales/zh-Hans.toml
+++ b/crates/ui-egui/locales/zh-Hans.toml
@@ -1871,6 +1871,7 @@ status = "draft — needs native review"
"component.combineVariants" = "合并为变体"
"component.create" = "创建组件"
"component.createMultiple" = "创建多个组件"
+"component.createSet" = "创建组件集"
"component.deleteProperty" = "删除组件属性"
"component.detach" = "分离实例"
"component.editProperty" = "编辑组件属性"
diff --git a/crates/ui-egui/locales/zh-Hant.toml b/crates/ui-egui/locales/zh-Hant.toml
index f14698b00..59b9064de 100644
--- a/crates/ui-egui/locales/zh-Hant.toml
+++ b/crates/ui-egui/locales/zh-Hant.toml
@@ -2089,6 +2089,7 @@ status = "draft — needs native review"
"component.combineVariants" = "合併為變體"
"component.create" = "建立元件"
"component.createMultiple" = "建立多個元件"
+"component.createSet" = "建立元件集"
"component.deleteProperty" = "刪除元件屬性"
"component.detach" = "分離實例"
"component.editProperty" = "編輯元件屬性"
From 0fec344f3cc1cc439808aed4781390f9ca76123c Mon Sep 17 00:00:00 2001
From: Trevor Brown
Date: Sat, 7 Nov 2026 23:38:58 -0500
Subject: [PATCH 17/61] M8: copy, cut and paste in vector edit mode act on the
selected points and segments (#1875)
Measured in Figma: in vector edit mode Copy takes only the selected segments (a lone point, the segments touching it) and a paste outside makes a new vector in place; Cut removes them, splitting the path in the same layer and staying in edit mode; Paste while editing adds the clipboard's segments or a copied layer's outline to the vector's network in place, selecting them. FigCraft copied the whole layer, Cut left nothing to paste, and Paste while editing did nothing. 16 new engine and UI tests cover copy, cut, paste, undo and junk parameters; the whole engine suite passes bar the known font test.
Co-Authored-By: Claude Sonnet 5.5
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at high
---
crates/engine/src/canvas/vectoredit.rs | 2 +-
crates/engine/src/cmd/edit.rs | 21 +-
crates/engine/src/cmd/edit/clipboard.rs | 62 +++-
.../engine/src/cmd/edit/vector_clipboard.rs | 274 +++++++++++++++
.../src/cmd/edit/vector_clipboard_tests.rs | 324 ++++++++++++++++++
crates/ui-egui/src/menus.rs | 10 +-
crates/ui-egui/src/shortcuts.rs | 13 +-
crates/ui-egui/src/vector_keys_tests.rs | 12 +
docs/ui-parity.md | 5 +-
9 files changed, 701 insertions(+), 22 deletions(-)
create mode 100644 crates/engine/src/cmd/edit/vector_clipboard.rs
create mode 100644 crates/engine/src/cmd/edit/vector_clipboard_tests.rs
diff --git a/crates/engine/src/canvas/vectoredit.rs b/crates/engine/src/canvas/vectoredit.rs
index 4f265e0f5..749e246c0 100644
--- a/crates/engine/src/canvas/vectoredit.rs
+++ b/crates/engine/src/canvas/vectoredit.rs
@@ -638,7 +638,7 @@ fn index(cmd: &str, p: &Value, key: &str) -> Result {
}
/// Delete the points and segments of `parts` (`heal` keeps paths through deleted points closed).
-fn delete_selection(s: &mut Session, parts: Vec, heal: bool) -> Result<()> {
+pub(crate) fn delete_selection(s: &mut Session, parts: Vec, heal: bool) -> Result<()> {
let doc = s.doc_mut()?;
for EditPart { id, vertices: verts, segments: segs } in parts {
edit(doc, id, |net| {
diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs
index efcb0fc52..19a7d7011 100644
--- a/crates/engine/src/cmd/edit.rs
+++ b/crates/engine/src/cmd/edit.rs
@@ -17,6 +17,9 @@ mod clipboard;
mod props;
pub(crate) use props::{edit_region_fills, fill_regions};
mod select;
+mod vector_clipboard;
+#[cfg(test)]
+mod vector_clipboard_tests;
pub(crate) use clipboard::apply_copied_props;
pub use clipboard::{CLIP_CLOSE, CLIP_OPEN, copy_to_clipboard, design_clipboard_buffer, paste_into};
@@ -117,12 +120,24 @@ pub fn specs() -> Vec {
true,
duplicate
),
- spec!("edit.copy", "Copy", "{ids?}", false, copy),
- spec!("edit.cut", "Cut", "{ids?}", true, cut),
+ spec!(
+ "edit.copy",
+ "Copy",
+ "{ids?} in vector edit mode with points or segments selected (and no ids): just those, the segments touching a selected point, as a new vector with the edited layer's look",
+ false,
+ copy
+ ),
+ spec!(
+ "edit.cut",
+ "Cut",
+ "{ids?} in vector edit mode with points or segments selected (and no ids): copies them as Copy does, then removes them as Delete does; the path splits in the same layer and edit mode stays on",
+ true,
+ cut
+ ),
spec!(
"edit.paste",
"Paste",
- "{parent?, x?, y? (page coordinates of the pasted top-left)} a copied main component pastes as an instance of it within its file (cut ones, and pastes into other files, keep the component)",
+ "{parent?, x?, y? (page coordinates of the pasted top-left)} in vector edit mode (and no parent): the copied vectors' segments and shapes' outlines join the edited vector's network in place, selected, and the layers that have no outline (text, frames, groups) are skipped (`skipped`); a copied main component pastes as an instance of it within its file (cut ones, and pastes into other files, keep the component)",
true,
paste
),
diff --git a/crates/engine/src/cmd/edit/clipboard.rs b/crates/engine/src/cmd/edit/clipboard.rs
index 150a3b577..da5089419 100644
--- a/crates/engine/src/cmd/edit/clipboard.rs
+++ b/crates/engine/src/cmd/edit/clipboard.rs
@@ -1,6 +1,6 @@
use super::{
- Affine, BTreeMap, BTreeSet, Document, EngineError, ImageData, Node, NodeId, NodeKind, Result, Session, Value, bad, delete, id, json, num, ok,
- req_targets, roots, string, targets, z_sorted,
+ Affine, BTreeMap, BTreeSet, Document, EngineError, ImageData, Node, NodeId, NodeKind, Result, Session, Value, bad, delete, get, id, json, num,
+ ok, req_targets, roots, string, targets, vector_clipboard, z_sorted,
};
/// The copied form of the selection.
@@ -12,6 +12,18 @@ pub fn copy_to_clipboard(s: &mut Session, cmd: &str, ids: &[NodeId]) -> Result<(
return Err(EngineError::Disabled(cmd.into(), "pages can't be copied; use page.duplicate".into()));
}
let (nodes, images, bounds) = copied(&ds.doc, &layers);
+ store_clipboard(s, cmd, nodes, images, bounds)
+}
+
+/// Make `nodes` (the copied layers, each root's transform in page space) the clipboard's layers.
+pub(super) fn store_clipboard(
+ s: &mut Session,
+ cmd: &str,
+ nodes: Vec<(NodeId, Vec)>,
+ images: BTreeMap,
+ bounds: Option,
+) -> Result<()> {
+ let ds = s.ds()?;
let (source, source_path, uid) = (ds.doc.clone(), ds.path.clone(), ds.uid);
s.clipboard.source = Some(source);
s.clipboard.source_path = source_path;
@@ -43,21 +55,26 @@ fn copied(doc: &Document, ids: &[NodeId]) -> Copied {
if let Some(r) = sub.first_mut() {
r.transform = world;
}
- for n in &sub {
- for p in n.fills.iter().chain(n.strokes.iter()) {
- if let figcraft_color::PaintKind::Image(img) = &p.kind
- && let Some(d) = doc.images.get(&img.image)
- {
- images.insert(img.image.clone(), d.clone());
- }
- }
- }
+ collect_images(doc, &sub, &mut images);
nodes.push((*i, sub));
}
let bounds = doc.bounds_of(&ids);
(nodes, images, bounds)
}
+/// The images the paints of `nodes` use, taken from `doc` into `images`.
+pub(super) fn collect_images(doc: &Document, nodes: &[Node], images: &mut BTreeMap) {
+ for n in nodes {
+ for p in n.fills.iter().chain(n.strokes.iter()) {
+ if let figcraft_color::PaintKind::Image(img) = &p.kind
+ && let Some(d) = doc.images.get(&img.image)
+ {
+ images.insert(img.image.clone(), d.clone());
+ }
+ }
+ }
+}
+
/// The markers around the copied layers in the clipboard's HTML, spelt as that format spells them.
pub const CLIP_OPEN: &str = "(figma)";
@@ -167,13 +184,32 @@ fn layers_missing_images(doc: &figcraft_doc::Document, ids: &[NodeId]) -> Vec bool {
+ get(p, "ids").is_some() || get(p, "id").is_some()
+}
+
pub(super) fn copy(s: &mut Session, p: &Value) -> Result {
+ // In vector edit mode with points or segments selected, Copy takes just those (#1875).
+ if !names_layers(p)
+ && let Some(sel) = vector_clipboard::edit_selection(s)
+ && !sel.parts.is_empty()
+ {
+ return vector_clipboard::copy_selection(s, "edit.copy", sel);
+ }
let ids = req_targets("edit.copy", s, p)?;
copy_to_clipboard(s, "edit.copy", &ids)?;
Ok(json!({"copied": s.clipboard.nodes.len()}))
}
pub(super) fn cut(s: &mut Session, p: &Value) -> Result {
+ // In vector edit mode with points or segments selected, Cut takes just those and stays in edit mode (#1875).
+ if !names_layers(p)
+ && let Some(sel) = vector_clipboard::edit_selection(s)
+ && sel.any
+ {
+ return vector_clipboard::cut_selection(s, sel);
+ }
let ids = req_targets("edit.cut", s, p)?;
copy_to_clipboard(s, "edit.cut", &ids)?;
let doc = s.doc()?;
@@ -238,6 +274,10 @@ pub fn paste_into(s: &mut Session, parent: NodeId, at: Option<(f64, f64)>) -> Re
}
pub(super) fn paste(s: &mut Session, p: &Value) -> Result {
+ // While editing a vector, the copied layers join its network (#1875); `parent` asks for layers.
+ if id(p, "parent").is_none() && s.ds()?.vector_edit.is_some() {
+ return vector_clipboard::paste_into_vector(s, p);
+ }
let page = s.page()?;
// Figma pastes into the selected frame (if one is selected), at the same position when it fits,
// else in the frame's centre; otherwise in place on the page (or the viewport centre).
diff --git a/crates/engine/src/cmd/edit/vector_clipboard.rs b/crates/engine/src/cmd/edit/vector_clipboard.rs
new file mode 100644
index 000000000..d9efea269
--- /dev/null
+++ b/crates/engine/src/cmd/edit/vector_clipboard.rs
@@ -0,0 +1,274 @@
+//! Copy, cut and paste in vector edit mode (#1875).
+//!
+//! With points or segments selected, Copy and Cut take just those: a temporary vector holding the
+//! selected segments (and the segments touching a selected point) goes on the ordinary layer
+//! clipboard, kept at its place on the page, so a paste outside edit mode is a plain layer paste
+//! in place. Cut then removes the selection the way Delete does and stays in edit mode. Paste
+//! while editing adds the clipboard's layers to the edited vector's network, in place: a vector
+//! with its segments, a shape or boolean with its outline.
+
+use figcraft_doc::{NodeKind, Region, VectorNetwork};
+
+use super::clipboard::{collect_images, store_clipboard};
+use super::{Affine, BTreeMap, BTreeSet, Document, EngineError, Node, NodeId, Result, Session, Value, json, num};
+use crate::canvas::vectoredit::{self, EditPart};
+
+/// The most segments a vector network takes through a paste.
+const MAX_SEGMENTS: usize = 500_000;
+
+/// What the edited layers have selected.
+pub(super) struct EditSelection {
+ /// Whether any edited layer has a point or a segment selected.
+ pub any: bool,
+ /// Each edited layer with something to copy, and the sub-network that is.
+ pub parts: Vec<(NodeId, VectorNetwork)>,
+}
+
+/// The selection of the vector being edited (and the other layers edited with it), or `None` when
+/// not in vector edit mode.
+pub(super) fn edit_selection(s: &Session) -> Option {
+ let ds = s.ds().ok()?;
+ let ve = ds.vector_edit.as_ref()?;
+ let mut sel = EditSelection { any: false, parts: Vec::new() };
+ for part in ve.parts() {
+ if part.vertices.is_empty() && part.segments.is_empty() {
+ continue;
+ }
+ sel.any = true;
+ let Some(net) = vectoredit::network(&ds.doc, part.id) else { continue };
+ let active = part.id == ve.id;
+ // Points selected only through a selected region don't pull in the segments touching
+ // them: the region's own segments are the selection.
+ let vertices: Vec = part.vertices.iter().copied().filter(|v| !active || !ve.region_vertices.contains(v)).collect();
+ let mut segments = part.segments.clone();
+ if active {
+ segments.extend(ve.regions.iter().filter_map(|r| net.regions.get(*r)).flat_map(|r| r.loops.iter().flatten().copied()));
+ }
+ if let Some(sub) = sub_network(net, &vertices, &segments) {
+ sel.parts.push((part.id, sub));
+ }
+ }
+ Some(sel)
+}
+
+/// The part of `net` that is the segments `segments` and those touching a point of `vertices`,
+/// with the points they join; `None` when there are none (a lone point with no segment draws
+/// nothing). The regions whose every segment is kept stay regions.
+fn sub_network(net: &VectorNetwork, vertices: &[usize], segments: &[usize]) -> Option {
+ let picked: BTreeSet = vertices.iter().copied().collect();
+ let mut keep: BTreeSet = segments.iter().copied().filter(|i| *i < net.segments.len()).collect();
+ for (i, sg) in net.segments.iter().enumerate() {
+ if picked.contains(&sg.a) || picked.contains(&sg.b) {
+ keep.insert(i);
+ }
+ }
+ let used: BTreeSet = keep.iter().filter_map(|i| net.segments.get(*i)).flat_map(|sg| [sg.a, sg.b]).collect();
+ let vmap: BTreeMap = used.iter().enumerate().map(|(new, old)| (*old, new)).collect();
+ let smap: BTreeMap = keep.iter().enumerate().map(|(new, old)| (*old, new)).collect();
+ let mut out = VectorNetwork {
+ vertices: used.iter().filter_map(|v| net.vertices.get(*v).cloned()).collect(),
+ segments: keep
+ .iter()
+ .filter_map(|i| net.segments.get(*i))
+ .filter_map(|sg| {
+ let mut sg = *sg;
+ sg.a = *vmap.get(&sg.a)?;
+ sg.b = *vmap.get(&sg.b)?;
+ Some(sg)
+ })
+ .collect(),
+ regions: Vec::new(),
+ };
+ if out.segments.is_empty() || out.segments.len() != keep.len() || out.vertices.len() != used.len() {
+ return None;
+ }
+ for r in &net.regions {
+ let loops: Option>> = r.loops.iter().map(|l| l.iter().map(|i| smap.get(i).copied()).collect::
")), "slot Label HTML: {html}");
+}
+
+fn assert_local_slot_text(s: &mut Session, instance: NodeId, expected: &str) {
+ assert!(matches!(&node(s, instance).kind, NodeKind::Instance { props, .. } if props.get("Text") == Some(&json!(expected))));
+ let properties = props_of(s, instance);
+ assert_eq!(properties.iter().find(|p| p["name"] == "Text").unwrap()["value"], expected);
+}
+
+#[test]
+fn slot_text_properties_stay_local_in_default_and_own_content() {
+ for own in [false, true] {
+ let mut s = Session::new();
+ let (content, label, _base, composition, main_content) = slot_text_composition(&mut s, own);
+ let a = idv(&ex(&mut s, "instance.create", json!({"component": composition, "x": 400})));
+ let b = idv(&ex(&mut s, "instance.create", json!({"component": composition, "x": 800})));
+ let ac = copy_of(&s, a, main_content);
+ let bc = copy_of(&s, b, main_content);
+ ex(&mut s, "instance.setProperties", json!({"ids": [ac], "properties": {"Text": "Custom"}}));
+ assert_local_slot_text(&mut s, ac, "Custom");
+ assert_slot_text(&mut s, ac, "Custom");
+ assert_slot_text(&mut s, bc, "Default");
+ assert_slot_text(&mut s, main_content, "Default");
+ assert_eq!(node(&s, label).kind.text().unwrap().characters, "Default");
+ // Main property edits propagate without replacing another instance's local value.
+ ex(&mut s, "instance.setProperties", json!({"ids": [main_content], "properties": {"Text": "Main value"}}));
+ assert_slot_text(&mut s, ac, "Custom");
+ assert_slot_text(&mut s, bc, "Main value");
+ assert_slot_text(&mut s, main_content, "Main value");
+ ex(&mut s, "component.editProperty", json!({"id": content, "name": "Text", "default": "New default"}));
+ assert_slot_text(&mut s, ac, "Custom");
+ assert_slot_text(&mut s, bc, "Main value");
+ healthy(&s);
+ }
+}
+
+#[test]
+fn slot_text_properties_do_not_read_an_unbound_base_property() {
+ let mut s = Session::new();
+ let (_content, _label, base, composition, main_content) = slot_text_composition(&mut s, true);
+ ex(&mut s, "component.addProperty", json!({"id": base, "name": "Text", "type": "text", "default": "Wrong owner"}));
+ let i = idv(&ex(&mut s, "instance.create", json!({"component": composition, "x": 400})));
+ let nested = copy_of(&s, i, main_content);
+ assert_slot_text(&mut s, nested, "Default");
+ ex(&mut s, "instance.setProperties", json!({"ids": [nested], "properties": {"Text": "Custom"}}));
+ assert_local_slot_text(&mut s, nested, "Custom");
+ assert_slot_text(&mut s, nested, "Custom");
+ assert_slot_text(&mut s, main_content, "Default");
+ healthy(&s);
+}
+
+#[test]
+fn slot_text_properties_survive_inherited_own_content_and_persistence() {
+ let mut s = Session::new();
+ let (_content, _label, _base, composition, main_content) = slot_text_composition(&mut s, true);
+ let (outer, inherited) = slot_text_wrapper(&mut s, composition, "Outer composition");
+ let inherited_content = copy_of(&s, inherited, main_content);
+ let a = idv(&ex(&mut s, "instance.create", json!({"component": outer, "x": 400})));
+ let b = idv(&ex(&mut s, "instance.create", json!({"component": outer, "x": 800})));
+ let ac = copy_of(&s, a, inherited_content);
+ let bc = copy_of(&s, b, inherited_content);
+ ex(&mut s, "instance.setProperties", json!({"ids": [ac], "properties": {"Text": "Custom"}}));
+ assert_local_slot_text(&mut s, ac, "Custom");
+ let bytes = figcraft_format::save_bytes(s.doc().unwrap(), None).unwrap();
+ let (back, _) = figcraft_format::load_bytes(&bytes).unwrap();
+ let mut s = Session::with_document(back);
+ assert_local_slot_text(&mut s, ac, "Custom");
+ assert_slot_text(&mut s, ac, "Custom");
+ assert_slot_text(&mut s, bc, "Default");
+ assert_slot_text(&mut s, inherited_content, "Default");
+ assert_slot_text(&mut s, main_content, "Default");
+ // Explicit characters override the bound property, even after a main update.
+ let alabel = kids(&s, ac)[0];
+ ex(&mut s, "text.set", json!({"id": alabel, "characters": "Explicit"}));
+ ex(&mut s, "instance.setProperties", json!({"ids": [ac], "properties": {"Text": "Later"}}));
+ ex(&mut s, "instance.setProperties", json!({"ids": [main_content], "properties": {"Text": "Main value"}}));
+ assert_local_slot_text(&mut s, ac, "Later");
+ assert_slot_text(&mut s, ac, "Explicit");
+ assert_slot_text(&mut s, bc, "Main value");
+ ex(&mut s, "component.resetOverride", json!({"id": alabel, "group": "characters"}));
+ assert_slot_text(&mut s, ac, "Later");
+ s.undo().unwrap();
+ assert_slot_text(&mut s, ac, "Explicit");
+ healthy(&s);
+}
+
/// Random slot edits, main edits and resets keep every instance mirroring its main.
#[test]
fn random_slot_edits_keep_instances_consistent() {
From 0ff3a3682ea8b2e2df68fab3156c2c99d4b8c442 Mon Sep 17 00:00:00 2001
From: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
Date: Sun, 8 Nov 2026 19:22:04 +0000
Subject: [PATCH 26/61] Reject negative and fractional index in file.openRecent
Found while testing crates/engine/src/cmd/file/open.rs:33 (open_recent, `.nth(i.max(0.0) as usize)`)
Co-Authored-By: Claude Haiku 5.5
Co-Authored-By: Claude Sonnet 5.5
---
crates/engine/src/cmd/file/open.rs | 5 ++++-
crates/engine/src/menu_gaps_tests.rs | 17 +++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/crates/engine/src/cmd/file/open.rs b/crates/engine/src/cmd/file/open.rs
index e4c3e0fb7..b6e154c35 100644
--- a/crates/engine/src/cmd/file/open.rs
+++ b/crates/engine/src/cmd/file/open.rs
@@ -31,7 +31,10 @@ pub(super) fn open_recent(s: &mut Session, p: &Value) -> Result {
Some(path)
}
(None, Some(i)) => {
- Some(s.prefs.recent_files.iter().filter(|r| listed(r)).nth(i.max(0.0) as usize).cloned().ok_or_else(|| bad(CMD, "no such recent file"))?)
+ if !(i >= 0.0 && i.fract() == 0.0) {
+ return Err(bad(CMD, "no such recent file"));
+ }
+ Some(s.prefs.recent_files.iter().filter(|r| listed(r)).nth(i as usize).cloned().ok_or_else(|| bad(CMD, "no such recent file"))?)
}
_ => None,
};
diff --git a/crates/engine/src/menu_gaps_tests.rs b/crates/engine/src/menu_gaps_tests.rs
index 057c5119a..fa32f5d8f 100644
--- a/crates/engine/src/menu_gaps_tests.rs
+++ b/crates/engine/src/menu_gaps_tests.rs
@@ -84,3 +84,20 @@ fn outlined_layers_draw_as_outlines_and_the_rest_normally() {
assert_eq!(outlined.pixel(20, 20).unwrap(), empty, "only its outline");
assert_eq!(outlined.pixel(80, 20).unwrap(), plain.pixel(80, 20).unwrap(), "the other layer draws normally");
}
+
+#[test]
+fn open_recent_rejects_negative_and_fractional_index() {
+ let dir = std::env::temp_dir().join(format!("figcraft-recent-bad-{}", std::process::id()));
+ std::fs::create_dir_all(&dir).unwrap();
+ let a = dir.join("a.figcraft").to_string_lossy().to_string();
+ let b = dir.join("b.figcraft").to_string_lossy().to_string();
+ let mut s = Session::new();
+ s.execute("file.save", &json!({"path": a})).unwrap();
+ s.execute("file.saveAs", &json!({"path": b})).unwrap();
+ let recent = s.prefs.recent_files.clone();
+ for i in [json!(-1), json!(1.5), json!(-0.5)] {
+ assert!(s.execute("file.openRecent", &json!({"index": i})).is_err(), "index {i} must be an error");
+ }
+ assert_eq!(s.prefs.recent_files, recent);
+ let _ = std::fs::remove_dir_all(&dir);
+}
From 9c2c2cb74eb3a960dc3f36ab55bd7e603a1e2601 Mon Sep 17 00:00:00 2001
From: Davit Matchakhelidze
Date: Mon, 9 Nov 2026 00:59:12 +0400
Subject: [PATCH 27/61] i18n(ka): place the new rows next to their English keys
(review)
---
crates/ui-egui/locales/ka.toml | 228 ++++++++++++++++-----------------
1 file changed, 114 insertions(+), 114 deletions(-)
diff --git a/crates/ui-egui/locales/ka.toml b/crates/ui-egui/locales/ka.toml
index 8a4a70475..80b99a957 100644
--- a/crates/ui-egui/locales/ka.toml
+++ b/crates/ui-egui/locales/ka.toml
@@ -16,7 +16,10 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"({n} warnings: some entries were skipped)" = { one = "(გაფრთხილება: {n}; ზოგი ჩანაწერი გამოტოვებულია)", other = "(გაფრთხილება: {n}; ზოგი ჩანაწერი გამოტოვებულია)" }
"+ Create variable" = "+ ცვლადის შექმნა"
".fig (experimental)" = ".fig (ექსპერიმენტული)"
+"1 year" = "1 წელი"
"1…9, 0" = "1…9, 0"
+"30 days" = "30 დღე"
+"90 days" = "90 დღე"
"@{login}: {prs} PRs, {commits} commits, +{added} / −{deleted} lines (Δ {delta}), +{bin_added} / −{bin_deleted} binary assets, {first} – {last}" = "@{login}: PR: {prs}, კომიტი: {commits}, +{added} / −{deleted} სტრიქონი (Δ {delta}), +{bin_added} / −{bin_deleted} ბინარული რესურსი, {first} – {last}"
"A collection of this file with these modes and variables: override their values per mode and add variables of its own" = "ამ ფაილის კოლექცია ამ რეჟიმებითა და ცვლადებით: შეცვალეთ მათი მნიშვნელობები თითოეული რეჟიმისთვის და დაამატეთ საკუთარი ცვლადები"
"A .figcraft file with this name already exists. Choose its full name to confirm replacement." = "ამ სახელით .figcraft ფაილი უკვე არსებობს. ჩანაცვლების დასადასტურებლად აირჩიეთ მისი სრული სახელი."
@@ -105,13 +108,14 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"All supported properties" = "ყველა მხარდაჭერილი თვისება"
"All the fonts this file uses are installed" = "ამ ფაილის ყველა შრიფტი დაინსტალირებულია"
"All variables" = "ყველა ცვლადი"
+"Allow and download" = "დაშვება და ჩამოტვირთვა"
+"Allow downloading fonts?" = "დაიშვას შრიფტების ჩამოტვირთვა?"
"Along the bottom" = "ქვედა კიდის გასწვრივ"
"Along the left" = "მარცხენა კიდის გასწვრივ"
"Along the right" = "მარჯვენა კიდის გასწვრივ"
"Along the top" = "ზედა კიდის გასწვრივ"
"Alpha" = "ალფა"
"Alphabetical" = "ანბანის მიხედვით"
-"Alt+double-click an edge of an auto layout child" = "Alt+ორმაგი დაწკაპუნება ავტოგანლაგების შვილობილი ელემენტის კიდეზე"
"Alt+drag" = "Alt+გადათრევა"
"An analytics screen on a grid: figures, charts drawn from vectors and a table" = "ანალიტიკა ბადეზე: ციფრები, დიაგრამები და ცხრილი"
"An earlier vote" = "ადრინდელი კენჭისყრა"
@@ -160,7 +164,6 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Auto layout" = "ავტოგანლაგება"
"Auto rows" = "ავტომატური სტრიქონები"
"Auto width" = "ავტომატური სიგანე"
-"Auto: by the first letter with a direction" = "ავტომატური: მიმართულების მქონე პირველი ასოს მიხედვით"
"Back to the FigCraft server" = "FigCraft-ის სერვერზე დაბრუნება"
"Back to the font's value" = "შრიფტის მნიშვნელობაზე დაბრუნება"
"Back" = "უკან"
@@ -189,6 +192,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Blend mode" = "შერევის რეჟიმი"
"Blue" = "ლურჯი"
"Blur" = "გაბუნდოვნება"
+"Board grid" = "დაფის ბადე"
"Boolean" = "ლოგიკური"
"Boolean groups" = "ლოგიკური ოპერაციების ჯგუფები"
"Both directions" = "ორივე მიმართულება"
@@ -220,6 +224,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Bulleted list" = "ბურთულებიანი სია"
"C or Shift+C" = "C ან Shift+C"
"C or ⇧C" = "C ან ⇧C"
+"Changed {date}" = "შეცვლილია: {date}"
"CMYK colour" = "CMYK ფერი"
"Can view" = "შეუძლია ნახვა"
"Can comment" = "შეუძლია კომენტარი"
@@ -237,6 +242,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Connector" = "შემაერთებელი"
"Convert to frame" = "ჩარჩოდ გარდაქმნა"
"Convert to section" = "სექციად გარდაქმნა"
+"Copy browser link" = "ბრაუზერის ბმულის კოპირება"
+"Couldn't reach {server} for its team list." = "{server}-იდან გუნდის სიის მიღება ვერ მოხერხდა."
"CSS custom properties…" = "CSS-ის მორგებული თვისებები…"
"Can edit" = "შეუძლია რედაქტირება"
"Can't read this library: {e}" = "ამ ბიბლიოთეკის წაკითხვა ვერ მოხერხდა: {e}"
@@ -341,7 +348,6 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Copy as PNG" = "კოპირება როგორც PNG"
"Copy as SVG" = "კოპირება როგორც SVG"
"Copy code" = "კოდის კოპირება"
-"Copy for AI" = "კოპირება AI-სთვის"
"Copy link" = "ბმულის კოპირება"
"Copy the {label}" = "კოპირება: {label}"
"Copy {value}" = "კოპირება: {value}"
@@ -368,11 +374,12 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Create style from the selected text" = "სტილის შექმნა მონიშნული ტექსტიდან"
"Created" = "შექმნილია"
"Crop" = "ჩამოჭრა"
+"Crop image" = "გამოსახულების ჩამოჭრა"
"Crop marks" = "ჭრის ნიშნები"
-"Ctrl+Alt+← ↑ → ↓" = "Ctrl+Alt+← ↑ → ↓"
"Ctrl+arrows" = "Ctrl+ისრები"
"Ctrl+click" = "Ctrl+დაწკაპუნება"
"Ctrl+click a padding field" = "Ctrl+დაწკაპუნება შიდა დაშორების ველზე"
+"⌘ click a padding field" = "⌘ დაწკაპუნება შიდა დაშორების ველზე"
"Ctrl+scroll" = "Ctrl+გადახვევა"
"Current name" = "მიმდინარე სახელი"
"Current version" = "მიმდინარე ვერსია"
@@ -392,53 +399,40 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Decoration style" = "გაფორმების სტილი"
"Decoration" = "გაფორმება"
"Deep select" = "ღრმა მონიშვნა"
+"Scrub a field faster (2x) or slower (1/2, 1/4)" = "ველის მნიშვნელობის გადათრევით ცვლა უფრო სწრაფად (2x) ან ნელა (1/2, 1/4)"
+"Move up or down while dragging its label" = "ზემოთ ან ქვემოთ გადაადგილება მისი იარლიყის გადათრევისას"
+"Scrubbing at 2x" = "გადათრევით ცვლა: 2x"
+"Scrubbing at 1x" = "გადათრევით ცვლა: 1x"
+"Scrubbing at 1/2" = "გადათრევით ცვლა: 1/2"
+"Scrubbing at 1/4" = "გადათრევით ცვლა: 1/4"
"Delete {n} variables" = { one = "ცვლადის წაშლა: {n}", other = "ცვლადის წაშლა: {n}" }
-"Disconnected. Reconnecting…" = "კავშირი გაწყდა. ხელახლა დაკავშირება…"
-"Disconnected. Your edits stay here and sync when the connection returns. Reconnecting…" = "კავშირი გაწყდა. თქვენი ცვლილებები აქ რჩება და სინქრონიზდება, როცა კავშირი აღდგება. ხელახლა დაკავშირება…"
-"Dismiss" = "უგულებელყოფა"
-"Double-click an edge of an auto layout frame" = "ორმაგი დაწკაპუნება ავტოგანლაგების ჩარჩოს კიდეზე"
-"Edit padding on all sides" = "შიდა დაშორების რედაქტირება ყველა მხარეს"
-"Enter / Shift+Enter" = "Enter / Shift+Enter"
-"Expand the interface" = "ინტერფეისის გაშლა"
-"Hide UI" = "ინტერფეისის დამალვა"
-"Left to right" = "მარცხნიდან მარჯვნივ"
"Move out of any group" = "ჯგუფიდან გამოტანა"
"Move to group {group}" = "ჯგუფში გადატანა: {group}"
-"Move up or down while dragging its label" = "ზემოთ ან ქვემოთ გადაადგილება მისი იარლიყის გადათრევისას"
-"Not connected: {reason}. Your work is still in this tab." = "კავშირი არ არის: {reason}. თქვენი ნამუშევარი ისევ ამ ჩანართშია."
-"Nothing to pick: the page is empty" = "ასარჩევი არაფერია: გვერდი ცარიელია"
-"Pick select: Tab and Shift+Tab move between layers, Enter goes into one, Shift+Enter out, Space selects, Escape cancels" = "შრის არჩევა: Tab და Shift+Tab შრეებს შორის გადაადგილდება, Enter შრეში შედის, Shift+Enter გამოდის, Space მონიშნავს, Escape გააუქმებს"
-"Pick select: into a layer, out to its parent" = "შრის არჩევა: შრეში შესვლა, მშობელზე გასვლა"
-"Pick select: next or previous layer" = "შრის არჩევა: შემდეგი ან წინა შრე"
-"Pick select: select the picked layer" = "შრის არჩევა: არჩეული შრის მონიშვნა"
-"Remove all auto layout" = "ყველა ავტოგანლაგების მოხსნა"
-"Retry now" = "ახლავე ხელახლა ცდა"
-"Right to left" = "მარჯვნიდან მარცხნივ"
-"Rotate a degree (Shift: 15)" = "ერთი გრადუსით შემობრუნება (Shift: 15)"
-"Same as file ({profile})" = "როგორც ფაილში ({profile})"
-"Save a copy…" = "ასლის შენახვა…"
"Scope: all supported properties" = "არე: ყველა მხარდაჭერილი თვისება"
"Scope: hidden from pickers" = "არე: ამომრჩევებში დამალული"
"Scope: only {scope}" = "არე: მხოლოდ {scope}"
-"Scrub a field faster (2x) or slower (1/2, 1/4)" = "ველის მნიშვნელობის გადათრევით ცვლა უფრო სწრაფად (2x) ან ნელა (1/2, 1/4)"
-"Scrubbing at 1/2" = "გადათრევით ცვლა: 1/2"
-"Scrubbing at 1/4" = "გადათრევით ცვლა: 1/4"
-"Scrubbing at 1x" = "გადათრევით ცვლა: 1x"
-"Scrubbing at 2x" = "გადათრევით ცვლა: 2x"
-"Selection box: switch to pick select" = "მონიშვნის ჩარჩო: შრის არჩევაზე გადართვა"
-"Set fill container" = "ზომა: კონტეინერის შევსება"
-"Set hug contents" = "ზომა: შიგთავსზე მორგება"
-"Show and move the placement crosshair (its tool chosen, nothing selected)" = "განთავსების ჯვრის ჩვენება და გადაადგილება (არჩეული ხელსაწყოთი, როცა არაფერია მონიშნული)"
-"Space" = "Space"
-"Tab or Ctrl+Space again" = "Tab ან ხელახლა Ctrl+Space"
-"Text direction" = "ტექსტის მიმართულება"
-"The bars are hidden. {shortcut} shows them again" = "ზოლები დამალულია. {shortcut} ისევ აჩვენებს მათ"
+"Disconnected. Reconnecting…" = "კავშირი გაწყდა. ხელახლა დაკავშირება…"
+"Disconnected. Your edits stay here and sync when the connection returns. Reconnecting…" = "კავშირი გაწყდა. თქვენი ცვლილებები აქ რჩება და სინქრონიზდება, როცა კავშირი აღდგება. ხელახლა დაკავშირება…"
+"Dismiss" = "უგულებელყოფა"
+"Not connected: {reason}. Your work is still in this tab." = "კავშირი არ არის: {reason}. თქვენი ნამუშევარი ისევ ამ ჩანართშია."
+"Retry now" = "ახლავე ხელახლა ცდა"
+"Save a copy…" = "ასლის შენახვა…"
"Wrap style" = "გადატანის სტილი"
+"Text direction" = "ტექსტის მიმართულება"
+"Auto: by the first letter with a direction" = "ავტომატური: მიმართულების მქონე პირველი ასოს მიხედვით"
+"Left to right" = "მარცხნიდან მარჯვნივ"
+"Right to left" = "მარჯვნიდან მარცხნივ"
"Balance" = "დაბალანსებული"
"Pretty" = "მოწესრიგებული"
"Auto: as many words as fit on each line" = "ავტომატური: თითო სტრიქონში იმდენი სიტყვა, რამდენიც ეტევა"
"Balance: every line close to the same length" = "დაბალანსებული: ყველა სტრიქონი დაახლოებით ერთი სიგრძისაა"
"Pretty: full lines, no one word alone on the last" = "მოწესრიგებული: სავსე სტრიქონები, ბოლო სტრიქონზე ერთი სიტყვა მარტო არ რჩება"
+"Set hug contents" = "ზომა: შიგთავსზე მორგება"
+"Set fill container" = "ზომა: კონტეინერის შევსება"
+"Double-click an edge of an auto layout frame" = "ორმაგი დაწკაპუნება ავტოგანლაგების ჩარჩოს კიდეზე"
+"{name}, disconnected from its live session" = "{name}, ცოცხალ სესიასთან კავშირი გაწყვეტილია"
+"⌥ double-click an edge of an auto layout child" = "⌥ ორმაგი დაწკაპუნება ავტოგანლაგების შვილობილი ელემენტის კიდეზე"
+"Alt+double-click an edge of an auto layout child" = "Alt+ორმაგი დაწკაპუნება ავტოგანლაგების შვილობილი ელემენტის კიდეზე"
"Default" = "ნაგულისხმევი"
"Default content" = "ნაგულისხმევი შიგთავსი"
"Default value (the top-left variant)" = "ნაგულისხმევი მნიშვნელობა (ზედა მარცხენა ვარიანტი)"
@@ -468,6 +462,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Desktop" = "დესკტოპი"
"Destination" = "დანიშნულება"
"Detach alias" = "ალიასის გამოყოფა"
+"Detach calculation" = "გამოთვლის გამოყოფა"
"Detach instance" = "ინსტანსის გამოყოფა"
"Detach property" = "თვისების გამოყოფა"
"Detach style" = "სტილის გამოყოფა"
@@ -499,6 +494,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Dots" = "წერტილები"
"Dotted" = "პუნქტირი"
"Down" = "ქვემოთ"
+"Download" = "ჩამოტვირთვა"
+"Downloading… {percent}%" = "ჩამოტვირთვა… {percent}%"
"Drafts" = "მონახაზები"
"Drag the stroke to add a width point" = "გადაათრიეთ კონტური სიგანის წერტილის დასამატებლად"
"Draw" = "ხატვა"
@@ -508,6 +505,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Drop to import" = "ჩააგდეთ იმპორტისთვის"
"Drop to open" = "ჩააგდეთ გასახსნელად"
"Drop shadow" = "ჩრდილი"
+"Drop to use this image" = "ჩააგდეთ ამ გამოსახულების გამოსაყენებლად"
"Dual-licensed MIT OR Apache-2.0. Made by the ArtCraft team and community." = "ორმაგი ლიცენზია: MIT OR Apache-2.0. შექმნილია ArtCraft-ის გუნდისა და საზოგადოების მიერ."
"Duo" = "დუო"
"Duplicate" = "დუბლირება"
@@ -521,6 +519,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Edit dev resource" = "დეველოპერის რესურსის რედაქტირება"
"Edit link" = "რედაქტირების ბმული"
"Edit link copied" = "რედაქტირების ბმული დაკოპირდა"
+"Edit padding on all sides" = "შიდა დაშორების რედაქტირება ყველა მხარეს"
"Edit style" = "სტილის რედაქტირება"
"Edit variable" = "ცვლადის რედაქტირება"
"Edit with the builder" = "კონსტრუქტორით რედაქტირება"
@@ -548,6 +547,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Essential" = "ძირითადი"
"Every conflict has a choice." = "ყველა კონფლიქტს არჩევანი აქვს."
"Every top-level frame already starts a flow" = "ყველა ზედა დონის ჩარჩო უკვე იწყებს ნაკადს"
+"Everyone who reaches this server can open these files while they are shared." = "ამ სერვერთან წვდომის მქონე ყველას შეუძლია ამ ფაილების გახსნა, სანამ ისინი გაზიარებულია."
"Exact opacity (4 then 5: 45%)" = "ზუსტი გაუმჭვირვალობა (4, შემდეგ 5: 45%)"
"Exclude" = "გამორიცხვა"
"Excluded" = "გამორიცხული"
@@ -556,6 +556,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Exclusion" = "გამორიცხვა"
"Exit focus view (Esc)" = "ფოკუსის ხედიდან გასვლა (Esc)"
"Expand" = "გაშლა"
+"Expand the interface" = "ინტერფეისის გაშლა"
"Export" = "ექსპორტირება"
"Export all" = "ყველაფრის ექსპორტირება"
"Export frames and layers as PNG, JPG, SVG or PDF" = "ჩარჩოები და შრეები PNG, JPG, SVG ან PDF ფორმატში"
@@ -582,6 +583,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Fetching from the server…" = "სერვერიდან მიღება…"
"FigCraft couldn't open its window: {error}" = "FigCraft-მა ფანჯრის გახსნა ვერ შეძლო: {error}"
"FigCraft doesn't support every feature of these files yet. The notes list what was left out or changed in the imported copy; the original file is unchanged." = "FigCraft ჯერ ამ ფაილების ყველა შესაძლებლობას არ უჭერს მხარს. შენიშვნებში ჩამოთვლილია, რა გამოტოვდა ან შეიცვალა იმპორტირებულ ასლში; ორიგინალი ფაილი უცვლელია."
+"FigCraft stopped because of an internal error." = "FigCraft-ის მუშაობა შიდა შეცდომის გამო შეწყდა."
"File" = "ფაილი"
"File name" = "ფაილის სახელი"
"File not found" = "ფაილი ვერ მოიძებნა"
@@ -638,6 +640,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Frame selection" = "მონიშნულის ჩარჩოში მოქცევა"
"Frame tools" = "ჩარჩოს ხელსაწყოები"
"Frames" = "ჩარჩოები"
+"Free fonts come from Google Fonts and Noto, through jsDelivr and GitHub. Each file is checked against the font index before it is installed into the font folder the Craft apps share. Nothing is downloaded until you allow it." = "უფასო შრიფტები Google Fonts-იდან და Noto-დან მოდის, jsDelivr-ისა და GitHub-ის გავლით. თითოეული ფაილი შრიფტების ინდექსთან მოწმდება, სანამ Craft-აპების საერთო შრიფტების საქაღალდეში დაინსტალირდება. სანამ არ დაუშვებთ, არაფერი ჩამოიტვირთება."
"From the library \"{name}\": read-only" = "ბიბლიოთეკიდან „{name}“: მხოლოდ წასაკითხად"
"From {name}" = "წყარო: {name}"
"From {server}" = "წყარო: {server}"
@@ -653,6 +656,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Go to {name}" = "{name}-ზე გადასვლა"
"Grab bag" = "სხვადასხვა"
"Gradient" = "გრადიენტი"
+"Graph paper" = "მილიმეტრიანი ქაღალდი"
"Gray" = "ნაცრისფერი"
"Green" = "მწვანე"
"Greyscale components and two example screens to sketch a flow with" = "ნაცრისფერი კომპონენტები ნაკადის ჩანახატისთვის"
@@ -675,6 +679,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Help page" = "დახმარების გვერდი"
"Here: {names}" = "აქ: {names}"
"Hidden" = "დამალული"
+"Hide UI" = "ინტერფეისის დამალვა"
"Hide contents" = "შიგთავსის დამალვა"
"Hide from publishing" = "გამოქვეყნებისას დამალვა"
"Hide section contents" = "სექციის შიგთავსის დამალვა"
@@ -766,6 +771,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Join with a code" = "კოდით შეერთება"
"Joined" = "შეერთებულია"
"Joined {file}" = "შეერთებულია: {file}"
+"Joining live session…" = "ცოცხალ სესიასთან შეერთება…"
"Joining…" = "შეერთება…"
"Join|stroke" = "შეერთება"
"Jul" = "ივლ"
@@ -827,6 +833,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Lines deleted" = "წაშლილი სტრიქონები"
"Link" = "ბმული"
"Link copied" = "ბმული დაკოპირდა"
+"Link copied: it opens the file in FigCraft" = "ბმული დაკოპირდა: ის ფაილს FigCraft-ში ხსნის"
+"Link copied: it opens the file in the browser" = "ბმული დაკოპირდა: ის ფაილს ბრაუზერში ხსნის"
"Link docs, code or tickets for developers." = "მიაბით დოკუმენტაცია, კოდი ან ტიკეტები დეველოპერებისთვის."
"Link frames on the Prototype tab, then present the flow" = "დააკავშირეთ ჩარჩოები და წარადგინეთ ნაკადი"
"Link this component to its code component: instances then show your real snippet with their values." = "დააკავშირეთ ეს კომპონენტი მის კოდის კომპონენტთან: ინსტანსები მაშინ თქვენს რეალურ ფრაგმენტს აჩვენებს მათი მნიშვნელობებით."
@@ -849,10 +857,15 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Make a component" = "შექმენით კომპონენტი"
"Make slot" = "სლოტად გადაქცევა"
"New collection" = "ახალი კოლექცია"
+"Nobody shares a file there now." = "იქ ახლა არავინ აზიარებს ფაილს."
+"Past 30 days" = "ბოლო 30 დღე"
+"Past 90 days" = "ბოლო 90 დღე"
+"Past year" = "ბოლო წელი"
"Pasted design layers" = "ჩასმული დიზაინის ფენები"
"Pasted design layers; the clipboard didn't carry the images of: {layers}" = "დიზაინის ფენები ჩაისვა; ბუფერში არ იყო შემდეგის სურათები: {layers}"
"Remove these results from the file" = "ამ შედეგების ფაილიდან წაშლა"
"Scroll wheel zoom" = "მასშტაბირება გადახვევის ბორბლით"
+"Shared by your team on {server}" = "თქვენი გუნდის მიერ {server}-ზე გაზიარებული"
"Slot name" = "სლოტის სახელი"
"Mar" = "მარ"
"Margin" = "ველი"
@@ -987,15 +1000,18 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Not bound" = "მიბმული არ არის"
"Not in a live session" = "ცოცხალ სესიაში არ ხართ"
"Not in this font" = "ამ შრიფტში არ არის"
+"Not now" = "ახლა არა"
"Not properties, kept as written: {names}" = "არ არის თვისებები, დარჩა დაწერილი სახით: {names}"
"Not read yet" = "ჯერ არ არის წაკითხული"
"Check for updates" = "განახლებების შემოწმება"
"Not checked yet" = "ჯერ არ არის შემოწმებული"
"Someone who left" = "ვინც წავიდა"
"Take the results off the board; they stay in the file" = "შედეგების დაფიდან მოხსნა; ფაილში დარჩება"
+"Upload from computer" = "კომპიუტერიდან ატვირთვა"
"This file uses team libraries on servers you haven't used here. They aren't contacted until you check them." = "ეს ფაილი იყენებს გუნდის ბიბლიოთეკებს სერვერებზე, რომლებიც აქ არ გამოგიყენებიათ. მათ არ დავუკავშირდებით, სანამ არ შეამოწმებთ."
"Not shared" = "არ არის გაზიარებული"
"Note {n}" = "შენიშვნა {n}"
+"Nothing counted yet" = "ჯერ არაფერი დათვლილა"
"Nothing changed since this version." = "ამ ვერსიის შემდეგ არაფერი შეცვლილა."
"Nothing changed since this was marked ready for dev." = "მას შემდეგ, რაც მზად დეველოპერისთვის მოინიშნა, არაფერი შეცვლილა."
"Nothing here yet. Set a frame's status to list it." = "აქ ჯერ არაფერია. ჩარჩოს სიაში გამოსაჩენად მიანიჭეთ სტატუსი."
@@ -1004,6 +1020,9 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Nov" = "ნოე"
"Now" = "ახლა"
"Nudge (Shift: big nudge)" = "მცირედ გადაწევა (Shift: დიდი ბიჯით)"
+"Rotate a degree (Shift: 15)" = "ერთი გრადუსით შემობრუნება (Shift: 15)"
+"⌥⌘ ← ↑ → ↓" = "⌥⌘ ← ↑ → ↓"
+"Ctrl+Alt+← ↑ → ↓" = "Ctrl+Alt+← ↑ → ↓"
"Nudge amount" = "მცირედ გადაწევის ბიჯი"
"Number" = "რიცხვი"
"Number ↑" = "რიცხვი ↑"
@@ -1080,6 +1099,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Pages: {pages}" = "გვერდი: {pages}"
"Paint bucket" = "საღებავის ვედრო"
"Pan the canvas" = "ტილოს გადაადგილება"
+"Show and move the placement crosshair (its tool chosen, nothing selected)" = "განთავსების ჯვრის ჩვენება და გადაადგილება (არჩეული ხელსაწყოთი, როცა არაფერია მონიშნული)"
"Pan with nothing selected (Shift: farther)" = "გადაადგილება, როცა არაფერია მონიშნული (Shift: უფრო შორს)"
"Panels" = "პანელები"
"Paper" = "ქაღალდი"
@@ -1189,9 +1209,13 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Regular expression" = "რეგულარული გამოსახულება"
"Relative to" = "მიმართ"
"Relative to your system's display scaling (100% is the system's own size). Document zoom is separate." = "სისტემის ეკრანის მასშტაბირებასთან მიმართებით (100% სისტემის საკუთარი ზომაა). დოკუმენტის მასშტაბი ცალკე რეგულირდება."
+"Reload the page to get back the unsaved files the browser had room for." = "განაახლეთ გვერდი, რომ დაიბრუნოთ ის შეუნახავი ფაილები, რომლებიც ბრაუზერში დაეტია."
+"Reload the page to get your unsaved files back." = "განაახლეთ გვერდი, რომ შეუნახავი ფაილები დაიბრუნოთ."
+"Reload the page to start again." = "თავიდან დასაწყებად განაახლეთ გვერდი."
"Remove" = "წაშლა"
"Remove all" = "ყველას წაშლა"
"Remove annotation" = "ანოტაციის წაშლა"
+"Remove all auto layout" = "ყველა ავტოგანლაგების მოხსნა"
"Remove auto layout" = "ავტოგანლაგების მოხსნა"
"Remove column" = "სვეტის წაშლა"
"Remove dev resource" = "დეველოპერის რესურსის წაშლა"
@@ -1243,6 +1267,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Reset adjustments" = "კორექციების ჩამოყრა"
"Reset all changes" = "ყველა ცვლილების ჩამოყრა"
"Reset all overrides on this layer" = "ამ შრის ყველა გადაფარვის ჩამოყრა"
+"Reset grid" = "ბადის ჩამოყრა"
"Reset overrides" = "გადაფარვების ჩამოყრა"
"Reset slot" = "სლოტის ჩამოყრა"
"Reset this override" = "ამ გადაფარვის ჩამოყრა"
@@ -1297,6 +1322,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"See all templates" = "ყველა შაბლონის ნახვა"
"Select layers and they space themselves as their content changes" = "შრეები შიგთავსის ცვლილებისას თავად დაშორდება"
"SHA-256: {sha}…" = "SHA-256: {sha}…"
+"Same as file ({profile})" = "როგორც ფაილში ({profile})"
"Same as layer" = "შრის მსგავსად"
"Saturation" = "გაჯერება"
"Save" = "შენახვა"
@@ -1322,6 +1348,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Search files and templates" = "ფაილებისა და შაბლონების ძიება"
"Search results" = "ძიების შედეგები"
"Search fonts" = "შრიფტების ძიება"
+"This server doesn't count insertions" = "ეს სერვერი ჩასმებს არ ითვლის"
+"This server doesn't count styles and variables" = "ეს სერვერი სტილებსა და ცვლადებს არ ითვლის"
"Use fonts installed on this computer…" = "ამ კომპიუტერზე დაყენებული შრიფტების გამოყენება…"
"Search layers" = "შრეების ძიება"
"Search shortcuts" = "მალსახმობების ძიება"
@@ -1381,6 +1409,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Show device frame" = "მოწყობილობის კორპუსის ჩვენება"
"Show dimensions on objects" = "ზომების ჩვენება ობიექტებზე"
"Show hotspot hints" = "აქტიური არეების მინიშნებების ჩვენება"
+"The bars are hidden. {shortcut} shows them again" = "ზოლები დამალულია. {shortcut} ისევ აჩვენებს მათ"
"Show in Explorer" = "Explorer-ში ჩვენება"
"Show in Finder" = "Finder-ში ჩვენება"
"Show in folder" = "საქაღალდეში ჩვენება"
@@ -1484,6 +1513,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Stroke style" = "კონტურის სტილი"
"Stroke weight" = "კონტურის სისქე"
"Strokes" = "კონტურები"
+"Strong line every" = "მუქი ხაზის ბიჯი"
"Style" = "სტილი"
"Styles" = "სტილები"
"Stylistic set 1" = "სტილისტური ნაკრები 1"
@@ -1707,6 +1737,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Your copy stays open; the file stays on the server" = "თქვენი ასლი ღია რჩება; ფაილი სერვერზე რჩება"
"Your name" = "თქვენი სახელი"
"Your system asks for reduced motion: animations stay off." = "თქვენი სისტემა ითხოვს მოძრაობის შემცირებას: ანიმაციები გამორთული რჩება."
+"Your unsaved files were too large for the browser to keep." = "თქვენი შეუნახავი ფაილები ბრაუზერისთვის შესანახად ზედმეტად დიდი იყო."
"Z" = "Z"
"Z to A" = "ჰ-დან ა-მდე"
"Zoom" = "მასშტაბი"
@@ -1740,6 +1771,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"connector label was skipped: text style data is missing" = "შემაერთებლის იარლიყი გამოტოვებულია: ტექსტის სტილის მონაცემები აკლია"
"connector label was skipped: text transform is invalid" = "შემაერთებლის იარლიყი გამოტოვებულია: ტექსტის გარდაქმნა არასწორია"
"connector labels were skipped" = "შემაერთებლების იარლიყები გამოტოვებულია"
+"connector labels without a saved snapshot are centred on the line, without their background" = "შენახული სნეპშოტის გარეშე შემაერთებლის იარლიყები ხაზზე ცენტრდება, ფონის გარეშე"
"connector layers import as static frame/vector snapshots with labels when present; live endpoint bindings are not retained" = "შემაერთებლის შრეები იმპორტირდება ჩარჩოს ან ვექტორის სტატიკური სნეპშოტების სახით, იარლიყებით (თუ არის); ბოლოების ცოცხალი მიბმები არ ნარჩუნდება"
"connector snapshot vector data is missing; connector was left empty" = "შემაერთებლის სნეპშოტის ვექტორული მონაცემები აკლია; შემაერთებელი ცარიელი დარჩა"
"connectors whose ends can't be placed are empty" = "შემაერთებლები, რომელთა ბოლოების განთავსება ვერ ხერხდება, ცარიელია"
@@ -1751,6 +1783,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"duplicate grid track sizing entries use equal tracks" = "ბადის ტრეკის ზომის დუბლირებული ჩანაწერებისას ტრეკები თანაბარია"
"e.g. count + 1" = "მაგ. count + 1"
"e.g. count >= 3 and not done" = "მაგ. count >= 3 and not done"
+"elbowed and curved connectors without a saved path follow FigCraft's own routing" = "შენახული ტრაექტორიის გარეშე კუთხოვანი და მრუდი შემაერთებლები FigCraft-ის საკუთარ მარშრუტს მიჰყვება"
"entries without a node type were skipped" = "კვანძის ტიპის გარეშე ჩანაწერები გამოტოვებულია"
"figcraft:// links from a browser, chat or email open this app and join the session." = "ბრაუზერიდან, ჩატიდან ან ელფოსტიდან figcraft:// ბმულები ხსნის ამ აპს და უერთდება სესიას."
"from {server}" = "წყარო: {server}"
@@ -1772,12 +1805,15 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"invalid internal .fig text path data was ignored" = ".fig-ის შიდა ტექსტის ტრაექტორიის არასწორი მონაცემები იგნორირებულია"
"invalid or oversized vector networks import as outlines" = "არასწორი ან ზედმეტად დიდი ვექტორული ქსელები კონტურებად იმპორტირდება"
"invalid or oversized vector path data was skipped" = "ვექტორული ტრაექტორიის არასწორი ან ზედმეტად დიდი მონაცემები გამოტოვებულია"
+"invalid vector region fill paint list; layer fill used" = "ვექტორული არის შევსების საღებავების სია არასწორია; გამოყენებულია შრის შევსება"
+"invalid vector region paints were skipped" = "ვექტორული არის არასწორი საღებავები გამოტოვებულია"
"just now" = "ახლახან"
"key triggers without a supported key were skipped" = "მხარდაჭერილი კლავიშის გარეშე კლავიშის გამშვებები გამოტოვებულია"
"key up triggers import as key presses" = "კლავიშის აშვების გამშვებები კლავიშის დაჭერებად იმპორტირდება"
"layers without a position were placed at their parent's origin" = "პოზიციის გარეშე შრეები მშობლის საწყის წერტილში განთავსდა"
"layers without a type were skipped" = "ტიპის გარეშე შრეები გამოტოვებულია"
"legacy image filter container is unsupported; filter conversion was skipped" = "გამოსახულების ფილტრების ძველი კონტეინერი მხარდაუჭერელია; ფილტრების გარდაქმნა გამოტოვებულია"
+"linked vector region fill styles keep resolved appearance; live style links were left out" = "ვექტორული არის მიბმული შევსების სტილები გამოთვლილ იერსახეს ინარჩუნებს; სტილების ცოცხალი კავშირები არ გადმოვიდა"
"links to shared styles that aren't in the file kept the layers' own values" = "ფაილში არარსებულ საერთო სტილებზე ბმულებმა შეინარჩუნეს ფენების საკუთარი მნიშვნელობები"
"locked" = "ჩაკეტილი"
"malformed image filters container was skipped" = "გამოსახულების ფილტრების დაზიანებული კონტეინერი გამოტოვებულია"
@@ -1786,6 +1822,10 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"no bleed" = "ჭრისპირა არის გარეშე"
"nobody else here yet" = "აქ ჯერ სხვა არავინაა"
"non-default slot settings are not represented and were skipped" = "სლოტის არანაგულისხმევი პარამეტრები არ არის წარმოდგენილი და გამოტოვებულია"
+"note or shape generated child has invalid bounds; child skipped" = "შენიშვნის ან ფიგურის გენერირებულ შვილობილ ელემენტს არასწორი საზღვრები აქვს; ელემენტი გამოტოვებულია"
+"note or shape generated child is missing its style or bounds; child skipped" = "შენიშვნის ან ფიგურის გენერირებულ შვილობილ ელემენტს სტილი ან საზღვრები აკლია; ელემენტი გამოტოვებულია"
+"note or shape generated children exceed the layer or nesting limit; remaining children skipped" = "შენიშვნის ან ფიგურის გენერირებული შვილობილი ელემენტები შრეების ან ჩადგმის ლიმიტს აჭარბებს; დანარჩენი ელემენტები გამოტოვებულია"
+"note or shape generated layout is missing or unsupported; using its outer frame" = "შენიშვნის ან ფიგურის გენერირებული განლაგება აკლია ან მხარდაუჭერელია; გამოიყენება მისი გარე ჩარჩო"
"now" = "ახლა"
"offer files to save if it asks to (you choose where each one goes)" = "შესანახად ფაილების შეთავაზება, თუ ამას ითხოვს (თითოეულის ადგილს თქვენ ირჩევთ)"
"only in a text style or variable" = "მხოლოდ ტექსტის სტილში ან ცვლადში"
@@ -1809,6 +1849,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"set-variable actions with values that don't fit the variable were skipped" = "ცვლადის დაყენების მოქმედებები, რომელთა მნიშვნელობა ცვლადს არ შეესაბამება, გამოტოვებულია"
"set-variable actions without a value were skipped" = "მნიშვნელობის გარეშე ცვლადის დაყენების მოქმედებები გამოტოვებულია"
"set-variable-mode actions on collections or modes that aren't in the variables JSON were skipped" = "ცვლადის რეჟიმის დაყენების მოქმედებები იმ კოლექციებზე ან რეჟიმებზე, რომლებიც ცვლადების JSON-ში არ არის, გამოტოვებულია"
+"shape generated outline is missing or damaged; using its rectangle" = "ფიგურის გენერირებული კონტური აკლია ან დაზიანებულია; გამოიყენება მისი მართკუთხედი"
"slot content assignment target is missing or is not slot content" = "სლოტის შიგთავსის მინიჭების სამიზნე აკლია ან სლოტის შიგთავსი არ არის"
"slot content assignment uses the empty GUID sentinel and was skipped" = "სლოტის შიგთავსის მინიჭება ცარიელ GUID მარკერს იყენებს და გამოტოვებულია"
"slot layers without a matching slot property were imported as frames" = "სლოტის შრეები, რომლებსაც შესაბამისი სლოტის თვისება არ აქვს, ჩარჩოებად იმპორტირდა"
@@ -1834,10 +1875,13 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"variable modes of collections that aren't in the file were skipped" = "იმ კოლექციების ცვლადის რეჟიმები, რომლებიც ფაილში არ არის, გამოტოვებულია"
"variable modes of collections that aren't in the variables JSON were skipped" = "იმ კოლექციების ცვლადის რეჟიმები, რომლებიც ცვლადების JSON-ში არ არის, გამოტოვებულია"
"variable values that don't match their type (or composed colours) were skipped" = "ცვლადის მნიშვნელობები, რომლებიც თავიანთ ტიპს არ შეესაბამება (ან შედგენილი ფერები), გამოტოვებულია"
+"variable-bound vector region paints keep resolved appearance; live bindings were left out" = "ცვლადებზე მიბმული ვექტორული არის საღებავები გამოთვლილ იერსახეს ინარჩუნებს; ცოცხალი მიბმები არ გადმოვიდა"
"variables of unknown types were skipped" = "უცნობი ტიპის ცვლადები გამოტოვებულია"
"variables whose collection isn't in the variables JSON were skipped" = "ცვლადები, რომელთა კოლექცია ცვლადების JSON-ში არ არის, გამოტოვებულია"
"variables without readable values were skipped" = "წაკითხვადი მნიშვნელობების გარეშე ცვლადები გამოტოვებულია"
"vector points with unknown stroke joins use the layer join" = "უცნობი კონტურის შეერთების მქონე ვექტორული წერტილები შრის შეერთებას იყენებს"
+"vector region paint data exceeded import limits and was skipped" = "ვექტორული არის საღებავის მონაცემებმა იმპორტის ლიმიტებს გადააჭარბა და გამოტოვებულია"
+"vector region references a missing fill style; layer fill used" = "ვექტორული არე მიუთითებს შევსების არარსებულ სტილზე; გამოყენებულია შრის შევსება"
"vectors without geometry are empty" = "გეომეტრიის გარეშე ვექტორები ცარიელია"
"vectors without geometry are empty (export the file JSON with geometry=paths)" = "გეომეტრიის გარეშე ვექტორები ცარიელია (ფაილის JSON-ის ექსპორტი გააკეთეთ geometry=paths პარამეტრით)"
"very long text was cut to 1,048,576 characters" = "ძალიან გრძელი ტექსტი 1 048 576 სიმბოლომდე შემოკლდა"
@@ -1845,6 +1889,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"video actions are not supported and were skipped" = "ვიდეოს მოქმედებები მხარდაუჭერელია და გამოტოვებულია"
"video triggers are not supported and were skipped" = "ვიდეოს გამშვებები მხარდაუჭერელია და გამოტოვებულია"
"yesterday" = "გუშინ"
+"{count} in it now · Changed {date}" = "ახლა მასშია: {count} · შეცვლილია: {date}"
+"{insertions} · {detachments}" = "{insertions} · {detachments}"
"{instances} in {files}" = "{instances} — {files}"
"{language}: draft translation, waiting for a native speaker's review." = "{language}: თარგმანის მონახაზი, ელოდება მშობლიური ენის მცოდნის განხილვას."
"{length} bleed" = "ჭრისპირა არე: {length}"
@@ -1853,7 +1899,6 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"{name} is forgotten on this computer; the file stays on {server}" = "{name} დავიწყებულია ამ კომპიუტერზე; ფაილი {server}-ზე რჩება"
"{name} is on the server." = "{name} სერვერზეა."
"{name} is spotlighting" = "ყურადღება {name}-ზეა"
-"{name}, disconnected from its live session" = "{name}, ცოცხალ სესიასთან კავშირი გაწყვეტილია"
"{name}\nClick to apply to the selection" = "{name}\nდაწკაპეთ მონიშნულზე გამოსაყენებლად"
"{name}\nDrag onto the canvas, or click to place in the middle of the view.\nHold Alt (Option) while dropping onto an instance to swap it." = "{name}\nგადაათრიეთ ტილოზე ან დაწკაპეთ ხედის შუაში განსათავსებლად.\nინსტანსის ჩასანაცვლებლად მასზე ჩაგდებისას დააჭირეთ Alt-ს (Option)."
"{name} (from {library})" = "{name} ({library}-იდან)"
@@ -1881,8 +1926,10 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"{n} components and styles have newer versions" = { one = "ახალი ვერსია აქვს კომპონენტს ან სტილს: {n}", other = "ახალი ვერსია აქვს კომპონენტს ან სტილს: {n}" }
"{n} conflicts to resolve" = { one = "გადასაწყვეტი კონფლიქტი: {n}", other = "გადასაწყვეტი კონფლიქტი: {n}" }
"{n} days ago" = { one = "{n} დღის წინ", other = "{n} დღის წინ" }
+"{n} detached" = { one = "გამოყოფილი: {n}", other = "გამოყოფილი: {n}" }
"{n} files" = { one = "ფაილი: {n}", other = "ფაილი: {n}" }
"{n} hours ago" = { one = "{n} საათის წინ", other = "{n} საათის წინ" }
+"{n} inserted" = { one = "ჩასმული: {n}", other = "ჩასმული: {n}" }
"{n} instances" = { one = "ინსტანსი: {n}", other = "ინსტანსი: {n}" }
"{n} layers" = { one = "შრე: {n}", other = "შრე: {n}" }
"{n} layers as one file" = { one = "შრე: {n}, ერთ ფაილად", other = "შრე: {n}, ერთ ფაილად" }
@@ -1913,12 +1960,15 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"{n}w" = "{n} კვ"
"{page}, nothing selected" = "{page}, არაფერია მონიშნული"
"{percent}%" = "{percent}%"
+"{period}: {counts}" = "{period}: {counts}"
"{profile} (current)" = "{profile} (მიმდინარე)"
"{property} is its value; {property ? \"a\" : \"b\"} picks a string. Other {…} stays as written." = "{property} მისი მნიშვნელობაა; {property ? \"a\" : \"b\"} ირჩევს სტრიქონს. ნებისმიერი სხვა {…} რჩება დაწერილი სახით."
"{server} can't say what became of your files (it is older than this app)." = "{server} ვერ გეტყვით, რა მოუვიდა თქვენს ფაილებს (ის ამ აპზე ძველია)."
"{server} · No longer on the server" = "{server} · სერვერზე აღარ არის"
"{server} · {shared} · Opened {date}" = "{server} · {shared} · გაიხსნა {date}"
"{tool} hold {key}" = "{tool} დააჭირეთ {key}"
+"{used} · {detached}" = "{used} · {detached}"
+"{used} · {inserted}" = "{used} · {inserted}"
"{value} isn't a colour" = "{value} ფერი არ არის"
"{when} · edited" = "{when} · რედაქტირებულია"
"← ↑ → ↓" = "← ↑ → ↓"
@@ -1926,23 +1976,32 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"←" = "←"
"→, Space or N" = "→, Space ან N"
"↵" = "↵"
-"↵ / ⇧↵" = "↵ / ⇧↵"
"⇥ / ⇧⇥" = "⇥ / ⇧⇥"
-"⇥ or ⌥ Space again" = "⇥ ან ხელახლა ⌥ Space"
"⌘ arrows" = "⌘ ისრები"
"⌘ click" = "⌘ დაწკაპუნება"
-"⌘ click a padding field" = "⌘ დაწკაპუნება შიდა დაშორების ველზე"
"⌘ scroll" = "⌘ გადახვევა"
-"⌥ double-click an edge of an auto layout child" = "⌥ ორმაგი დაწკაპუნება ავტოგანლაგების შვილობილი ელემენტის კიდეზე"
"⌥ drag" = "⌥ გადათრევა"
+"Selection box: switch to pick select" = "მონიშვნის ჩარჩო: შრის არჩევაზე გადართვა"
+"Pick select: next or previous layer" = "შრის არჩევა: შემდეგი ან წინა შრე"
+"Pick select: into a layer, out to its parent" = "შრის არჩევა: შრეში შესვლა, მშობელზე გასვლა"
+"Pick select: select the picked layer" = "შრის არჩევა: არჩეული შრის მონიშვნა"
+"⇥ or ⌥ Space again" = "⇥ ან ხელახლა ⌥ Space"
+"Tab or Ctrl+Space again" = "Tab ან ხელახლა Ctrl+Space"
+"↵ / ⇧↵" = "↵ / ⇧↵"
+"Enter / Shift+Enter" = "Enter / Shift+Enter"
+"Space" = "Space"
+"Nothing to pick: the page is empty" = "ასარჩევი არაფერია: გვერდი ცარიელია"
+"Pick select: Tab and Shift+Tab move between layers, Enter goes into one, Shift+Enter out, Space selects, Escape cancels" = "შრის არჩევა: Tab და Shift+Tab შრეებს შორის გადაადგილდება, Enter შრეში შედის, Shift+Enter გამოდის, Space მონიშნავს, Escape გააუქმებს"
"Android Vector Drawable" = "Android Vector Drawable"
"Best effort" = "მაქსიმალური მიახლოება"
"Check for Updates" = "განახლებების შემოწმება"
"Check for updates…" = "განახლებების შემოწმება…"
"Compatibility" = "თავსებადობა"
"Dart constants for Flutter…" = "Dart-ის კონსტანტები Flutter-ისთვის…"
+"Calculated from other variables; it follows them" = "გამოითვლება სხვა ცვლადებიდან და მათ მიჰყვება"
"Copy effect" = "ეფექტის კოპირება"
"Copy fill" = "შევსების კოპირება"
+"Copy for AI" = "კოპირება AI-სთვის"
"Copy stroke" = "კონტურის კოპირება"
"Couldn't download {name}" = "{name} ვერ ჩამოიტვირთა"
"Don't show this again" = "აღარ აჩვენო"
@@ -1959,70 +2018,11 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"Set corner smoothing to 60%" = "კუთხეების დარბილების 60%-ზე დაყენება"
"Text on a path" = "ტექსტი ტრაექტორიაზე"
"This link opens a website outside the prototype:" = "ეს ბმული პროტოტიპის გარეთ ვებსაიტს ხსნის:"
+"This link opens your mail app to write a message:" = "ეს ბმული წერილის დასაწერად თქვენს საფოსტო აპს ხსნის:"
+"This server doesn't count detached instances" = "ეს სერვერი გამოყოფილ ინსტანსებს არ ითვლის"
"Update check is not supported in the web browser." = "ვებბრაუზერში განახლებების შემოწმება მხარდაჭერილი არ არის."
"instance swap properties whose default component was past the layer limit were skipped" = "ინსტანსის ჩანაცვლების თვისებები, რომელთა ნაგულისხმევი კომპონენტი შრეების ზღვარს მიღმა იყო, გამოტოვებულია"
"instances whose component was past the layer limit were imported as frames" = "ინსტანსები, რომელთა კომპონენტი შრეების ზღვარს მიღმა იყო, ჩარჩოებად იმპორტირდა"
-"1 year" = "1 წელი"
-"30 days" = "30 დღე"
-"90 days" = "90 დღე"
-"Allow and download" = "დაშვება და ჩამოტვირთვა"
-"Allow downloading fonts?" = "დაიშვას შრიფტების ჩამოტვირთვა?"
-"Board grid" = "დაფის ბადე"
-"Changed {date}" = "შეცვლილია: {date}"
-"Copy browser link" = "ბრაუზერის ბმულის კოპირება"
-"Couldn't reach {server} for its team list." = "{server}-იდან გუნდის სიის მიღება ვერ მოხერხდა."
-"Calculated from other variables; it follows them" = "გამოითვლება სხვა ცვლადებიდან და მათ მიჰყვება"
-"Crop image" = "გამოსახულების ჩამოჭრა"
-"Detach calculation" = "გამოთვლის გამოყოფა"
-"Download" = "ჩამოტვირთვა"
-"Downloading… {percent}%" = "ჩამოტვირთვა… {percent}%"
-"Drop to use this image" = "ჩააგდეთ ამ გამოსახულების გამოსაყენებლად"
-"Everyone who reaches this server can open these files while they are shared." = "ამ სერვერთან წვდომის მქონე ყველას შეუძლია ამ ფაილების გახსნა, სანამ ისინი გაზიარებულია."
-"FigCraft stopped because of an internal error." = "FigCraft-ის მუშაობა შიდა შეცდომის გამო შეწყდა."
-"Free fonts come from Google Fonts and Noto, through jsDelivr and GitHub. Each file is checked against the font index before it is installed into the font folder the Craft apps share. Nothing is downloaded until you allow it." = "უფასო შრიფტები Google Fonts-იდან და Noto-დან მოდის, jsDelivr-ისა და GitHub-ის გავლით. თითოეული ფაილი შრიფტების ინდექსთან მოწმდება, სანამ Craft-აპების საერთო შრიფტების საქაღალდეში დაინსტალირდება. სანამ არ დაუშვებთ, არაფერი ჩამოიტვირთება."
-"Graph paper" = "მილიმეტრიანი ქაღალდი"
-"Joining live session…" = "ცოცხალ სესიასთან შეერთება…"
-"Link copied: it opens the file in FigCraft" = "ბმული დაკოპირდა: ის ფაილს FigCraft-ში ხსნის"
-"Link copied: it opens the file in the browser" = "ბმული დაკოპირდა: ის ფაილს ბრაუზერში ხსნის"
-"Nobody shares a file there now." = "იქ ახლა არავინ აზიარებს ფაილს."
-"Past 30 days" = "ბოლო 30 დღე"
-"Past 90 days" = "ბოლო 90 დღე"
-"Past year" = "ბოლო წელი"
-"Shared by your team on {server}" = "თქვენი გუნდის მიერ {server}-ზე გაზიარებული"
-"Not now" = "ახლა არა"
-"Nothing counted yet" = "ჯერ არაფერი დათვლილა"
-"Reload the page to get back the unsaved files the browser had room for." = "განაახლეთ გვერდი, რომ დაიბრუნოთ ის შეუნახავი ფაილები, რომლებიც ბრაუზერში დაეტია."
-"Reload the page to get your unsaved files back." = "განაახლეთ გვერდი, რომ შეუნახავი ფაილები დაიბრუნოთ."
-"Reload the page to start again." = "თავიდან დასაწყებად განაახლეთ გვერდი."
-"Reset grid" = "ბადის ჩამოყრა"
-"This server doesn't count insertions" = "ეს სერვერი ჩასმებს არ ითვლის"
-"This server doesn't count styles and variables" = "ეს სერვერი სტილებსა და ცვლადებს არ ითვლის"
-"Upload from computer" = "კომპიუტერიდან ატვირთვა"
-"Strong line every" = "მუქი ხაზის ბიჯი"
-"This link opens your mail app to write a message:" = "ეს ბმული წერილის დასაწერად თქვენს საფოსტო აპს ხსნის:"
-"This server doesn't count detached instances" = "ეს სერვერი გამოყოფილ ინსტანსებს არ ითვლის"
-"Your unsaved files were too large for the browser to keep." = "თქვენი შეუნახავი ფაილები ბრაუზერისთვის შესანახად ზედმეტად დიდი იყო."
-"connector labels without a saved snapshot are centred on the line, without their background" = "შენახული სნეპშოტის გარეშე შემაერთებლის იარლიყები ხაზზე ცენტრდება, ფონის გარეშე"
-"elbowed and curved connectors without a saved path follow FigCraft's own routing" = "შენახული ტრაექტორიის გარეშე კუთხოვანი და მრუდი შემაერთებლები FigCraft-ის საკუთარ მარშრუტს მიჰყვება"
-"invalid vector region fill paint list; layer fill used" = "ვექტორული არის შევსების საღებავების სია არასწორია; გამოყენებულია შრის შევსება"
-"invalid vector region paints were skipped" = "ვექტორული არის არასწორი საღებავები გამოტოვებულია"
-"linked vector region fill styles keep resolved appearance; live style links were left out" = "ვექტორული არის მიბმული შევსების სტილები გამოთვლილ იერსახეს ინარჩუნებს; სტილების ცოცხალი კავშირები არ გადმოვიდა"
-"note or shape generated child has invalid bounds; child skipped" = "შენიშვნის ან ფიგურის გენერირებულ შვილობილ ელემენტს არასწორი საზღვრები აქვს; ელემენტი გამოტოვებულია"
-"note or shape generated child is missing its style or bounds; child skipped" = "შენიშვნის ან ფიგურის გენერირებულ შვილობილ ელემენტს სტილი ან საზღვრები აკლია; ელემენტი გამოტოვებულია"
-"note or shape generated children exceed the layer or nesting limit; remaining children skipped" = "შენიშვნის ან ფიგურის გენერირებული შვილობილი ელემენტები შრეების ან ჩადგმის ლიმიტს აჭარბებს; დანარჩენი ელემენტები გამოტოვებულია"
-"note or shape generated layout is missing or unsupported; using its outer frame" = "შენიშვნის ან ფიგურის გენერირებული განლაგება აკლია ან მხარდაუჭერელია; გამოიყენება მისი გარე ჩარჩო"
-"shape generated outline is missing or damaged; using its rectangle" = "ფიგურის გენერირებული კონტური აკლია ან დაზიანებულია; გამოიყენება მისი მართკუთხედი"
-"variable-bound vector region paints keep resolved appearance; live bindings were left out" = "ცვლადებზე მიბმული ვექტორული არის საღებავები გამოთვლილ იერსახეს ინარჩუნებს; ცოცხალი მიბმები არ გადმოვიდა"
-"vector region paint data exceeded import limits and was skipped" = "ვექტორული არის საღებავის მონაცემებმა იმპორტის ლიმიტებს გადააჭარბა და გამოტოვებულია"
-"vector region references a missing fill style; layer fill used" = "ვექტორული არე მიუთითებს შევსების არარსებულ სტილზე; გამოყენებულია შრის შევსება"
-"{count} in it now · Changed {date}" = "ახლა მასშია: {count} · შეცვლილია: {date}"
-"{insertions} · {detachments}" = "{insertions} · {detachments}"
-"{period}: {counts}" = "{period}: {counts}"
-"{used} · {detached}" = "{used} · {detached}"
-"{used} · {inserted}" = "{used} · {inserted}"
-"{n} detached" = { one = "გამოყოფილი: {n}", other = "გამოყოფილი: {n}" }
-"{n} inserted" = { one = "ჩასმული: {n}", other = "ჩასმული: {n}" }
-"⌥⌘ ← ↑ → ↓" = "⌥⌘ ← ↑ → ↓"
[commands]
"align.bottom" = "ქვემოთ სწორება"
@@ -2053,10 +2053,12 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"arrange.tidy" = "მოწესრიგება"
"board.addConnected" = "დაკავშირებული ფიგურის დამატება"
"board.connector" = "შემაერთებელი"
+"board.grid" = "დაფის ბადე"
"board.ink" = "მარკერის შტრიხი"
"board.label" = "შემაერთებლის წარწერა"
"board.nextSticky" = "შემდეგი სტიკერი"
"board.reattach" = "შემაერთებლის ხელახლა მიმაგრება"
+"board.reshape" = "შემაერთებლის ფორმის შეცვლა"
"board.setColor" = "დაფის ფერი"
"board.setStyle" = "დაფის სტილი"
"board.shape" = "ფიგურა ტექსტით"
@@ -2218,6 +2220,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"fill.pattern" = "პატერნით შევსება"
"fill.remove" = "შევსების წაშლა"
"fill.set" = "შევსების დაყენება"
+"font.download" = "შრიფტის ჩამოტვირთვა"
+"font.downloads" = "შრიფტების ჩამოტვირთვები"
"frame.create" = "ჩარჩოს შექმნა"
"frame.presets" = "ჩარჩოს პრესეტების სია"
"frame.swapOrientation" = "ორიენტაციის შეცვლა"
@@ -2234,9 +2238,11 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"help.page" = "დახმარების გვერდი"
"help.shortcuts" = "კლავიატურის მალსახმობები"
"image.adjust" = "გამოსახულების კორექცია"
+"image.crop" = "გამოსახულების ჩამოჭრა"
"image.deletePreset" = "გამოსახულების პრესეტის წაშლა"
"image.place" = "გამოსახულების განთავსება"
"image.presets" = "გამოსახულების პრესეტები"
+"image.replace" = "გამოსახულების ჩანაცვლება"
"image.savePreset" = "გამოსახულების პრესეტის შენახვა"
"inspect.assets" = "რესურსების ინსპექტირება"
"inspect.code" = "შრის კოდი"
@@ -2263,6 +2269,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"library.aliasVariable" = "ბიბლიოთეკის ცვლადის ალიასი"
"library.applyStyle" = "ბიბლიოთეკის სტილის გამოყენება"
"library.bindVariable" = "ბიბლიოთეკის ცვლადის მიბმა"
+"library.check" = "გუნდის ბიბლიოთეკების განახლებების შემოწმება"
"library.extendCollection" = "ბიბლიოთეკის კოლექციის გაფართოება"
"library.import" = "ბიბლიოთეკის კომპონენტის იმპორტი"
"library.importVariable" = "ბიბლიოთეკის ცვლადის იმპორტი"
@@ -2524,6 +2531,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"variable.deleteCollection" = "კოლექციის წაშლა"
"variable.duplicate" = "ცვლადის დუბლირება"
"variable.export" = "ცვლადების ექსპორტირება"
+"variable.extendCollection" = "კოლექციის გაფართოება"
"variable.import" = "ცვლადების იმპორტი"
"variable.list" = "ცვლადების სია"
"variable.moveMode" = "რეჟიმის გადატანა"
@@ -2633,6 +2641,7 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"view.zoomOut" = "დაპატარავება"
"view.zoomSelection" = "მონიშნულის მასშტაბირება"
"widget.click" = "ვიჯეტზე დაწკაპუნება"
+"widget.hover" = "ვიჯეტზე მაჩვენებლის მიტანა"
"widget.insert" = "ვიჯეტის ჩასმა"
"widget.list" = "ვიჯეტების სია"
"widget.menu" = "ვიჯეტის მენიუ"
@@ -2650,15 +2659,6 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
"file.markSaved" = "შენახულად მარკირება"
"text.fit" = "ტექსტის ჩატევა თავის საზღვრებში"
"data.fill" = "ასლების მონაცემებით შევსება"
-"board.grid" = "დაფის ბადე"
-"font.download" = "შრიფტის ჩამოტვირთვა"
-"font.downloads" = "შრიფტების ჩამოტვირთვები"
-"image.crop" = "გამოსახულების ჩამოჭრა"
-"library.check" = "გუნდის ბიბლიოთეკების განახლებების შემოწმება"
-"board.reshape" = "შემაერთებლის ფორმის შეცვლა"
-"image.replace" = "გამოსახულების ჩანაცვლება"
-"variable.extendCollection" = "კოლექციის გაფართოება"
-"widget.hover" = "ვიჯეტზე მაჩვენებლის მიტანა"
[menu]
"bool.exclude" = "გამორიცხვა"
From 0aba3f7632457150cfe18c96510022e1566151c6 Mon Sep 17 00:00:00 2001
From: ljkx <177671075+ljkx@users.noreply.github.com>
Date: Mon, 9 Nov 2026 06:15:26 +0100
Subject: [PATCH 28/61] M4: a Pencil stroke stays where it was drawn, without
spikes off it (#1741)
kurbo's simplify_bezpath, which smooths Pencil samples and runs Simplify
path, fitted two common shapes with a curve that ran far off the path: a
stroke that goes out and back to the very point it left (kurbo keeps a
reversal as a smooth join) and nearly collinear samples (kurbo measures
its error across the path, not along it).
figcraft_geom::simplify_path cuts the path where it turns back by more
than a right angle, simplifies each run with kurbo, and keeps a run as it
was when its fit strays more than twice the accuracy from it. The Pencil
and vector.simplify use it.
---
crates/engine/src/brush_tests.rs | 46 +++++++
crates/engine/src/canvas/tools/pen.rs | 5 +-
crates/engine/src/cmd/structure.rs | 8 +-
crates/engine/src/vector_behaviour_tests.rs | 21 +++
crates/geom/src/lib.rs | 2 +
crates/geom/src/simplify.rs | 140 ++++++++++++++++++++
crates/geom/src/tests.rs | 117 ++++++++++++++++
7 files changed, 333 insertions(+), 6 deletions(-)
create mode 100644 crates/geom/src/simplify.rs
diff --git a/crates/engine/src/brush_tests.rs b/crates/engine/src/brush_tests.rs
index 35dba6a7f..50317496d 100644
--- a/crates/engine/src/brush_tests.rs
+++ b/crates/engine/src/brush_tests.rs
@@ -149,3 +149,49 @@ fn the_pencil_draws_white_on_a_dark_background() {
assert_eq!(stroke(&mut s, 0.0, 600.0).0, want, "on {bg}");
}
}
+
+/// A Pencil stroke stays where it was drawn: the fitted curve shot far off the stroke, a spike
+/// (#1741, its second point), where the stroke went out and back to the very point it left and
+/// where samples ran on nearly straight. Pointer pixels become fractional page points, so going
+/// back to a pixel lands on exactly the same point. Both sample runs are ones kurbo's fit took
+/// hundreds of units off.
+#[test]
+fn the_pencil_keeps_its_stroke_where_it_was_drawn() {
+ let mut s = Session::new();
+ s.execute("tool.set", &json!({"tool": "pencil"})).unwrap();
+ let (p, q) = ((86.043_565_719_086_97, -173.744_402_349_100_94), (87.851_850_739_335_35, -179.202_846_445_954_52));
+ let back = [(80.0, -160.0), p, q, p, (95.0, -185.0)];
+ let straight = [
+ (204.0, -198.0),
+ (209.598_690_794_015_5, -204.909_328_119_739_88),
+ (211.277_914_263_870_97, -207.190_974_020_753_4),
+ (214.246_506_828_720_84, -211.228_827_590_623_24),
+ (218.0, -214.0),
+ ];
+ for (what, samples) in [("out and back", &back[..]), ("nearly straight", &straight[..])] {
+ let (first, last) = (samples[0], samples[samples.len() - 1]);
+ s.pointer(&PointerEvent::at(PointerKind::Down, first.0, first.1, 1.0)).unwrap();
+ for (x, y) in &samples[1..] {
+ s.pointer(&PointerEvent::at(PointerKind::Move, *x, *y, 1.0)).unwrap();
+ }
+ s.pointer(&PointerEvent::at(PointerKind::Up, last.0, last.1, 1.0)).unwrap();
+ let doc = s.doc().unwrap();
+ let n = doc.nodes().filter(|n| matches!(n.kind, NodeKind::Vector { .. })).max_by_key(|n| n.id).unwrap();
+ let NodeKind::Vector { network } = &n.kind else { panic!("{what}: not a vector") };
+ let drawn = doc.world_transform(n.id) * network.stroke_path();
+ let samples_box = figcraft_geom::points_bounds(samples.iter().map(|(x, y)| Point::new(*x, *y))).unwrap();
+ let (path_box, node_box) = (figcraft_geom::Shape::bounding_box(&drawn), doc.world_bounds(n.id).unwrap());
+ assert!(
+ samples_box.inflate(1.5, 1.5).contains_rect(path_box),
+ "{what}: the stroke {path_box:?} goes past the samples {samples_box:?}: {}",
+ drawn.to_svg()
+ );
+ assert!(samples_box.inflate(1.5, 1.5).contains_rect(node_box), "{what}: the layer {node_box:?}, the samples {samples_box:?}");
+ }
+ // The turn is a point of the stroke, where it was drawn.
+ let doc = s.doc().unwrap();
+ let turned = doc.nodes().find(|n| n.name == "Vector" && doc.world_bounds(n.id).is_some_and(|b| b.y1 < -150.0 && b.x1 < 100.0)).unwrap();
+ let NodeKind::Vector { network } = &turned.kind else { panic!("not a vector") };
+ let xf = doc.world_transform(turned.id);
+ assert!(network.vertices.iter().any(|v| (xf * Point::new(v.x, v.y) - Point::new(q.0, q.1)).hypot() < 1e-6), "no point at the turn");
+}
diff --git a/crates/engine/src/canvas/tools/pen.rs b/crates/engine/src/canvas/tools/pen.rs
index 4b98ccee1..3f8b47e59 100644
--- a/crates/engine/src/canvas/tools/pen.rs
+++ b/crates/engine/src/canvas/tools/pen.rs
@@ -313,7 +313,8 @@ impl Session {
if points.len() < 2 {
return Ok(());
}
- // Smooth: fit a curve through the samples.
+ // Smooth: fit a curve through the samples, kept from shooting past them where the stroke
+ // turns back or runs nearly straight (#1741).
let mut poly = figcraft_geom::BezPath::new();
for (k, p) in points.iter().enumerate() {
if k == 0 {
@@ -322,7 +323,7 @@ impl Session {
poly.line_to(*p);
}
}
- let fitted = figcraft_geom::kurbo::simplify::simplify_bezpath(poly.iter(), 0.75, &Default::default());
+ let fitted = figcraft_geom::simplify_path(&poly, 0.75);
let d = fitted.to_svg();
if matches!(self.tool.tool, ToolId::Marker | ToolId::Highlighter) {
return self.ink_finish(&d);
diff --git a/crates/engine/src/cmd/structure.rs b/crates/engine/src/cmd/structure.rs
index 3339faa38..34cc91fbb 100644
--- a/crates/engine/src/cmd/structure.rs
+++ b/crates/engine/src/cmd/structure.rs
@@ -799,7 +799,7 @@ fn simplify(s: &mut Session, p: &Value) -> Result {
WindingRule::NonZero
};
let path = drawn.fill_path();
- let path = figcraft_geom::kurbo::simplify::simplify_bezpath(path.iter(), tol, &Default::default());
+ let path = figcraft_geom::simplify_path(&path, tol);
let (path, output_winding) = match figcraft_pathops::simplify_with_rule(&path, winding == WindingRule::EvenOdd) {
Ok(path) => (path, WindingRule::EvenOdd),
Err(_) => (path, winding),
@@ -809,7 +809,7 @@ fn simplify(s: &mut Session, p: &Value) -> Result {
} else {
for (index, region) in source.regions.iter().enumerate() {
let Some(path) = drawn.region_path(index) else { continue };
- let path = figcraft_geom::kurbo::simplify::simplify_bezpath(path.iter(), tol, &Default::default());
+ let path = figcraft_geom::simplify_path(&path, tol);
let path = figcraft_pathops::simplify_with_rule(&path, region.winding == WindingRule::EvenOdd).unwrap_or(path);
append_region_path(&mut net, &path, region, region.winding);
}
@@ -826,7 +826,7 @@ fn simplify(s: &mut Session, p: &Value) -> Result {
open.regions.clear();
if !open.segments.is_empty() {
let path = open.stroke_path();
- let simplified = figcraft_geom::kurbo::simplify::simplify_bezpath(path.iter(), tol, &Default::default());
+ let simplified = figcraft_geom::simplify_path(&path, tol);
let mut loose = VectorNetwork::from_path(&simplified);
loose.regions.clear();
append_network(&mut net, loose);
@@ -834,7 +834,7 @@ fn simplify(s: &mut Session, p: &Value) -> Result {
}
if source.regions.is_empty() {
let path = source.stroke_path();
- let simplified = figcraft_geom::kurbo::simplify::simplify_bezpath(path.iter(), tol, &Default::default());
+ let simplified = figcraft_geom::simplify_path(&path, tol);
net = VectorNetwork::from_path(&simplified);
net.regions.clear();
}
diff --git a/crates/engine/src/vector_behaviour_tests.rs b/crates/engine/src/vector_behaviour_tests.rs
index c990ad348..4666c3028 100644
--- a/crates/engine/src/vector_behaviour_tests.rs
+++ b/crates/engine/src/vector_behaviour_tests.rs
@@ -326,6 +326,27 @@ fn ex_to_vector(doc: &mut figcraft_doc::Document, id: NodeId) {
doc.get_mut(id).unwrap().kind = NodeKind::Vector { network };
}
+/// Simplify path keeps nearly collinear points near where they were: kurbo's fit, which Simplify
+/// path and the Pencil share, ran a handle hundreds of units on along the line (#1741).
+#[test]
+fn simplify_keeps_nearly_collinear_points_near_them() {
+ let mut s = Session::new();
+ let id = id_of(&ex(&mut s, "vector.create", json!({"path": "M0 0 L10 10"}))["id"]).unwrap();
+ // The points exactly as sampled, at the page origin (`vector.create` would move them).
+ let d = "M209.5986907940155 -204.90932811973988 L211.27791426387097 -207.1909740207534 L214.24650682872084 -211.22882759062324";
+ let before = BezPath::from_svg(d).unwrap();
+ {
+ let n = s.doc_mut().unwrap().get_mut(id).unwrap();
+ n.transform = figcraft_geom::Affine::IDENTITY;
+ n.kind = NodeKind::Vector { network: VectorNetwork::from_path(&before) };
+ }
+ assert_eq!(net(&s, id).stroke_path().elements(), before.elements(), "the samples as they were");
+ ex(&mut s, "vector.simplify", json!({"ids": [id], "tolerance": 0.75}));
+ let after = s.doc().unwrap().world_transform(id) * net(&s, id).stroke_path();
+ let (b0, b1) = (before.bounding_box(), after.bounding_box());
+ assert!(b0.inflate(1.5, 1.5).contains_rect(b1), "{b1:?} past {b0:?}: {}", after.to_svg());
+}
+
fn ex(s: &mut Session, cmd: &str, p: Value) -> Value {
s.execute(cmd, &p).unwrap_or_else(|e| panic!("{cmd}: {e}"))
}
diff --git a/crates/geom/src/lib.rs b/crates/geom/src/lib.rs
index a775a4170..191b30419 100644
--- a/crates/geom/src/lib.rs
+++ b/crates/geom/src/lib.rs
@@ -12,7 +12,9 @@ use kurbo::ParamCurve;
use std::f64::consts::{FRAC_PI_2, PI, TAU};
pub mod measure;
+mod simplify;
mod transform;
+pub use simplify::simplify_path;
pub use transform::*;
/// Corner radii in clockwise order from the top-left: `[tl, tr, br, bl]`.
diff --git a/crates/geom/src/simplify.rs b/crates/geom/src/simplify.rs
new file mode 100644
index 000000000..e768f303a
--- /dev/null
+++ b/crates/geom/src/simplify.rs
@@ -0,0 +1,140 @@
+//! Path simplification that keeps to its input where kurbo's fit would shoot past it.
+
+use kurbo::{BezPath, ParamCurve, ParamCurveNearest, PathEl, PathSeg, Point, Vec2};
+
+/// How far, as a multiple of the accuracy asked for, a fitted run may stray from the run it
+/// replaces before the run is kept as it was. kurbo's own fits stay within about the accuracy; its
+/// failures stray by tens to hundreds of units, so twice the accuracy tells them apart without
+/// undoing fits that are merely a little over.
+const STRAY: f64 = 2.0;
+
+/// `path` simplified to within `accuracy` by kurbo's [`simplify_bezpath`], kept from straying
+/// far from `path` where kurbo's fit does.
+///
+/// Two inputs made kurbo's fit shoot far past the path it simplified (#1741, a Pencil stroke with
+/// a spike off it), and both are common in pointer samples:
+/// - A join where the path turns straight back (samples going down and back up the same line):
+/// kurbo keeps two segments in one smooth fit when their tangents are parallel whichever way
+/// they point (`|cross| <= |dot| * angle_thresh`), so it fits a smooth curve through the cusp.
+/// The path is cut where it turns back by more than a right angle, each run between the cuts is
+/// simplified on its own, and the runs are joined again, so the turn stays a sharp corner. Any
+/// other join that isn't straight within kurbo's threshold is a corner to kurbo already, so the
+/// cut changes nothing there.
+/// - A run of nearly collinear segments: kurbo measures its error across the path, not along it, so
+/// a fitted cubic whose handle runs hundreds of units on along the line passes its check. Each
+/// fitted run is measured against the run it replaces, and one that strays more than
+/// twice `accuracy` from it is kept as it was instead.
+///
+/// Subpaths and closes are kept, and a closing segment stays implicit, as kurbo leaves it.
+///
+/// [`simplify_bezpath`]: kurbo::simplify::simplify_bezpath
+pub fn simplify_path(path: &BezPath, accuracy: f64) -> BezPath {
+ let mut out = BezPath::new();
+ let mut run = BezPath::new();
+ // Where the current subpath started, where the pen is, and the last segment's end tangent.
+ let mut start = Point::ZERO;
+ let mut at = Point::ZERO;
+ let mut last_tan: Option = None;
+ // Whether the next run that draws anything has to start the subpath with its move.
+ let mut fresh = true;
+ for el in path.elements() {
+ let seg = match *el {
+ PathEl::MoveTo(p) => {
+ flush(&mut out, &mut run, accuracy, &mut fresh);
+ (start, at, last_tan, fresh) = (p, p, None, true);
+ run.move_to(p);
+ continue;
+ }
+ PathEl::ClosePath => {
+ flush(&mut out, &mut run, accuracy, &mut fresh);
+ if !fresh {
+ out.close_path();
+ }
+ // A segment after a close starts a new subpath at the closed one's start.
+ (at, last_tan, fresh) = (start, None, true);
+ run.move_to(start);
+ continue;
+ }
+ PathEl::LineTo(p) => PathSeg::Line(kurbo::Line::new(at, p)),
+ PathEl::QuadTo(p1, p2) => PathSeg::Quad(kurbo::QuadBez::new(at, p1, p2)),
+ PathEl::CurveTo(p1, p2, p3) => PathSeg::Cubic(kurbo::CubicBez::new(at, p1, p2, p3)),
+ };
+ if run.elements().is_empty() {
+ run.move_to(at);
+ }
+ let Some((t0, t1)) = tangents(seg) else { continue };
+ if last_tan.is_some_and(|last| last.dot(t0) < 0.0) {
+ flush(&mut out, &mut run, accuracy, &mut fresh);
+ run.move_to(at);
+ }
+ run.push(*el);
+ at = seg.end();
+ last_tan = Some(t1);
+ }
+ flush(&mut out, &mut run, accuracy, &mut fresh);
+ out
+}
+
+/// Simplify `run` (one move and the segments after it) with kurbo and append it to `out`; the
+/// run's move is kept only when it starts a subpath (`fresh`), else the run carries on from the
+/// last point drawn. `run` is left empty.
+fn flush(out: &mut BezPath, run: &mut BezPath, accuracy: f64, fresh: &mut bool) {
+ if run.elements().len() > 1 {
+ let fitted = kurbo::simplify::simplify_bezpath(run.iter(), accuracy, &Default::default());
+ let fitted = if keeps_to(&fitted, run, STRAY * accuracy) { fitted } else { std::mem::take(run) };
+ for el in fitted.elements() {
+ match el {
+ PathEl::MoveTo(_) if !*fresh => {}
+ _ => {
+ out.push(*el);
+ *fresh = false;
+ }
+ }
+ }
+ }
+ *run = BezPath::new();
+}
+
+/// Whether every point of `fitted` lies within `tol` of `source`: one subpath each, from the same
+/// start to the same end, `fitted` being kurbo's simplification of `source`.
+///
+/// kurbo ends each fitted segment on the source, so the two are walked together: for each fitted
+/// segment, the source segments from where it starts to the first one its end lies on are the only
+/// ones its sample points are measured against. The work is linear in the two lengths. A fitted end
+/// found on no source segment counts as straying.
+fn keeps_to(fitted: &BezPath, source: &BezPath, tol: f64) -> bool {
+ /// Parts each fitted segment is cut into: the points between them are the ones measured.
+ const SAMPLES: u32 = 16;
+ let src: Vec = source.segments().collect();
+ // kurbo puts each end on the source by evaluating it: off by rounding at most.
+ let on2 = (tol * 1e-3).powi(2);
+ let (tol2, mut cur) = (tol * tol, 0);
+ for seg in fitted.segments() {
+ let Some(last) = (cur..src.len()).find(|&i| src.get(i).is_some_and(|s| s.nearest(seg.end(), 1e-9).distance_sq <= on2)) else {
+ return false;
+ };
+ let near = src.get(cur..=last).unwrap_or_default();
+ for i in 1..SAMPLES {
+ let p = seg.eval(f64::from(i) / f64::from(SAMPLES));
+ if !near.iter().any(|s| s.nearest(p, 1e-6).distance_sq <= tol2) {
+ return false;
+ }
+ }
+ cur = last;
+ }
+ true
+}
+
+/// The directions `seg` leaves its start and reaches its end, skipping control points that sit on
+/// an end; `None` for a segment of no length, which kurbo skips too.
+fn tangents(seg: PathSeg) -> Option<(Vec2, Vec2)> {
+ let pts: Vec = match seg {
+ PathSeg::Line(l) => vec![l.p0, l.p1],
+ PathSeg::Quad(q) => vec![q.p0, q.p1, q.p2],
+ PathSeg::Cubic(c) => vec![c.p0, c.p1, c.p2, c.p3],
+ };
+ let (first, last) = (*pts.first()?, *pts.last()?);
+ let t0 = pts.iter().map(|p| *p - first).find(|d| d.hypot2() > 0.0)?;
+ let t1 = pts.iter().rev().map(|p| last - *p).find(|d| d.hypot2() > 0.0)?;
+ Some((t0, t1))
+}
diff --git a/crates/geom/src/tests.rs b/crates/geom/src/tests.rs
index 459b2b101..10e09318c 100644
--- a/crates/geom/src/tests.rs
+++ b/crates/geom/src/tests.rs
@@ -366,3 +366,120 @@ fn svg_path_refuses_numbers_past_the_limit_before_parsing() {
assert!(number_past("M0 0L-2.5.5 1e-3-4e3z", 1e3));
assert!(number_past("M.5.5e10", 1e3));
}
+
+/// A path through `pts` with straight lines (pencil samples).
+fn polyline(pts: &[(f64, f64)]) -> BezPath {
+ let mut p = BezPath::new();
+ for (k, (x, y)) in pts.iter().enumerate() {
+ if k == 0 { p.move_to((*x, *y)) } else { p.line_to((*x, *y)) }
+ }
+ p
+}
+
+/// How far `out` strays from `input`: the largest distance from a point sampled along `out` to the
+/// nearest segment of `input` (closing segments included).
+fn deviation(out: &BezPath, input: &BezPath) -> f64 {
+ use kurbo::{ParamCurve, ParamCurveNearest};
+ let segs: Vec = input.segments().collect();
+ out.segments()
+ .flat_map(|seg| (0..=32).map(move |i| seg.eval(f64::from(i) / 32.0)))
+ .map(|p| segs.iter().map(|s| s.nearest(p, 1e-6).distance_sq).fold(f64::INFINITY, f64::min).sqrt())
+ .fold(0.0, f64::max)
+}
+
+/// Pencil strokes kurbo's fit shot far past keep to their samples (#1741): a stroke that goes out
+/// and back to the very point it left, nearly collinear samples, and strokes that turn back along
+/// their own line. The first two are from fuzzing pencil-like strokes, where kurbo's curve went
+/// about 390 and 160 units off; at whole-pixel coordinates the same shapes happened to fit well.
+#[test]
+fn simplifying_keeps_to_strokes_kurbo_shot_past() {
+ use kurbo::ParamCurve;
+ let cases: [(&str, &[(f64, f64)]); 5] = [
+ (
+ "out and back to the same point",
+ &[
+ (86.043_565_719_086_97, -173.744_402_349_100_94),
+ (87.851_850_739_335_35, -179.202_846_445_954_52),
+ (86.043_565_719_086_97, -173.744_402_349_100_94),
+ ],
+ ),
+ (
+ "nearly collinear",
+ &[
+ (209.598_690_794_015_5, -204.909_328_119_739_88),
+ (211.277_914_263_870_97, -207.190_974_020_753_4),
+ (214.246_506_828_720_84, -211.228_827_590_623_24),
+ ],
+ ),
+ (
+ "a dip straight down and back up",
+ &[(0.0, 0.0), (10.0, 0.0), (20.0, 2.0), (30.0, 6.0), (30.0, 12.0), (30.0, 6.0), (40.0, 2.0), (50.0, 0.0)],
+ ),
+ ("a slip back at the end", &[(0.0, 0.0), (10.0, 3.0), (20.0, 8.0), (30.0, 15.0), (30.0, 25.0), (30.0, 22.0)]),
+ (
+ "a near reversal in a curve",
+ &[(0.0, 0.0), (8.0, 2.0), (16.0, 6.0), (24.0, 12.0), (32.0, 20.0), (24.0, 12.000_01), (16.0, 6.0), (8.0, 2.0)],
+ ),
+ ];
+ for (what, pts) in cases {
+ let input = polyline(pts);
+ let out = simplify_path(&input, 0.75);
+ let d = deviation(&out, &input);
+ assert!(d <= 1.5, "{what}: strays {d} from the samples: {}", out.to_svg());
+ let (inb, outb) = (input.bounding_box(), out.bounding_box());
+ assert!(inb.inflate(1.5, 1.5).contains_rect(outb), "{what}: {outb:?} past {inb:?}");
+ // One subpath, starting and ending where the stroke does.
+ let moves = out.elements().iter().filter(|e| matches!(e, kurbo::PathEl::MoveTo(_))).count();
+ assert_eq!(moves, 1, "{what}: {}", out.to_svg());
+ let (first, last) = (pts[0], pts[pts.len() - 1]);
+ assert_eq!(out.segments().next().map(|s| s.start()), Some(Point::new(first.0, first.1)), "{what}");
+ assert_eq!(out.segments().last().map(|s| s.end()), Some(Point::new(last.0, last.1)), "{what}");
+ }
+}
+
+/// Where a path never turns back and kurbo's fit holds, the result is kurbo's own, element for
+/// element: smooth runs, corners sharper than a right angle, closed subpaths and several subpaths.
+#[test]
+fn simplifying_is_kurbos_where_its_fit_holds() {
+ let wave: Vec<(f64, f64)> = (0..=60).map(|i| (f64::from(i) * 4.0, (f64::from(i) / 6.0).sin() * 30.0)).collect();
+ let zigzag: Vec<(f64, f64)> = (0..=8).map(|i| (f64::from(i) * 10.0, if i % 2 == 0 { 0.0 } else { 40.0 })).collect();
+ let mut closed = polyline(&wave[..20]);
+ closed.close_path();
+ let mut several = polyline(&wave);
+ several.extend(polyline(&zigzag).elements().iter().map(|e| match *e {
+ kurbo::PathEl::MoveTo(p) => kurbo::PathEl::MoveTo(p + Vec2::new(0.0, 100.0)),
+ kurbo::PathEl::LineTo(p) => kurbo::PathEl::LineTo(p + Vec2::new(0.0, 100.0)),
+ e => e,
+ }));
+ let curves = BezPath::from_svg("M0 0 C10 -20 30 -20 40 0 C50 20 70 20 80 0 Q100 -30 120 0 L140 10 Z M200 0 L240 0").unwrap();
+ for (what, input) in
+ [("a wave", polyline(&wave)), ("a zigzag", polyline(&zigzag)), ("closed", closed), ("two subpaths", several), ("curves", curves)]
+ {
+ let ours = simplify_path(&input, 0.75);
+ let theirs = kurbo::simplify::simplify_bezpath(input.iter(), 0.75, &Default::default());
+ assert_eq!(ours.elements(), theirs.elements(), "{what}");
+ }
+}
+
+/// A closed path with a reversal in it stays one closed subpath, and each subpath of several keeps
+/// its own start.
+#[test]
+fn simplifying_keeps_closes_and_subpaths_across_a_reversal() {
+ let mut input = polyline(&[(0.0, 0.0), (40.0, 0.0), (40.0, 30.0), (40.0, 20.0), (0.0, 30.0)]);
+ input.close_path();
+ input.extend(polyline(&[(100.0, 0.0), (100.0, 20.0), (100.0, 10.0)]).elements().iter().copied());
+ let out = simplify_path(&input, 0.75);
+ let els = out.elements();
+ let moves: Vec = els.iter().filter_map(|e| if let kurbo::PathEl::MoveTo(p) = e { Some(*p) } else { None }).collect();
+ assert_eq!(moves, [Point::new(0.0, 0.0), Point::new(100.0, 0.0)], "{}", out.to_svg());
+ assert_eq!(els.iter().filter(|e| matches!(e, kurbo::PathEl::ClosePath)).count(), 1, "{}", out.to_svg());
+ let close = els.iter().position(|e| matches!(e, kurbo::PathEl::ClosePath)).unwrap();
+ assert!(matches!(els[close + 1], kurbo::PathEl::MoveTo(_)), "the first subpath closes before the second starts");
+ assert!(deviation(&out, &input) <= 1.5, "{}", out.to_svg());
+ // Nothing to draw: nothing out, not a stray move or close.
+ let mut empty = BezPath::new();
+ empty.move_to((5.0, 5.0));
+ empty.line_to((5.0, 5.0));
+ empty.close_path();
+ assert!(simplify_path(&empty, 0.75).elements().is_empty());
+}
From 984270fbecdaace2353d8247f04b94626f10390f Mon Sep 17 00:00:00 2001
From: ljkx <177671075+ljkx@users.noreply.github.com>
Date: Mon, 9 Nov 2026 12:38:29 +0100
Subject: [PATCH 29/61] M8: automation roots refuse a path on another computer
before resolving it (#1094)
On Windows, Roots::check resolved every path (canonicalize opens it) before
comparing it with the roots, so `\server\share\x` contacted the server, and
could send it the user's credentials, before it was refused. Now the path as
given and made absolute is classified by its spelling with craft_docpath
first: another computer that no root's share is on, a device path, or a DOS
device name anywhere in it is refused, and so is a link on the way that
leads to one (followed by its target's spelling, up to 40 links).
Fixes #1094
---
crates/engine/src/automation/file_access.rs | 189 ++++++++++++++++--
.../src/automation/file_access/tests.rs | 177 ++++++++++++++++
2 files changed, 344 insertions(+), 22 deletions(-)
diff --git a/crates/engine/src/automation/file_access.rs b/crates/engine/src/automation/file_access.rs
index 5ce06b122..97c6cd2f5 100644
--- a/crates/engine/src/automation/file_access.rs
+++ b/crates/engine/src/automation/file_access.rs
@@ -12,6 +12,11 @@
//! existing folder is resolved and the rest must be plain names. The comparison is by whole
//! components (`/work2` is not inside `/work`), and the I/O uses the resolved path, so what was
//! checked is what is opened.
+//!
+//! On Windows, resolving a path opens it, and opening a path on another computer contacts that
+//! computer and may send it the signed-in user's credentials. So before anything is resolved, a
+//! path on another computer that no root is on, a device path, or one reached through a link that
+//! leads to them is refused by how it is spelled (#1094).
#![allow(clippy::disallowed_methods)]
use std::cell::RefCell;
@@ -19,6 +24,8 @@ use std::ffi::{OsStr, OsString};
use std::path::{Component, Path, PathBuf};
use std::sync::Arc;
+use craft_docpath::Refused;
+
use crate::{EngineError, Result};
/// What a command does with a file.
@@ -58,6 +65,19 @@ impl Roots {
Access::Read => ([self.read.as_slice(), self.write.as_slice()].concat(), "read"),
Access::Write => (self.write.clone(), "written"),
};
+ if cfg!(windows) {
+ match refused_unresolved(path, &roots) {
+ Some(Unresolved::Spelled(Refused::Network)) => {
+ return Err(format!(
+ "automation path rejected: {asked} is on another computer, and no folder that may be {what} is on its share"
+ ));
+ }
+ Some(Unresolved::Spelled(_)) => return Err(format!("automation path rejected: {asked} names a device, not a file")),
+ // Where a link leads is only told by the usual message: it would say what is there.
+ Some(Unresolved::Linked) => return Err(outside(asked, &roots, what)),
+ None => {}
+ }
+ }
match resolve(path) {
Ok(resolved) if roots.iter().any(|r| resolved.starts_with(r)) => return Ok(resolved),
Ok(_) => {}
@@ -65,11 +85,7 @@ impl Roots {
Err(why) if inside_as_far_as_it_exists(path, &roots) => return Err(format!("automation path rejected: {asked}: {why}")),
Err(_) => {}
}
- if roots.is_empty() {
- return Err(format!("automation path rejected: no folder may be {what} (no root for it was given): {asked}"));
- }
- let shown: Vec = roots.iter().map(|r| shown(r)).collect();
- Err(format!("automation path rejected: {asked} is outside the folders that may be {what}: {}", shown.join(", ")))
+ Err(outside(asked, &roots, what))
}
/// The folders as JSON, resolved: `{read: [every folder that may be read], write: [the write roots]}`.
@@ -79,23 +95,146 @@ impl Roots {
}
}
+/// Why `asked` is refused: it is outside every one of `roots`, the folders that may be `what`.
+fn outside(asked: std::path::Display<'_>, roots: &[PathBuf], what: &str) -> String {
+ if roots.is_empty() {
+ return format!("automation path rejected: no folder may be {what} (no root for it was given): {asked}");
+ }
+ let shown: Vec = roots.iter().map(|r| shown(r)).collect();
+ format!("automation path rejected: {asked} is outside the folders that may be {what}: {}", shown.join(", "))
+}
+
+/// Why a path is refused before it is resolved (#1094).
+#[derive(Debug, PartialEq, Eq)]
+enum Unresolved {
+ /// Its spelling leads to another computer ([`Refused::Network`]) or a device ([`Refused::Device`]).
+ Spelled(Refused),
+ /// A link on the way leads there.
+ Linked,
+}
+
+/// How many links are followed on the way to a path before it is given up on, as on Linux.
+const MAX_LINKS: u8 = 40;
+
+/// Why `path` is refused before anything on the way to it is opened, if it is: resolving it would
+/// open a path on another computer, which on Windows contacts that computer and may send it the
+/// signed-in user's credentials, or open a device (#1094). That is the case when the path as
+/// given or made absolute is (see [`refused_spelling`]), or when a link on the way, or on the way
+/// on from where one leads, leads to such a path ([`link_refused`]). A path on the share of one of
+/// `roots` goes on to the usual check.
+fn refused_unresolved(path: &Path, roots: &[PathBuf]) -> Option {
+ // Made absolute without looking at the disk (on Windows `GetFullPathNameW`, which also turns a
+ // bare device name such as `NUL` into `\\.\NUL`, as opening it would).
+ let abs = std::path::absolute(path).ok()?;
+ if let Some(why) = [path, abs.as_path()].into_iter().find_map(|p| refused_spelling(&p.to_string_lossy(), roots)) {
+ return Some(Unresolved::Spelled(why));
+ }
+ link_refused(&abs, roots, MAX_LINKS, &on_disk).then_some(Unresolved::Linked)
+}
+
+/// What is at a path, looked at without following a link there.
+#[derive(Debug, Clone, PartialEq, Eq)]
+enum Entry {
+ /// Nothing, or what can't be looked at: resolving the path meets the same there and goes no
+ /// further.
+ Missing,
+ /// A file or a folder.
+ Plain,
+ /// A link, with where it leads (`None` when that can't be read).
+ Link(Option),
+}
+
+/// What is at `p` on disk (see [`Entry`]).
+fn on_disk(p: &Path) -> Entry {
+ match std::fs::symlink_metadata(p) {
+ Ok(m) if m.is_symlink() => Entry::Link(std::fs::read_link(p).ok()),
+ Ok(_) => Entry::Plain,
+ Err(_) => Entry::Missing,
+ }
+}
+
+/// Why path `p` is refused by its spelling alone, if it is (see [`craft_docpath::resolve`], which
+/// reads both `/` and `\` as separators and compares names ignoring case):
+/// - on another computer (`\\server\share`, `//server/share`, `\\?\UNC\…`, `\\.\UNC\…`, or a
+/// server without a share) and on no root's share;
+/// - a device path (`\\.\pipe\…`, `\\?\GLOBALROOT\…`, `\\.\C:\…`), other than a local volume's
+/// `\\?\Volume{…}\`, which a folder can be mounted as;
+/// - or with a device name (`CON`, `NUL`, `COM1.png`, `lpt1 `…) as any of its names: each folder on
+/// the way is opened in turn while the path is resolved, and the device behind a name such as
+/// `LPT1` can be a printer on another computer.
+fn refused_spelling(p: &str, roots: &[PathBuf]) -> Option {
+ match craft_docpath::resolve(p, None) {
+ // With a root as the document, a path on its share is allowed.
+ Err(Refused::Network) if !roots.iter().any(|r| craft_docpath::resolve(p, Some(r)) != Err(Refused::Network)) => {
+ return Some(Refused::Network);
+ }
+ Err(Refused::Device) if !is_volume(p) => return Some(Refused::Device),
+ _ => {}
+ }
+ // `craft_docpath` stops at the first name it refuses, which may not be the device's.
+ p.split(['\\', '/']).any(device_name).then_some(Refused::Device)
+}
+
+/// Whether `p` is in a local volume by its `\\?\Volume{…}` (or `\\.\Volume{…}`) name.
+fn is_volume(p: &str) -> bool {
+ let mut names = p.split(['\\', '/']);
+ let (Some(""), Some(""), Some("?" | "."), Some(volume)) = (names.next(), names.next(), names.next(), names.next()) else {
+ return false;
+ };
+ volume.get(..7).is_some_and(|v| v.eq_ignore_ascii_case("Volume{")) && volume.ends_with('}')
+}
+
+/// Whether a link on the way to `abs` (an absolute path) leads to a path [`refused_spelling`]
+/// refuses, following at most `links` links: one that leads to another, or on through further
+/// links, is followed too, as resolving the path would. A link that can't be read, or more links
+/// than that, are refused as well. Each name on the way is looked at with `look` ([`on_disk`]),
+/// which doesn't follow a link: where a link leads is looked at only once its spelling is known
+/// not to be refused.
+fn link_refused(abs: &Path, roots: &[PathBuf], links: u8, look: &dyn Fn(&Path) -> Entry) -> bool {
+ let mut at = PathBuf::new();
+ let mut rest = abs.components();
+ while let Some(c) = rest.next() {
+ at.push(c);
+ if !matches!(c, Component::Normal(_)) {
+ continue;
+ }
+ let target = match look(&at) {
+ Entry::Plain => continue,
+ // Nothing is below what isn't there, so no link either.
+ Entry::Missing => return false,
+ Entry::Link(target) => target,
+ };
+ let (Some(links), Some(target)) = (links.checked_sub(1), target) else { return true };
+ // A relative target is relative to the link's folder; an absolute one replaces it.
+ let next = lexical(&at.parent().unwrap_or(&at).join(target).join(rest.as_path()));
+ return refused_spelling(&next.to_string_lossy(), roots).is_some() || link_refused(&next, roots, links, look);
+ }
+ false
+}
+
+/// `p` with its `.` and `..` taken by name, as Windows takes them.
+fn lexical(p: &Path) -> PathBuf {
+ let mut out = PathBuf::new();
+ for c in p.components() {
+ match c {
+ Component::ParentDir => {
+ out.pop();
+ }
+ Component::CurDir => {}
+ c => out.push(c),
+ }
+ }
+ out
+}
+
/// Whether `path` lies in one of `roots` once made absolute with its `.` and `..` taken by name and
/// its longest leading part that exists resolved, so links on the way are followed as the roots'
/// were (`/tmp/work/x` is inside root `/private/tmp/work`, a link out of a root leads out of it).
fn inside_as_far_as_it_exists(path: &Path, roots: &[PathBuf]) -> bool {
let Ok(abs) = std::path::absolute(path) else { return false };
- let mut lexical = PathBuf::new();
- for c in abs.components() {
- match c {
- Component::ParentDir => {
- lexical.pop();
- }
- Component::CurDir => {}
- c => lexical.push(c),
- }
- }
+ let folded = lexical(&abs);
let mut rest: Vec<&OsStr> = Vec::new();
- let mut at = lexical.as_path();
+ let mut at = folded.as_path();
let resolved = loop {
if let Ok(mut base) = std::fs::canonicalize(at) {
base.extend(rest.iter().rev());
@@ -169,18 +308,24 @@ fn resolve(path: &Path) -> std::result::Result {
fn plain_name(name: &OsStr) -> std::result::Result<(), String> {
if cfg!(windows) {
let n = name.to_string_lossy();
- let stem = n.split('.').next().unwrap_or_default().trim_end().to_ascii_uppercase();
- let device = matches!(stem.as_str(), "CON" | "PRN" | "AUX" | "NUL" | "CONIN$" | "CONOUT$")
- || ((stem.starts_with("COM") || stem.starts_with("LPT"))
- && stem.chars().count() == 4
- && stem.chars().last().is_some_and(|c| c.is_ascii_digit() || matches!(c, '¹' | '²' | '³')));
- if device || n.contains(':') {
+ if device_name(&n) || n.contains(':') {
return Err(format!("`{n}` is a device or stream name, not a file"));
}
}
Ok(())
}
+/// Whether Windows opens a device for file or folder name `n`: `CON`, `PRN`, `AUX`, `NUL`,
+/// `CONIN$`, `CONOUT$`, `COM1`…`COM9` and `LPT1`…`LPT9` (also with `¹`, `²` or `³`), in any case,
+/// and with anything after a dot or a colon or trailing spaces (`nul.txt`, `COM1 .png`, `con:x`).
+fn device_name(n: &str) -> bool {
+ let stem = n.split(['.', ':']).next().unwrap_or_default().trim_end().to_ascii_uppercase();
+ matches!(stem.as_str(), "CON" | "PRN" | "AUX" | "NUL" | "CONIN$" | "CONOUT$")
+ || ((stem.starts_with("COM") || stem.starts_with("LPT"))
+ && stem.chars().count() == 4
+ && stem.chars().last().is_some_and(|c| c.is_ascii_digit() || matches!(c, '¹' | '²' | '³')))
+}
+
thread_local! {
static ROOTS: RefCell