Commit Graph

248 Commits

Author SHA1 Message Date
Brandon Thomas 89891fdfbe Never crash: geom and color return or fall back instead of panicking
Replace the unwrap/expect calls in path closing, bounds, Pathfinder output
and gradient sampling with let-else / if-let; the ASE reader uses checked
offsets (a 32-bit length could overflow on wasm32). Both crates now deny
unwrap/expect/panic/unimplemented/todo/unreachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:39:33 -04:00
Brandon Thomas 192b72054d Linux: use the X11 backend under XWayland so files can be dropped (#2)
winit 0.30 has no file drag-and-drop on Wayland. DESIGNCRAFT_WAYLAND=1
keeps the native Wayland backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:38:26 -04:00
Brandon Thomas a2bbd96f30 UI: tool shortcuts work right after clicking the canvas (#1)
Only a focused text field blocks global shortcuts; the canvas (or a
button) holding egui focus after a click no longer swallows V/F/… until
Esc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:38:17 -04:00
Brandon Thomas 8490965e71 CI: fix new Rust 1.99 clippy lints (as_chunks, ?, redundant ref)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:37:09 -04:00
Brandon Thomas deab1dce10
Merge pull request #6 from storytold/pr/license-standard
Licensing: standard LICENSE files, NOTICE, ArtCraft brand terms
2026-10-04 10:09:14 -04:00
Brandon Thomas a848431dba Licensing: standard LICENSE files, NOTICE, ArtCraft brand terms
- LICENSE-MIT: copyright "ArtCraft Team and the DesignCraft contributors"
  (it wrongly named the PrintCraft contributors); LICENSE-APACHE: the
  standard text (adds the trailing newline).
- docs/brand/LICENSE-brand.txt: the ArtCraft brand terms.
- NOTICE: standard header and brand carve-out; third-party list kept.
- ASSETS.md: docs/brand/ rows point at LICENSE-brand.txt; brand files
  noted as the one non-open-source exception.
- README: standard "License and credits" section, nav anchor, badge alt.
- AGENTS.md / CLAUDE.md: asset rule notes the docs/brand/ exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 10:04:24 -04:00
storybored379 8d0203a2d2 EPUB: styles whose names slug alike keep their own CSS classes
Paragraph and character styles become CSS classes through slug(), which
keeps only ASCII letters and digits. Different styles could therefore get
the same class: every all-non-ASCII name ("見出し", "本文", Cyrillic,
Greek…) becomes `basic`, and "Body Text" / "Body-Text" / "body text" all
become `body-text`. style.css then holds several rules for one class and
the last one wins, so e.g. a 30 pt centred Japanese heading style came
out at the body style's 10 pt, left-aligned, in the EPUB.

Map each style name to a class once per export (paragraph and character
styles separately), adding -2, -3… on a collision, and use that map for
both the stylesheet and the XHTML. A class set in Export Tagging still
takes precedence in the XHTML, as before.

Test: styles_whose_names_slug_alike_keep_their_own_classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 09:52:37 -04:00
storybored379 eee64ae7c9 Layers: the active layer falls back to the top layer when it is removed
The active layer lives on DocState, outside the undo snapshots, and
nothing re-checked it when the document's layers changed. After New
Layer → Undo (or Delete Layer / Delete Unused Layers / Merge Layers on
the active layer) it kept pointing at a layer that no longer exists, and
every object created next (frames, lines, placed images, pasted items)
was put on that phantom layer: not drawn on the canvas, missing from PDF
export, ItemLayer referencing an undefined layer in IDML, and preflight
reported nothing.

After each command, if the active layer is gone, make the top layer
active (as on opening a document).

Test: active_layer_survives_undoing_new_layer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 09:52:29 -04:00
storybored379 01753f90f3 File: file.serialize returns the file's bytes (base64) — web Save wrote corrupt documents
file.serialize returned {json: String::from_utf8_lossy(to_bytes(doc))},
but since M6.1 the native format is a zip (deflated document.json + raw
assets), not JSON text. from_utf8_lossy turns every invalid UTF-8
sequence into U+FFFD, so the result is not the file: on the web, File ›
Save downloads exactly those bytes (download_document), and the
downloaded .designcraft can't be opened again ("invalid Zip archive").
Agents calling file.serialize got the same unusable string.

Return {base64, bytes} like the other byte-producing commands
(file.exportIdml, file.exportPdf, snippet.export) and decode it in
download_document.

Test: serialized_document_opens_again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 09:51:34 -04:00
Brandon Thomas 5294c8f677 T: ruby and kenten
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:47:55 -04:00
Brandon Thomas 558e798dfc E: CMYK transparency blend space on screen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:09:26 -04:00
Brandon Thomas e856b849bb M: video and sound in interactive PDF (screen annotations, renditions)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:44:50 -04:00
Brandon Thomas 5b7969901c T: right-to-left carets and selections; Binding: Right to Left
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:34:47 -04:00
Brandon Thomas 6334734b3a T: Insert Kashidas in the paragraph style Justification tab
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:18:41 -04:00
Brandon Thomas 2827574a47 T: kashida justification for Arabic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:15:38 -04:00
Brandon Thomas ee55acd858 T: Digits (World-Ready) — figures in Arabic-Indic, Persian and native scripts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:06:38 -04:00
Brandon Thomas f888e6b061 X: DTDs — load, validate the structure, Tags panel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:57:18 -04:00
Brandon Thomas fe40d4b80b T: tate-chu-yoko in vertical frames
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:46:52 -04:00
Brandon Thomas a57a909db1 T: vertical punctuation forms (vert) in vertical frames
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:35:02 -04:00
Brandon Thomas b13135472a V: Rotate Spread per spread — canvas layout through per-spread transforms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:25:16 -04:00
Brandon Thomas b23f19f0c9 T: drag selected table rows and columns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:14:35 -04:00
Brandon Thomas d30285c542 L: alternate layouts keep their stories linked to the originals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:10:48 -04:00
Brandon Thomas 1c8952f6db W: New Window in its own OS window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:08:02 -04:00
Brandon Thomas 79f266c04c T: text language — hyphenation, spelling and quotes follow it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:01:50 -04:00
Brandon Thomas 7b636fb9f5 C: separations from source colours
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:54:54 -04:00
Brandon Thomas 0d02222dab W: Scripts panel and script.run (one undo step)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 8eca6305f8 I: Object Export Options — artifact, rasterize, alignment, page break
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas b7cd7f6309 O: interactive PDF view options (full screen, layout, opening view, timing)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas dc2114be26 I: PDF form fields — text, check box, combo, list, signature
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 33a56dfe32 L: roadmap — 98% breadth, ~200 h remaining
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 55af964ea8 X: inline XML tagging and tag markers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 2f104f83a8 O: EPUB cover and fixed-layout EPUB export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 3d4bb45f9e A: tagged PDF by paragraph, with headings from Export Tagging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas e5bb4551a1 X: Tagged Text export and place
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 55e0efbc62 S: style Export Tagging for EPUB/HTML
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 84476ffef4 P: live captions that follow their source's metadata
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 7acccc354c Release 0.1.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:55:50 -04:00
Brandon Thomas 031d099b3a V: Power Zoom by press-and-hold with the Hand tool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:10:59 -04:00
Brandon Thomas 8ac240889f E: region-based transparency flattener (the rest stays vector)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:06:31 -04:00
Brandon Thomas b655a5f75c V: Flattener Preview; knockout groups kept in PDF export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:58:27 -04:00
Brandon Thomas 84d8f498eb E: Directional Feather
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:55:15 -04:00
Brandon Thomas 9ecd3fb9fd E: Inner Glow, Bevel and Emboss, Satin; soft effects kept in PDF export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:50:43 -04:00
Brandon Thomas 0acb628a28 L: roadmap — every P2 feature at least partial
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:38:34 -04:00
Brandon Thomas 37f0cd99e1 P: Object Layer Options for placed PDFs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:38:23 -04:00
Brandon Thomas d37d2e5237 T: math expressions — LaTeX subset typeset to SVG, inline or framed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:30:11 -04:00
Brandon Thomas 77fc006b02 T: vertical type — Vertical Type tool, upright CJK, CJK line breaking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:18:14 -04:00
Brandon Thomas 2ca8abc9a1 L: roadmap — 96% breadth, ~240 h remaining
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:00:36 -04:00
Brandon Thomas 7cd4657261 V: rotate the spread view in quarter turns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:00:28 -04:00
Brandon Thomas 5bee68cf88 T: accept/reject single changes (+ Track Changes panel)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:51:59 -04:00
Brandon Thomas 7ca9c5814f W: Tab hides panels, Cmd+F6 cycles documents
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:48:29 -04:00