Commit Graph
83 Commits
Author SHA1 Message Date
Bryton CooperandClaude Opus 5.5 96a2067684 figcraft-cli: --strict on export, convert and run; .fig fill outline per winding rule (#2384)
`export`, `convert` and `run --out` take `--strict`. When the .fig,
.penpot or Android Vector Drawable writer reports anything left out or
changed, nothing is written or replaced and the command exits 1 with the
reasons on the error line. A folder of drawables is written only once
none of its files leaves anything out. `--strict` with an output whose
writer reports nothing (png, svg, pdf, ...) or with `--vd-compat ignore`
is a usage error (exit 2), so it never passes without checking anything.
A .figcraft output is accepted for convert and run: it keeps everything.

.fig export writes a vector whose filled areas use both winding rules as
one fillGeometry path per rule, so other readers fill each area as the
network does. The warning that the outline used the first area's rule is
gone.

Image adjustments, list spacing, hanging punctuation and lists, and
vertical trim were already written on main. OpenType features,
variables' publishing, code syntax and inheritance settings, prototype
device settings and text styles on part of a text keep their warnings:
the .fig import (craft_fig's mapping at the pinned craft-libs rev) does
not read them back, so they cannot round-trip yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 04:37:07 -07:00
BFlat dbe9eeb1bd Merge pull request #2607 from Utakata/feat/open-camera-raw
format: open camera raw files as their developed picture
2026-11-28 15:06:51 +07:00
FredApps f278b428cb Merge branch 'main' into feat/automation-allow-server-join
main moved figcraft-cli to RFC-0018 (#2645): main.rs is a thin wrapper and the
dispatch lives in lib.rs, so mcp_roots, the --automation-allow-server handling
and its test move there; headless mcp is checked before the fonts are scanned.
2026-11-28 08:01:38 +01:00
FredApps 4561b31166 Merge branch 'main' into feat/open-camera-raw
main's craft-libs pin (8fa4db64) already contains 249a41bd, so the pins stay at
main's and the camera raw crates are added at that same rev.
2026-11-28 07:46:25 +01:00
bflatastic 3cac6c5051 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-27 14:25:45 +07:00
BFlat 1673da23fc Merge pull request #2645 from storytold/rfc-0018-figcraft-cli
figcraft-cli: follow RFC-0018
2026-11-27 13:46:46 +07:00
BFlat 09236df3d8 Merge pull request #2558 from MMexicann/patch-24
docs(cli): explain how export resolves layer names across pages
2026-11-27 13:43:51 +07:00
BFlat 39f3da9451 Merge pull request #2551 from MMexicann/patch-18
docs(cli): explain selected-layer exports to a directory
2026-11-27 13:43:30 +07:00
BFlat 0e4660b53c Merge pull request #2546 from MMexicann/patch-14
docs(cli): clarify what a failed script rolls back
2026-11-27 13:43:11 +07:00
FredApps 8d50b20c64 figcraft-cli: follow RFC-0018 (run(args,out,err), typed errors, env flags, --in-place, man pages and completions) 2026-11-26 22:34:19 +01:00
UtakataandClaude Opus 5.5 90d2d92430 format: open camera raw files as their developed picture
RW2, CR2, CR3, NEF, ARW, RAF, ORF, DNG and the other containers craft-raw
decodes now open, import, place and fill shapes. add_image develops a raw
once with craft-develop's stages (AHD demosaic, highlight rebuild, as-shot
white balance and colour matrices, neutral tone curve, sRGB, orientation)
and the document keeps the picture as a quality 95 JPEG, so every way an
image comes in takes raws. file.open and the Open, Import, Place and image
fill dialogs know the raw extensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 04:34:49 +09:00
Anderson 470b6483f1 Require both roots for headless MCP 2026-11-23 04:04:24 +01:00
Anderson 4f2ade852e MCP: allow confined sessions to join an approved server 2026-11-23 02:34:21 +01:00
Mex 0264e32c47 docs(cli): explain how export resolves layer names across pages 2026-11-21 20:27:29 +01:00
Mex a6f9cd1efc docs(cli): explain selected-layer exports to a directory 2026-11-21 19:38:17 +01:00
Mex 0d03a241db docs(cli): clarify what a failed script rolls back 2026-11-21 18:33:54 +01:00
Mex 0ceac64731 docs(cli): list Penpot as a convert input 2026-11-21 17:19:23 +01:00
Mex ceea6da487 Merge branch 'main' into patch-6 2026-11-18 21:12:24 +01:00
Mex 16249aab13 M0.9: clarify formats that ignore CLI page selection
State in the --page guide bullet that .fig and .penpot export the whole document and ignore --page, matching the early returns before page_named.
2026-11-15 19:57:05 +01:00
Mex eaf1cc8bb9 M0.9: document the CLI default page selection
Clarify the behavior of the `export` command regarding output file naming and default page selection. Update the `render` command description to specify default behavior for non-divider pages.Explain skipped divider pages, the first-page fallback when all are dividers, and explicit --page selection for export and render.
2026-11-15 19:39:55 +01:00
Mex 4382b9b591 docs: explain generated device-name prefixes
Document the reserved Windows name prefix alongside the existing generated export filename rules.
2026-11-15 16:27:19 +01:00
skylar taylor-barrick 3839fe4a0c Naming: use Developer Mode instead of Figma's Dev Mode (#2135)
Figma holds a US registration for DEV MODE (US 7574348). Display text only: the view.devMode label, Inspect tab, shortcut row, refusal messages, CLI help, docs and all locale catalogs now say Developer Mode. Command ids, preference keys and saved fields are unchanged; "Dev Mode" stays a search alias in the Actions palette. Adds a naming guard test.
2026-11-09 06:24:44 +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 01b07af55a M6: a pasted image the clipboard doesn't carry shows as missing and is named (#1648)
* M6: a pasted image the clipboard doesn't carry shows as missing and is named (#1646)

The placeholder an import stores for an image it lacks is now striped, not flat grey; the fill keeps the image's name; .fig and paste give a fixed, translated note per image; edit.pasteDesignLayers returns missingImages, the paste's message names those layers, and a paste with notes opens the import report.

* M6: the missing-image placeholder's stripes stay clean when scaled, and a .fig gives one note (#1646)
2026-10-30 19:34:24 +07:00
BFlat 84e5278209 M6: figcraft-cli connect publish publishes code connect mappings to a design file (#1643)
* M6: figcraft-cli connect publish publishes code connect mappings to a design file

figcraft-cli connect publish <file.figcraft> [--mappings figcraft.connect.json] [--dry-run] links each entry's component or set by name through codeConnect.import, warns about and skips links that don't fit, saves the file in place through the engine's file.save, and exits 1 when nothing links. Gap 16.

* M6: the generated man pages include connect and connect publish
2026-10-30 16:31:25 +07:00
05a475dccf M0.9: generate shell completions and man pages for figcraft-cli (part of #1396)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
2026-10-30 06:49:05 +03:00
BFlat be7a2ecd3c M0.9: parse figcraft-cli arguments with clap, following RFC-0012 (#1396) (#1570)
clap derive types replace the hand-written parser: typed values, usage
errors (exit 2) before any work, help from the same definitions.

Syntax changes: a repeated option is a usage error (was: last wins; the
automation roots still repeat); a value starting with `-` needs `=`; a
positional starting with `-` needs `--`; `--o` and the `version`
subcommand are gone (`--version` stays); `<sub> --help` prints that
subcommand's help; usage errors are clap's text; `--format` is checked
before the file is opened.
2026-10-30 05:41:26 +07:00
BFlat fe7b4bac63 Merge pull request #1143 from Guillergood/feat/penpot-import-export
M6: import and export Penpot 2.x files offline
2026-10-29 14:20:14 +07:00
bflatastic 0a6642747a Merge main into #1143
file.open and file.export docs: main's (reload, export options) plus the Penpot format.
2026-10-29 13:51:11 +07:00
bflatastic e89def2068 Merge main into #1409 2026-10-29 13:46:42 +07:00
MortenHustedandClaude Opus 5.5 27c11858e1 M0.9: MCP tools and batch steps refuse names they don't take (#1413)
`run_command {"command": "inspect.code", "args": {...}}` ran the command
without its params, on the selection. MCP tool arguments are now checked
against each tool's input schema (and the objects it describes inside,
such as a batch's steps; open objects like `params` take anything), and
a step key other than `command`, `params` and `as` is refused in
command.batch, figcraft-cli scripts and the MCP batch tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:06:59 +01:00
Guillermo Bueno 7ea161f33f M6: merge main and isolate offline Penpot import/export 2026-10-27 18:59:49 +01:00
300a5f2f9d M0.9: let batches continue after failed steps (#1386)
command.batch and the MCP batch tool take onError: "abort" (the default, unchanged) or
"continue". In continue mode each step runs inside a rollback-only checkpoint split out of
Session::grouped: a failed step is rolled back on its own, later steps still run, and the result
is one {step, command, ok, result|error} object per step. What was applied is one undo step; a
reference to a failed step fails too; malformed batches are still rejected before any step runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
2026-10-27 07:57:54 +03:00
bflatastic e469cc8135 Merge main into #840
# Conflicts:
#	apps/figcraft-cli/src/files.rs
#	apps/figcraft-cli/src/main.rs
#	crates/engine/src/cmd/file.rs
#	crates/engine/src/lib.rs
#	crates/ui-egui/locales/en.toml
#	crates/ui-egui/locales/es.toml
#	crates/ui-egui/src/export_panel.rs
#	crates/ui-egui/src/export_preview_tests.rs
#	docs/file-format-parity.md
#	docs/mcp.md
#	docs/roadmap.md
#	docs/ui-parity.md
2026-10-26 23:23:07 +07:00
Denis Gomes f1b41ffeaa M7: find fonts that macOS font managers activate outside the font folders
Font managers such as RightFont, FontBase and Typeface keep fonts in their
own library folders and activate them through Core Text, without copying
them into /Library/Fonts or ~/Library/Fonts. Every other Mac app lists
these fonts; FigCraft walks only the font folders, so it didn't, and a
file using one of them drew in a fallback font.

On macOS the scan now also asks Core Text for the file of every available
font and indexes the files that lie outside the walked folders. All three
scans (the first, the on-demand one and text.rescanFonts) share this, so a
font activated while the app runs is found by a rescan like a newly
installed one.

Core Text needs unsafe FFI, which the workspace forbids, so the query goes
through the safe wrappers of the core-text crate, pinned at =20.1.0. That
version builds on the core-foundation 0.9, core-graphics 0.23 and
foreign-types 0.5 the lockfile already has: core-text is the only new
package. The call sits inside catch_unwind, so anything unexpected from
Core Text leaves the scan with the font folders alone. Other platforms are
unchanged.

On a Mac with RightFont, 15 families from its library are now listed
(Geist, JetBrains Mono, Clash Display and others) that weren't before. A
full font listing went from 0.06 s to 0.20 s on that machine.

Tests: the filter that keeps files outside the font folders once, indexing
a font file found outside them, and (macOS only) that Core Text lists the
system's font files. cargo test --workspace, cargo clippy -p figcraft-text
--all-targets -D warnings and cargo fmt --check pass on macOS 15. CI
builds on Linux only, so the macOS path is checked locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5699e7abe6e5994e526051774ec92aadddb0550c)
2026-10-26 00:36:21 -04:00
bflatastic 7177f1c042 Merge main into #1021
# Conflicts:
#	ROADMAP.md
#	docs/roadmap.md
2026-10-26 10:29:24 +07:00
bflatastic 7c25399e4a Merge main into #661
# Conflicts:
#	ROADMAP.md
2026-10-26 10:03:15 +07:00
bflatastic 07a654959a Merge main into #1021
# Conflicts:
#	docs/file-format-parity.md
2026-10-26 09:12:39 +07:00
BFlat 378ac56286 Merge pull request #1003 from kkilchrist/feat-994-batch-step-refs
command.batch: named step references (`as` / `$ref`) and paths in `field`
2026-10-26 08:31:53 +07:00
Jindřich ŠaršonandClaude Opus 5.5 6258ad2786 M6: Sketch import: merge main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 22:23:40 +01:00
Guillermo Bueno Vargas ff365be661 Merge branch 'main' into feat/penpot-import-export 2026-10-25 17:42:30 +01:00
Guillermo Bueno 1cd9c0d875 M6: add bounded offline Penpot import and export 2026-10-25 14:36:23 +01:00
Jindřich ŠaršonandClaude Opus 5.5 87db9522b4 M6: Sketch import: merge main (Boards M12 and community fixes)
Conflicts resolved keeping both sides: `.sketch` stays in `is_document`
(now via `OsStr::to_str`); ROADMAP and the parity, roadmap and
file-format docs keep main's headers and rows with the `.sketch` notes
and history rows added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:13:03 +02:00
AganzeFelicite c743f8ec1e Merge remote-tracking branch 'upstream/main' into fix/adobe-fonts-macos-298
# Conflicts:
#	ROADMAP.md
#	crates/text/src/fontdb.rs
#	docs/roadmap.md
2026-10-24 18:20:00 +02:00
bflatastic 48a5e03348 Merge main into #954
# Conflicts:
#	ROADMAP.md
2026-10-24 12:54:04 +07:00
bflatastic 13eba6a3ea Merge main into #1003
# Conflicts:
#	crates/engine/src/lib.rs
2026-10-24 12:53:57 +07:00
bflatastic 550c3e8bbb Merge #905: M1: say that the automation roots reach only the headless side (#835) (@xiaou61) 2026-10-24 09:23:48 +07:00
bflatastic 90e5e03b23 Merge #1160: M0.9: figcraft-cli export names files as the app's export does (#1154) (@switch87) 2026-10-24 09:16:12 +07:00
Gert Pellin eb07717783 M0.9: trim mixed edge spaces and dots, document the name limits (#1154)
Review: " . .name. . " kept inner dots at the edges; trim spaces and dots
in one pass. docs/cli.md and safe_file_name's comment give the 100 and
200 character limits.
2026-10-22 21:43:52 +02:00
Gert Pellin 40315a123d M0.9: --help and -h after a figcraft-cli subcommand print the usage (#1155)
`figcraft-cli mcp --help` failed with "unknown option --help" and
exit code 2; only a leading --help worked. The argument parser now
returns CliError::Help for --help or -h among a subcommand's options
(not as an option's value), and main prints the usage on stdout with
exit code 0. docs/cli.md says so.
2026-10-22 21:25:24 +02:00