DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Merge PR #1070: Table of Contents: page number and separator character styles, Sort Entries in Alphabetical Order
aiongg52cf755179f0
diff --cc ROADMAP.mdindex 79270004e,16b46c38d..36eb5d2a3--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -345,102 -343,11 +345,103 @@@ list) · [roadmap.md](docs/roadmap.md)## Progress log-- **2026-10-13** · Switching between document and parent pages refreshes the canvas immediately, preventing black parent pages and stale document objects when the zoom stays the same. Ordinary edits retain partial repainting. No readiness percentage change.-Newest first.+- **2026-10-14** · Threading keeps generated and linked stories, text that refers to a story, local IDs and locked frames intact; a colour chosen at a caret waits for the typing, Swap Fill and Stroke on text keeps each run's colours, control-channel input never reads or writes the system clipboard, and IDML frame preferences given as properties import with bounded column counts (#84). No readiness percentage change.+- **2026-10-14** · The Liquid Layout panel follows InDesign's: Liquid Page Rule with the page number, Content › Auto-Fit, and Object Constraints › Resize with Page and Pin for the selected object on an object-based page; Create Alternate Layout moved to the Layout menu. No readiness percentage change.+- **2026-10-14** · On an object-based page the Page tool shows a selected object's liquid pins and resize locks as InDesign does: a click pins a side to the page edge or locks the width or height, with InDesign's tooltips. No readiness percentage change.+- **2026-10-14** · With the Page tool, the Control panel shows the page as InDesign's does: W/H from a reference point, page-size preset (US Business Card added), orientation, Liquid Page Rule and Show Parent Page Overlay, which draws the parent page's size over a resized page. No readiness percentage change.+- **2026-10-14** · The Page tool works as InDesign's: a click selects a page and shows its handles and liquid page rule; dragging a handle previews the rule and springs back, Alt-drag resizes the page from the opposite edge, Shift keeps proportions, with a W/H readout. No readiness percentage change.+- **2026-10-14** · With the Page tool, a guide dragged from a ruler is a liquid guide (dashed), as in InDesign; guide-based pages stretch the objects it crosses. No readiness percentage change.+- **2026-10-14** · The Pages panel menu follows InDesign's order: Insert Pages…, Move Pages…, Duplicate Spread (and at End of Document), Delete Page (and Delete Spread for a spread of several pages), New Parent…, Apply Parent to Pages, Override All Parent Page Items, Parent Pages, Create Alternate Layout…, Numbering & Section Options…, Allow Selected Spread to Shuffle. No readiness percentage change.+- **2026-10-14** · Pages panel: Alt-drag copies a page that is a spread of its own (one undo step; `layout.pages.duplicateSpread` takes `to`), a page dropped on Create new page is duplicated at the end, Edit page size offers the presets and Custom Page Size…; duplicated pages keep their own size, rule and guides; thumbnails of pages of their own size stay in their rows. No readiness percentage change.+- **2026-10-13** · IDML: an anchored object takes each anchor setting it leaves unset from its object style, the styles that one is based on, then `[None]`; other item attributes read through the same chain. A left-aligned anchored object's X offset reads in the layout's direction. A rotated group's bounds follow its children's outlines instead of the box of their rotated boxes. No readiness percentage change.+- **2026-10-13** · Control-channel clicks and drags validate positive counts and the complete pending-event budget before queuing input (#732). Oversized requests leave pending gestures intact, preventing unbounded click-count allocation. No readiness percentage change.+- **2026-10-13** · Switching between document and parent pages refreshes the canvas immediately, preventing black parent pages and stale document objects when the zoom stays the same. Ordinary edits retain partial repainting. No readiness percentage change.+- **2026-10-13** · Placed PDFs are drawn through pdfcraft's patched hayro crates: calculator functions whose `idiv` divides by zero or overflows, chains of stitching functions a hundred thousand deep, and mesh shadings with points far off the page, ten thousand overlapping triangles or forty thousand patches no longer panic, overflow the stack, run for over a minute or use more than 2 GiB of memory. A page with a `/UserUnit`, and its trim, bleed and art boxes, are sized in points. No readiness percentage change.+- **2026-10-13** · Object › Fitting has InDesign's shortcuts: Fill Frame Proportionally ⌘⌥⇧C, Fit Content Proportionally ⌘⌥⇧E, Fit Frame to Content ⌘⌥C, Fit Content to Frame ⌘⌥E, Center Content ⌘⇧E. No readiness percentage change.+- **2026-10-13** · Gradients between process colours blend as inks, as InDesign shows them: magenta to cyan passes through C 50 M 50 (a light lilac) on screen instead of the darker RGB mix, and a midpoint between CMYK or grey stops no longer turns the PDF shading RGB. No readiness percentage change.+- **2026-10-13** · Commands refuse parameter keys their params description doesn't name (#776): the control channel, MCP (`-32602`, every `batch` step checked before the first runs) and `designcraft-cli --cmd` answer with an “unknown parameter” error naming the nearest or the accepted keys instead of running with defaults; journals still replay. Descriptions of the table, anchored-object, data-merge and placing commands now name every key they read. No readiness percentage change.+- **2026-10-13** · File ▸ Open Recent lists the documents last opened or saved (newest first, no duplicates; Save a Copy and exports don't count), with Clear Recent Files; the start screen shows the last eight, below the community card, as cards with a picture of the first page: saving puts one in the file (`preview.png`), so the start screen reads it without opening the document. A file that is gone is dimmed and says so when chosen, and stays listed. Preferences ▸ File Handling sets how many are kept (default 20, 0–100). `file.openRecent {index}`, `file.recentFiles`, `file.clearRecent` (#706). No readiness percentage change.+- **2026-10-13** · Dropping an `.ase` file on the window loads its swatches, as Load Swatches does (the drop failed with "Can't Place the File"). No readiness percentage change.+- **2026-10-13** · Text takes gradient swatches: a gradient fill or stroke on characters spans the text frame's box (on a path: the path's), on screen and in PDF. No readiness percentage change.+- **2026-10-13** · Gradient swatches work on strokes: drawn across the path's box on screen and in PDF (they drew nothing), set with `object.gradient {target: stroke}` and in the Gradient panel when the Stroke box is in front; the stroke's gradient vector moves with the shape and round-trips through IDML. No readiness percentage change.+- **2026-10-13** · The Gradient panel follows InDesign's layout (thumbnail, Type, Location, Angle, Reverse, ramp with midpoint diamonds) and takes swatches dragged from the Swatches panel: dropped on a stop they colour it, elsewhere they add a stop. Stops keep their CMYK through panel edits; `object.gradient` stops accept a `swatch`. No readiness percentage change.+- **2026-10-13** · New Swatch works as InDesign's: a gradient made in the Gradient panel becomes "New Gradient Swatch" (still applied), an unnamed colour a listed swatch, a named swatch a "copy" (`swatch.new`); `swatch.create {gradient}` makes a gradient swatch from colour swatches. No readiness percentage change.+- **2026-10-13** · Radial gradients stretch with the object's box, as InDesign draws them: by default an ellipse reaching the frame's sides (it was a circle reaching only the longer side), and a Gradient Swatch tool drag keeps the box's proportions; on screen and in PDF. No readiness percentage change.+- **2026-10-13** · Inner Glow takes a blend mode (Screen by default) and a Technique (Softer or Precise); Basic Feather takes Choke and Corners (Sharp, Rounded, Diffused), in the Effects dialog and `object.effects`. Inner glow and bevel blend modes now mix with the object below them instead of an empty layer. Noise isn't drawn. No readiness percentage change.+- **2026-10-13** · Text Frame Options is laid out as InDesign's: General (Columns: Fixed Number or Fixed Width with Number, Width and Gutter; Balance Columns; Inset Spacing with the link button; Vertical Justification; Ignore Text Wrap), Baseline Options (First Baseline Offset and Min) and Column Rules. `object.textFrameOptions` takes `columnWidth` and `firstBaselineMin`. No readiness percentage change.+- **2026-10-13** · The Window menu follows InDesign's order (Arrange, Workspace, then the panels alphabetically with Color, Editorial, Object & Layout, Styles… submenus), and Window › Workspace lists the workspaces as InDesign does, now with Essentials Classic: the Control panel and an icon column of named panel groups. No readiness percentage change.+- **2026-10-13** · `.indd` and `.indt` documents open through File › Open, drop, the web inbox, `file.open`, `file.openBytes`, `file.openIdml` and the CLI: [storytold/indd-utils](https://github.com/storytold/indd-utils) converts them to IDML in memory and the IDML importer reads the result, on desktop and web. Converter warnings come first in the open result; an unreadable file is an open error (#21, #114). No readiness percentage change until a real-file corpus measures it.+- **2026-10-13** · macOS: a command chosen with the mouse in the menu bar runs at once. It used to wait for the next mouse move or key press over the window, so File › Open, Place and Save As seemed to take 10–20 seconds to open their dialogs. No readiness percentage change.+- **2026-10-13** · An explicit recovery folder (`file.recovery.save` with `dir`) never overwrites or deletes another running app's checkpoints. Document uids start at 1 in every process, so two apps saving recovery to one chosen folder replaced or removed each other's `<uid>.designcraft`. A run replaces or removes only the entries it wrote or recovered there, refuses an occupied uid, and refuses a folder whose run lock another app holds. No readiness percentage change.+- **2026-10-13** · PDF export leaves out form fields, buttons and video or sound that don't print: inside a hidden group, on a hidden or non-printing layer, or marked non-printing. Page content and interactive elements follow one inclusion rule. No readiness percentage change.+- **2026-10-13** · IDML export keeps parent item overrides: each page lists its overridden parent items and the local copy keeps its link to the parent item, so a reopened IDML file shows only the local copy (#725). No readiness percentage change.+- **2026-10-13** · Reflowable EPUB and HTML export include tables (header and footer rows, merged cells), footnotes (a linked note after the paragraph that refers to it) and endnotes (a linked section at the end of the book). No readiness percentage change.+- **2026-10-13** · Word import: table cells read text by the same rules as body text, so deleted text, moved-away text and field codes stay out (#721). Word's Normal comes in as its own paragraph style "Normal" over the document defaults, so text formatted only by Normal keeps its look; it conflicts only with a document's own Normal, and the style map can send it to [Basic Paragraph] (#722). No readiness percentage change.+- **2026-10-13** · Text recomposes when the document baseline grid changes, when a layer holding a text-wrap object is shown or hidden, or when a section's start number, numbering style, prefix or marker changes; the composition cache keyed only on the section count and item identities and kept the old layout. No readiness percentage change.+- **2026-10-13** · Path edits (`path.setAnchor`, `path.moveAnchors`, `path.appendAnchor`, `path.reverse`, `path.close`, anchor add/delete/convert, Erase, Smooth and Scissors) refuse a path that is locked, sits in a locked group or on a locked layer (#735). Properties links to the Stroke, Character, Paragraph, Effects, Text Wrap and Info panels open them in a customized panel layout too (#736). No readiness percentage change.+- **2026-10-13** · The Story Editor stays with the document its story belongs to: it hides while another document is active and closes with its document, so its edits never reach another document's story with the same id (#729). Undo restores the selection from before the command and Redo the one after it (#716). No readiness percentage change.+- **2026-10-13** · Saving never reports success without a file: a document that can't be written is an error from Save, Save As, Save a Copy, Package, snippet export and the web serializer, leaving the existing file, the unsaved state and the recovery checkpoint as they were. Placed files over 4 GiB are written with zip64 sizes. A web Save whose browser download can't start reports the error and keeps the document unsaved (#741, #708). No readiness percentage change.+- **2026-10-13** · Colour management runs on craft-libs' `craft-cms`. The default CMYK working space is its Coated FOGRA39 profile (Generic CMYK and Device CMYK stay selectable); CMYK swatches show relative colorimetric with the settings' black point compensation, and PDF/X-4 output intents embed the working CMYK profile (FOGRA39 by default). Profile names the built-in stands in for resolve to it; other unknown names are an error, and saved settings naming one start with the default. No readiness percentage change.+- **2026-10-13** · Command scripts look up only a well-formed `$N.path` / `$last.path` reference; other strings starting with `$`, such as a GREP replacement of `$1` and a nonbreaking space, stay as written, and `$$` writes a literal `$` (#749). No readiness percentage change.+- **2026-10-13** · Dialogs and the About window move when you drag their title row, so the page behind them can be seen. A dragged dialog may go partly off-screen, but its title row stays reachable; each dialog opens centred, and again after the window is resized. No readiness percentage change.+- **2026-10-12** · Placed Excel tables and Excel data-merge records keep numeric precision, including small values, and preserve numeric-looking cached formula strings as text. No readiness percentage change.+- **2026-10-13** · Links rows show their source paths; selecting a link shows its full path wrapped inside the panel, so same-named files from different folders can be distinguished. No readiness percentage change.+- **2026-10-13** · HTML and reflowable EPUB order grouped stories and graphics by their transformed spread position, including nested groups and rotated frames. Explicit Article order is unchanged. No readiness percentage change.+- **2026-10-13** · A selected placed graphic shows its own brown bounding box with handles: dragging one resizes the graphic inside its frame (Shift keeps proportions, Alt from the centre) and leaves the frame as it is; `transform.set` takes the graphic's new spread `bounds`. Builds on #415 and #550. No readiness percentage change.+- **2026-10-13** · Create Outlines makes one compound path per line (and per text colour within a line), grouped, as InDesign does: Ungroup then leaves each line on its own to be spaced and made into one compound path again. A single line in one colour stays a single compound path. No readiness percentage change.+- **2026-10-13** · Ungroup only takes groups apart: a frame with pasted-in content stays whole (and selected), is named by its shape in the Layers and Properties panels, and offers Convert Shape rather than Ungroup. Non-groups stay selected. No readiness percentage change.+- **2026-10-13** · Copy with a placed graphic selected (Direct Selection) copies just the graphic, uncropped, where it sits on the page and without the frame's stroke, so Paste Into puts the whole image in place; Cut and Delete then remove only the graphic and leave its frame empty. Nested selections copy in their spread coordinates. No readiness percentage change.+- **2026-10-13** · Object effects (Basic Feather, Inner Glow, shadows, glows, bevel, satin, directional and gradient feathers) apply to frames with pasted-in content, on screen and in image exports: the frame, its clipped content and its stroke are one object to the effect. PDF export still has no soft effects for any object. No readiness percentage change.+- **2026-10-13** · Backspace between two consecutive tables, pasting a table next to a table anchor, and pasting several paragraphs right before one keep every table on its own anchor paragraph. Previously a table was dropped or left without its anchor, and the saved file failed to reopen. No readiness percentage change.+- **2026-10-12** · The engine's atomic writer, used by saves and exports (documents, snippets, books, libraries, swatches, XML, interchange, MCP, desktop and CLI writes), delegates to craft-libs/craft-atomic. Failed writes retain the original; new files follow the umask and replaced files keep their permissions. Recovery checkpoints and package output keep their own no-follow writers. No readiness percentage change.+- **2026-10-13** · New Document has Preview (off by default, kept for the session): a document with the window's settings shows in the workspace and follows them once typing pauses. Create keeps it with a clean undo history and refuses invalid fields; Close removes it and shows the previous document again. The preview takes no Untitled number and writes no recovery data; one edited by a menu or script stays open as a document. No readiness percentage change.+- **2026-10-13** · Object styles carry effects (drop shadow, feather, inner and outer shadows and glows, bevel, satin, gradient and directional feather). New styles from a selection keep its effects, `style.object.edit` changes a style's effects and every item that follows them, `style.object.clearOverrides` returns items to their style, and new frames take their default style's effects. IDML carries only the drop shadow and feather, for ObjectStyles (with their effects category and BasedOn chain) as for items (#653). No readiness percentage change.+- **2026-10-13** · A parent can be based on another parent (`layout.parents.options`). Pages draw the base parent's items, then the parent's, then their own, on screen and in PDF and image export; chains work, cycles are refused, overrides reach base items, `document.inspect` reports `basedOn`, and IDML round-trips it. No readiness percentage change.+- **2026-10-12** · The Effects dialog, as in InDesign: Object › Effects (Transparency…, Drop Shadow… and the rest, and their shortcuts) and the Effects panel's fx button open it on the chosen effect, turned on. Transparency and every effect in one window, in the document's units, with X/Y offsets, Preview on the page, Cancel putting things back, and OK as one undo step (`object.effects`). Shadows default to InDesign's 120° light angle. No readiness percentage change.+- **2026-10-12** · Editing type on a path: the Type tool clicks, drags and double-clicks along the curve (the character under the pointer, not one on the straightened line), a click on the letters themselves hits the frame, and the caret and highlight bend with the path. No readiness percentage change.+- **2026-10-12** · Type on a path has start and end brackets, as in InDesign: selected path type shows them across the path, and dragging either with the Selection or Direct Selection tool moves where the text starts or ends (text past the end bracket is overset). `type.pathOptions {end}`; IDML reads and writes EndBracket. No readiness percentage change.+- **2026-10-12** · The Pen tool continues an open path from either end point, as in InDesign: the cursor shows it over an end point, a click there carries on drawing that path, a drag first reshapes the end point's direction lines, and the other end closes it. Object › Paths › Reverse Path (`path.reverse`); `path.setAnchor`; `path.appendAnchor` and `path.close` take a subpath. No readiness percentage change.+- **2026-10-12** · The Eyedropper puts a colour sampled from an image on the stroke when the toolbox's Stroke box is in front, as in InDesign (a line takes it on its stroke). No readiness percentage change.+- **2026-10-12** · Linked text files (#597): placed Word, RTF and text files can stay linked; the Links panel shows them OK / Modified / Missing, and Update imports the file again into the same frames with the saved style map (the Links panel asks before replacing edits made in the layout). No readiness percentage change.+- **2026-10-12** · Text in oval, polygon and other non-rectangular text frames follows the frame's outline: each line is set in the part of its band inside the shape, one inset away from the outline, in every column and in vertical frames; text wrap still applies on top (#646). No readiness percentage change.+- **2026-10-12** · Colour entry: the Color Picker's hex, R/G/B and C/M/Y/K fields and the Color panel's number fields keep typed text until it is complete; panel and picker values are applied on a fixed scale (`{model, …}` colours in 0..1), so M 1 is 1 %. Picking keeps a CMYK colour CMYK; dialogs leave the page behind them undimmed; colours that round to the same swatch name share one swatch (#323). No readiness percentage change.+- **2026-10-12** · Placed photos show in their own colours: embedded ICC profiles (Adobe RGB, ProPhoto, P3, grey) are converted to sRGB on screen, and CMYK JPEGs (including YCCK), CMYK TIFFs and CMYK PSDs go through their embedded CMYK profile or the working CMYK space with the colour settings' intent and black-point compensation, instead of the profile-free formula. Unreadable profiles are ignored. No readiness percentage change.+- **2026-10-12** · Placed Word documents keep their bullets and numbering (#626): `numbering.xml` levels become bullet or numbered paragraphs with Word's number formats, label text, start numbers, restarts and list indents, also when a paragraph style carries the list. No readiness percentage change.+- **2026-10-12** · Text strokes can sit behind the fill: the stroke lies wholly outside the letters at its full weight on screen, in PNG and in PDF, set from the Properties panel or Character Style Options. IDML `StrokeAlignment` on text imports and exports as this setting, so imported text with outside-aligned strokes keeps its letter shapes (#619). No readiness percentage change.+- **2026-10-12** · Type tool: Option/Alt+Left/Right kerns the pair at the caret (manual kerning) or tracks a selection by the Kerning/Tracking increment (Preferences › Units & Increments, 20/1000 em), five times with Cmd/Ctrl; moving by words is Cmd+Left/Right on macOS and Ctrl+Left/Right elsewhere, and Option/Alt+Shift+Left/Right still selects by words (#621). No readiness percentage change.+- **2026-10-12** · Autoflow on Place threads one frame per page column (right to left in a right-to-left story), so text no longer runs across the gutter; pages Smart Text Reflow adds get a primary frame with the page's columns (#625). No readiness percentage change.+- **2026-10-12** · Vector art copied in Illustrator, VectorCraft, Figma or Inkscape pastes as editable paths, as InDesign pastes Illustrator art: the SVG those apps put on the clipboard becomes paths with their fills, strokes (weight, caps, joins, dashes) and opacity, groups stay groups and text comes in as outlines, centred in the view (`edit.pasteSvg`, `ui.paste`). Edit › Paste reads the system clipboard when nothing was copied in DesignCraft. No readiness percentage change.+- **2026-10-12** · Pages panel: double-clicking a parent shows that parent and selects only its row; parent rows show rendered thumbnails. Commands name parents by id, full name, or a prefix only one parent has; an unknown or ambiguous name is an error instead of clearing the page's parent (#624). No readiness percentage change.+- **2026-10-12** · With the Type tool, dragging a table's column or row border resizes it (the double-arrow cursor shows over a border): later columns and rows move along, Shift keeps the table size, and Shift on the right or bottom edge scales every column or row. A dragged row becomes At Least; one undo step per drag, Esc cancels; works in rotated frames and turned spreads. Scripts use `table.resizeBorder`. No readiness percentage change.+- **2026-10-12** · The Tools panel's Fill/Stroke keys work: D (default fill and stroke), X (fill or stroke in front), Shift+X (swap per object, tints included) and / (Apply None), as `color.*` commands; swap and default are one undo step (`object.swapFillStroke`, `object.defaultFillStroke`); the Color panel follows the proxy's fill/stroke choice. No readiness percentage change.+- **2026-10-12** · With a placed graphic selected (Direct Selection), the Transform values act on the graphic inside its frame, as in InDesign: a tilted frame's image can be straightened to 0°. No readiness percentage change.+- **2026-10-11** · Font menu laid out like InDesign's: filters (classification, favourites,+ recently added), families opening to their styles, the selected text as the sample in three+ sizes, Recently Used fonts, Show Similar Fonts and each font's format.+- **2026-10-12** · The Effects panel shows the level its settings apply to ("Group: Color Dodge 100%") and, as in InDesign, Isolate Blending and Knockout Group for a selected group. No readiness percentage change.+- **2026-10-12** · Edit › Step and Repeat has its InDesign dialog: Repeat (Count, or Rows and Columns with Create as a grid), Offset (Vertical, Horizontal, in ruler units) and Preview, which shows the copies while the dialog is open; Cancel takes them away and OK makes them as one undo step. No readiness percentage change.+- **2026-10-12** · Load Styles: the Paragraph Styles and Character Styles panels load styles from another DesignCraft document or an IDML file, with the styles, swatches and lists they name; a dialog picks the styles and what happens to one the document defines differently (`style.load`). No readiness percentage change.+- **2026-10-12** · On screen, blend modes blend with the objects below and not with the paper, as in InDesign and in PDF export: a Color Dodge or Screen object over blank paper shows as it is. No readiness percentage change.+- **2026-10-15** · Define Lists… is listed under Type › Bulleted & Numbered Lists in command search and Edit › Menus, matching the menu, and the parity doc no longer lists a Type › Paragraph Rules… menu item that does not exist. No readiness percentage change.+- **2026-10-15** · Pressing Enter in the Layers panel's rename field without typing leaves an unnamed object unnamed, so it keeps following its automatic label instead of taking it as a fixed name. No readiness percentage change.+- **2026-10-15** · Apply Gradient (.) with the Stroke box in front puts a new default gradient on the stroke in one undo step and leaves the fill's swatch and tint as they were. No readiness percentage change.+- **2026-10-15** · In a facing-pages document, two odd-numbered pages in a row after a section restart (page 2 starting at 1) each get their own spread and stay right pages, instead of sharing a spread with an odd page on the left. No readiness percentage change.+- **2026-10-15** · Character formatting set at a caret on a blank line (an empty paragraph) applies to the line's paragraph mark and to the text typed there, also after the caret has left the line and come back; typed text used to take the previous paragraph's format. No readiness percentage change.+- **2026-10-15** · Very wide effects stay sharp at high zoom: a wide Basic Feather draws the object itself at full resolution, with only the soft mask at a reduced one, and wide inner shadows, inner glows, satin and bevels are clipped to the shape at full resolution, so they no longer blur the object or bleed past its edge. No readiness percentage change.+- **2026-10-15** · The Typography panel controls every OpenType feature a character format carries: Other Features lists Proportional Metrics, Horizontal Kana, Localized Forms, Mark Positioning, Justification Alternates and Roman Italics. Lining, Oldstyle, Tabular or Proportional chosen alone also sets the other figure axis, so IDML export keeps the figure style instead of writing Default. Standard Ligatures follows and sets Character › Ligatures. No readiness percentage change.+- **2026-10-15** · Join Path and Convert Point leave a path on a locked layer or inside a locked group unchanged, as the other path edits do. No readiness percentage change.+- **2026-10-15** · A kerning value chosen in the Character panel or Properties at a caret kerns the pair at the caret (the character before it takes the value, in one undo step), and the field shows that pair's kerning; at the start of a story or paragraph it is kept for the next typing, and a selection is kerned as before (`type.kernPair`). No readiness percentage change.+- **2026-10-15** · Japanese, Chinese and Korean input methods type into stories with the Type tool: the marked text shows in place, underlined (the clause being converted twice), with the candidate window at the caret, and the commit is one undo step. Keys, shortcuts, the clipboard and Undo wait while the input method composes; a click, a tool switch or another command keeps the marked text as typed. Not yet checked by hand with a system input method. No readiness percentage change.+- **2026-10-15** · IDML placed PDFs keep their page and Crop to box (`PDFAttribute` `PageNumber` and `PDFCrop`, written for every placed PDF); two crops of one PDF page stay two assets; a page the PDF lacks is left out of PDF export with a warning instead of failing it; `$ID/` font names resolve; the IDML in a package links the images in its Links folder without embedding them. No readiness percentage change.+- **2026-10-15** · The CJK leading model and character alignment take effect only in paragraphs set with a Japanese composer (`HL Composer J`, `HL Single J`), which IDML import and export keep: Western and Arabic paragraphs set baseline to baseline on the Roman baseline, a paragraph switched to a Japanese composer gets the file's Aki Below spacing, and under Aki Below a line's leading is the space below it. No readiness percentage change.+- **2026-10-15** · Document pages follow their parent page's margins and columns unless margins were set on the page itself (`Page::local_margins`): applying a different parent gives a page that parent's margins, a page that changes side after an insert takes the other parent page's, and a page given margins equal to its parent's keeps them when the parent changes. IDML import and older files mark pages whose margins differ from their parent as their own. No readiness percentage change.+- **2026-10-15** · Start-up picks the GPU that drives the display (or the kind `WGPU_POWER_PREF` or the adapter `WGPU_ADAPTER_NAME` names), and when a start-up fails or hangs it restarts on the next adapter, then the next backend, then a software renderer, keeping recovered documents; start-up errors are logged to standard error and the log file (#273, #334). No readiness percentage change.+- **2026-10-15** · IDML: liquid guides keep their type on document and parent pages instead of reopening as ordinary ruler guides. Positions, orientation, Fit to Page, locks and layers are preserved; object liquid constraints remain unmapped (#872). No readiness percentage change.+- **2026-10-16** · A swatch applied to a placed greyscale or bitmap image colours it, as in InDesign: IDML's `<Image FillColor>` is read and written, greyscale pixels become a tint of the swatch on opaque white and a bitmap's white lets the frame show through, on screen and in PDF (spot swatches print on their plate). Colour images keep their colours. Applying the swatch from the Swatches panel comes next. No readiness percentage change.+- **2026-10-15** · Table ▸ Convert Rows ▸ To Header / To Body / To Footer, as in InDesign: the selected rows become header rows when they touch the top of the table or its header rows, footer rows when they touch the bottom or its footer rows, and header or footer rows next to the body go back to body rows. The items are greyed out when the rows can't change (a gap, the last body row, a merged cell across the new boundary); one undo step. No readiness percentage change.+ - **2026-10-15** · Table of Contents: each included style can set a character style for its page number and for the text between entry and number, and Sort Entries in Alphabetical Order lists its entries alphabetically among their siblings, each with the entries under it (#1069). Both survive Update Table of Contents, renaming or deleting the character style, and IDML (`PageNumberStyle`, `SeparatorStyle`, `Sort`). No readiness percentage change.- **2026-10-14** · The Type tool draws a new text frame over a locked empty frame, as InDesign does, instead of turning the locked frame into a text frame. No readiness percentage change.- **2026-10-14** · 100% black shows as pure black on screen by default, as InDesign's Appearance of Black does out of the box (Display All Blacks as Rich Black); Preferences › Appearance of Black › Display All Blacks Accurately still shows it as the dark grey it prints, and a saved choice is kept. No readiness percentage change.- **2026-10-14** · Pathfinder keeps the frontmost object, as InDesign does: a photo placed over shapes and intersected with them shows through the shapes (it was dropped, and the shapes kept their black fill); Add, Exclude Overlap and Minus Back take the front object's fill too, Subtract still keeps the back one. No readiness percentage change.diff --cc crates/engine/src/cmd/style.rsindex 7e04bb676,799d16d7f..81ed6951b--- a/crates/engine/src/cmd/style.rs+++ b/crates/engine/src/cmd/style.rs@@@ -692,9 -566,20 +692,19 @@@ fn redirect_style_refs(d: &mut designcrfor s in &mut st.paragraph {rename_char_refs(&mut s.para, from, to);}- if d.footnote_options.ref_char_style == from {- d.footnote_options.ref_char_style = to.to_string();- }+ rename(&mut st.default_character);+ rename(&mut d.footnote_options.ref_char_style);}+ // The table of contents' character styles ([None] is stored as no style).+ if !para && let Some(toc) = d.toc.as_mut() {+ for e in &mut toc.entries {+ for n in [&mut e.page_number_style, &mut e.separator_style] {+ if n.as_deref() == Some(from) {+ *n = Some(to.to_string()).filter(|t| t != designcraft_doc::NO_CHAR_STYLE);+ }+ }+ }+ }for sid in d.stories.keys().copied().collect::<Vec<_>>() {let Some(story) = d.story_mut(sid) else { continue };story.for_each_text_mut(&mut |st| {diff --cc crates/engine/src/tests_idml.rsindex 16dff6267,d35320bef..0701052d0--- a/crates/engine/src/tests_idml.rs+++ b/crates/engine/src/tests_idml.rs@@@ -530,21 -395,29 +530,48 @@@ fn table_of_contents_definition_round_tassert_eq!(toc_text(&s), text);}+#[test]+fn parent_and_page_margins_round_trip_through_idml() {+ let mut s = Session::new();+ s.execute("file.new", &json!({"pages": 3})).unwrap();+ s.execute("layout.marginsAndColumns", &json!({"parent": "A", "margins": 48, "columns": 2})).unwrap();+ s.execute("layout.marginsAndColumns", &json!({"pages": [2], "margins": 100})).unwrap();+ let back = designcraft_idml::import_idml(&designcraft_idml::export_idml(&s.doc().unwrap().doc)).unwrap();+ let pages: Vec<(f64, u32, bool)> =+ (0..back.page_count()).filter_map(|i| back.page(i)).map(|p| (p.margins.top, p.columns.count, p.local_margins)).collect();+ assert_eq!(pages, vec![(48.0, 2, false), (48.0, 2, false), (100.0, 2, true)]);+ assert!(back.parents[0].pages.iter().all(|p| p.margins.top == 48.0 && p.columns.count == 2));+ // The imported pages still follow their parent.+ let mut d = back;+ std::sync::Arc::make_mut(&mut d.parents[0]).pages[1].margins.top = 60.0;+ d.sync_parent_margins();+ assert_eq!(d.page(0).unwrap().margins.top, 60.0);+ assert_eq!(d.page(2).unwrap().margins.top, 100.0);+}+++ #[test]+ fn table_of_contents_character_styles_and_sort_round_trip_through_idml() {+ let mut s = Session::new();+ s.execute("file.newSample", &json!({})).unwrap();+ let page = s.doc().unwrap().doc.page_count() + 1;+ s.execute("layout.pages.insert", &json!({"count": 1})).unwrap();+ s.execute("style.character.create", &json!({"name": "TOC Number", "chars": {"fontStyle": "Bold"}})).unwrap();+ s.execute("style.character.create", &json!({"name": "TOC Dots"})).unwrap();+ s.execute(+ "toc.generate",+ &json!({"page": page, "entries": [+ {"style": "Cover Title", "level": 1, "pageNumberStyle": "TOC Number", "separatorStyle": "TOC Dots", "sort": true},+ {"style": "Headline", "level": 2},+ ]}),+ )+ .unwrap();+ let before = s.doc().unwrap().doc.toc.clone().unwrap();+ let b64 = s.execute("file.exportIdml", &json!({})).unwrap()["base64"].as_str().unwrap().to_string();+ s.execute("file.openIdml", &json!({"base64": b64, "name": "toc.idml"})).unwrap();+ let after = s.doc().unwrap().doc.toc.clone().expect("the TOC definition is imported");+ assert_eq!(after.entries, before.entries);+ let e = &after.entries[0];+ assert_eq!((e.page_number_style.as_deref(), e.separator_style.as_deref(), e.sort), (Some("TOC Number"), Some("TOC Dots"), true));+ let e = &after.entries[1];+ assert_eq!((e.page_number_style.as_deref(), e.separator_style.as_deref(), e.sort), (None, None, false));+ }diff --cc crates/ui-egui/src/dialogs.rsindex 935d88d26,c14cb331c..efa143b55--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@@ -5611,516 -4481,71 +5611,544 @@@ fn paragraph_rules(app: &DesignApp, ui}}});- });- });- });- if let Some(r) = rows.get_mut(sel) {- ui.add_space(8.0);- crate::rtl::label(ui, egui::RichText::new(format!("{} {}", tr("Style:"), r.style)).font(semibold(12.0)));- let none = designcraft_doc::NO_CHAR_STYLE;- egui::Grid::new("toc_entry").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {- crate::rtl::label(ui, tr("Entry Style:"));- let auto = format!("TOC Level {}", r.level.clamp(1, 9));- toc_style_combo(ui, "entry", &styles, &auto, &mut r.entry_style);- ui.end_row();- crate::rtl::label(ui, tr("Page Number:"));- let choices = [("after", "After Entry"), ("before", "Before Entry"), ("none", "No Page Number")];- let cur = choices.iter().find(|(v, _)| *v == r.page_number).map_or("After Entry", |(_, l)| l);- egui::ComboBox::from_id_salt("toc_page_number").selected_text(tr(cur)).width(200.0).show_ui(ui, |ui| {- for (v, l) in choices {- if ui.selectable_label(r.page_number == v, tr(l)).clicked() {- r.page_number = v.into();- }- }- });- crate::rtl::label(ui, tr("Style:"));- toc_style_combo(ui, "page_number", &char_styles, none, &mut r.page_number_style);- ui.end_row();- crate::rtl::label(ui, tr("Between Entry and Number:"));- ui.add(egui::TextEdit::singleline(&mut r.separator).desired_width(80.0).horizontal_align(egui::Align::Min));- crate::rtl::label(ui, tr("Style:"));- toc_style_combo(ui, "separator", &char_styles, none, &mut r.separator_style);ui.end_row();- crate::rtl::label(ui, "");- ui.checkbox(&mut r.sort, tr("Sort Entries in Alphabetical Order"));+ crate::rtl::label(ui, crate::i18n::tr(lang, "Offset:"));+ if let Some(v) = sized(ui, &mut |ui| crate::widgets::measure(ui, &key("offset"), rule["offset"].as_f64(), v_units, 80.0)) {+ d.fields.insert(key("offset"), json!(v));+ }ui.end_row();- crate::rtl::label(ui, tr("Level:"));- egui::ComboBox::from_id_salt("toc_level").selected_text(r.level.to_string()).width(60.0).show_ui(ui, |ui| {- for l in 1..=9u8 {- if ui.selectable_label(r.level == l, l.to_string()).clicked() {- r.level = l;- }+ for (label, field) in [("Left Indent:", "leftIndent"), ("Right Indent:", "rightIndent")] {+ crate::rtl::label(ui, crate::i18n::tr(lang, label));+ if let Some(v) = sized(ui, &mut |ui| crate::widgets::measure(ui, &key(field), rule[field].as_f64(), h_units, 80.0)) {+ d.fields.insert(key(field), json!(v));}- });+ }ui.end_row();});- }- ui.add_space(8.0);- crate::rtl::label(ui, egui::RichText::new(tr("Options")).font(semibold(12.0)));- let has_toc = d.b("hasToc");- ui.add_enabled_ui(has_toc, |ui| check(ui, d, "replace", &tr("Replace Existing Table of Contents")));- if let Some(st) = d.fields.get("status").and_then(Value::as_str) {- ui.add_space(6.0);- crate::rtl::label(ui, egui::RichText::new(st).color(crate::theme::Tokens::get(ui.ctx()).text_dim));- }- d.fields.insert("included".into(), json!(rows));- d.fields.insert("selected".into(), json!(sel));- d.fields.insert("other".into(), json!(other));- d.fields.insert("titleStyle".into(), json!(title_style));+ });}-/// The params a previewing dialog shows on the page (its interaction is open while it is set).-const PREVIEWED: &str = "_previewed";-/// Edit › Step and Repeat, as in InDesign: Repeat (Count, or Rows and Columns with Create as a-/// grid), Offset (Vertical, Horizontal, in the document's ruler units) and Preview, which shows-/// the copies on the page while the dialog is open.-fn step_and_repeat_dialog(app: &mut DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {- let (hu, vu) = app.session.active().map_or((Unit::Picas, Unit::Picas), |s| (s.doc.settings.horizontal_units, s.doc.settings.vertical_units));+/// Document Footnote Options: Numbering and Formatting / Layout tabs.+fn footnote_options(app: &mut DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {+ ui.horizontal(|ui| {+ for (tab, label) in [("numbering", "Numbering and Formatting"), ("layout", "Layout")] {+ if ui.selectable_label(d.s("tab") == tab, crate::rtl::widget(ui, crate::i18n::tr(&app.ui.language, label))).clicked() {+ d.fields.insert("tab".into(), json!(tab));+ }+ }+ });+ ui.separator();+ let head = |ui: &mut egui::Ui, t: &str| {+ ui.add_space(4.0);+ crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, t)).font(semibold(12.0)));+ };+ if d.s("tab") == "layout" {+ head(ui, "Spacing Options");+ egui::Grid::new("fn_sp").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Minimum Space Before First Footnote:"));+ text_field(ui, d, "spaceBefore", 70.0);+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Space Between Footnotes:"));+ text_field(ui, d, "spaceBetween", 70.0);+ ui.end_row();+ });+ head(ui, "First Baseline");+ egui::Grid::new("fn_fb").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Offset:"));+ translated_combo(+ &app.ui.language,+ ui,+ d,+ "firstBaseline",+ &[+ ("ascent", "Ascent"),+ ("capHeight", "Cap Height"),+ ("leading", "Leading"),+ ("xHeight", "x Height"),+ ("emboxHeight", "Em Box Height"),+ ("fixed", "Fixed"),+ ],+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Min:"));+ text_field(ui, d, "firstBaselineMin", 70.0);+ ui.end_row();+ });+ check(ui, d, "spanColumns", crate::i18n::tr(&app.ui.language, "Span Footnotes Across Columns"));+ head(ui, "Rule Above");+ check(ui, d, "rule.on", crate::i18n::tr(&app.ui.language, "Rule On"));+ egui::Grid::new("fn_rule").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Weight:"));+ text_field(ui, d, "rule.weight", 60.0);+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Color:"));+ let swatches: Vec<String> = app.session.active().map(|st| st.doc.swatches.iter().map(|s| s.name.clone()).collect()).unwrap_or_default();+ let opts: Vec<(&str, &str)> = swatches.iter().map(|n| (n.as_str(), n.as_str())).collect();+ combo(ui, d, "rule.color", &opts);+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Width:"));+ text_field(ui, d, "rule.width", 60.0);+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Offset:"));+ text_field(ui, d, "rule.offset", 60.0);+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Left Indent:"));+ text_field(ui, d, "rule.leftIndent", 60.0);+ ui.end_row();+ });+ return;+ }+ head(ui, "Numbering");+ egui::Grid::new("fn_num").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Style:"));+ translated_combo(+ &app.ui.language,+ ui,+ d,+ "style",+ &[+ ("arabic", "1, 2, 3, 4..."),+ ("upperRoman", "I, II, III, IV..."),+ ("lowerRoman", "i, ii, iii, iv..."),+ ("upperLetters", "A, B, C, D..."),+ ("lowerLetters", "a, b, c, d..."),+ ("arabicLeadingZero", "01, 02, 03..."),+ ("symbols", "*, †, ‡, §..."),+ ("kanji", "一, 二, 三, 四..."),+ ],+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Start at:"));+ text_field(ui, d, "startAt", 60.0);+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Restart Numbering Every:"));+ translated_combo(+ &app.ui.language,+ ui,+ d,+ "restart",+ &[("never", "Never (continuous)"), ("page", "Page"), ("spread", "Spread"), ("section", "Section")],+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Show Prefix/Suffix in:"));+ translated_combo(+ &app.ui.language,+ ui,+ d,+ "affixIn",+ &[("none", "None"), ("reference", "Footnote Reference"), ("text", "Footnote Text"), ("both", "Both")],+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Prefix:"));+ text_field(ui, d, "prefix", 60.0);+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Suffix:"));+ text_field(ui, d, "suffix", 60.0);+ ui.end_row();+ });+ head(ui, "Footnote Reference Number in Text");+ egui::Grid::new("fn_ref").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Position:"));+ translated_combo(+ &app.ui.language,+ ui,+ d,+ "refPosition",+ &[+ ("superscript", "Apply Superscript"),+ ("subscript", "Apply Subscript"),+ ("normal", "Apply Normal"),+ ("otSuperscript", "OpenType Superscript"),+ ],+ );+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Character Style:"));+ style_combo(app, ui, d, "refCharStyle", true);+ ui.end_row();+ });+ head(ui, "Footnote Formatting");+ egui::Grid::new("fn_fmt").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Paragraph Style:"));+ style_combo(app, ui, d, "paraStyle", false);+ ui.end_row();+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Separator:"));+ text_field(ui, d, "separator", 60.0);+ ui.end_row();+ });+}++/// One parameter of a command, parsed from its params documentation+/// (`{name, type?: a|b|c, count?, flag?: bool, …}`).+#[derive(Clone, Debug, PartialEq)]+pub struct CommandField {+ pub key: String,+ pub optional: bool,+ /// Enumerated values (`a|b|c`).+ pub choices: Vec<String>,+ pub boolean: bool,+ /// The documented value spec (shown as a hint).+ pub hint: String,+}++/// Parameters of a command from its documentation string: the top-level keys of the first `{…}`.+pub fn command_fields(doc: &str) -> Vec<CommandField> {+ let Some(start) = doc.find('{') else { return vec![] };+ let mut depth = 0i32;+ let mut end = doc.len();+ for (i, c) in doc[start..].char_indices() {+ match c {+ '{' | '[' | '(' => depth += 1,+ '}' | ']' | ')' => {+ depth -= 1;+ if depth == 0 {+ end = start + i;+ break;+ }+ }+ _ => {}+ }+ }+ let body = &doc[start + 1..end];+ let mut parts = Vec::new();+ let (mut depth, mut from) = (0i32, 0usize);+ for (i, c) in body.char_indices() {+ match c {+ '{' | '[' | '(' => depth += 1,+ '}' | ']' | ')' => depth -= 1,+ ',' if depth == 0 => {+ parts.push(&body[from..i]);+ from = i + 1;+ }+ _ => {}+ }+ }+ parts.push(&body[from..]);+ let ident = |s: &str| !s.is_empty() && s.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') && !s.starts_with(|c: char| c.is_ascii_digit());+ let mut out = Vec::new();+ for part in parts {+ // `key`, `key?`, `key: spec` or `key (spec)`: the key is the leading word.+ let part = part.trim();+ let k_end = part.find(|c: char| c.is_whitespace() || c == ':' || c == '(').unwrap_or(part.len());+ let (k, rest) = part.split_at(k_end);+ let rest = rest.trim_start();+ let spec = match rest.strip_prefix(':') {+ Some(v) => v.trim(),+ None => rest.strip_prefix('(').and_then(|r| r.strip_suffix(')')).unwrap_or(rest).trim(),+ };+ let optional = k.ends_with('?');+ let key = k.trim_end_matches('?');+ if !ident(key) || out.iter().any(|f: &CommandField| f.key == key) {+ continue;+ }+ let word = spec.split_whitespace().next().unwrap_or("");+ let choices: Vec<String> =+ if word.contains('|') && word.split('|').all(ident) { word.split('|').map(str::to_string).collect() } else { vec![] };+ let boolean = spec.starts_with("bool") || spec.starts_with("true|false") || spec.starts_with("true") && spec.len() <= 5;+ out.push(CommandField { key: key.into(), optional, choices: if boolean { vec![] } else { choices }, boolean, hint: spec.into() });+ }+ out+}++fn humanize(key: &str) -> String {+ let mut s = String::new();+ for (i, c) in key.chars().enumerate() {+ if i == 0 {+ s.extend(c.to_uppercase());+ } else if c.is_uppercase() {+ s.push(' ');+ s.extend(c.to_lowercase());+ } else {+ s.push(c);+ }+ }+ s+}++/// A form for any command, from its parameter documentation.+fn command_form(app: &crate::DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {+ let doc = designcraft_engine::find_command(&d.id[4..]).map_or("", |c| c.params);+ let fields = command_fields(doc);+ let dim = crate::theme::Tokens::get(ui.ctx()).text_dim;+ egui::Grid::new("cmdform").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {+ for f in &fields {+ ui.label(crate::rtl::widget(+ ui,+ format!("{}{}", crate::i18n::tr(&app.ui.language, &humanize(&f.key)), if f.optional { "" } else { " *" }),+ ));+ if f.boolean {+ check(ui, d, &f.key, "");+ } else if !f.choices.is_empty() {+ let mut opts: Vec<(&str, &str)> = vec![("", "—")];+ let labels: Vec<_> = f.choices.iter().map(|c| humanize(c)).collect();+ opts.extend(f.choices.iter().zip(&labels).map(|(value, label)| (value.as_str(), crate::i18n::tr(&app.ui.language, label))));+ combo(ui, d, &f.key, &opts);+ } else {+ let mut s = d.s(&f.key);+ let hint = if f.hint.is_empty() { String::new() } else { f.hint.clone() };+ if ui.add(egui::TextEdit::singleline(&mut s).hint_text(egui::RichText::new(hint).color(dim)).desired_width(240.0)).changed() {+ d.fields.insert(f.key.clone(), Value::String(s));+ }+ }+ ui.end_row();+ }+ });+ if let Some(st) = d.fields.get("status").and_then(Value::as_str) {+ ui.label(egui::RichText::new(st).color(crate::theme::Tokens::get(ui.ctx()).text_dim));+ }+}++const STEP_AND_REPEAT: &str = "cmd:edit.stepAndRepeat";+const TOC: &str = "cmd:toc.generate";++/// One included style of the Table of Contents dialog, as `toc.generate` takes it, with the+/// separator in the dialog's notation (`^t` a tab).+#[derive(Clone, Debug, Default, Deserialize, Serialize)]+#[serde(rename_all = "camelCase", default)]+struct TocRow {+ style: String,+ level: u8,+ entry_style: String,+ page_number: String,+ separator: String,++ /// Character styles of the page number and the separator; "" is [None].++ page_number_style: String,++ separator_style: String,++ sort: bool,+}++fn toc_separator_shown(s: &str) -> String {+ s.replace('\t', "^t").replace('\u{2003}', "^m").replace('\u{2002}', "^>")+}++fn toc_separator_typed(s: &str) -> String {+ s.replace("^t", "\t").replace("^m", "\u{2003}").replace("^>", "\u{2002}")+}++fn toc_rows(d: &Dialog) -> Vec<TocRow> {+ d.fields.get("included").cloned().and_then(|v| serde_json::from_value(v).ok()).unwrap_or_default()+}++/// Layout › Table of Contents…: prefilled from the document's table of contents when it has one.+pub fn open_toc(app: &mut DesignApp) {+ let Some(st) = app.session.active() else { return };+ let d = &st.doc;+ let styles: Vec<&str> = d.styles.paragraph.iter().map(|p| p.name.as_str()).filter(|n| *n != designcraft_doc::NO_PARA_STYLE).collect();++ let char_styles: Vec<&str> = d.styles.character.iter().map(|c| c.name.as_str()).filter(|n| *n != designcraft_doc::NO_CHAR_STYLE).collect();+ let toc = d.toc.as_ref().filter(|t| d.story(t.story).is_some());+ let rows: Vec<TocRow> = toc+ .map(|t| {+ t.entries+ .iter()+ .map(|e| TocRow {+ style: e.style.clone(),+ level: e.level,+ entry_style: e.entry_style.clone().unwrap_or_default(),+ page_number: match (t.page_numbers, e.page_number) {+ (false, _) | (_, designcraft_doc::TocPageNumber::None) => "none",+ (_, designcraft_doc::TocPageNumber::Before) => "before",+ _ => "after",+ }+ .into(),+ separator: toc_separator_shown(e.separator.as_deref().unwrap_or("\t")),++ page_number_style: e.page_number_style.clone().unwrap_or_default(),++ separator_style: e.separator_style.clone().unwrap_or_default(),++ sort: e.sort,+ })+ .collect()+ })+ .unwrap_or_default();+ let fields = json!({+ "title": toc.map_or("Contents", |t| t.title.as_str()),+ "titleStyle": toc.and_then(|t| t.title_style.clone()).unwrap_or_default(),+ "included": rows,+ "selected": 0,+ "styles": styles,++ "charStyles": char_styles,+ "hasToc": toc.is_some(),+ "replace": toc.is_some(),+ });+ app.ui.dialog = Some(Dialog::new(TOC, fields));+}++/// The dialog's fields as `toc.generate` params. A new frame goes on the page in view.+fn toc_params(app: &DesignApp, d: &Dialog) -> Value {+ let entries: Vec<Value> = toc_rows(d)+ .iter()+ .map(|r| {+ let mut e = json!({"style": r.style, "level": r.level, "separator": toc_separator_typed(&r.separator)});+ if !r.entry_style.is_empty() {+ e["entryStyle"] = json!(r.entry_style);+ }+ if !r.page_number.is_empty() {+ e["pageNumber"] = json!(r.page_number);+ }++ if !r.page_number_style.is_empty() {++ e["pageNumberStyle"] = json!(r.page_number_style);++ }++ if !r.separator_style.is_empty() {++ e["separatorStyle"] = json!(r.separator_style);++ }++ if r.sort {++ e["sort"] = json!(true);++ }+ e+ })+ .collect();+ let mut p = json!({"title": d.s("title"), "entries": entries, "replace": d.b("replace")});+ let title_style = d.s("titleStyle");+ if !title_style.is_empty() {+ p["titleStyle"] = json!(title_style);+ }+ if let Some(page) = crate::canvas::current_page(app) {+ p["page"] = json!(page + 1);+ }+ p+}+- /// A paragraph style menu whose first choice, stored as "", is the generated style `auto`.++/// A style menu whose first choice, stored as "", is `auto` (the generated paragraph style, or++/// [None] for a character style).+fn toc_style_combo(ui: &mut egui::Ui, salt: &str, styles: &[String], auto: &str, cur: &mut String) -> bool {+ let shown = if cur.is_empty() { auto.to_string() } else { cur.clone() };+ let mut changed = false;+ egui::ComboBox::from_id_salt(("toc_style", salt)).selected_text(shown).width(200.0).show_ui(ui, |ui| {+ if ui.selectable_label(cur.is_empty(), auto).clicked() {+ cur.clear();+ changed = true;+ }+ for n in styles.iter().filter(|n| *n != auto) {+ if ui.selectable_label(cur == n, n.as_str()).clicked() {+ *cur = n.clone();+ changed = true;+ }+ }+ });+ changed+}++/// Layout › Table of Contents: the title and its style, the paragraph styles to include (Add /+/// Remove between the two lists) and, for the selected one, its entry style, page number- /// position, separator and level.++/// position and separator with their character styles, alphabetical sorting and level.+fn toc_dialog(app: &mut DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {+ let lang = app.ui.language.clone();+ let tr = |s: &str| crate::i18n::tr(&lang, s).to_string();+ let styles: Vec<String> = d.fields.get("styles").cloned().and_then(|v| serde_json::from_value(v).ok()).unwrap_or_default();++ let char_styles: Vec<String> = d.fields.get("charStyles").cloned().and_then(|v| serde_json::from_value(v).ok()).unwrap_or_default();+ let mut rows = toc_rows(d);+ let mut sel = d.n("selected").map_or(0, |n| n.max(0.0) as usize);+ let mut other = d.s("other");+ let mut title_style = d.s("titleStyle");+ egui::Grid::new("toc_title").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, tr("Title:"));+ text_field(ui, d, "title", 200.0);+ crate::rtl::label(ui, tr("Style:"));+ toc_style_combo(ui, "title", &styles, "TOC Title", &mut title_style);+ ui.end_row();+ });+ ui.add_space(8.0);+ crate::rtl::label(ui, egui::RichText::new(tr("Styles in Table of Contents")).font(semibold(12.0)));+ let others: Vec<&String> = styles.iter().filter(|n| !rows.iter().any(|r| &r.style == *n)).collect();+ ui.horizontal_top(|ui| {+ ui.vertical(|ui| {+ crate::rtl::label(ui, tr("Include Paragraph Styles:"));+ egui::Frame::group(ui.style()).show(ui, |ui| {+ ui.set_width(200.0);+ egui::ScrollArea::vertical().id_salt("toc_included").max_height(150.0).min_scrolled_height(150.0).show(ui, |ui| {+ for (i, r) in rows.iter().enumerate() {+ let indent = " ".repeat(usize::from(r.level.saturating_sub(1)));+ if ui.selectable_label(i == sel, format!("{indent}{}", r.style)).clicked() {+ sel = i;+ }+ }+ });+ });+ });+ ui.vertical(|ui| {+ ui.add_space(40.0);+ if ui.button(tr("« Add")).clicked() && others.iter().any(|n| **n == other) {+ let level = u8::try_from(rows.len() + 1).unwrap_or(9).min(9);+ rows.push(TocRow { style: other.clone(), level, page_number: "after".into(), separator: "^t".into(), ..Default::default() });+ sel = rows.len() - 1;+ other.clear();+ }+ if ui.button(tr("Remove »")).clicked() && sel < rows.len() {+ other = rows.remove(sel).style;+ sel = sel.min(rows.len().saturating_sub(1));+ }+ });+ ui.vertical(|ui| {+ crate::rtl::label(ui, tr("Other Styles:"));+ egui::Frame::group(ui.style()).show(ui, |ui| {+ ui.set_width(200.0);+ egui::ScrollArea::vertical().id_salt("toc_other").max_height(150.0).min_scrolled_height(150.0).show(ui, |ui| {+ for n in styles.iter().filter(|n| !rows.iter().any(|r| &r.style == *n)) {+ if ui.selectable_label(*n == other, n.as_str()).clicked() {+ other = n.clone();+ }+ }+ });+ });+ });+ });+ if let Some(r) = rows.get_mut(sel) {+ ui.add_space(8.0);+ crate::rtl::label(ui, egui::RichText::new(format!("{} {}", tr("Style:"), r.style)).font(semibold(12.0)));- egui::Grid::new("toc_entry").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {++ let none = designcraft_doc::NO_CHAR_STYLE;++ egui::Grid::new("toc_entry").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {+ crate::rtl::label(ui, tr("Entry Style:"));+ let auto = format!("TOC Level {}", r.level.clamp(1, 9));+ toc_style_combo(ui, "entry", &styles, &auto, &mut r.entry_style);+ ui.end_row();+ crate::rtl::label(ui, tr("Page Number:"));+ let choices = [("after", "After Entry"), ("before", "Before Entry"), ("none", "No Page Number")];+ let cur = choices.iter().find(|(v, _)| *v == r.page_number).map_or("After Entry", |(_, l)| l);+ egui::ComboBox::from_id_salt("toc_page_number").selected_text(tr(cur)).width(200.0).show_ui(ui, |ui| {+ for (v, l) in choices {+ if ui.selectable_label(r.page_number == v, tr(l)).clicked() {+ r.page_number = v.into();+ }+ }+ });++ crate::rtl::label(ui, tr("Style:"));++ toc_style_combo(ui, "page_number", &char_styles, none, &mut r.page_number_style);+ ui.end_row();+ crate::rtl::label(ui, tr("Between Entry and Number:"));+ ui.add(egui::TextEdit::singleline(&mut r.separator).desired_width(80.0).horizontal_align(egui::Align::Min));++ crate::rtl::label(ui, tr("Style:"));++ toc_style_combo(ui, "separator", &char_styles, none, &mut r.separator_style);++ ui.end_row();++ crate::rtl::label(ui, "");++ ui.checkbox(&mut r.sort, tr("Sort Entries in Alphabetical Order"));+ ui.end_row();+ crate::rtl::label(ui, tr("Level:"));+ egui::ComboBox::from_id_salt("toc_level").selected_text(r.level.to_string()).width(60.0).show_ui(ui, |ui| {+ for l in 1..=9u8 {+ if ui.selectable_label(r.level == l, l.to_string()).clicked() {+ r.level = l;+ }+ }+ });+ ui.end_row();+ });+ }+ ui.add_space(8.0);+ crate::rtl::label(ui, egui::RichText::new(tr("Options")).font(semibold(12.0)));+ let has_toc = d.b("hasToc");+ ui.add_enabled_ui(has_toc, |ui| check(ui, d, "replace", &tr("Replace Existing Table of Contents")));+ if let Some(st) = d.fields.get("status").and_then(Value::as_str) {+ ui.add_space(6.0);+ crate::rtl::label(ui, egui::RichText::new(st).color(crate::theme::Tokens::get(ui.ctx()).text_dim));+ }+ d.fields.insert("included".into(), json!(rows));+ d.fields.insert("selected".into(), json!(sel));+ d.fields.insert("other".into(), json!(other));+ d.fields.insert("titleStyle".into(), json!(title_style));+}+/// The params a previewing dialog shows on the page (its interaction is open while it is set).+const PREVIEWED: &str = "_previewed";++/// Edit › Step and Repeat, as in InDesign: Repeat (Count, or Rows and Columns with Create as a+/// grid), Offset (Vertical, Horizontal, in the document's ruler units) and Preview, which shows+/// the copies on the page while the dialog is open.+fn step_and_repeat_dialog(app: &mut DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {+ let (hu, vu) = app.session.active().map_or((Unit::Picas, Unit::Picas), |s| (s.doc.settings.horizontal_units, s.doc.settings.vertical_units));for (k, v) in [("count", json!("1")),("rows", json!("1")),diff --cc crates/ui-egui/src/i18n.rsindex 6d4913c77,5cb6a7e09..ff39b60f0--- a/crates/ui-egui/src/i18n.rs+++ b/crates/ui-egui/src/i18n.rs@@@ -3877,445 -3106,23 +3877,456 @@@ const TABLE: &[(&str, [&str; 5])] = &// Paragraph Rules.("Paragraph Rules…", ["Absatzlinien …", "Filets de paragraphe…", "Filetes de párrafo…", "段落境界線…", "段落线…"]),("Paragraph Rules", ["Absatzlinien", "Filets de paragraphe", "Filetes de párrafo", "段落境界線", "段落线"]),- ("Rule Below", ["Linie unterhalb", "Filet après", "Filete después", "後境界線", "下方横线"]),- ("Tint:", ["Farbton:", "Teinte:", "Matiz:", "濃淡:", "色调:"]),+ ("Justification…", ["Blocksatzeinstellungen …", "Justification…", "Justificación…", "両端揃え…", "两端对齐…"]),+ ("Rule Below", ["Linie unterhalb", "Filet au-dessous", "Filete después", "後境界線", "下方横线"]),+ ("Tint:", ["Farbton:", "Teinte :", "Matiz:", "濃淡:", "色调:"]),+ ("Apply To:", ["Anwenden auf:", "Appliquer à :", "Aplicar a:", "適用先:", "应用于:"]),+ ("Frame", ["Rahmen", "Bloc", "Marco", "フレーム", "框架"]),("Slug", ["Infobereich", "Ligne-bloc", "Indicaciones", "印刷可能領域", "辅助信息区"]),("Presentation", ["Präsentation", "Présentation", "Presentación", "プレゼンテーション", "演示文稿"]),- ("Extras", ["Extras", "Options supplémentaires", "Extras", "エクストラ", "附加"]),+ ("Extras", ["Extras", "Extras", "Extras", "エクストラ", "附加"]),("Column", ["Spalte", "Colonne", "Columna", "段", "栏"]),+ // File › New › Document+ ("Recent", ["Zuletzt verwendet", "Récents", "Recientes", "最近使用", "最近"]),+ ("Saved", ["Gespeichert", "Enregistrés", "Guardados", "保存済み", "已保存"]),+ ("[Default]", ["[Standard]", "[Par défaut]", "[Predeterminado]", "[初期設定]", "[默认]"]),+ ("Your Recent Items", ["Zuletzt verwendete Elemente", "Éléments récents", "Elementos recientes", "最近使用した項目", "最近使用的项目"]),+ (+ "Saved Presets",+ ["Gespeicherte Vorgaben", "Paramètres prédéfinis enregistrés", "Ajustes preestablecidos guardados", "保存済みプリセット", "已保存的预设"],+ ),+ (+ "Blank Document Presets",+ [+ "Vorgaben für leere Dokumente",+ "Paramètres prédéfinis de document vierge",+ "Ajustes preestablecidos de documento en blanco",+ "空のドキュメントプリセット",+ "空白文档预设",+ ],+ ),+ ("Delete Preset", ["Vorgabe löschen", "Supprimer le paramètre prédéfini", "Eliminar ajuste preestablecido", "プリセットを削除", "删除预设"]),+ (+ "Preset Details",+ ["Vorgabedetails", "Détails du paramètre prédéfini", "Detalles del ajuste preestablecido", "プリセットの詳細", "预设详细信息"],+ ),+ ("Document Name", ["Dokumentname", "Nom du document", "Nombre del documento", "ドキュメント名", "文档名称"]),+ (+ "Save Document Preset",+ [+ "Dokumentvorgabe speichern",+ "Enregistrer le paramètre prédéfini de document",+ "Guardar ajuste preestablecido de documento",+ "ドキュメントプリセットを保存",+ "存储文档预设",+ ],+ ),+ (+ "Save Document Preset As:",+ [+ "Dokumentvorgabe speichern unter:",+ "Enregistrer le paramètre prédéfini de document sous :",+ "Guardar ajuste preestablecido de documento como:",+ "ドキュメントプリセットの保存名:",+ "存储文档预设为:",+ ],+ ),+ ("Preset Name", ["Vorgabename", "Nom du paramètre prédéfini", "Nombre del ajuste preestablecido", "プリセット名", "预设名称"]),+ ("Save Preset", ["Vorgabe speichern", "Enregistrer le paramètre prédéfini", "Guardar ajuste preestablecido", "プリセットを保存", "存储预设"]),+ ("Start #", ["Startseitennr.", "N° de début", "N.º inicial", "開始ページ番号", "起始页码"]),+ ("Column Gutter", ["Spaltenabstand", "Gouttière", "Medianil", "列間隔", "栏间距"]),+ // Layout › Numbering & Section Options+ ("Start Section", ["Abschnittsanfang", "Début de section", "Iniciar sección", "セクション開始", "开始新章节"]),+ (+ "Automatic Page Numbering",+ [+ "Automatische Seitennummerierung",+ "Numérotation automatique des pages",+ "Numeración de páginas automática",+ "自動ページ番号",+ "自动编排页码",+ ],+ ),+ (+ "Start Page Numbering at:",+ ["Seitennummerierung beginnen bei:", "Commencer la numérotation à :", "Iniciar numeración de páginas en:", "開始ページ番号:", "起始页码:"],+ ),+ ("Section Prefix:", ["Abschnittspräfix:", "Préfixe de section :", "Prefijo de sección:", "セクションプレフィックス:", "章节前缀:"]),+ ("Section Marker:", ["Abschnittsmarke:", "Marqueur de section :", "Marcador de sección:", "セクションマーカー:", "章节标志符:"]),+ (+ "Include Prefix when Numbering Pages",+ [+ "Präfix in Seitennummerierung einschließen",+ "Inclure le préfixe lors de la numérotation des pages",+ "Incluir prefijo al numerar páginas",+ "ページ番号にプレフィックスを含める",+ "编排页码时包含前缀",+ ],+ ),+ (+ "Document Chapter Numbering",+ [+ "Kapitelnummerierung des Dokuments",+ "Numérotation des chapitres du document",+ "Numeración de capítulos del documento",+ "ドキュメントの章番号",+ "文档章节编号",+ ],+ ),+ (+ "Automatic Chapter Numbering",+ [+ "Automatische Kapitelnummerierung",+ "Numérotation automatique des chapitres",+ "Numeración de capítulos automática",+ "自動章番号",+ "自动为章节编号",+ ],+ ),+ (+ "Start Chapter Numbering at:",+ [+ "Kapitelnummerierung beginnen bei:",+ "Commencer la numérotation des chapitres à :",+ "Iniciar numeración de capítulos en:",+ "開始章番号:",+ "起始章节编号:",+ ],+ ),+ (+ "Same as Previous Document in the Book",+ [+ "Wie vorheriges Dokument im Buch",+ "Identique au document précédent du livre",+ "Igual que el documento anterior del libro",+ "ブック内の前のドキュメントと同じ",+ "与书籍中的上一文档相同",+ ],+ ),+ ("Book Name:", ["Buchname:", "Nom du livre :", "Nombre del libro:", "ブック名:", "书籍名称:"]),+ ("N/A", ["–", "S.O.", "N/D", "なし", "不适用"]),+ // Paragraph Style Options: Paragraph Border, Paragraph Shading, Keep Options, Span Columns, Bullets and Numbering.+ ("Paragraph Border", ["Absatzrahmen", "Contour de paragraphe", "Borde de párrafo", "段落囲み罫", "段落边框"]),+ ("Paragraph Shading", ["Absatzschattierung", "Ombrage de paragraphe", "Sombreado de párrafo", "段落の背景色", "段落底纹"]),+ ("Keep Options", ["Umbruchoptionen", "Options d'enchaînement", "Opciones de separación", "段落分離禁止オプション", "保持选项"]),+ ("Span Columns", ["Spalten überspannen", "Étendre sur les colonnes", "Abarcar columnas", "段抜きと段分割", "跨栏"]),+ ("Keep with Next:", ["Nicht trennen von nächsten:", "Lier aux suivantes:", "Conservar con siguientes:", "次の段落と分離禁止:", "与下一段保持:"]),+ ("Keep Lines Together", ["Zeilen nicht trennen", "Lignes solidaires", "Conservar líneas juntas", "行を分離しない", "保持各行同页"]),+ (+ "All Lines in Paragraph",+ ["Alle Zeilen im Absatz", "Toutes les lignes du paragraphe", "Todas las líneas del párrafo", "段落のすべての行", "段落中所有行"],+ ),+ (+ "At Start/End of Paragraph",+ ["Am Anfang/Ende des Absatzes", "Au début/à la fin du paragraphe", "Al inicio/final del párrafo", "段落の始めと終わり", "在段落开头/结尾"],+ ),+ ("End:", ["Ende:", "Fin:", "Final:", "終了位置:", "结束:"]),+ ("Start Paragraph:", ["Absatzbeginn:", "Début de paragraphe:", "Inicio de párrafo:", "段落の開始位置:", "段落开始:"]),+ ("Anywhere", ["Überall", "N'importe où", "En cualquier lugar", "任意の位置", "任意位置"]),+ ("In Next Column", ["In nächster Spalte", "Dans la colonne suivante", "En la siguiente columna", "次の段", "于下一栏"]),+ ("In Next Frame", ["In nächstem Rahmen", "Dans le bloc suivant", "En el siguiente marco", "次のフレーム", "于下一框架"]),+ ("On Next Page", ["Auf nächster Seite", "Sur la page suivante", "En la página siguiente", "次のページ", "于下一页"]),+ (+ "On Next Odd Page",+ ["Auf nächster ungerader Seite", "Sur la page impaire suivante", "En la siguiente página impar", "次の奇数ページ", "于下一奇数页"],+ ),+ (+ "On Next Even Page",+ ["Auf nächster gerader Seite", "Sur la page paire suivante", "En la siguiente página par", "次の偶数ページ", "于下一偶数页"],+ ),+ ("Paragraph Layout:", ["Absatzlayout:", "Disposition du paragraphe:", "Diseño de párrafo:", "段落レイアウト:", "段落版面:"]),+ ("Single Column", ["Eine Spalte", "Colonne simple", "Una columna", "単一段", "单栏"]),+ ("Split Column", ["Spalte unterteilen", "Diviser la colonne", "Dividir columna", "段分割", "拆分栏"]),+ ("Columns:", ["Spalten:", "Colonnes :", "Columnas:", "段:", "栏数:"]),+ ("All", ["Alle", "Toutes", "Todas", "すべて", "全部"]),+ ("Inside Gutter:", ["Innerer Spaltenabstand:", "Gouttière intérieure:", "Medianil interior:", "内側の間隔:", "内栏间距:"]),+ ("Outside Gutter:", ["Äußerer Spaltenabstand:", "Gouttière extérieure:", "Medianil exterior:", "外側の間隔:", "外栏间距:"]),+ ("List Type:", ["Listentyp:", "Type de liste:", "Tipo de lista:", "リストタイプ:", "列表类型:"]),+ ("Bullets", ["Aufzählungszeichen", "Puces", "Viñetas", "箇条書き記号", "项目符号"]),+ ("Numbers", ["Nummerierung", "Numéros", "Números", "自動番号", "编号"]),+ ("Bullet Character:", ["Aufzählungszeichen:", "Caractère de puce:", "Carácter de viñeta:", "箇条書き記号:", "项目符号字符:"]),+ ("Text After:", ["Text danach:", "Texte après:", "Texto después:", "後続テキスト:", "后续文本:"]),+ ("Gap Tint:", ["Lückenfarbton:", "Teinte de l'espace:", "Matiz del hueco:", "すき間の濃淡:", "间隙色调:"]),+ (+ "Corner Size and Shape",+ ["Eckengröße und -form", "Taille et forme des angles", "Tamaño y forma de esquinas", "角のサイズとシェイプ", "角大小和形状"],+ ),+ ("Top Left:", ["Oben links:", "En haut à gauche:", "Superior izquierda:", "左上:", "左上:"]),+ ("Top Right:", ["Oben rechts:", "En haut à droite:", "Superior derecha:", "右上:", "右上:"]),+ ("Bottom Right:", ["Unten rechts:", "En bas à droite:", "Inferior derecha:", "右下:", "右下:"]),+ ("Bottom Left:", ["Unten links:", "En bas à gauche:", "Inferior izquierda:", "左下:", "左下:"]),+ ("Rounded", ["Abgerundet", "Arrondi", "Redondeado", "角丸", "圆角"]),+ ("Inverse Rounded", ["Umgekehrt abgerundet", "Arrondi inversé", "Redondeado inverso", "逆角丸", "反向圆角"]),+ ("Inset", ["Eingezogen", "En retrait", "Hundido", "内側に切り欠き", "内凹"]),+ ("Fancy", ["Verziert", "Fantaisie", "Decorativo", "装飾", "花式"]),+ ("Top Edge:", ["Obere Kante:", "Bord supérieur:", "Borde superior:", "上端:", "上边缘:"]),+ ("Bottom Edge:", ["Untere Kante:", "Bord inférieur:", "Borde inferior:", "下端:", "下边缘:"]),+ ("Em Box Top", ["Geviert oben", "Haut du cadratin", "Parte superior del cuadratín", "仮想ボディの上", "全角框顶部"]),+ ("Descent", ["Unterlänge", "Jambage inférieur", "Descendente", "ディセント", "下伸部"]),+ ("Em Box Bottom", ["Geviert unten", "Bas du cadratin", "Parte inferior del cuadratín", "仮想ボディの下", "全角框底部"]),+ (+ "Display Border if Paragraph Splits Across Frames/Columns",+ [+ "Rahmen anzeigen, wenn der Absatz auf Rahmen/Spalten verteilt ist",+ "Afficher le contour si le paragraphe est réparti sur plusieurs blocs/colonnes",+ "Mostrar borde si el párrafo se divide entre marcos/columnas",+ "段落がフレームや段をまたぐときに囲み罫を表示",+ "段落跨框架/栏拆分时显示边框",+ ],+ ),+ (+ "Merge Consecutive Borders and Shading",+ [+ "Aufeinanderfolgende Rahmen und Schattierungen zusammenführen",+ "Fusionner les contours et trames consécutifs",+ "Combinar bordes y sombreados consecutivos",+ "連続する囲み罫と背景色を結合",+ "合并连续的边框和底纹",+ ],+ ),+ ("Clip to Frame", ["Auf Rahmen beschneiden", "Découper selon le bloc", "Recortar al marco", "フレームでクリップ", "剪切到框架"]),+ (+ "Do not Print or Export",+ ["Nicht drucken oder exportieren", "Ne pas imprimer ni exporter", "No imprimir ni exportar", "印刷・書き出ししない", "不打印或导出"],+ ),+ ("Space Before Span:", ["Abstand vor Überspannung:", "Espace avant l'étendue:", "Espacio antes de abarcar:", "段抜き前のアキ:", "跨栏前间距:"]),+ (+ "Space After Span:",+ ["Abstand nach Überspannung:", "Espace après l'étendue:", "Espacio después de abarcar:", "段抜き後のアキ:", "跨栏后间距:"],+ ),+ ("Space Before Split:", ["Abstand vor Teilung:", "Espace avant la division:", "Espacio antes de dividir:", "段分割前のアキ:", "拆分前间距:"]),+ ("Space After Split:", ["Abstand nach Teilung:", "Espace après la division:", "Espacio después de dividir:", "段分割後のアキ:", "拆分后间距:"]),+ ("Level:", ["Ebene:", "Niveau:", "Nivel:", "レベル:", "级别:"]),+ ("Glyphs…", ["Glyphen…", "Glyphes…", "Glifos…", "字形…", "字形…"]),+ ("(Paragraph Font)", ["(Absatzschrift)", "(Police du paragraphe)", "(Fuente del párrafo)", "(段落のフォント)", "(段落字体)"]),+ (+ "Restart Numbers at This Level After:",+ [+ "Nummerierung auf dieser Ebene neu beginnen nach:",+ "Recommencer la numérotation à ce niveau après:",+ "Reiniciar números en este nivel después de:",+ "このレベルの番号を振り直すきっかけ:",+ "在此级别后重新编号:",+ ],+ ),+ (+ "Any Previous Level",+ ["Einer beliebigen höheren Ebene", "Tout niveau précédent", "Cualquier nivel anterior", "任意の上位レベル", "任何上一级别"],+ ),+ ("Tab Position:", ["Tabulatorposition:", "Position de la tabulation:", "Posición de tabulación:", "タブ位置:", "制表符位置:"]),+ (+ "Paragraph Borders and Shading…",+ [+ "Absatzrahmen und -schattierung…",+ "Contours et trames de paragraphe…",+ "Bordes y sombreado de párrafo…",+ "段落囲み罫と段落背景色…",+ "段落边框和底纹…",+ ],+ ),+ (+ "Paragraph Borders and Shading",+ [+ "Absatzrahmen und -schattierung",+ "Contours et trames de paragraphe",+ "Bordes y sombreado de párrafo",+ "段落囲み罫と段落背景色",+ "段落边框和底纹",+ ],+ ),+ ("Span Columns…", ["Spalten überspannen…", "Étendre sur les colonnes…", "Abarcar columnas…", "段抜きと段分割…", "跨栏…"]),+ (+ "Bullets and Numbering…",+ ["Aufzählungszeichen und Nummerierung…", "Puces et numérotation…", "Viñetas y numeración…", "箇条書き記号と番号付け…", "项目符号和编号…"],+ ),+ ("List:", ["Liste:", "Liste:", "Lista:", "リスト:", "列表:"]),+ ("Mode:", ["Modus:", "Mode:", "Modo:", "モード:", "模式:"]),+ (+ "Continue from Previous Number",+ [+ "Ab vorheriger Zahl fortfahren",+ "Continuer à partir du numéro précédent",+ "Continuar desde el número anterior",+ "前の番号から継続",+ "从上一编号继续",+ ],+ ),+ ("Start At", ["Beginnen bei", "Commencer à", "Empezar en", "開始番号", "起始编号"]),+ // Cell strokes.+ ("Strokes and Fills…", ["Konturen und Flächen …", "Contours et fonds…", "Trazos y rellenos…", "線と塗り…", "描边和填色…"]),+ ("Cell Stroke", ["Zellkontur", "Contour de cellule", "Trazo de celda", "セルの線", "单元格描边"]),+ ("Cell Fill", ["Zellfläche", "Fond de cellule", "Relleno de celda", "セルの塗り", "单元格填色"]),+ ("Cell edges", ["Zellkanten", "Bords de cellule", "Bordes de celda", "セルの境界線", "单元格边缘"]),+ (+ "Click a line to include or exclude it. Double-click selects all outer or all inner lines; triple-click selects or clears all.",+ [+ "Klicken Sie auf eine Linie, um sie ein- oder auszuschließen. Doppelklick wählt alle äußeren oder alle inneren Linien; Dreifachklick wählt alle aus oder hebt die Auswahl auf.",+ "Cliquez sur une ligne pour l'inclure ou l'exclure. Un double-clic sélectionne toutes les lignes extérieures ou intérieures ; un triple-clic sélectionne ou désélectionne tout.",+ "Haga clic en una línea para incluirla o excluirla. Doble clic selecciona todas las líneas exteriores o interiores; triple clic selecciona o borra todas.",+ "線をクリックすると、含めるか除外するかを切り替えます。ダブルクリックで外側または内側の線をすべて選択し、トリプルクリックですべてを選択または解除します。",+ "单击线条可将其包含或排除。双击选择所有外侧或所有内侧线条;三击选择或清除全部。",+ ],+ ),+ ("Swatch Options…", ["Farbfeldoptionen …", "Options de nuance…", "Opciones de muestra…", "スウォッチオプション…", "色板选项…"]),+ ("Swatch Options", ["Farbfeldoptionen", "Options de nuance", "Opciones de muestra", "スウォッチオプション", "色板选项"]),+ (+ "Color Group Options…",+ ["Farbgruppenoptionen …", "Options du groupe de couleurs…", "Opciones de grupo de colores…", "カラーグループオプション…", "颜色组选项…"],+ ),+ ("Layer Options", ["Ebenenoptionen", "Options de calque", "Opciones de capa", "レイヤーオプション", "图层选项"]),+ (+ "Layer Options for \"{name}\"…",+ [+ "Ebenenoptionen für „{name}“ …",+ "Options du calque « {name} »…",+ "Opciones de capa para «{name}»…",+ "「{name}」のレイヤーオプション…",+ "“{name}”的图层选项…",+ ],+ ),+ ("Swatch Name:", ["Farbfeldname:", "Nom de la nuance :", "Nombre de muestra:", "スウォッチ名:", "色板名称:"]),+ (+ "Name with Color Value",+ ["Name mit Farbwert", "Nommer d'après la valeur chromatique", "Nombre con valor de color", "カラー値を名前にする", "以颜色值命名"],+ ),+ ("Color Type:", ["Farbtyp:", "Type de couleur :", "Tipo de color:", "カラータイプ:", "颜色类型:"]),+ ("Process", ["Prozessfarbe", "Quadrichromie", "Cuatricromía", "プロセス", "印刷色"]),+ ("Spot", ["Volltonfarbe", "Ton direct", "Tinta plana", "特色", "专色"]),+ ("Color Mode:", ["Farbmodus:", "Mode colorimétrique :", "Modo de color:", "カラーモード:", "颜色模式:"]),+ ("Base Color:", ["Grundfarbe:", "Couleur de base :", "Color base:", "ベースカラー:", "基准颜色:"]),+ (+ "Edit the gradient's stops in the Gradient panel.",+ [+ "Die Verlaufsregler bearbeiten Sie im Verlaufsbedienfeld.",+ "Modifiez les arrêts du dégradé dans le panneau Dégradé.",+ "Edite las paradas del degradado en el panel Degradado.",+ "グラデーションの分岐点はグラデーションパネルで編集します。",+ "在“渐变”面板中编辑渐变的色标。",+ ],+ ),+ (+ "This swatch can't be edited.",+ [+ "Dieses Farbfeld kann nicht bearbeitet werden.",+ "Cette nuance ne peut pas être modifiée.",+ "Esta muestra no se puede editar.",+ "このスウォッチは編集できません。",+ "此色板无法编辑。",+ ],+ ),+ ("Light Blue", ["Hellblau", "Bleu clair", "Azul claro", "ライトブルー", "浅蓝色"]),+ ("Red", ["Rot", "Rouge", "Rojo", "レッド", "红色"]),+ ("Green", ["Grün", "Vert", "Verde", "グリーン", "绿色"]),+ ("Blue", ["Blau", "Bleu", "Azul", "ブルー", "蓝色"]),+ ("Yellow", ["Gelb", "Jaune", "Amarillo", "イエロー", "黄色"]),+ ("Magenta", ["Magenta", "Magenta", "Magenta", "マゼンタ", "洋红色"]),+ ("Cyan", ["Cyan", "Cyan", "Cian", "シアン", "青色"]),+ ("Black", ["Schwarz", "Noir", "Negro", "ブラック", "黑色"]),+ ("Orange", ["Orange", "Orange", "Naranja", "オレンジ", "橙色"]),+ ("Dark Green", ["Dunkelgrün", "Vert foncé", "Verde oscuro", "ダークグリーン", "深绿色"]),+ ("Teal", ["Blaugrün", "Bleu canard", "Verde azulado", "ティール", "蓝绿色"]),+ ("Tan", ["Hellbraun", "Fauve", "Tostado", "タン", "棕褐色"]),+ ("Brown", ["Braun", "Marron", "Marrón", "ブラウン", "褐色"]),+ ("Violet", ["Violett", "Violet", "Violeta", "バイオレット", "紫罗兰色"]),+ ("Gold", ["Gold", "Or", "Dorado", "ゴールド", "金色"]),+ ("Show Layer", ["Ebene einblenden", "Afficher le calque", "Mostrar capa", "レイヤーを表示", "显示图层"]),+ ("Lock Layer", ["Ebene fixieren", "Verrouiller le calque", "Bloquear capa", "レイヤーをロック", "锁定图层"]),+ ("Print Layer", ["Ebene drucken", "Imprimer le calque", "Imprimir capa", "レイヤーをプリント", "打印图层"]),+ (+ "Suppress Text Wrap When Layer is Hidden",+ [+ "Textumfluss bei ausgeblendeter Ebene unterdrücken",+ "Supprimer l'habillage quand le calque est masqué",+ "Suprimir ceñir texto cuando la capa está oculta",+ "非表示レイヤーのテキストの回り込みを無視",+ "图层隐藏时禁止文本绕排",+ ],+ ),+ // Document Setup+ ("Page Size:", ["Seitenformat:", "Format de page :", "Tamaño de página:", "ページサイズ:", "页面大小:"]),+ (+ "Adjust page elements to document changes",+ [+ "Seitenelemente an Dokumentänderungen anpassen",+ "Adapter les éléments de page aux modifications du document",+ "Ajustar los elementos de página a los cambios del documento",+ "ページ要素をドキュメントの変更に合わせて調整",+ "根据文档更改调整页面元素",+ ],+ ),+ (+ "Apply the changes; objects follow the new page size and margins",+ [+ "Änderungen anwenden; Objekte folgen dem neuen Seitenformat und den Rändern",+ "Appliquer les modifications ; les objets suivent le nouveau format et les marges",+ "Aplicar los cambios; los objetos siguen el nuevo tamaño de página y los márgenes",+ "変更を適用し、オブジェクトを新しいページサイズとマージンに合わせます",+ "应用更改;对象跟随新的页面大小和边距",+ ],+ ),+ ("Bleed:", ["Anschnitt:", "Fond perdu :", "Sangrado:", "裁ち落とし:", "出血:"]),+ ("Slug:", ["Infobereich:", "Ligne-bloc :", "Indicaciones:", "印刷可能領域:", "辅助信息区:"]),+ // Font menu+ ("Filters:", ["Filter:", "Filtres :", "Filtros:", "フィルター:", "过滤器:"]),+ ("All Classes", ["Alle Klassen", "Toutes les classes", "Todas las clases", "すべての分類", "所有分类"]),+ ("Serif", ["Serifenschrift", "Serif", "Con serifa", "セリフ", "衬线"]),+ ("Slab Serif", ["Egyptienne", "Slab serif", "Serifa cuadrada", "スラブセリフ", "粗衬线"]),+ ("Sans Serif", ["Serifenlos", "Sans serif", "Sin serifa", "サンセリフ", "无衬线"]),+ ("Script", ["Schreibschrift", "Script", "Manuscrita", "スクリプト", "手写体"]),+ ("Monospaced", ["Dicktengleich", "Chasse fixe", "Monoespaciada", "等幅", "等宽"]),+ ("Decorative", ["Dekorativ", "Décorative", "Decorativa", "装飾", "装饰"]),+ ("Symbol", ["Symbol", "Symbole", "Símbolo", "記号", "符号"]),+ (+ "Show Recently Added",+ [+ "Zuletzt hinzugefügte anzeigen",+ "Afficher les polices ajoutées récemment",+ "Mostrar añadidas recientemente",+ "最近追加したフォントを表示",+ "显示最近添加的字体",+ ],+ ),+ (+ "Small Sample Text Size",+ ["Kleine Beispieltextgröße", "Petite taille de l'exemple", "Tamaño de muestra pequeño", "サンプルテキスト(小)", "小号示例文本"],+ ),+ (+ "Medium Sample Text Size",+ ["Mittlere Beispieltextgröße", "Taille moyenne de l'exemple", "Tamaño de muestra mediano", "サンプルテキスト(中)", "中号示例文本"],+ ),+ (+ "Large Sample Text Size",+ ["Große Beispieltextgröße", "Grande taille de l'exemple", "Tamaño de muestra grande", "サンプルテキスト(大)", "大号示例文本"],+ ),+ ("Selected Text", ["Ausgewählter Text", "Texte sélectionné", "Texto seleccionado", "選択したテキスト", "所选文本"]),+ ("Sample", ["Beispiel", "Exemple", "Muestra", "サンプル", "示例"]),+ ("Similar to {family}", ["Ähnlich wie {family}", "Semblables à {family}", "Similares a {family}", "{family} に類似", "与 {family} 相似"]),+ (+ "No fonts match",+ ["Keine passenden Schriften", "Aucune police ne correspond", "Ninguna fuente coincide", "一致するフォントはありません", "没有匹配的字体"],+ ),+ (+ "Show Similar Fonts",+ ["Ähnliche Schriften anzeigen", "Afficher les polices semblables", "Mostrar fuentes similares", "類似フォントを表示", "显示相似字体"],+ ),+ ("Loading fonts…", ["Schriften werden geladen…", "Chargement des polices…", "Cargando fuentes…", "フォントを読み込み中…", "正在加载字体…"]),+ ("Show Styles", ["Schnitte einblenden", "Afficher les styles", "Mostrar estilos", "スタイルを表示", "显示样式"]),+ ("Hide Styles", ["Schnitte ausblenden", "Masquer les styles", "Ocultar estilos", "スタイルを隠す", "隐藏样式"]),+ ("TrueType font", ["TrueType-Schrift", "Police TrueType", "Fuente TrueType", "TrueType フォント", "TrueType 字体"]),+ ("OpenType font", ["OpenType-Schrift", "Police OpenType", "Fuente OpenType", "OpenType フォント", "OpenType 字体"]),+ ("Variable font", ["Variable Schrift", "Police variable", "Fuente variable", "バリアブルフォント", "可变字体"]),+ ("Color font", ["Farbschrift", "Police couleur", "Fuente de color", "カラーフォント", "彩色字体"]),+ // Table of Contents.+ (+ "Sort Entries in Alphabetical Order",+ [+ "Einträge alphabetisch sortieren",+ "Trier les entrées par ordre alphabétique",+ "Ordenar entradas alfabéticamente",+ "項目をアルファベット順に並べ替え",+ "按字母顺序排列条目",+ ],+ ),];/// Interface direction; independent of document binding and paragraph direction.diff --cc docs/target-app-parity.mdindex 5572d4123,5cd4e4400..e5f452d2a--- a/docs/target-app-parity.md+++ b/docs/target-app-parity.md@@@ -441,10 -433,9 +441,10 @@@ It is evidence of breadth: each item ex- Stroke panel: cap, join, miter limit, alignment, type, Start/End arrowheads (12 kinds, drawn on screen and in PDF; the path is shortened under pointed heads) and gap colour under dashes and dots.- Preferences (⌘K: General, Type, Units & Increments, Grids, Guides & Pasteboard, Display Performance) backed by `prefs.set` (application) and `document.preferences` (units, increments, grids — undoable, saved with the document; right-click a ruler to pick its units, the horizontal and vertical rulers each have their own); scaling applies to content and scales stroke weights (Include Stroke Weight), and X/Y/W/H measure the stroke's outer edge (Dimensions Include Stroke Weight). Quick Apply (⌘Return) finds paragraph, character and object styles as well as commands.- Parent item overrides: Cmd+Shift-click a parent item on a page (or Override All Parent Page Items, ⌥⇧⌘L) makes an editable local copy that hides the parent's; Remove All Local Overrides and Detach All Objects from Parent in the Pages panel menu.+- Based on Parent (`layout.parents.options {parent, basedOn}`): a parent shows its base parent's items under its own, on its pages and on the parent itself; chains work, cycles are refused, and items from any parent in the chain can be overridden. IDML carries it as the parent pages' `AppliedMaster`; a cycle or missing base in a file is cleared with a warning on open. The Pages panel has no Parent Options dialog yet.- Place PDF: placed PDF pages are sized by their crop box, drawn on screen through hayro (with mip levels) and embedded in exported PDFs as vector form XObjects (krilla), `<PDF>` in IDML.- Menus expose the engine's features (TOC, numbering & sections, text variables, hyperlinks, cross-references, footnotes, step and repeat, spelling, fitting/content, effects, Data Merge, Preflight, EPUB); any menu command with parameters gets a dialog generated from its parameter documentation.- - Table of contents (Layout ▸ Table of Contents dialog: included styles, per-style entry style, page number position, separator and level, title style, Replace Existing; generate/update, dot leaders; the definition round-trips through IDML as a TOC style) and text variables (running headers, last page number, chapter number, file name, dates, custom) resolved per page.+ - Table of contents (Layout ▸ Table of Contents dialog: included styles, per-style entry style, page number position and its character style, separator and its character style, alphabetical sorting and level, title style, Replace Existing; generate/update, dot leaders; the definition round-trips through IDML as a TOC style) and text variables (running headers, last page number, chapter number, file name, dates, custom) resolved per page.- Soft effects: blurred drop shadow, inner shadow, outer glow, basic feather.- ~200 commands, all reachable through the JSON control channel; headless CLI rendering to PNG.- MCP server (`designcraft-cli mcp [--connect PORT]`, docs/mcp.md): headless engine or the running app; commands, batch, document/story inspection, page renders as images, window screenshots, pointer/keyboard/dialog input.