23 Commits
Author SHA1 Message Date
Marco Arnulfo 9e15d5a17e fix(cli): accept a UTF-8 BOM in scripts and document the syntax in script --help (fixes #654) 2026-10-13 00:41:46 +02:00
skylar taylor-barrick e198eb5d1d fix(export): replace desktop and CLI outputs atomically
Route desktop writes and CLI raster exports through the engine atomic writer. Add actual-caller regressions for reader visibility, private modes, symlinks and valid long filenames.

Follow-up to #485.

PR #614.
2026-10-12 12:04:39 -06:00
Vikram Bhaskaran 3de58750cd Add PDF/X-4 validation command (#200) 2026-10-10 01:51:17 -04:00
5369687497 fix(cli): --help prints usage to stdout and exits 0 (#254)
Asking for help is not an error, but `designcraft-cli --help` shared the
catch-all arm with unknown commands, so it wrote the usage block to
stderr and exited 1 — unusable in a pipeline and wrong by convention
(`--version` already exits 0).

Split the arm: `--help`, `-h` and `help` now print the same usage block
to stdout and succeed, while an unknown command keeps it on stderr and
still fails. The usage text and links line are hoisted into a shared
`USAGE` const and `usage_footer()` so the two paths can't drift.

Fixes #243

🤖 Generated with Codebuff

Co-authored-by: Codebuff <[email protected]>
Co-authored-by: Brandon Thomas <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-10 01:50:34 -04:00
aiongg 3033c8cc64 CLI: export options after the last export are an error; MCP and README docs match the code (#127)
* CLI: run rejects an export option with no export after it (#67)

--page, --scale and --pdf-options apply to the exports that follow them; one
given after the last --export or --all-pages did nothing and said nothing.
The usage text and docs/agents.md say so.

* MCP: document that text offsets and story lengths are UTF-8 bytes (#68)

* MCP: docs name the UI-only commands precisely; app.links works headless (#62)

* README: PDF and EPUB export ship (#60)
2026-10-10 01:13:42 -04:00
japbcoelhoandClaude Opus 5.5 337e2ab113 CLI: a closed stdout ends designcraft-cli quietly
`designcraft-cli commands | head -1` panicked and exited with status 101:

  thread 'main' panicked at library/std/src/io/stdio.rs:1168:9:
  failed printing to stdout: Broken pipe (os error 32)

println! panics when stdout is closed. Output now goes through outln!, which
ends the program with status 0 on a broken pipe (the reader has what it
wanted) and reports any other write error on stderr with status 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 09:05:16 -04:00
Brandon ThomasandClaude Opus 5.5 59d7982780 Never crash: apps (desktop, CLI, web)
perf/bench return errors instead of expect() (bench runs on any document),
and the Windows resource build step fails the build without panic!. The
three app crates deny the panicking lints.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 12:43:34 -04:00
Brandon ThomasandClaude Opus 5.5 b13135472a V: Rotate Spread per spread — canvas layout through per-spread transforms
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 00:25:16 -04:00
Brandon ThomasandClaude Opus 5.5 2f54f0b53d O: Frame Fitting Options — auto-fit on resize, align from, crop (+ dialog, IDML)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-03 00:14:47 -04:00
Brandon ThomasandClaude Opus 5.5 175aaf28fd H: place a chosen PDF page (Image Import Options)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 20:57:38 -04:00
Brandon ThomasandClaude Opus 5.5 4b2417a8c0 designcraft-cli: support --version (the release packaging smoke tests call it)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 12:34:06 -04:00
Brandon ThomasandClaude Opus 5.5 f8ccff2470 F: Color panel, Color Picker, unnamed colours
- color: Swatch.hidden — unnamed colours (applied, not listed in Swatches until added)
- engine: object.color (reuses a swatch with the same colour, else an unnamed one; fill or
  stroke), swatch.addToSwatches (optionally named; users follow the rename),
  swatch.addUnnamed (+ test)
- UI: Color panel with fill/stroke proxy, CMYK/RGB/Lab, channel sliders with gradient tracks and
  value fields, tint slider for named swatches, spectrum ramp, Add to Swatches; Color Picker
  dialog (double-click a proxy chip); Swatches hides unnamed colours

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 08:45:39 -04:00
Brandon ThomasandClaude Opus 5.5 7145107896 Agents: command scripts with result references (CLI, MCP, app); parity estimate
- engine::script: parse scripts (lines, JSON lines, JSON arrays), resolve "$N.path" /
  "${N.path}" references to earlier results, run with a failure report (+ tests)
- CLI: script [FILE|-] (headless or --connect to the running app; --save/--export,
  --keep-going), app COMMAND [JSON] / --method, describe ID, commands FILTER, $N references in
  run --cmd (+ integration tests)
- MCP batch: references and a script-text alternative (+ test)
- docs/agents.md; docs/parity.md scored over 275 catalogue features with cargo xtask parity;
  ROADMAP: parity ~63% breadth / ~55% overall, ~600 agent-hours remaining

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 08:06:42 -04:00
Brandon ThomasandClaude Opus 5.5 ded7c7ad04 M9: damage-region repaint — re-render only changed frames and patch the canvas texture
- render: damage()/damage_with() — changed items and only the frames whose composition changed
  (cache keeps the composition each edit replaced; Cache::composed_for matches a document
  version exactly); conservative full repaint for styles, swatches, layers, parents, wrap,
  effects and cross-story text (+ tests incl. pixel-identical patch vs full render)
- UI: canvas patches its texture after edits with the view unchanged (0.6 ms vs 22 ms on the
  sample when typing); perf harness row for the damage repaint

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 00:54:31 -04:00
Brandon ThomasandClaude Opus 5.5 56cb9f5c65 M14: community links — Help menu (Discord, app page, GitHub, issues, website), About splash with ArtCraft mark, start-screen community card, app-bar Discord button, app.links/help.* commands, CLI 'links', MCP websiteUrl
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 14:19:13 -04:00
Brandon Thomas f08df595ca Merge main
# Conflicts:
#	ASSETS.md
2026-10-01 12:32:10 -04:00
Brandon ThomasandClaude Opus 5.5 b62a795602 M9: render perf (glyph path cache, culling) + soft drop shadow/feather/glow; perf harness
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 12:31:01 -04:00
Brandon ThomasandClaude Opus 5.5 9a45d058de M12: EPUB 3 reflowable export (designcraft-epub): reading order, CSS from styles, images, nav
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 12:19:26 -04:00
Brandon ThomasandClaude Opus 5.5 b070cc343c M6.2: IDML import/export
New crate designcraft-idml (L3, zip + quick-xml): export_idml/import_idml for
swatches (process/spot CMYK/RGB/Lab, tints, gradients), paragraph/character/
object styles with BasedOn and groups, fonts, preferences, layers, sections,
parent spreads, spreads/pages (spine/centre origin mapping), frames, groups,
corner options, wrap, transparency, embedded/linked images, formatted stories
with special characters, breaks and threading. Engine commands
file.exportIdml / file.openIdml, file.open/openBytes dispatch on IDML, CLI
--in/--export .idml, File > Export IDML..., open dialogs accept .idml.
Verified black-box in InDesign 2026 (exported files open with correct pages,
stories, threads, styles, swatches; InDesign-exported IDML imports).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 12:03:28 -04:00
Brandon Thomas 91c1051b63 Merge branch 'worktree-agent-ac6e2e6d3a98c1789'
# Conflicts:
#	Cargo.lock
#	ROADMAP.md
#	apps/designcraft-cli/src/main.rs
#	crates/engine/Cargo.toml
#	crates/engine/src/tests.rs
#	crates/ui-egui/src/menus.rs
2026-10-01 11:37:14 -04:00
Brandon ThomasandClaude Opus 5.5 cc4a8610c2 M6.4: PDF export (krilla) + file.exportPdf
New crate designcraft-pdf (L3): pages or spreads with MediaBox/TrimBox/BleedBox,
parent items with per-page folios, fills (solid + gradient swatches), aligned/dashed
strokes, corner options, opacity/blend, simple drop shadow, clipped images (JPEG
passthrough), and real text: composed glyph runs with embedded font subsets and
Unicode mapping from the story. CMYK as DeviceCMYK, RGB as DeviceRGB, spot swatches
as Separation, [Registration] as /All. Crop/bleed marks and page info. PDF/A-2b via
krilla; PDF/X-4 writes PDF 1.6 (output intent TODO).

Engine command file.exportPdf {path?, pages?, spreads?, bleed?, marks?, standard?,
compressImages?, title?, author?} (base64 when no path), CLI --export out.pdf with
--pdf-options, File > Export PDF... in the UI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 11:20:59 -04:00
Brandon ThomasandClaude Opus 5.5 044534503c M1.9: MCP server (designcraft-mcp) + designcraft-cli mcp
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 11:07:01 -04:00
Brandon ThomasandClaude Opus 5.5 91ae2b3cc9 M0: engine, tools, egui UI, desktop app, CLI, sample document, docs
Engine with command registry (~100 commands), tool hosting with one-step
undo per gesture, InDesign-style egui frontend (app bar, Control panel,
Tools panel, rulers, guides, frame edges, ports/threads, Properties/Pages/
Layers dock, panels, dialogs), JSON control channel, headless CLI renderer,
generated sample magazine, README/AGENTS/ROADMAP/ASSETS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 10:39:15 -04:00