Commit Graph
4115 Commits
Author SHA1 Message Date
Brandon ThomasandClaude Opus 5.5 8981d5e4cd IDML import: ignore non-finite Minimum First Baseline offsets, clamp to 0..8640
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 02:31:31 -04:00
Brandon ThomasandClaude Opus 5.5 0d0fa585a0 story.replaceRange: convert offsets with usize::try_from (wasm32-safe)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 02:23:07 -04:00
NetterSilverandClaude Haiku 5.5 49fc2c1209 Clamp RGB, CMYK and Gray components on ASE import
Found while testing crates/color/src/ase.rs:100-103

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 07:43:14 +02:00
aiongg 687ea314b6 Docking trial: craft-ui docking branch, group drag by the drag bar
Patch craft-ui to aiongg/craft-libs 4bf1164 (docking branch). Floating
windows hold groups (Floating::single, panels()); matches on Node and
Action get wildcard arms; apply_action validates MoveGroup, MoveColumn,
MoveWindow, the group close actions, minimize and resize, and records
return locations for every panel a close action removes. PanelContent
gives preferred floating sizes. A pointer test drags the docked
Character Styles | Paragraph Styles group by its drag bar to the canvas
and onto another strip: order and the front tab are kept.
2026-10-19 05:16:28 +00:00
aiongg 4f7c7e85be keymap: craft-keymap 1e4ab21; report lists keyless panel-menu matches 2026-10-19 04:48:25 +00:00
aiongg 8e20bdfe2d keymap: panel menus, toggles and aliases on craft-keymap 6e136c9
- The importer marks Panel Menus items as panel-menu entries.
- Show/Hide commands and the other show-and-hide toggles are marked as
  toggles, so Show and Hide names match only them.
- The Preferences alias names its submenu (Preferences: General…).
- The import test checks an alias match (Exit).
2026-10-19 04:40:50 +00:00
aiongg 506c429c65 keymap: dispatch_filtered, panel twins and import aliases on craft-keymap 66f2202
- shortcuts() declines Clear and native-menu presses through
  dispatch_filtered; clipboard events stay with the app by default.
- keys::conflicts uses Keymap::conflicts_with.
- Panel bindings share the default key of the UI command that opens the
  same panel, so importing InDesign's set leaves both with it.
- Import aliases and a Tools path for InDesign feature names DesignCraft
  has commands for.
- Overrides with one key per command save in the map form older versions
  read.
2026-10-19 04:35:32 +00:00
aiongg 8bb887a188 keymap: the InDesign set import runs on craft_keymap::import
shortcut_import.rs keeps the Show Set reader (decoding, the 8 MB cap,
header and item lines, entry splitting that keeps the comma key) and maps
each item to a craft_keymap::ForeignSet entry: `<menu> Menu` areas become
menus, the Tools area marks `... Tool` items as tool entries, and keys are
read with ForeignKey::read in the set's Windows or Mac flavour. Matching,
conflicts and apply are craft_keymap::plan + ImportPlan::apply with
Default as the home context and Text used when an item has no Default
keys; the keymap's overrides are stored afterwards.

- Window menu panel items and Tools items set panel and tool shortcuts.
- An item's Default keys all apply, not only the first readable one.
- The window.importShortcuts result keeps its field names and adds
  failed, approximated, suggestions and truncated; rows carry line and
  reason, ids are command keys.
- An engine command's own menu path is left out of the catalogue where a
  menu row of another command already stands, so the importer can pick
  the menu row's command.
- The dialog summary counts unmatched items without the rows for keys in
  contexts DesignCraft lacks.
2026-10-19 04:26:41 +00:00
aiongg 8383d828ad keymap: DesignCraft shortcuts on craft-keymap
The shortcut model, dispatch and storage move onto the shared craft-keymap
crate. The catalogue is built from UI_COMMANDS, the engine command specs,
the panels (window.panel {panel}) and the tools (tool.select {tool}, one
group per Tools-panel group), with menu paths from the menu tree.

- Dispatch goes through craft_keymap::egui::Dispatcher; presentation keys,
  Esc-to-selection, Clear and the native-menu skip stay app-side, and the
  clipboard events stay with the canvas.
- Panels take InDesign's default keys where DesignCraft leaves them free.
- Tool keys are editable; tools sharing a key take turns.
- ui.json keeps its shortcuts as craft-keymap Overrides; the map form older
  versions saved loads unchanged.
- window.setShortcut accepts params (panels), tool ids and steal; the
  Keyboard Shortcuts dialog lists panels and tools and moves recorded keys.
2026-10-19 04:14:59 +00:00
NetterSilverandClaude Haiku 5.5 3b3544477d Show page and resolution of anchored images in the Links panel
Fixes #1269

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 04:04:40 +00:00
aiongg 68e2044b91 #1180: when two items want the same keys, the later one takes them 2026-10-19 03:42:41 +00:00
KnottyDyes 287b65f788 Object: reject malformed stroke types 2026-10-18 17:25:35 -06:00
moppeeer 42903d7bd3 TOC-5: open numbering options from section markers 2026-10-18 23:43:17 +02:00
moppeeer ff9f482a6e TOC-5: integrate PR #892 section markers on current main 2026-10-18 23:42:50 +02:00
MarekSpodBiedry 4df5d1639c Align Story Editor paragraph style labels with the wrapped text rows (#1251) 2026-10-18 23:40:40 +02:00
MarekSpodBiedry 551886c133 Show text stroke options in the Stroke panel when text is selected (#1265) 2026-10-18 23:38:00 +02:00
MarekSpodBiedry 251ceda1e0 Reject invalid story.replaceRange offsets with an error (#1267) 2026-10-18 23:37:25 +02:00
moppeeer 8cc92a50b6 TOC-6: toggle advanced table of contents options 2026-10-18 23:36:38 +02:00
MarekSpodBiedry 6e0b50a819 Show New Document preset sizes in the selected units (#1260) 2026-10-18 23:35:57 +02:00
MarekSpodBiedry 6fc7172628 Let single-line paths be resized along their length (#1245) 2026-10-18 23:35:56 +02:00
moppeeer 7308800623 TOC-3: keep the table of contents title readable 2026-10-18 23:29:40 +02:00
RoHaX 175c6f6ae3 T.DE1: restrict German reform hyphenation variants 2026-10-18 22:38:35 +02:00
NetterSilverandClaude Haiku 5.5 103d7eb3ff Clamp object.stroke tint and gapTint to 0..1
Found while testing crates/engine/src/cmd/object.rs:299-313 (object.stroke: `st.tint = v as f32`, `st.gap_tint = v as f32`; the no-selection path at :273 clamps, this one doesn't)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 19:59:59 +00:00
seanth 8850dd20e5 Merge branch 'storytold:main' into parent-page-display 2026-10-18 13:36:52 -04:00
seanth db0bc7ada0 Merge branch 'storytold:main' into running-header-order 2026-10-18 13:36:22 -04:00
seanth 8f1f20f24a Merge branch 'storytold:main' into tool-units 2026-10-18 13:36:03 -04:00
seanth 2ea1266ad4 Merge branch 'storytold:main' into xref-edited-text 2026-10-18 13:35:45 -04:00
Marco Arnulfo 526eeda545 Document Setup: read a number without a unit in the document's units (fixes #1247) 2026-10-18 18:04:22 +02:00
Hamza b8ae284a4a View: Bleed and Slug screen modes show their area; draw the slug guide
Bleed and Slug were selectable from the toolbar, the View menu and
`view.screenMode`, and were stored, but the canvas only ever asked whether the
mode was Preview or Presentation. Both therefore drew exactly what Normal drew:
guides, frame edges, the other non-printing marks, and content reaching across
the pasteboard.

They are preview modes now, and what each spread shows reaches out to its box:
the bleed for Bleed, the bleed and the slug for Slug (Slug shows every printing
element, and a slug narrower than the bleed does not pull the edge back in).
Preview and Presentation still stop at the trim.

The slug guide was never drawn either, so the Slug colour in Preferences ›
Guides & Pasteboard was stored, exported and round-tripped while nothing read
it. It is drawn beside the bleed guide, in that colour.

`Spread::bleed_rect`'s body becomes `outset_rect`, which measures either offset
from the page edges, with `bleed_rect` and `slug_rect` as its named callers.
2026-10-18 20:47:01 +05:00
moppeeer 81913c2f48 TOC-1: localize separator picker and address review cleanup 2026-10-18 16:07:02 +02:00
moppeeer e8ec23a88d TOC-1: preserve right-indent separators and expose their picker 2026-10-18 15:47:55 +02:00
moppeeer ec179d5e69 TOC-2: preserve manual bookmark ordering on refresh 2026-10-18 13:59:55 +02:00
moppeeer 924d9c1b73 TOC-2: generate and refresh nested PDF bookmarks 2026-10-18 13:24:56 +02:00
RoHaX 8a8180c1f8 T.DE1: German 2006 reform hyphenation 2026-10-18 11:06:57 +02:00
Paul GandClaude Sonnet 5.5 17848dd1e9 Package: link the packaged document and IDML relative to the package (fixes #340)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDKUo6t8zLKhzeuPrJxa3n
2026-10-17 17:11:31 -07:00
harrisonoconnorhover 9434e96dbf fix: integrate parent deletion with current main (#956) 2026-10-17 17:52:04 -04:00
moppeeerandGPT-6 Astra 71869ac3c7 UI.NewDocument: delete saved presets from their cards
Show the existing trash icon on selected or hovered custom Saved cards and route it through file.deletePreset. Keep the factory card protected, prevent the action from selecting or creating a document, and retain the configured preview. Cover both selected and hovered-card clicks in the whole-window regression.

Co-Authored-By: GPT-6 Astra <noreply@openai.com>
2026-10-17 23:40:37 +02:00
Claude 4e263ad821 Cross-references keep edited text and break at spaces
InDesign keeps text typed over a cross-reference's generated text (until the
cross-reference is updated), with its page number still live. The IDML
importer dropped that text and generated it again from the format, so a
credits list whose format reads "Last, First. ... YYYY. Volume X, issue Y."
showed those placeholders instead of the names and dates typed in.

- CrossRef gains `text` (edited text, `<pageNum />` for the live page) and
  `page` (the page last shown). Import keeps saved text that no longer
  reads as its format produces it; export writes it back with InDesign's
  XRefPageNumber variable. Setting a format drops the edits, as InDesign does.
- Edited text whose destination is gone shows its saved page, not "??".
- Spaces in a cross-reference's text are word spaces the line may break at
  (it was set as one unbreakable piece, so long ones broke mid-word).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-17 20:00:06 +00:00
Aykut FiratandClaude Opus 5.5 d98b2cce01 IDML: TOC styles read InDesign's $ID/-prefixed separators and Properties-child entry styles
InDesign writes a TOC style entry's separator with the built-in prefix (`Separator="$ID/^y"`, the right indent tab)
and its FormatStyle / PageNumberStyle / SeparatorStyle as `<Properties>` children, not attributes. The importer kept
the prefix as text (entries read "Welcome$ID/<tab>3") and never found the entry styles, so a regenerated TOC lost its
entry paragraph style and page-number character style.

- names::toc_separator_in strips `$ID/` before decoding.
- toc_of reads FormatStyle, PageNumberStyle and SeparatorStyle with `prop` (attribute or Properties child).
- tests: a TOC style written as InDesign writes it imports its separator, entry style, page-number style and title style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:32:00 -04:00
Aykut FiratandClaude Opus 5.5 08ce444054 Tables: cell First Baseline offset (Cell Options › Text › First Baseline)
Cells and cell styles had no first-baseline setting, so every cell set its first line by the
Ascent offset (the font's typographic ascender). IDML documents that set FirstBaselineOffset on a
cell style (CapHeight is common, often through a table style's body region) composed every row
taller than the document asked for. With a font whose typographic ascender is a full em (Avenir),
each row grew about 2.6 pt and long tables overset, losing their last rows.

- doc: Cell.first_baseline / first_baseline_min; CellStyle.first_baseline / first_baseline_min,
  applied by CellStyle::apply_to and carried through resolve_cell_style's BasedOn chain.
- idml: FirstBaselineOffset and MinimumFirstBaselineOffset read and written on cells and cell styles.
- compose: a cell's text frame uses the cell's first baseline offset and minimum.
- engine: table.setCell, style.cell.create/edit take firstBaseline / firstBaselineMin; table.get
  reports them; style.cell.create fromSelection captures them.
- tests: import through BasedOn and a table style's body region, a cell's own override, IDML round
  trip; composer cap height vs ascent and a fixed minimum; command parameters and validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:07:46 -04:00
skylar taylor-barrick 9fd0a881f7 Merge storytold/main into linked-path-checks
The conflict was in links.rs, where main's atomic relink work (b050343a) and
this branch's path gate both changed `update`. Kept main's mechanism (build the
replacement with relinked_asset, then insert it) and this branch's gate (a link
craft-docpath refuses is missing and never read).

relinked_asset now takes the path to read and the link to record separately.
Previously they were one argument, safe only because update passed the raw stored
link; passing the resolved path to the old signature would have rewritten every
relative link to an absolute one on each refresh.

Also passes None for the document in main's embedded-status test, where the asset
has no link so the document is irrelevant.
2026-10-17 12:39:14 -06:00
Claude afc6d31764 Inline objects paint under their frame's text
Anchored objects were painted after all of their frame's text, so an inline
picture whose frame reaches below its baseline (a negative Y offset, common in
IDML) covered the top of the next line with its white background. InDesign
paints them under the text. Both the renderer and the PDF export now draw a
frame's anchored objects after its paragraph shading and before its text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-17 16:15:32 +00:00
Claude 54ea1559d7 Parent pages: show running-header placeholders, keep page overlays off them
On a parent page a running-header variable has no page to read, so it
composed blank; it now shows <variable name>, as the header's placeholder.

While parents were edited, document frames weren't laid out and fell back
to the identity canvas transform, so their hidden characters (a flood of ¶),
spelling squiggles and other overlays were drawn over the right parent page.
Items on spreads that aren't shown now have no canvas transform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-17 15:06:47 +00:00
Claude 34632c0b15 Running headers read a page in text order, not by height
A multi-column page's "last on page" picked whichever matching paragraph sat
lowest, so a dictionary page whose final entry tops column 2 showed the last
entry of column 1. Hits on a page now order by their story's first position
on the page (top-left), then by position within the story.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-17 15:06:44 +00:00
con3codeandClaude Opus 5.5 46596a9d19 Mojikumi: close up consecutive punctuation in the Japanese sets only
The Chinese sets keep the larger blank between two marks, as before:
JLREQ's rule is Japanese, and Chinese styles (Taiwan's centred, full-width
marks among them) set consecutive punctuation their own way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013phQ3ekq6uGBEWD6FjFYG2
2026-10-17 23:42:21 +09:00
con3codeandClaude Opus 5.5 e06f4134d4 Mojikumi: move the consecutive punctuation test clear of #1127's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013phQ3ekq6uGBEWD6FjFYG2
2026-10-17 23:08:18 +09:00
macadminHU e8908b0fc2 HU1: add Hungarian interface localization
Add 1,917 Hungarian translations and two context captions, register Magyar in Preferences, and cover language persistence and tool labels with regression tests. Let tool flyouts grow to fit translated labels.

AI-assisted translation reviewed by a native Hungarian contributor with over 30 years of DTP experience. Further in-context feedback is welcome. Add the contributor's requested public GitHub profile-name preference.
2026-10-17 15:56:21 +02:00
con3codeandClaude Opus 5.5 aa55877b7a Mojikumi: consecutive punctuation closes up
Opening brackets together, and closing brackets, commas and full stops
together, now touch (JLREQ 3.1.4): 」。 and 「『 no longer keep half an
em between them. A closing bracket and an opening one stay half an em
apart, and other neighbours keep the larger blank, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013phQ3ekq6uGBEWD6FjFYG2
2026-10-17 22:51:34 +09:00
MarekSpodBiedry f633cf54dd PDF/X-4 export: add xmp:MetadataDate and xmpMM:VersionID to the XMP (#1207) 2026-10-17 15:07:14 +02:00
MarekSpodBiedry b13b1ec408 Keep the mapped style of the first paragraph when placing text at an empty caret (#1208) 2026-10-17 15:05:08 +02:00