Commit Graph

47 Commits

Author SHA1 Message Date
Brandon Thomas 14e677b242 Bump version to 0.4.0 (from 0.3.0) for release
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:02:08 -04:00
Brandon Thomas 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
Brandon Thomas 2c8ea6d167 Merge remote-tracking branch 'origin/main' into r55
# Conflicts:
#	Cargo.toml
2026-10-07 22:13:23 -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 Thomas a39c8893b9 Merge remote-tracking branch 'origin/main' into fix/cmyk-tiff-pdf-export
# Conflicts:
#	crates/pdf/Cargo.toml
#	crates/pdf/src/tests.rs
2026-10-07 22:05:52 -04:00
Brandon Thomas dd8d3037b1
Merge pull request #75 from ShaoWenbinSaleh/arabic-chinese-typesetting-rules-fix
Preserve and compose Chinese and Arabic typesetting rules
2026-10-07 22:04:16 -04:00
Brandon Thomas 927191d25f
About: contributor and model credits compiled in (grab bag + table, self-submitted names) (#108)
* About: contributors compiled in from contributors.json (grab bag + table, sortable, name toggle)

Adds the craftrules standard (standards/contributors.md) to Help > About DesignCraft, which now
has tabs About · Contributors · Models (`help.about {tab}` selects one).
contributors/contributors.json is generated by craftrules/scripts/contributors.py and baked
into the binary by crates/ui-egui/build.rs as static tables (crates/ui-egui/src/credits.rs).
Each contributor line: @username, opt-in display/real name, PRs, commits, lines +/−/Δ,
binary assets +/−, first/last commit. Sortable by every column; alphabetical ignores
case and the leading @.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Contributors docs: craftrules is two levels up (../../craftrules)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Contributors: self-submitted names in contributors/people.toml; AGENTS.md credit-yourself section

build.rs reads contributors/people.toml next to the generated contributors.json and shows a name only
for entries the generator verified as written by that person (craftrules standards/contributors.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Contributors: regenerate (verified people.toml entries)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:16:42 -04:00
Shao Wenbin c861a9f75e TYPE1: Reapply Chinese and Arabic typesetting rules on main
Port the CJK1 and AR1 changes from 3ecdb78 and de83cdc onto current main. Resolve translation and font-stack conflicts by retaining main localization and craft-fonts integration while preserving all typesetting code, tests, and documentation.

Validation: all six CI gates passed, including 616 tests and WASM checks.
2026-10-07 18:16:32 +08:00
aiongg 270984fab4 Images: PSD composites decode by colour mode
Decode the merged composite of .psd/.psb files in designcraft-images
(public file format spec) instead of the psd crate, which mapped
channels by count: grayscale with extra alpha/spot channels rendered
yellow, blue or invisible, and RGB + one spot channel was read as RGBA.

Channels now map by colour mode (Bitmap, Grayscale, Duotone, Indexed,
RGB, CMYK via the uncalibrated CMYK formula, Lab; 8 and 16 bit; raw and
PackBits). The first extra channel is the alpha only when the layer
count is negative (also via Lr16/Lr32), un-matted from white; other
extra channels are ignored. Damaged or oversized files return None
without panicking. Drops the psd dependency and its panic paths.
2026-10-06 18:12:14 -04:00
EthanSuquet 16694c8f3c PDF: placed CMYK TIFFs keep their inks
A CMYK TIFF went into every PDF, PDF/X-4 included, as a DeviceRGB image:
load_image sent anything that wasn't JPEG, PNG, GIF or WebP through
designcraft_images::decode_rgba, and `image` decodes CMYK TIFFs to RGB. 100%
K came out as RGB black, which the press separates as four-colour black
(#35).

designcraft-images now reads a CMYK TIFF's ink values with the tiff crate
(the version `image` already uses): 8- or 16-bit, interleaved, opaque or
with unassociated alpha. PDF export writes them through krilla's CustomImage
as DeviceCMYK, as it does a CMYK JPEG, and leaves out the TIFF's own ICC
profile so the numbers go to the output intent's press unchanged. PDF/A
exports stay RGB. A CMYK TIFF this can't read (planar, premultiplied alpha,
another ink set, over 256 MiB) is still converted, now with a warning. The
screen keeps decoding to RGB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 15:15:09 -04:00
Shao Wenbin 9d85777546 UI: add Chinese and Arabic localization with RTL-safe interface text
Extend interface language selection with Chinese and Arabic translations
across menus, dialogs, panels, tooltips, and common application controls.
Keep English fallback for untranslated strings, return borrowed translation
text, and validate translation key uniqueness and language switching.

Bundle redistributable Noto CJK and Arabic fonts with OFL license files and
ASSETS.md attribution so native and WASM builds have portable glyph coverage.
Register Arabic regular and semibold families while retaining existing font
fallbacks for proportional and monospace controls.

Render Arabic labels using Unicode bidirectional runs and contextual shaping.
Wrap logical text at grapheme boundaries before ordering each visual line,
mirror neutral punctuation, preserve logical source text for accessibility,
and handle truncation, empty lines, and mixed Latin text and numbers. Keep
ASCII labels on the normal rendering path. Disable selection on shaped RTL
labels because egui's default label cursor mapping assumes LTR text.

Adapt welcome controls, menu ordering, popup alignment, and new-document rows
for RTL layout. Bound popup geometry and avoid unsupported RTL grid behavior;
keep numeric inputs LTR. Isolate user-provided document names from Latin
application and zoom metadata. Interface language changes leave document
binding, paragraph direction, editable text, and engine state unchanged.

Add regressions for contextual Arabic joining, bidirectional punctuation,
mixed document names, logical wrapping, truncation, language switching, and
finite widget geometry. Update the roadmap with localization coverage.
Apply equivalent chunk-iteration and PDF Option/borrow simplifications needed
by the current Rust toolchain's strict Clippy checks.

Validation:
- cargo xtask ci: fmt, Clippy, native tests, assets, and layers passed;
  native tests total 517 passed and 2 ignored.
- UI regression suite: 26 passed.
- Headless UI screenshots verified Arabic welcome/new-document creation,
  menus, mixed-script document names, and switching back to Chinese/English.
- Default WASM gate is blocked by this host's missing precompiled wasm32
  standard library. All 15 WASM crates pass using the installed Rust sources:
  RUSTC_BOOTSTRAP=1 CARGO_UNSTABLE_BUILD_STD=std,panic_abort
  target/debug/xtask wasm.
2026-10-06 15:12:49 -04:00
Brandon Thomas 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 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 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 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 bfbe9661e1 P: place EPS through its preview or a bounding-box placeholder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:19:54 -04:00
Brandon Thomas 6b2fa19f00 T: right-to-left text — bidi shaping and line reordering, paragraph direction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 05:29:56 -04:00
Brandon Thomas d6d9c385ea X: XML basics — tags, style-to-tag map, structure, export/import, tagged frame markers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:21:30 -04:00
Brandon Thomas 615b033f47 I: Word/RTF import options — style mapping and conflict handling (+ dialog)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:45:27 -04:00
Brandon Thomas 059312b1d1 F: Generate QR Code — vector codes for links, text, SMS, email, business cards
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:53:04 -04:00
Brandon Thomas fcef655ba8 T: nested styles and GREP styles (compose overlays, Paragraph Style Options); ui.dialog.open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:47:52 -04:00
Brandon Thomas 9dd44f63cf D: Pathfinder — add, subtract, intersect, exclude overlap, minus back (curves kept)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:45:34 -04:00
Brandon Thomas 5971553d60 H: place SVG (vector PDF export), PSD, BMP, AI — designcraft-images crate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:51:48 -04:00
Brandon Thomas c0f8679ba5 V: Display Performance — Fast, Typical, High Quality display
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:34:40 -04:00
Brandon Thomas b97828eb50 app icon: calico cat in a polka-dot scarf (owner's ArtCraft drawing), Dock/taskbar/launcher wiring, palette docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:44:07 -04:00
Brandon Thomas da0e87b86b H: place PDF — sized by crop box, hayro on screen, vector form XObjects in PDF export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:11:04 -04:00
Brandon Thomas 446c70af04 H: place text files — Word (.docx), RTF, plain text; autoflow
- designcraft-textimport (L3): DOCX (styles by name with spacing/indents/alignment and font,
  size, bold/italic/underline/strike/caps/position; runs, tabs, breaks, footnotes, tables,
  hyperlink/field results; used styles only), RTF (text, paragraphs, bold/italic/underline/
  strike, size, Unicode/cp1252, skipped destinations), plain text (+ tests)
- engine: file.place routes text files into the insertion point, the selected frame or a new
  frame on the page; imported styles added (existing win); removeStyles; autoflow adds pages
  with threaded frames until the story fits (+ test)
- app/web: Place dialogs accept .docx/.rtf/.txt/.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:55:28 -04:00
Brandon Thomas 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 <noreply@anthropic.com>
2026-10-01 14:19:13 -04:00
Brandon Thomas cf8e6d1f74 Merge branch 'main' into worktree-agent-abb433558e9b52d63 2026-10-01 12:46:43 -04:00
Brandon Thomas 67ac9f1dfb UI: fidelity pass 2 (Properties sections, spinner fields, task bar, inverse text selection, Pages/Layers panels)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:46:43 -04:00
Brandon Thomas f08df595ca Merge main
# Conflicts:
#	ASSETS.md
2026-10-01 12:32:10 -04:00
Brandon Thomas b62a795602 M9: render perf (glyph path cache, culling) + soft drop shadow/feather/glow; perf harness
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:31:01 -04:00
Brandon Thomas 9a45d058de M12: EPUB 3 reflowable export (designcraft-epub): reading order, CSS from styles, images, nav
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:19:26 -04:00
Brandon Thomas 0c0428548c Merge branch 'worktree-agent-a178b843a06aff260'
# Conflicts:
#	ROADMAP.md
2026-10-01 12:05:54 -04:00
Brandon Thomas 83915e2fc2 M2.5: dictionary hyphenation, letter/glyph justification, keeps
- hyphen: bundled en-US dictionary from the public-domain Moby Hyphenator II
  list (Grady Ward, Gutenberg #3204), front-coded + deflated (433 KB), with
  case/apostrophe/punctuation/compound handling and inflection inheritance;
  our own Liang patterns (19.5k, 129 KB) trained by a patgen-style trainer
  (hyphen::patgen, examples/hyphgen.rs) for unknown words; heuristic last.
  Discretionary hyphens replace automatic points.
- breaker: prioritised word/letter/glyph-scaling glue in Knuth-Plass and
  layout; uncapped badness; hyphen limit as a hard constraint (hyphen-count
  states); hyphenation zone for ragged text (both composers); ragged
  hyphenation measured correctly; optical margin alignment; balance ragged
  lines; Knuth's node pruning.
- compose: Keep Options (keep with next, keep all lines, keep first/last)
  via paragraph snapshots; desired spacing applied to all alignments;
  justified last lines shrink instead of overflowing; word shaping and
  hyphenation caches (300k-char story: ~40 ms warm, ~60 ms cold).
- tests: golden corpus, perf (ignored), keeps, balance, optical, zone,
  limit, letter/glyph scaling, discretionary hyphens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:04:43 -04:00
Brandon Thomas 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 <noreply@anthropic.com>
2026-10-01 12:03:28 -04:00
Brandon Thomas e3c5df2212 M6.1: native .designcraft zip format (document.json + raw assets, versioned; legacy JSON still opens)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:49:53 -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 Thomas 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 <noreply@anthropic.com>
2026-10-01 11:20:59 -04:00
Brandon Thomas a3bc482b76 Merge branch 'worktree-agent-a0e10dbd5ddd190db'
# Conflicts:
#	ROADMAP.md
2026-10-01 11:18:48 -04:00
Brandon Thomas a7b9a31fc5 UI: match measured InDesign 2026 chrome (Medium Dark palette, native macOS menu bar, 43 pt app bar, dock layout, rulers, status bar, tools metrics, hairline guides, handles/ports)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:18:34 -04:00
Brandon Thomas 157a3e23c0 M0.13: web build (trunk, WebGPU/WebGL2)
apps/designcraft-web runs DesignApp through eframe's web runner (wgpu:
WebGPU with WebGL2 fallback, ?webgl forces GL, ?sample opens the sample).
Services gain open_async, download and an inbox: browser-picked and
dropped files are fed back as file.openBytes (.designcraft) or file.place
(images, base64); Save/Export download via Blob + anchor. The web app is
excluded from default-members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:17:17 -04:00
Brandon Thomas 249cd37f57 Merge branch 'worktree-agent-a73e456eaddf146ad' 2026-10-01 11:07:59 -04:00
Brandon Thomas 044534503c M1.9: MCP server (designcraft-mcp) + designcraft-cli mcp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:07:01 -04:00
Brandon Thomas fbc07c0fbd M10.1: Find/Change (text + GREP with InDesign metacharacters, formatting on change) + dialog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:56:45 -04:00
Brandon Thomas 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 <noreply@anthropic.com>
2026-10-01 10:39:15 -04:00
Brandon Thomas c9dcad1f6e continued work 2026-10-01 09:36:32 -04:00