Commit Graph
435 Commits
Author SHA1 Message Date
aiongg 8cd7bdc88b Merge #117: Fix browser printing, startup flags, and document MIME 2026-10-09 22:16:13 +00:00
aiongg e46e173d90 Merge #120: Preserve typed values in generic command dialogs 2026-10-09 22:16:13 +00:00
aiongg 800b2332f6 Merge #139: Docs, About: the Illustrator-class sibling is VectorCraft (#59) 2026-10-09 22:16:13 +00:00
aiongg 40a8ba3c53 Merge #138: Web: AltGr and other named keys no longer type their names (#134) 2026-10-09 22:16:13 +00:00
aiongg 8300519bd5 Merge #249: Make menu entries selectable across the full row 2026-10-09 22:16:13 +00:00
aiongg 9b3b085770 Merge #248: Add A6 sheet preset to the welcome page 2026-10-09 22:16:13 +00:00
aiongg 8fe589586b Merge #224: Distribute selected table rows evenly and keep the edit undoable 2026-10-09 22:16:13 +00:00
aiongg 5729796705 Merge #122: Desktop: write log records to standard error and a rotating log file
Conflict: apps/designcraft/src/main.rs: kept both module declarations (#168's graphics, #122's logging)
2026-10-09 22:16:13 +00:00
aiongg 6e8f33c386 Merge #168: Fix Windows startup crash by defaulting to DirectX 12 2026-10-09 22:15:59 +00:00
aiongg de5d32c90f Merge #244: Rebind embedded image links when opening relocated packages (#235) 2026-10-09 22:15:59 +00:00
aiongg 553d017065 Merge #229: Prevent mixed gradient color spaces from aborting PDF export 2026-10-09 22:15:59 +00:00
aiongg 29e33dde3d Merge #152: Apply contextual escaping to HTML and EPUB exports 2026-10-09 22:15:59 +00:00
aiongg eedbaf6717 Merge #137: Commands: huge row and column counts can't exhaust memory 2026-10-09 22:15:59 +00:00
aiongg 997d18dcac Merge #149: Import: RTF and Tagged Text keep characters past U+FFFF 2026-10-09 22:15:59 +00:00
aiongg 69fc1c381f Merge #116: Images: set SVG text in the shared fonts when the bundled ones lack it 2026-10-09 22:15:59 +00:00
aiongg 13cc11b041 Merge #115: Compose: don't panic when a hyphenated paragraph starts with a no-break letter 2026-10-09 22:15:59 +00:00
aiongg c64e703495 Merge #136: Images: PSD decode passes clippy on Rust 1.98 2026-10-09 22:15:59 +00:00
moppeeer 218dc42e5d Make menu entries selectable across the full row 2026-10-09 23:33:42 +02:00
moppeeer 84be68d9c2 Add A6 sheet preset to the welcome page 2026-10-09 23:28:49 +02:00
DWAA1660andCodex 658d8e1784 M5: rebind embedded image links when opening relocated packages (#235)
Reuse packaged-link candidates for embedded IDML images and native files.
Resolve missing original paths beside the opened document, retaining the
embedded image bytes and any original link that still exists. Bound path
lookup allocations and cover actual package relocation through commands.

Make existing data-merge test path assertions portable to Windows.

Co-authored-by: Codex <noreply@openai.com>
2026-10-09 15:07:20 -06:00
Vikram Bhaskaran 6aaa4f0b75 Distribute selected table rows evenly and keep the edit undoable.
The rows share one fixed height that preserves their composed total. Merged rows and rows that are not laid out are refused, and the table stays unchanged.
2026-10-10 04:37:44 +11:00
Skylar Taylor-Barrick ee33fe3c35 FID1: prevent mixed gradient color spaces from aborting PDF export 2026-10-09 17:33:18 +00:00
Brandon Thomas 66c7ce7e96 Merge pull request #131 from XusBadia/dmg-background
macOS DMG: branded window background and icon layout
2026-10-09 09:20:37 -04:00
Xus BadiaandClaude Opus 5.5 ec42e542e9 macOS DMG: branded window background and icon layout
The DMG opened as a plain Finder window. It now shows the app icon's figure on
the DesignCraft colour, with DesignCraft.app and the Applications link side by side.
Same approach as PhotoCraft's and VectorCraft's (storytold/photocraft#1201,
storytold/vectorcraft#493).

- packaging/macos/dmg/: background.svg (source; text outlined, no paper grain,
  the figure an <image> of assets/app-icon), background.tiff (1x + 2x HiDPI,
  16-colour palette, Deflate, sRGB; ~90 KB)
  and dmg-layout.DS_Store (Finder view settings: window, icon size 128,
  positions, background).
- generate.py writes the TIFF and the layout on any OS, byte-for-byte
  reproducible, with nothing from the machine that ran it (no paths, users,
  disk names or volume UUIDs).
- package.sh copies them into the staging folder; the image is still built with
  hdiutil makehybrid. Nothing extra runs in the signing job.
- The volume name drops the version: the layout finds the background through
  an alias that includes the volume name. The DMG file name keeps the version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:43:40 +02:00
DWAA1660 412962d9f8 Fix #167: default Windows startup to DirectX 12 2026-10-08 14:56:37 -06:00
Jan Hallvard LarsenandClaude Opus 5.5 c63ca54227 Import: RTF and Tagged Text keep characters past U+FFFF
Placing an RTF or Tagged Text file dropped every character outside the
Basic Multilingual Plane: emoji, mathematical letters and the rarer CJK
ideographs such as 𠮷 (U+20BB7, used in Japanese names). The text
around them came in, so the loss was silent. It also broke our own round
trip: Export Text writes these characters correctly and Place lost them.

Both formats carry such a character as a UTF-16 surrogate pair, two
units in a row: \u-10179?\u-8704? in RTF, <0xD83D><0xDE00> in Tagged
Text. Both readers passed each unit to char::from_u32 on its own. Half a
pair is not a character, so each half was dropped.

A small shared Utf16Units joins the units: a first half waits for the
second, and the pair becomes one character. Half a pair with no partner
is still left out, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 16:33:44 +01:00
Skylar Taylor-Barrick 6a53d95895 Security: escape HTML and EPUB metadata 2026-10-08 15:31:35 +00:00
Jan Hallvard LarsenandClaude Opus 5.5 e8ee4cffb4 Docs, About: the Illustrator-class sibling is VectorCraft (#59)
DrawCraft was renamed VectorCraft, and its repository is now
storytold/vectorcraft. Three places still used the old name:

- AGENTS.md and CLAUDE.md told contributors and agents that the sibling
  checkout lives at ../drawcraft. A clone made from the README link lands
  in ../vectorcraft, so that path does not exist.
- The About window's sibling list used the app-page slug "drawcraft".
  getartcraft.com/apps/drawcraft still redirects to /apps/vectorcraft,
  so the link worked, but the README (which the list says it matches)
  uses /apps/vectorcraft.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 16:04:52 +01:00
Jan Hallvard LarsenandClaude Opus 5.5 9ec7858dc9 Web: AltGr and other named keys no longer type their names (#134)
In the browser, pressing AltGr while editing text on the canvas inserted
the word "AltGraph" into the story.

eframe's web backend (0.36.2, web/input.rs text_from_keyboard_event)
turns a keydown into a text event unless the key is on a fixed list of
names. Browsers report many more named keys than that list holds:
AltGraph, Dead, Unidentified, the media keys. Each one arrived as text.
Panel text fields are not affected, because a focused egui text field
takes its text from the browser's input events instead of keydown.

The web shell now drops a text event that is a key name (ASCII letters
and digits, starting with a capital, longer than one character) unless
an egui text field has the keyboard. One key press never types such a
word; a text field's input events can, so they are left alone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 15:54:52 +01:00
Jan Hallvard LarsenandClaude Opus 5.5 7c739feb6f Commands: huge row and column counts can't exhaust memory
Three commands took a count from their parameters and used it unchecked.
Parameters come from MCP, the control channel and scripts, so the count
is hostile input (never-crash: cap input-sized allocations, checked
arithmetic).

- layout.createGuides made one or two guides per row and column with no
  upper limit: 30 million rows took 1.2 GB, and 2^32 - 1 would exhaust
  memory, which aborts the process past the command guard. A count over
  2^32 wrapped to a small one. Both counts are now capped at 100.
- edit.stepAndRepeat multiplied rows by columns as usize. In debug builds
  the overflow panicked; in release builds 2^32 x 2^32 wraps to 0, passes
  the 1000-copy limit and starts a grid of 2^64 copies. The product is
  now checked, and a grid that large falls back to `count` copies like
  any other grid over 1000.
- file.new stored any column count in the page (4 billion, or a wrapped
  value past 2^32). Page::column_rects builds one rect per column each
  time the columns are laid out. The count is now clamped to 1..=216,
  the range layout.marginsAndColumns already uses.

Each case has a regression test that failed before the fix.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 15:45:15 +01:00
Jan Hallvard LarsenandClaude Opus 5.5 27b5c871bd Images: PSD decode passes clippy on Rust 1.98
Rust 1.98 adds the clippy lint chunks_exact_to_as_chunks. It flags two
loops in the PSD decoder, so `cargo xtask ci` stops at the clippy step on
unmodified main for anyone on current stable.

Both loops now use as_chunks / as_chunks_mut (stable since 1.88, below the
workspace rust-version 1.90). The chunks are arrays, so the try_from that
could never fail goes away too. Decoded pixels are unchanged; the existing
PSD tests cover both paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 15:32:20 +01:00
Brandon ThomasandClaude Opus 5.5 14e677b242 Bump version to 0.4.0 (from 0.3.0) for release
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.4.0
2026-10-08 10:02:08 -04:00
d26b91335c README Downloads: where to get it first, then builds with Windows before macOS (#135)
Co-authored-by: Brandon Thomas <shared2@storyteller.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:50:30 -04:00
865640b70a Release: FreeBSD x86_64, Flatpak x86_64/aarch64, AppImage zsync updates; README Downloads (#132)
- freebsd job: builds packaging/freebsd/package.sh in a FreeBSD 14.3 VM (same image and
  packages as freebsd.yml) into designcraft-<ver>-freebsd-x86_64.tar.gz.
- flatpak jobs (x86_64 on ubuntu-24.04, aarch64 on ubuntu-24.04-arm): repackage the Linux
  tarball with packaging/linux/flatpak-bundle.sh and a new bundle manifest; runtime and
  finish-args shared with the from-source manifest (checked by packaging-lint).
- AppImages embed gh-releases-zsync update information and ship a .zsync beside them.
- version, linux, web, flatpak and freebsd no longer use the release environment (they read
  no secrets), so a workflow_dispatch on a branch dry-runs them; the signing jobs and the
  draft release stay environment-gated.
- nfpm package description described an image editor; now describes DesignCraft.
- README: Downloads section listing every build.

Co-authored-by: Brandon Thomas <shared2@storyteller.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:38:16 -04:00
Brandon ThomasandClaude Opus 5.5 5382fd4fb7 Bump version to 0.3.0 (from 0.2.1) for release
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:13:12 -04:00
Gert Pellin 36255f1697 Desktop: no eprintln! on the log and panic paths
eprintln! panics when standard error is a broken pipe (a GUI launch on
Windows), and a panic inside the panic hook aborts. The "no log file"
message goes through log::warn! (standard error only by then); the panic
hook's fallback writes to standard error with write_fmt and ignores the
error. Same fix as storytold/vectorcraft#465.
2026-10-08 13:01:13 +02:00
Gert Pellin 4f25955002 Desktop: write log records to standard error and a rotating log file
The desktop app installed no logger, so every log::warn!/log::error! in
the workspace was discarded: the crash guard's panic report, a failed
crash-recovery save, font folders that can't be read. A launch from a
desktop menu has no terminal either, so there was nothing to attach to a
bug report.

apps/designcraft/src/logging.rs (no new dependency):
- standard error plus <settings dir>/logs/designcraft.log (beside
  ui.json and prefs.json); each launch rotates the previous log to
  designcraft.1.log and .2.log, so the log of a run that crashed
  survives the next start; the file is capped at 16 MiB
- records logged before the settings directory is known are buffered
  (bounded) and written once the file is attached
- default levels: info for designcraft*, warn for everything else;
  RUST_LOG replaces them with env_logger-style directives
- never panics: an unusable directory or a failed write leaves standard
  error as the only sink

The logger is installed first in main (before the engine's panic hook)
and the file is opened after argument parsing (--version leaves no
file). The settings directory moves out of prefs_path into config_dir.
A --control or DESIGNCRAFT_CONTROL_PORT value that is not a port is now
logged instead of silently leaving the control channel off. Documented
in README.md (Quick start > Logs).
2026-10-08 11:36:29 +02:00
skylar taylor-barrick bae5a92dbb #72: preserve typed generic dialog values 2026-10-08 00:23:35 -06:00
skylar taylor-barrick 8662526736 browser-correctness: fix print, startup flags, and document MIME 2026-10-08 00:08:16 -06:00
Haseom Shin ac4c7e6b8e Images: set SVG text in the shared fonts when the bundled ones lack it 2026-10-08 14:58:56 +09:00
Haseom Shin 36000e75f5 Compose: don't panic when a hyphenated paragraph starts with a no-break letter 2026-10-08 14:58:08 +09:00
Brandon Thomas f4a4c9709b Merge pull request #76 from CameronGilroy/pr/data-merge
Data merge: linked source, placeholders, preview, and tiled merge
2026-10-07 22:53:41 -04:00
Brandon Thomas b05fe0aed4 Merge pull request #78 from ShaoWenbinSaleh/multi-language-fix
Complete Arabic translations, refine Chinese terminology, and cache RTL label layouts
2026-10-07 22:46:52 -04:00
Brandon ThomasandClaude Opus 5.5 8d2d180062 Merge origin/main into multi-language-fix
Resolve i18n conflicts: keep this branch's revised zh/ar wording plus
main's new rows (font-name, missing-glyph, Korean line-break labels).
Brazilian Portuguese (#103) now uses the same cached HashMap lookup as
Arabic; the cached-lookup test covers pt-br too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:32:13 -04:00
Brandon ThomasandClaude Opus 5.5 48dfbcfd19 Merge origin/main into data-merge
Resolve conflicts keeping both sides: doc gains both `cjk` and
`datamerge` modules; file.open resolves data-merge sources and loads the
document's fonts; DocState keeps preview_stash/preview_record and fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:28:15 -04:00
Brandon Thomas 8e2a5b1fc3 Merge pull request #55 from EthanSuquet/fix/cmyk-tiff-pdf-export
PDF: placed CMYK TIFFs keep their inks
2026-10-07 22:13:56 -04:00
Brandon Thomas 2c8ea6d167 Merge remote-tracking branch 'origin/main' into r55
# Conflicts:
#	Cargo.toml
2026-10-07 22:13:23 -04:00
Brandon Thomas e97d98977f Merge pull request #103 from RicSchonfelder/i18n-pt-br
i18n: add Brazilian Portuguese (pt-br) UI translation
2026-10-07 22:13:15 -04:00
Brandon Thomas 9f2f61bfbf Merge pull request #82 from aiongg/fix/psd-channels
Images: PSD composites decode by colour mode
2026-10-07 22:13:10 -04:00
Brandon ThomasandClaude Opus 5.5 84f2eadb39 Release CI: macOS job on macos-15-xlarge
Custom macOS larger runners in a runner group do not pick up jobs; the
built-in M2 Pro label does. Only release.yml uses it, and the
actions_macos_xl budget caps the monthly spend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:08:05 -04:00