Commit Graph
2702 Commits
Author SHA1 Message Date
Cameron Gilroy 7032587238 Snap: document grid and baseline passes 2026-10-06 09:05:59 -04:00
Cameron Gilroy 253f1a7a10 Snap: Alt-drag skips preview copies and Shift follows the turned view 2026-10-06 09:05:59 -04:00
Cameron Gilroy a2451243ad Snap: Shift and Command on a move 2026-10-06 09:05:59 -04:00
Cameron Gilroy 55ec575521 Snap: guides beat object alignment 2026-10-06 09:05:59 -04:00
Cameron Gilroy 4de93d1345 Snap: carry SnapView on the tool context 2026-10-06 09:05:59 -04:00
Cameron Gilroy 18e196acda Repo: ignore local worktree checkouts 2026-10-06 09:05:59 -04:00
Cameron Gilroy 6c5f74c9ef Docs: smart guides snapping implementation plan
Break the approved spec into ten tested tasks, from SnapView through the view commands.
2026-10-06 09:05:59 -04:00
Cameron Gilroy 552811092d Docs: smart guides and snapping design
Record the approved pass order, gestures, view switches, overlays, and tests for InDesign-style snapping.
2026-10-06 09:05:59 -04:00
Brandon ThomasandClaude Opus 5.5 9a50b3f6c5 Fonts: scan macOS's font asset folders (PingFang, Yu Mincho, …)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:05:40 -04:00
japbcoelhoandClaude Opus 5.5 48e409e214 Fonts: installed fonts are found by name whatever ran before
FontDb cataloged the system fonts only when a character needed a fallback
(nothing else calls load_system_fonts), so a document set in an installed
family was composed in Source Sans 3, and font.list and preflight reported
the family missing (#22).

Every lookup by family name now waits for one scan of the font folders per
session, as VectorCraft does since #130: the app starts the scan in the
background at startup, other processes run it on first use. The scan reads
only each file's table directory and name table, and skips folders it has
already read, so a symlink loop can't hang it. has_family counts installed
families. FontDb::with_font_dirs and system_font_dirs let tests use their
own font folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:05:40 -04:00
japbcoelhoandClaude Opus 5.5 b8e3b2c029 Preflight: placed PDF and SVG graphics have no resolution to check
preflight.run measured every placed graphic's "pixels", which for a PDF or
SVG is only the size of its screen preview, so a vector logo placed at its
own size was reported as low resolution:

  {"kind": "lowResolution", "message": "logo.pdf: effective 72 ppi (< 150)", "severity": "warning"}

Placed PDF and SVG pages export as vectors; the effective-resolution check
now applies to raster images only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:05:28 -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 <noreply@anthropic.com>
2026-10-06 09:05:16 -04:00
Brandon ThomasandClaude Opus 5.5 e7ad37517e PDF/X-4: warn when a transparency group still blends in RGB
The CMYK rewrite matches krilla's exact output; if that ever changes,
the export says so instead of silently writing RGB groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:05:03 -04:00
japbcoelhoandClaude Opus 5.5 0ce21b476c PDF: transparency groups blend in CMYK in print exports
krilla gives every transparency group it writes a DeviceRGB blending space,
including the group around a placed PDF page:

  /Group<</Type/Group/S/Transparency/I true/CS/DeviceRGB>>

A print file therefore carried DeviceRGB (forbidden by PDF/X-4 under a CMYK
output intent) and blended CMYK art through RGB: a placed logo's black,
C91 M78 Y61 K97 in its own file, printed as C72 M67 Y67 K88. When the
document's transparency blend space is CMYK (the default for print) or the
export is PDF/X-4, the groups are rewritten to /CS/DeviceCMYK in place and
at the same length (the optional /Type/Group gives the room, the rest is
padded with spaces), only inside object dictionaries found through the
cross-reference table, so every offset stays valid. Booklets get the same.
Books merged by merge_pdfs are not covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:05:03 -04:00
japbcoelhoandClaude Opus 5.5 9fcba1e3db PDF: placed PDF 1.7 files go into PDF/X-4 exports
A PDF/X-4 export (PDF 1.6) of a page with a placed PDF 1.7 (VectorCraft's
default, and most tools') failed at the very end with

  designcraft-cli: PDF writer error: Pdf(PdfDocument(PdfDocumentRepr { .. }), VersionMismatch(Pdf17), None)

krilla refuses to embed a PDF newer than the file it writes. PDF 1.7 changed
nothing in how a page draws, so a 1.7 file now goes in as 1.6 (its header
relabelled, as qpdf --force-version=1.6 does) with a warning. A PDF 2.0
file, or one whose catalog declares 1.7, fails the export with a message
naming it. hayro-syntax moves from dev-dependencies to dependencies (krilla
already builds it) because the check names its PdfVersion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:04:49 -04:00
japbcoelhoandClaude Opus 5.5 108e34ff79 PDF: [Paper] prints as no ink in print exports
[Paper] was written as DeviceRGB white (`1 1 1 rg`) even in print documents
and PDF/X-4 files: an RGB object in a CMYK print file, which print preflight
rejects. For the Print intent and for PDF/X it is now `0 0 0 0 k` (CMYK, no
ink, still knocking out what lies below); Web and Mobile documents keep RGB
white.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:04:34 -04:00
Brandon ThomasandClaude Opus 5.5 f1767a84fd Engine: an empty ids names nothing; states.create and conveyor.collect honour id
named_targets reads ids/id as targets() does, so {ids: [], id} can't
pass the gate and then run on nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:04:22 -04:00
japbcoelhoandClaude Opus 5.5 7e69c82b89 Engine: commands given ids run without a selection
A command that documents ids (object.textFrameOptions, transform.rotate, ...)
acts on the objects a call names, yet its enabled check looked only at the
selection. With a text caret or nothing selected, {"ids": [5]} failed with:

  command `object.textFrameOptions` is not available right now: nothing selected

Execute now lets such a call through when every named object exists, and
says "no object with id N" when one doesn't. transform.set, object.arrange
and edit.stepAndRepeat, which already acted on ids, now document them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:04:22 -04:00
japbcoelhoandClaude Opus 5.5 b54fa8d9bb Text: carriage returns in typed or created text start paragraphs
frame.create's text and text.insert kept CR and CR LF as characters, so text
written with InDesign's, classic Mac or Windows line ends ("One\rTwo") became
a single paragraph, and paragraph formatting (spaceAfter) never applied
between the parts. They now become \n, the paragraph separator, as edit.paste
and text import already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:04:08 -04:00
japbcoelhoandClaude Opus 5.5 316e1ffe62 Text: text.select documents its offsets as UTF-8 bytes
anchor and focus are byte offsets into the story text, as find.find reports
them, but the params doc said only {story, anchor, focus}. A script that
counts characters (Python's len()) selects too little after the first
accented letter: with "Matemática Básica" and focus 17, type.char left the
last two letters out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:03:56 -04:00
Brandon Thomas 80b3e3cb74 Merge pull request #47 from storytold/pr/release-0.2.1
Release: DesignCraft v0.2.1
v0.2.1
2026-10-06 08:00:51 -04:00
Brandon ThomasandClaude Opus 5.5 7f41aa51b0 Release: DesignCraft v0.2.1
Fixes the Windows installer: the Start Menu shortcut and Add/Remove Programs icon were blank, and the shortcut description was wrong. Release builds no longer open a console window behind the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:00:38 -04:00
Brandon Thomas d3001b4911 Merge pull request #46 from storytold/pr/windows-packaging
Windows packaging: Start Menu/Add-Remove icon, no console window, correct description
2026-10-06 07:54:02 -04:00
Brandon ThomasandClaude Opus 5.5 60de09f1bb Windows packaging: Start Menu/Add-Remove icon, no console window, correct description
The MSI Icon id had no .ico/.exe extension, which Windows Installer needs for
advertised shortcuts and ARPPRODUCTICON, so both showed a blank icon. Release
builds of the desktop app are now GUI-subsystem (no console window; the CLI stays
a console program), the shortcut/summary description names what DesignCraft does, and
packaging-lint rejects an Icon id without an extension. Found in printcraft#57.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 07:50:34 -04:00
storybored379andOpenAI Codex 6e62155108 Guides: honor layer protection in move and delete commands
Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-06 00:03:03 -07:00
Brandon ThomasandClaude Opus 5.5 02f187cc5d Text: story.replaceRange keeps the caret on a character boundary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:32:57 -04:00
storybored379andOpenAI Codex e47f65a595 Text: keep selections on UTF-8 character boundaries
Use the document model boundary helper for explicit selections and retained selections after story replacement. Cover editing and caret movement through the command API.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-05 17:32:57 -04:00
Brandon ThomasandClaude Opus 5.5 7d721c92eb Fonts: embed Shippori Mincho once, shared by documents and the UI
The UI theme included the 8.7 MB font a second time; it now uses
designcraft_fonts::JAPANESE_FALLBACK (release binary 72 MB -> 63 MB).
The ROADMAP note joins the Interface language entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:32:47 -04:00
midasdf 3ef82f850c i18n: bundle Japanese font fallback and translate vertical controls 2026-10-05 17:32:47 -04:00
Brandon Thomas 1adcf69521 Merge pull request #27 from storytold/pr/freebsd-ci-sync
FreeBSD CI: match the shared template
2026-10-05 10:04:33 -04:00
Brandon ThomasandClaude Opus 5.5 5276d7f67a FreeBSD CI: match the shared template (git + safe.directory, 4 vCPUs, pinned vmactions/freebsd-vm)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:45:12 -04:00
Brandon Thomas 1345488cff Merge pull request #25 from storytold/pr/freebsd
FreeBSD: CI job and X11 drag-and-drop on every non-Apple Unix
2026-10-05 08:30:23 -04:00
Brandon ThomasandClaude Opus 5.5 97487cf800 docs: point agents to the shared test corpora (#26)
Real-file test oracles live in storytold/photocraft-corpus, explained in
craftrules standards/test-corpora.md. Never commit large binary fixtures
here; fetch them pinned and sha256-verified.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 08:24:08 -04:00
Brandon ThomasandClaude Opus 5.5 f327d1a078 FreeBSD CI: don't copy the build back out of the VM; longer timeout; alsa-lib
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 08:11:24 -04:00
Brandon ThomasandClaude Opus 5.5 811b0d8846 FreeBSD: CI job and X11 drag-and-drop on every non-Apple Unix
A FreeBSD workflow builds and tests the workspace in a FreeBSD 14 VM
(vmactions/freebsd-vm) on pushes to main, dependency changes and on
demand. The X11 backend choice for file drag-and-drop covered only
Linux; FreeBSD desktops use the same X11/Wayland stack, so it now applies
to all(unix, not(macos)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:45:05 -04:00
Brandon Thomas c9a2040df3 Merge pull request #19 from storytold/pr/release-0.2.0
Release: DesignCraft v0.2.0
v0.2.0
2026-10-05 02:40:48 -04:00
Brandon ThomasandClaude Opus 5.5 6e7684a660 Release: DesignCraft v0.2.0
Bump the workspace version 0.1.1 -> 0.2.0 (cargo xtask version set 0.2.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:40:36 -04:00
Brandon Thomas afdae89d68 Merge pull request #14 from storytold/pr/never-crash-guard
Never crash: last-resort guard around every command
2026-10-04 14:20:03 -04:00
Brandon Thomas 87abffe7c0 Merge pull request #13 from storytold/pr/never-crash-apps
Never crash: apps (desktop, CLI, web)
2026-10-04 14:06:44 -04:00
Brandon Thomas 67535cf40a Merge pull request #12 from storytold/pr/never-crash-ui
Never crash: UI (ui-egui)
2026-10-04 14:06:22 -04:00
Brandon Thomas 9ec051e526 Merge pull request #11 from storytold/pr/never-crash-geom-color
Never crash: geom and color
2026-10-04 14:05:59 -04:00
Brandon Thomas e7f7ba13cc Merge pull request #18 from storytold/pr/never-crash-engine
Never crash: engine, MCP and tools
2026-10-04 14:05:42 -04:00
Brandon Thomas 1bf8ca50a1 Merge pull request #17 from storytold/pr/never-crash-render-pdf
Never crash: render and pdf
2026-10-04 14:05:25 -04:00
Brandon Thomas 9cf3a3309b Merge pull request #16 from storytold/pr/never-crash-doc-compose
Never crash: doc and compose
2026-10-04 14:05:09 -04:00
Brandon Thomas abb1667fef Merge pull request #15 from storytold/pr/never-crash-importers
Never crash: importers (text, IDML, fonts, format, EPUB, images)
2026-10-04 14:04:53 -04:00
Brandon Thomas 3e2cf149c6 Merge pull request #8 from storytold/pr/never-crash-steering
Never crash: steering rule, clippy.toml, forbid unsafe
2026-10-04 14:04:36 -04:00
Brandon ThomasandClaude Opus 5.5 f1662185de Never crash: last-resort guard around every command
Session::execute runs each command inside catch_unwind: a panic that escapes
(any edit, import or export, from the UI, CLI, MCP or control channel)
becomes EngineError::Internal, the document and selection are restored to
before the command, and crash recovery is saved when enabled. The first
Session installs a panic hook that logs the message and location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:55:07 -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 <noreply@anthropic.com>
2026-10-04 12:43:34 -04:00
Brandon ThomasandClaude Opus 5.5 2c46e97a48 Never crash: UI
The canvas, Properties panel and QR dialog skip a frame instead of
expect()ing a document; the control channel caps ui.drag steps. ui-egui
denies the panicking lints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:43:34 -04:00
Brandon ThomasandClaude Opus 5.5 d84107aaca Never crash: importers (text, IDML, fonts, format, EPUB, images)
An .xlsx cell reference far from the others no longer allocates the whole
range before the cell cap (billions of cells, out of memory), and long
column names can't overflow. IDML import doesn't trust zip part sizes for
up-front allocation and adds header/footer counts saturating. Tagged Text
and IDML export use let-else; the font fallback has a compiled-in last
resort. These crates deny the panicking lints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:43:34 -04:00