Commit Graph
1054 Commits
Author SHA1 Message Date
Jeffrey Thayne b8a95f357d Links: don't trust a linked text file's time while it is still changing
File times are whole seconds (as in Data Merge's fingerprint), so a
same-size change saved within the same second as the last check kept
both size and time, and the Links panel said OK. A size and time are now
only remembered (on place, update, relink, and in the session's check
cache) once the file has been unchanged for two seconds; a file changed
more recently is checked by content on each poll. Found by the Update
Link dialog test, which rewrites a file within the same second; the
polling test now also changes a file twice in one second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0541f36795)
2026-10-13 19:58:22 +00:00
Jeffrey Thayne d1fddc0ae8 Links: only read a linked text file when its size or time changed
The Links panel lists links about twice a second, and each listing
hashed every linked text file. A linked text file now also remembers
its modification time (as Data Merge does for its source, through the
same size-and-time fingerprint): while size and time match, it isn't
read. A different size is Modified without reading. When only the time
changed, the content hash still decides (a file saved or synced again
without changes stays OK), and the session remembers that check by
size and time, so the next poll doesn't read the file again. Update and
Relink record the size and time from before their read. Test: polls of
an unchanged file don't read it (it is made unreadable), a touched but
unchanged file is read once and stays OK, a changed file is Modified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7b33c981dc)
2026-10-13 19:58:21 +00:00
aiongg 7f0d7f1f32 Merge t13-moppeeer: #253 #832 #753 #754 (a3b97165) #588
# Conflicts:
#	ROADMAP.md
#	crates/idml/src/tests.rs
2026-10-13 19:57:37 +00:00
aiongg a4ec5b31d6 Merge t13-gradients: gradient PRs #765 #763 #826 #823 #825 2026-10-13 19:55:40 +00:00
aiongg 72d7ea2e82 Integration: #823 a linear gradient across a straight line runs along its length, on screen and in PDF alike 2026-10-13 19:49:32 +00:00
aiongg 9b605cecd9 Integration: cargo fmt 2026-10-13 19:33:55 +00:00
moppeeer 58b9950fb6 feat(effects): Inner Glow mode and technique; Basic Feather choke and corners
InDesign's Effects dialog sets an Inner Glow's blend Mode (Screen by
default) and Technique (Softer or Precise), and a Basic Feather's Choke
and Corners (Sharp, Rounded, Diffused). LYH Studio episode 14 shows them
at 12:05–12:20 (Screen 75 %, Softer, 0.25 in; 0.0625 in, Diffused).

- doc: InnerGlow.mode and .technique (GlowTechnique), Effects.
  feather_options (FeatherOptions: choke %, FeatherCorners), with
  InDesign's defaults; old documents read as before.
- render: the glow uses its mode; Precise keeps it nearer the edge; the
  feather's choke shortens the fade, Sharp and Rounded corners follow
  the shape more tightly or softly than Diffused (unchanged, so the
  goldens stay).
- render fix: an inner glow's (and a bevel's) blend mode was applied
  inside the clip layer, against its empty backdrop, so Screen and
  Multiply acted as Normal; the blend layer now wraps the finished edge
  and mixes with the object below.
- engine: choke clamped to 0–100; the params documented.
- Effects dialog: Mode and Technique on Inner Glow; Choke and Corners on
  Basic Feather; strings translated.

Builds on #643 (the Effects dialog).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a3b971654f)
2026-10-13 19:33:40 +00:00
aiongg 14e98419ad Integration: #825 PDF table-cell and footnote text lays a gradient across its own lines, as on screen 2026-10-13 19:33:08 +00:00
aiongg 977b4b26f3 Integration: #753 Fixed Width columns resize the frame to fit them; columnWidth and firstBaselineMin are range-checked 2026-10-13 19:32:38 +00:00
aiongg 1907d14699 Merge #753: Text Frame Options laid out as InDesign's: columns type and width, inset link, Ignore Text Wrap, Baseline Options 2026-10-13 19:31:44 +00:00
aiongg 1847b8cef5 Merge #825: Gradient swatches on text, laid across the text frame
# Conflicts:
#	ROADMAP.md
#	crates/pdf/src/export.rs
#	crates/pdf/src/text.rs
#	crates/render/src/text.rs
#	docs/target-app-parity.md
2026-10-13 19:30:47 +00:00
aiongg 6db40bdbb5 Integration: #823 a radial gradient on a box with no width or height is a circle across it 2026-10-13 19:29:28 +00:00
aiongg f60eb24656 Merge #823: Gradient strokes: on screen, in PDF, in IDML and the Gradient panel
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd/object.rs
#	crates/engine/src/cmd/style.rs
#	crates/idml/src/tests.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/uk.rs
#	crates/ui-egui/src/panels/swatches.rs
#	docs/target-app-parity.md
2026-10-13 19:28:11 +00:00
aiongg ba95ae2dae Integration: #826 grey stops keep their value (model form); a stale ramp drag can't index past the stops 2026-10-13 19:26:54 +00:00
aiongg da8aaa9cdc Merge #826: Gradient panel layout; drop swatches from the Swatches panel onto its stops
# Conflicts:
#	ROADMAP.md
#	crates/ui-egui/src/panels/swatches.rs
#	docs/target-app-parity.md
2026-10-13 19:25:12 +00:00
aiongg aad9db158f Integration: #763 New Swatch with nothing selected makes a colour swatch in the engine; the panel sends the Fill/Stroke target 2026-10-13 19:24:47 +00:00
aiongg 0c45a8420f Merge t13-epub: EPUB/HTML export PRs #785 #787 #783 #789 #779 #780 #782 #791 #121 2026-10-13 19:23:54 +00:00
aiongg fce28331ec Merge #763: New Swatch names a gradient "New Gradient Swatch"; gradient swatches from colour swatches
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd/style.rs
#	docs/target-app-parity.md
2026-10-13 19:23:33 +00:00
aiongg 9d5d341a7d Merge #765: Radial gradients stretch with the object's box (an ellipse) 2026-10-13 19:21:58 +00:00
aiongg 1486f82212 Merge #782: EPUB: the navigation lists the headings, with a title in the book's language
# Conflicts:
#	crates/engine/src/cmd/export.rs
#	crates/epub/src/lib.rs
2026-10-13 19:14:13 +00:00
aiongg 033611d518 Integration: cargo fmt 2026-10-13 19:09:21 +00:00
aiongg 6477435e81 fix(transform): rotate and flip turn about the chosen reference point 2026-10-13 19:08:36 +00:00
aiongg ee2c450829 Merge #789: Styles: name the attributes in the params docs, and a wrong one in the command's error
# Conflicts:
#	crates/engine/src/cmd/style.rs
2026-10-13 19:07:52 +00:00
aiongg 6eae3620ed Integration: #783 reads the cover image with a size cap (256 MiB), devices included 2026-10-13 19:07:02 +00:00
aiongg 3cb3f342c8 Integration: #812's test (overset preflight names the page of a frame in a moved group) 2026-10-13 19:07:02 +00:00
aiongg 73112e882f Merge #783: EPUB: real modified time, a stable unique identifier, and a cover image file
# Conflicts:
#	crates/engine/src/cmd/export.rs
#	crates/epub/src/lib.rs
2026-10-13 19:06:49 +00:00
aiongg 5917b24aaa Integration: #819 a pasted missing graphic always gets a fresh asset id from the target 2026-10-13 19:06:46 +00:00
aiongg 0016b8260e Merge #819: Keep a missing graphic missing when it is pasted into another document (#720)
# Conflicts:
#	crates/engine/src/cmd/object.rs
2026-10-13 19:06:14 +00:00
aiongg 8f54d1cce4 Integration: #787 refuses bitmap-only fonts for embedding, and styles name the face's numeric weight 2026-10-13 19:05:28 +00:00
aiongg 11e4a7f60e Merge #787: EPUB/HTML: generic font fallback from the font's class, and optional font embedding
# Conflicts:
#	crates/engine/src/cmd/export.rs
#	crates/epub/src/lib.rs
2026-10-13 19:04:24 +00:00
Govinda RoyandClaude Opus 5.5 82ffb692fc INDD: graphics whose linked file is missing show InDesign's preview
An InDesign document holds a screen preview of each placed graphic, which
InDesign shows while the linked file is missing. indd-utils returns them
beside the IDML (`Conversion::previews`); opening an .indd now passes them
to the importer through `import_idml_report_with_previews`, and a graphic
whose file neither the package nor the folder provides takes its preview.
The graphic keeps its link, so relinking replaces it; IDML import without
previews is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 01:03:19 +06:00
aiongg 5f3a2fbb61 Merge #785: EPUB/HTML: no file name as alt text, readable image names in the package 2026-10-13 19:02:00 +00:00
aiongg b4f7286482 Merge text-autosize: opening a file keeps its auto-size frame sizes (#632)
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd/interchange.rs
#	docs/gaps.md
#	docs/target-app-parity.md
2026-10-13 18:40:15 +00:00
aiongg 935741d47c Text frames: opening a file keeps its auto-size frame sizes 2026-10-13 18:40:01 +00:00
moppeeerandClaude Opus 5.5 bdf66d7749 feat(ui): Gradient panel in InDesign's layout; swatches drop onto its stops
LYH Studio episode 6 (1:36-2:05) builds its gradient in the Gradient
panel: it drags C=0 M=100 Y=0 K=0 from the Swatches panel onto the left
stop, drops C=100 M=0 Y=0 K=0 on the ramp (a new stop at 68.636 %), then
drags the black stop off. DesignCraft's Gradient panel took no swatches,
showed only a hint until the fill was a gradient, and laid out its
fields differently.

- Gradient panel: InDesign's layout (thumbnail; Type; Location % and
  Angle; Reverse; the ramp with midpoint diamonds above and stops below).
  Until the fill is a gradient it shows the default White -> Black ramp;
  clicking the thumbnail or using the ramp starts one. Midpoints drag
  and take a Location. A stop's colour picker moved to its right-click
  menu, so selecting a stop no longer grows the panel.
- Swatches panel rows are drag sources (the chip follows the pointer):
  dropped on a stop a swatch colours it, elsewhere on the ramp it adds
  a stop there.
- Stops keep their colour model through panel edits (CMYK used to turn
  into hex RGB whenever a stop moved).
- engine: `object.gradient` stops accept `swatch` (its colour; gradient
  swatches and [None] are refused) and colours accept `{gray}`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:02:45 +02:00
moppeeerandClaude Opus 5.5 ac54c8faf7 feat(text): gradient swatches on text, laid across the frame as in InDesign
LYH Studio episode 6 (8:28) gives the "1969" headline the "New Gradient
Swatch" (magenta → cyan) from the Swatches panel. InDesign runs a gradient
on text across its text frame's box. DesignCraft resolved a character
fill to one solid colour, so a gradient swatch drew no text at all.

- render: a character fill or stroke that names a gradient swatch is
  painted with that gradient over the frame's box in text space (type on
  a path: the path's box).
- pdf: text runs take a gradient paint: the shading is laid out in the
  frame's text space and mapped into each run's origin, so skew and
  horizontal scale don't bend it; outlined runs and type on a path too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 19:30:55 +02:00
moppeeerandClaude Opus 5.5 370dca2ca2 feat(render): gradient strokes, on screen, in PDF and in the Gradient panel
A gradient swatch on a stroke drew nothing: strokes were painted with a
single resolved colour. LYH Studio episode 6 gives the loop on the right
page (9:13) and, at first by accident, the circle (1:19, "right now it
is on the stroke") a gradient stroke.

- doc: Stroke::gradient_angle / gradient_vector (as Fill's) and
  Stroke::as_fill(), the stroke's paint as a fill.
- render and PDF: a gradient stroke is painted like a gradient fill,
  across the path's box (dash gaps and arrowheads keep their paints).
- engine: object.gradient {target: stroke} edits the stroke's
  gradient (kind, stops, angle, the Gradient Swatch tool's from/to);
  scaling moves the stroke's vector with the shape.
- IDML: GradientStrokeStart/Length/Angle round-trip.
- Gradient panel: acts on the stroke when the toolbox's Stroke box is
  in front, as InDesign's follows the Fill/Stroke proxy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 19:11:58 +02:00
MarekSpodBiedry ec4ff485df Keep a missing graphic missing when it is pasted into another document (#720) 2026-10-13 18:43:16 +02:00
MarekSpodBiedry e329cb8023 Fix overset preflight page for frames inside translated groups (#738) 2026-10-13 18:20:01 +02:00
aiongg a7c3e330ec INDD: open .indd and .indt files through indd-utils (#21, #114)
.indd and .indt documents open through File › Open, drop, the web inbox,
file.open, file.openBytes, file.openIdml and the CLI. The engine converts
them to IDML in memory with storytold/indd-utils (pinned by rev, MIT OR
Apache-2.0, no dependencies, builds for wasm) and imports the result
through the existing IDML path. The converter's warnings come first in the
open result's `warnings`, before the IDML importer's and the font
warnings. A file the converter can't read is an open error, shown in the
Can't Open the File alert.

Routing: a path or name ending in .indd/.indt, or bytes starting with the
INDD signature (the web inbox passes the name without its extension).
opens_as_document and the desktop and web Open dialogs list indd/indt.

Tests use synthetic bytes only: signature-bearing junk, a zero-filled
.indd and a short .indt all fail as open errors with no document added;
a dropped unreadable .indd raises the open alert.

(cherry picked from commit bb8a6a23fa)
2026-10-13 16:15:15 +00:00
Nick MarelloandClaude Opus 5.5 2d5abba78f #21: opening or dropping an InDesign file says how to bring it over
file.open on a .indd reported "not a DesignCraft document: expected value at
line 1 column 1"; file.openBytes with a .indd name failed the same way, and a
dropped .indd was placed as a graphic. All now say InDesign documents and
templates can't be opened yet and point to File > Export > InDesign Markup
(IDML), which DesignCraft already opens. The check is by extension, before
anything is read.

Also adds my contributors/people.toml entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:02:49 -07:00
Jeffrey ThayneandClaude Opus 5.5 0541f36795 Links: don't trust a linked text file's time while it is still changing
File times are whole seconds (as in Data Merge's fingerprint), so a
same-size change saved within the same second as the last check kept
both size and time, and the Links panel said OK. A size and time are now
only remembered (on place, update, relink, and in the session's check
cache) once the file has been unchanged for two seconds; a file changed
more recently is checked by content on each poll. Found by the Update
Link dialog test, which rewrites a file within the same second; the
polling test now also changes a file twice in one second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:38:37 -06:00
Jeffrey ThayneandClaude Opus 5.5 7b33c981dc Links: only read a linked text file when its size or time changed
The Links panel lists links about twice a second, and each listing
hashed every linked text file. A linked text file now also remembers
its modification time (as Data Merge does for its source, through the
same size-and-time fingerprint): while size and time match, it isn't
read. A different size is Modified without reading. When only the time
changed, the content hash still decides (a file saved or synced again
without changes stays OK), and the session remembers that check by
size and time, so the next poll doesn't read the file again. Update and
Relink record the size and time from before their read. Test: polls of
an unchanged file don't read it (it is made unreadable), a touched but
unchanged file is read once and stays OK, a changed file is Modified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:30:40 -06:00
Jeffrey Thayne 38bf116604 Merge remote-tracking branch 'origin/main' into linked-docx 2026-10-13 09:25:53 -06:00
Gert Pellin 68596ea696 Refuse command params the description doesn't name
Callers from outside the app now get a parameter error for a key a
command's params description doesn't name, instead of the command
running with its defaults: `text.select {story, start, end}` and
`style.list {bogus: 1}` are refused with "unknown parameter `…`" and the
nearest or the accepted keys.

- engine: `cmd::params` (ported from VectorCraft #1442) reads the keys
  from each params description; `check_params` / `check_keys`.
  `Session::execute` itself stays lenient so old journals replay; in the
  engine's own tests it checks too, as the audit of the descriptions.
- MCP: tools/call answers -32602 for an argument a tool doesn't take and
  for params a command doesn't take (`execute`, every `batch` step before
  the first runs); the headless backend checks as well.
- Control channel (`engine.execute`) and `designcraft-cli run --cmd`.
- Descriptions now name every key their commands read (table target
  cells, anchored objects, gap.move, file.place, data merge, prefs.set,
  …); type.char / type.para stay unchecked (their attributes may be the
  params object itself; the setters refuse unknown attributes).
- Tests that passed keys the commands never read are fixed, and the pen
  tool no longer sends the unread `notifyPen`.

Fixes #776
2026-10-13 17:25:27 +02:00
PiMinusMax 0fb3d677cc Start screen: recent files show a picture of the first page (#706)
Save and Save a Copy put a picture of the first page in the .designcraft
zip as preview.png (320 px on the longer side). The start screen reads
only that entry and shows the last eight recent files as cards with the
picture and the name, below the community card. Files saved before have
a blank page until they are saved again.

The package fallback-font test writes its fixture without Save's preview:
drawing it before the document's fonts load pulled in a system font that
covers the test's characters (Unifont CSUR) ahead of the document's own.
2026-10-13 17:01:57 +02:00
aiongg fca75a3302 Merge locked-paths: tests for path edits on locked layers and groups (#735)
# Conflicts:
#	crates/ui-egui/src/panel_docking_tests.rs
2026-10-13 14:58:15 +00:00
aiongg e08f3c5997 test(paths): path edits on a locked layer change nothing (#735) 2026-10-13 14:51:53 +00:00
Gert Pellin 2a3d1dc183 Styles: name the attributes in the params docs, and a wrong one in the command's error (#777)
- describe style.paragraph.create (and .edit, style.character.create,
  .edit) gave chars?: {…} and para?: {…}. The descriptions now say they
  take type.char's and type.para's attributes and name the common ones.
- A wrong attribute gave "invalid parameters for `style`: unknown
  attribute `font`". The error now names the command and the group,
  and the attribute meant (nearest name, or one the key starts or ends)
  or else lists them all: "invalid parameters for
  `style.paragraph.create`: chars: unknown attribute `font`; did you
  mean `fontFamily`?". The suggestion comes from set_json, so
  type.char, type.para and find.change get it too.
- chars or para that isn't an object is an error instead of ignored.

Fixes #777
2026-10-13 16:48:27 +02:00
aiongg d9c766dd16 Integration (editor-undo): Story Editor test focuses the text input, not its text run; paste test sets its stale selection after Undo restores the selection 2026-10-13 14:47:23 +00:00