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)
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)
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)
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>
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>
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>
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>
.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)
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>
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>
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>
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
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.
- 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