Commit Graph
2433 Commits
Author SHA1 Message Date
bd920fc7de M8: .fig import: a routed connector takes its line style from the generated record (#1807) (#1813)
* M8: .fig import: a routed connector takes its line style from the generated record (#1807)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* M8: .fig import: a routed connector keeps its own empty paints and dash pattern

CodeRabbit review on #1813: an explicit empty strokePaints (no stroke) or
dashPattern (solid) on the connector no longer takes the generated record's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-01 14:12:31 -05:00
김삼현andClaude Opus 5.5 264bcb1c03 M8: an arc's spread shadow and mitred stroke get room for their corners (#1802)
* M8: an arc's spread shadow gets room for its mitred corners

Rectangles, frames and ellipses grow by exactly their spread, so their
layers only make room for the spread itself; other shapes make room for
the mitre at sharp corners (up to four times the spread). An ellipse
with arc data (a pie slice, or a ring cut short) counted as an ellipse,
but its ends meet its sides in sharp corners: a spread of 25 on a slice
of 0.3 rad cut its shadow off at the layer's edge (up to 255 levels).

Only an ellipse that goes all the way round now grows by exactly its
spread. `figcraft_geom::full_sweep` is what `ellipse` already used to
tell a whole ellipse or ring from an arc, so the two agree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* M8: an arc's mitred stroke gets room for its corners too

Review: `outline_reach` counted every ellipse as an outline whose stroke
mitres end on the grown box, the same mistake as the spread. A thin
slice with a 20-unit mitred stroke and a spread of 10 still had its
shadow cut off (255 levels). It now asks `grows_by_exactly_its_spread`,
which picks the same shapes and leaves arcs out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:12:27 -05:00
김삼현andClaude Opus 5.5 6b2e464361 M8: a scaled node's spread shadow keeps its room in SVG (#1803)
The SVG export blurs a spread drop shadow in a filter whose region is
the silhouette's page bounds grown by the spread's mitre and the blur.
The spread grows the outline in the node's own units, though, and the
transform then scales it: on a star scaled three times, a spread of 10
mitred out to some 97 units while the region only made room for 48, so
SVG viewers cut the shadow's points off. The spread now grows the region
as far across and down as the transform takes a local step of that
length, as the paint bounds already do.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:12:23 -05:00
Trevor BrownandClaude Fable 5.1 83c28cf3ae M6: SVG import: a stretched image stays stretched (#1811)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 14:12:18 -05:00
e04c5d2274 text: use craft-font-catalog on Unix (#1765)
* text: use craft-font-catalog on Unix

On Linux and BSD distributions that do not follow traditional FHS layout
(such as NixOS and Guix), or systems using custom font configurations,
fonts are not located under `/usr/share/fonts` or `/usr/local/share/fonts`.
Instead, font directories are declared in `/etc/fonts/fonts.conf` and its
included configuration files (such as `/etc/fonts/conf.d`), or under
`$XDG_DATA_DIRS/fonts`.

`figcraft-text` already depends on `craft-font-catalog`, which provides
`craft_font_catalog::font_dirs`:
- Preserves all existing directory sources (`/usr/share/fonts`,
  `/usr/local/share/fonts`, and user font directories).
- Adds Flatpak host directories (`/run/host/fonts`), `$XDG_DATA_DIRS`,
  and fontconfig directory trees (`/etc/fonts/fonts.conf`).
- Deduplicates the combined list via `craft_font_catalog::dedup_dirs`
  using canonical paths, ensuring equivalent directories and symlinks
  are not redundantly scanned.

Use `craft_font_catalog::font_dirs` in `system_font_dirs()` on Unix, and
retain `unix_user_font_dirs` under `#[cfg(test)]` for its unit tests.

* text: walk each system font folder once

Fontconfig usually lists folders the scan already has (/usr/share/fonts); the list is deduplicated
so their faces aren't indexed twice (CodeRabbit on #1765).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* text: scan the catalog's full Unix font folder list

fontconfig_dirs alone dropped /usr/share/fonts, ~/.fonts and the XDG folders when no fontconfig
configuration exists; font_dirs keeps them, adds what fontconfig names, and deduplicates, as the
PR description intended. The local user-folder helper it replaces is removed with its tests (the
catalog applies the same XDG rules).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:38:47 -04:00
NetterSilverandClaude Opus 5.5 96dcb3eda9 Give each variable a unique custom property in CSS export (#1738)
Found while testing crates/engine/src/cmd/variables_io.rs:~80-105 (css, non-tailwind `name` closure using css_var_of) with crates/engine/src/dev/codegen/css.rs:41 (css_var_name)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:37:26 -04:00
NetterSilverandClaude Haiku 5.5 556d44d47a Reject '+' sign in comment parse_link thread ids (#1740)
Found while testing crates/engine/src/cmd/comment.rs:55 (parse_link)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-31 10:37:22 -04:00
NetterSilverandClaude Haiku 5.5 9a7e5d1a16 Apply paint opacity to CSS gradient stops in code export (#1750)
Found while testing crates/engine/src/dev/codegen/css.rs:121 (css_decls, the PaintKind::Gradient arm calling css_gradient at :255)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-31 10:37:18 -04:00
45e5a25370 Escape backslashes and line breaks in CSS font-family export (#1752)
* Escape backslashes and line breaks in CSS font-family export

Found while testing crates/engine/src/dev/codegen/css.rs:223 (text_decls, the font-family put)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Escape quotes and < in CSS font-family export

A double quote in a family name is escaped instead of turned into a single quote (CodeRabbit on
#1752), and < is written as \3C so a name can't end the generated page's <style> block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-31 10:37:13 -04:00
NetterSilverandClaude Haiku 5.5 fad47ac8bc Relative line height and letter spacing edits with a unit suffix add to the current value (#1755)
Found while testing crates/ui-egui/src/panels/typography/spacing.rs:166 (parse_line_height, px branch; also :183 and :180 in parse_letter_spacing, px and % branches)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-31 10:37:09 -04:00
NetterSilverandClaude Haiku 5.5 3b5de55587 Keep huge finite values finite when stepping number fields (#1753)
Found while testing crates/ui-egui/src/widgets/field_math.rs:168 (stepped, used by widgets.rs:131 scrubbed)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-31 10:37:05 -04:00
b957160379 Fix code export printing inf for very large finite numbers (#1757)
* Fix code export printing inf for very large finite numbers

Found while testing crates/engine/src/dev/codegen.rs:185 (num)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Keep rem values finite past num6's scaling overflow

num6 had the same x1e6 overflow as num: a huge finite length printed 0rem (CodeRabbit on #1757).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-31 10:37:01 -04:00
aiongg 0abbe44cd4 updates: gate the wasm-only import (#1746) 2026-10-31 01:43:37 -04:00
Dylan M. Taylor 7253909c09 Merge pull request #1739 from aiongg/docs-tidy
docs: tidy agent, contributor and asset docs
2026-10-31 01:06:42 -04:00
Dylan Taylor 29e333b5b1 fix: remove unused tr import in updates_ui 2026-10-31 01:05:13 -04:00
aiongg 57d92d291a updates: show check results with craft-update's CheckResultDialog 2026-10-31 04:42:35 +00:00
aiongg 69f7e91db3 docs: tidy agent, contributor and asset docs 2026-10-31 04:17:30 +00:00
BFlat 12e9b409ed M12: a connector end on any part of an object with Cmd/Ctrl (#1733) 2026-10-31 10:27:56 +07:00
BFlat e2f04b33e0 M11: a tap on a plugin panel's button keeps what was typed in its fields (#1732) 2026-10-31 10:13:01 +07:00
BFlat 6b28ef57dc M4: Dash cap setting for Dash and Custom strokes (#1728) 2026-10-31 09:41:39 +07:00
BFlat b62ec4ef25 Merge pull request #1734 from Silvertree2010/fix/h4145-parse-css-accepts-empty-argument
Reject empty arguments in parse_css color functions
2026-10-31 09:28:57 +07:00
BFlat 3b77c236af Merge pull request #1731 from zral/docs/vector-path-xy-offset
M0.9: document that x/y offset a vector path by its own box
2026-10-31 09:14:25 +07:00
BFlat 87254913af M3: library analytics list how each style and variable is used (#1730)
* M3: library analytics list how each style and variable is used

A file reports how many of its layers use each of a team library's styles and
variables, and Show usage lists them by a Type choice with their layers and
files. Layers in instances count for their component. Also ignores plugins/target.

* M3: the style analytics test waits for the instance report too
2026-10-31 09:13:08 +07:00
NetterSilverandClaude Haiku 5.5 9ae43a4c4e Reject empty arguments in parse_css color functions
Found while testing crates/color/src/lib.rs:247 (css_args, used by the rgb/rgba and hsl/hsla arms of parse_css at :159 and :178)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 03:02:39 +01:00
BFlat 57a51af8bb M5: the Controller menu names each button as PlayStation and Switch controllers do (#1726) 2026-10-31 08:41:40 +07:00
BFlat 1c5c9e04c3 M11: widgets draw lines and SVG pictures (plugin API 6) (#1727)
A widget description can have a line, 100 long and black and 1 thick unless told
otherwise, and an SVG that comes in as locked layers, scaled to fit a size and
within the widget's 256 layers. The Counter example uses both.
2026-10-31 08:13:08 +07:00
BFlat 59c7624569 M12: a connector end dropped along a side of a shape attaches to that side (#1708) (#1714) 2026-10-31 07:57:03 +07:00
BFlat bdb6a05976 M8: regression tests for one-sided strokes on rounded shapes and XML-forbidden characters in SVG (#1351, #1124) (#1719)
Both reports were checked by running them and are already fixed on main. Pins a rounded rectangle or frame stroking only the side asked for in every alignment, and SVG font families and ids leaving out characters XML forbids.
2026-10-31 07:41:40 +07:00
BFlat 3837b08a71 M8: a damaged image is refused with a reason instead of showing as an empty box (#1724)
* M8: a damaged image is refused with a reason instead of showing as an empty box (#1474)

* M8: replacing an image refuses a damaged file too
2026-10-31 07:22:44 +07:00
BFlat 943c20f934 M1: images copied elsewhere paste on the desktop and in the browser (#492) (#1723)
The desktop shell swallows a plain Cmd/Ctrl+V, press and release, and sends an
image paste event; FigCraft ignored it and waited for a release that no longer
comes. The browser's paste event gives eframe only text, so the page now reads
the image from it, under the same limits.
2026-10-31 07:07:09 +07:00
BFlat 2e92d36af0 M6: SwiftUI and Compose code name a bound variable by its code syntax (#1716)
Bound variables with an iOS or Android code syntax are named in generated SwiftUI and Compose in place of their value: paints, stroke weight, sizes, corner radius, gaps, padding, opacity and text. A variable with none for the platform keeps the value.
2026-10-31 06:49:41 +07:00
BFlat a1a198239e Merge pull request #1725 from Silvertree2010/fix/h4127-outside-stroke-on-a-rectangle-ig
Honour Round and Bevel joins on outside rectangle strokes
2026-10-31 06:36:30 +07:00
BFlat 920aafb805 M1: the colour picker's Image tab has a placeholder, a preview and takes a dropped file (#1682) (#1713)
Choosing Image shows a checkered placeholder and Upload from computer instead of a dialog at once; an image paint shows its asset preview. A file dropped on the open picker replaces the image, keeping the fill mode, crop, position and adjustments (image.replace, one undo step; paths capped as image.place's). The browser's file picker reaches the tab too. Also fixes a race in library_detach_tests.
2026-10-31 06:32:59 +07:00
BFlat 1ea19482d3 M1: the Frame tool's Phone presets have the iPhone 17 family (#1691) (#1720)
iPhone 17, 17 Pro, 17 Pro Max and Air, at the sizes the prototype device list uses; a test keeps presets named like a device at its size.
2026-10-31 06:13:47 +07:00
NetterSilverandClaude Haiku 5.5 8fbb693370 Honour Round and Bevel joins on outside rectangle strokes
Found while testing crates/render/src/draw.rs:190-240 (stroke_area, the Inside/Outside ring fast path)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 00:11:23 +01:00
bflatastic 71a625896b Merge main into #1721 2026-10-31 05:31:25 +07:00
BFlat 87e42a14f2 M4: a dashed line starts and ends with a half-length dash (#1718) 2026-10-31 05:28:15 +07:00
BFlat 71323ee780 M8: search fields in the left panels keep their text in the middle (#1703) (#1709) 2026-10-31 05:10:48 +07:00
BFlat b462a48346 M12: a connector's path can be reshaped by dragging its path handles (#1710) (#1717) 2026-10-31 04:53:36 +07:00
BFlat 4bcfd5247f M12: boards have 16 more shapes, in grid pickers (#1705)
* M12: boards have 16 more shapes, in grid pickers

* M12: a board shape's id and name sit in one table
2026-10-31 04:27:12 +07:00
BFlat 2d784c363d M3: library analytics count insertions and show them over time (#1704)
Gap 10: a file counts the library instances it places, creates, pastes or duplicates and reports them like its detaches. The server counts what a file's totals grow past their highest in the current week and keeps a year of weeks (actions.json). library.usage {days} and Show usage give insertions and detachments over the past 30 days, 90 days or year. New variants are appended; an older server refuses them and Show usage says so.
2026-10-31 04:13:14 +07:00
BFlat 0fb8d37084 Merge pull request #1715 from kler/swedish-ui-2026-10-30-2
i18n(sv): translate 22 new strings
2026-10-31 03:58:29 +07:00
BFlat 12d36a9913 M4: a stroke's Custom style takes a dash pattern as a comma-separated list (#1681) (#1712) 2026-10-31 03:56:43 +07:00
Patrik LermonandClaude Opus 5.5 6a9a107982 i18n(sv): translate 22 new strings
Brings the Swedish catalog up to date with upstream main (fd8d49fc).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 21:44:07 +01:00
BFlat 437d052396 M8: a control request can set its own timeout, up to 10 minutes (#1696) (#1706)
A request line can carry timeoutMs beside id and method, capped at 600,000 ms; without it the wait stays 60 s and older apps ignore the field. figcraft-cli mcp --attach PORT --timeout SECONDS sends it with every request and reads the answers that much longer. A timeout's message says how long the request waited.
2026-10-31 03:41:56 +07:00
BFlat fd8d49fc95 M11: a widget opens its plugin's panel (plugin API 5) (#1684)
* M11: a widget opens its plugin's panel (plugin API 5)

Gap 6: a widget callback's ui_show opens the plugin's panel and keeps the module loaded; the panel's callbacks get the widget's id and state and redraw it in the same undo step. Older plugins' ui_show from a widget still opens nothing. The Counter example sets its count from a panel.

* M11: open_panel takes its opener as one value
2026-10-31 03:24:32 +07:00
BFlat 9dafa22a20 M8: the Menu key opens the context menu; stale parity rows on reorder rings and shortcut counts corrected (#1677) 2026-10-31 03:07:14 +07:00
BFlat 760aece238 M5: an Open link action can open in place of the prototype, with Open in new tab off (#1685) 2026-10-31 02:37:54 +07:00
BFlat 77778cad9d Merge pull request #1700 from Janiz-zzz/fi-update-20261030
i18n(fi): translate the 99 UI strings and 23 command labels Finnish lacked
2026-10-31 02:34:39 +07:00
BFlat bbd1188c81 M3: a collection of this file can be extended (#1679)
Gap 14: variable.extendCollection and Extend collection on a collection's row in the Variables editor. Extensions follow edits of the collection they extend at once (normalising keeps them in step whenever variables change), extensions extend again, and a loop of extensions from a hostile file comes apart into plain collections.
2026-10-31 02:21:53 +07:00