Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Merge PR #1079: Color Theme: extract a placed image palette and add it to Swatches

aiongg2f948fa7e205
diff --cc ROADMAP.md
index 36eb5d2a3,89dbb0faa..f2926a626
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@@ -345,103 -343,12 +345,104 @@@ list) · [roadmap.md](docs/roadmap.md)
## Progress log
-- **2026-10-15** · Color Theme: the toolbar tool previews up to five colours from a placed raster and adds them as one undoable swatch group. Local deterministic extraction; transparent padding is ignored. 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.
-
Newest first.
++- **2026-10-15** · Color Theme: the toolbar tool previews up to five colours from a placed raster and adds them as one undoable swatch group. Local deterministic extraction; transparent padding is ignored. No readiness percentage change.
+- **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/tools/src/tests.rs
index 57f94c9f5,5eaad703f..23fc2b715
--- a/crates/tools/src/tests.rs
+++ b/crates/tools/src/tests.rs
@@@ -22,6 -22,30 +22,33 @@@ fn ctx<'a>(d: &'a Document, s: &'a Sele
}
}
+ #[test]
+ fn color_theme_tool_requests_a_palette_without_editing_the_image() {
+ let mut d = Document::new(&NewDocument::default());
+ let id = add_rect(&mut d, Rect::new(100.0, 100.0, 200.0, 200.0));
+ d.item_mut(id).unwrap().content = designcraft_doc::Content::Graphic(designcraft_doc::Graphic {
+ asset: designcraft_doc::AssetId(1),
+ size: (100.0, 100.0),
+ xf: designcraft_geom::Affine::IDENTITY,
++ clip: None,
+ auto_fit: Default::default(),
+ fit_align: 4,
+ crop: [0.0; 4],
++ wrap: Default::default(),
++ fill: Default::default(),
+ });
+ let (s, c, l) = (Selection::default(), Cache::new(), CanvasLayout::new(&d, false));
+ let off = l.xf(SpreadRef::Doc(0)).translation();
+ let cx = ctx(&d, &s, &c, &l);
+ let mut tool = create("colorTheme");
+ assert_eq!(tool.id(), "colorTheme");
+ assert_eq!(
+ tool.pointer(&cx, &PointerEvent::new(PointerKind::Down, 150.0 + off.x, 150.0 + off.y)),
+ vec![Action::Dialog("colorTheme".into(), serde_json::json!({"id":id.0}))]
+ );
+ assert!(tool.pointer(&cx, &PointerEvent::new(PointerKind::Up, 150.0 + off.x, 150.0 + off.y)).is_empty());
+ }
+
#[test]
fn frame_tool_drag_emits_begin_preview_commit() {
let d = Document::new(&NewDocument::default());
diff --cc crates/ui-egui/src/dialogs.rs
index efa143b55,0bcca9004..69d30bae3
--- a/crates/ui-egui/src/dialogs.rs
+++ b/crates/ui-egui/src/dialogs.rs
@@@ -1980,8 -1558,8 +2040,9 @@@ pub fn show(app: &mut DesignApp, ctx: &
"createGuides" => crate::i18n::tr(&app.ui.language, "Create Guides"),
"marginsAndColumns" => crate::i18n::tr(&app.ui.language, "Margins and Columns"),
"textFrameOptions" => crate::i18n::tr(&app.ui.language, "Text Frame Options"),
+ "colorTheme" => crate::i18n::tr(&app.ui.language, "Color Theme"),
"documentSetup" => crate::i18n::tr(&app.ui.language, "Document Setup"),
+ "numberingSection" => crate::i18n::tr(&app.ui.language, "Numbering & Section Options…").trim_end_matches('…'),
"findChange" => crate::i18n::tr(&app.ui.language, "Find/Change"),
"paragraphStyleOptions" => crate::i18n::tr(&app.ui.language, "Paragraph Style Options"),
"deleteParagraphStyle" => crate::i18n::tr(&app.ui.language, "Delete Paragraph Style"),
@@@ -2569,140 -2077,198 +2630,142 @@@
}
});
});
- }
- }
- "closeDocument" => {
- let text = crate::i18n::tr(&app.ui.language, "“{}” has changes that are not saved. Save them before closing?")
- .replace("{}", &d.s("title"));
- crate::rtl::label(ui, text);
- }
- "updateLink" => {
- let text = crate::i18n::tr(
- &app.ui.language,
- "“{}” has been edited in this layout. Updating replaces those edits with the text from the file.",
- )
- .replace("{}", &d.s("files"));
- crate::rtl::label(ui, text);
- }
- "newWorkspace" => {
- ui.horizontal(|ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Name:"));
- text_field(ui, &mut d, "name", 220.0);
- });
- crate::rtl::label(
- ui,
- egui::RichText::new(crate::i18n::tr(&app.ui.language, "Saves which bars show and where the panels are.")).size(10.5),
- );
- }
- "fittingOptions" => {
- check(ui, &mut d, "autoFit", crate::i18n::tr(&app.ui.language, "Auto-Fit"));
- ui.add_space(4.0);
- crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, "Content Fitting")).font(semibold(12.0)));
- let cur = d.s("fitting");
- let label = |v: &str| match v {
- "fillProportionally" => crate::i18n::tr(&app.ui.language, "Fill Frame Proportionally"),
- "fitProportionally" => crate::i18n::tr(&app.ui.language, "Fit Content Proportionally"),
- "fitContentToFrame" => crate::i18n::tr(&app.ui.language, "Fit Content to Frame"),
- "centerContent" => crate::i18n::tr(&app.ui.language, "Center Content"),
- _ => crate::i18n::tr(&app.ui.language, "None"),
- };
- ui.horizontal(|ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Fitting:"));
- egui::ComboBox::from_id_salt("ff_fit").selected_text(crate::rtl::widget(ui, label(&cur))).width(200.0).show_ui(ui, |ui| {
- for v in ["none", "fillProportionally", "fitProportionally", "fitContentToFrame", "centerContent"] {
- if ui.selectable_label(cur == v, crate::rtl::widget(ui, label(v))).clicked() {
- d.fields.insert("fitting".into(), json!(v));
- }
+ crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, "Crop Amount")).font(semibold(12.0)));
+ egui::Grid::new("ff_crop").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {
+ for (k, l) in [("cropTop", "Top:"), ("cropLeft", "Left:")] {
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, l));
+ text_field(ui, &mut d, k, 70.0);
+ }
+ ui.end_row();
+ for (k, l) in [("cropBottom", "Bottom:"), ("cropRight", "Right:")] {
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, l));
+ text_field(ui, &mut d, k, 70.0);
}
+ ui.end_row();
});
- });
- ui.horizontal(|ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Align From:"));
- let a = d.n("align").unwrap_or(4.0) as u8;
- egui::Grid::new("ff_align").spacing([2.0, 2.0]).show(ui, |ui| {
- for row in 0..3u8 {
- for col in 0..3u8 {
- let i = row * 3 + col;
- let (r, resp) = ui.allocate_exact_size(egui::vec2(14.0, 14.0), egui::Sense::click());
- let c = ui.visuals().text_color();
- if a == i {
- ui.painter().rect_filled(r.shrink(2.0), 1.0, c);
- } else {
- ui.painter().rect_stroke(r.shrink(3.0), 1.0, egui::Stroke::new(1.0, c), egui::StrokeKind::Inside);
- }
- if resp.clicked() {
- d.fields.insert("align".into(), json!(i));
+ }
+ "qrCode" => {
+ let cur = d.s("type");
+ ui.horizontal(|ui| {
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Type:"));
+ let label = |v: &str| match v {
+ "text" => crate::i18n::tr(&app.ui.language, "Plain Text"),
+ "sms" => crate::i18n::tr(&app.ui.language, "Text Message"),
+ "email" => crate::i18n::tr(&app.ui.language, "Email"),
+ "vcard" => crate::i18n::tr(&app.ui.language, "Business Card"),
+ _ => crate::i18n::tr(&app.ui.language, "Web Hyperlink"),
+ };
+ egui::ComboBox::from_id_salt("qr_type").selected_text(crate::rtl::widget(ui, label(&cur))).width(160.0).show_ui(
+ ui,
+ |ui| {
+ for v in ["url", "text", "sms", "email", "vcard"] {
+ if ui.selectable_label(cur == v, crate::rtl::widget(ui, label(v))).clicked() {
+ d.fields.insert("type".into(), json!(v));
+ }
}
- }
- ui.end_row();
- }
+ },
+ );
});
- });
- crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, "Crop Amount")).font(semibold(12.0)));
- egui::Grid::new("ff_crop").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {
- for (k, l) in [("cropTop", "Top:"), ("cropLeft", "Left:")] {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, l));
- text_field(ui, &mut d, k, 70.0);
- }
- ui.end_row();
- for (k, l) in [("cropBottom", "Bottom:"), ("cropRight", "Right:")] {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, l));
- text_field(ui, &mut d, k, 70.0);
- }
- ui.end_row();
- });
- }
- "qrCode" => {
- let cur = d.s("type");
- ui.horizontal(|ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Type:"));
- let label = |v: &str| match v {
- "text" => crate::i18n::tr(&app.ui.language, "Plain Text"),
- "sms" => crate::i18n::tr(&app.ui.language, "Text Message"),
- "email" => crate::i18n::tr(&app.ui.language, "Email"),
- "vcard" => crate::i18n::tr(&app.ui.language, "Business Card"),
- _ => crate::i18n::tr(&app.ui.language, "Web Hyperlink"),
+ let fields: &[(&str, &str)] = match cur.as_str() {
+ "sms" => &[("number", "Cell Number:"), ("message", "Message:")],
+ "email" => &[("to", "Email Address:"), ("subject", "Subject:"), ("body", "Message:")],
+ "vcard" => &[("name", "Name:"), ("org", "Organization:"), ("phone", "Phone:"), ("email", "Email:"), ("url", "URL:")],
+ "text" => &[("content", "Text:")],
+ _ => &[("content", "URL:")],
};
- egui::ComboBox::from_id_salt("qr_type").selected_text(crate::rtl::widget(ui, label(&cur))).width(160.0).show_ui(ui, |ui| {
- for v in ["url", "text", "sms", "email", "vcard"] {
- if ui.selectable_label(cur == v, crate::rtl::widget(ui, label(v))).clicked() {
- d.fields.insert("type".into(), json!(v));
- }
+ egui::Grid::new("qr_fields").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {
+ for (k, l) in fields {
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, l));
+ text_field(ui, &mut d, k, 260.0);
+ ui.end_row();
}
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Color:"));
+ text_field(ui, &mut d, "color", 160.0);
+ ui.end_row();
});
- });
- let fields: &[(&str, &str)] = match cur.as_str() {
- "sms" => &[("number", "Cell Number:"), ("message", "Message:")],
- "email" => &[("to", "Email Address:"), ("subject", "Subject:"), ("body", "Message:")],
- "vcard" => &[("name", "Name:"), ("org", "Organization:"), ("phone", "Phone:"), ("email", "Email:"), ("url", "URL:")],
- "text" => &[("content", "Text:")],
- _ => &[("content", "URL:")],
- };
- egui::Grid::new("qr_fields").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {
- for (k, l) in fields {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, l));
- text_field(ui, &mut d, k, 260.0);
+ }
+ "polygonSettings" => {
+ egui::Grid::new("poly").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Number of Sides:"));
+ text_field(ui, &mut d, "sides", 60.0);
ui.end_row();
- }
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Color:"));
- text_field(ui, &mut d, "color", 160.0);
- ui.end_row();
- });
- }
- "polygonSettings" => {
- egui::Grid::new("poly").num_columns(2).spacing([8.0, 6.0]).show(ui, |ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Number of Sides:"));
- text_field(ui, &mut d, "sides", 60.0);
- ui.end_row();
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Star Inset:"));
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Star Inset:"));
+ ui.horizontal(|ui| {
+ text_field(ui, &mut d, "starInset", 60.0);
+ ui.label("%");
+ });
+ ui.end_row();
+ });
+ }
+ STEP_AND_REPEAT => step_and_repeat_dialog(app, ui, &mut d),
+ TOC => toc_dialog(app, ui, &mut d),
+ id if id.starts_with("cmd:") => command_form(app, ui, &mut d),
+ "goToPage" => {
ui.horizontal(|ui| {
- text_field(ui, &mut d, "starInset", 60.0);
- ui.label("%");
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Page"));
+ text_field(ui, &mut d, "page", 80.0);
});
- ui.end_row();
- });
- }
- STEP_AND_REPEAT => step_and_repeat_dialog(app, ui, &mut d),
- TOC => toc_dialog(app, ui, &mut d),
- id if id.starts_with("cmd:") => command_form(app, ui, &mut d),
- "goToPage" => {
- ui.horizontal(|ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Page"));
- text_field(ui, &mut d, "page", 80.0);
- });
- }
- "ruby" => {
- ui.horizontal(|ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Ruby:"));
- text_field(ui, &mut d, "text", 200.0);
- });
- crate::rtl::label(
- ui,
- egui::RichText::new(crate::i18n::tr(&app.ui.language, "Set over the selected text; empty removes it.")).size(11.0),
- );
- }
- "insertTable" => {
- crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, "Table Dimensions")).font(semibold(12.0)));
- egui::Grid::new("ins_table").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Body Rows"));
- text_field(ui, &mut d, "bodyRows", 60.0);
- crate::rtl::label(ui, crate::i18n::tr_context(&app.ui.language, "Columns", "table"));
- text_field(ui, &mut d, "columns", 60.0);
- ui.end_row();
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Header Rows"));
- text_field(ui, &mut d, "headerRows", 60.0);
- crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Footer Rows"));
- text_field(ui, &mut d, "footerRows", 60.0);
- ui.end_row();
- });
- }
- "createGuides" => create_guides_dialog(app, ui, &mut d),
- "marginsAndColumns" => margins_and_columns_dialog(app, ui, &mut d),
- "textFrameOptions" => {
- seed_text_frame_options(app, &mut d);
- text_frame_options_dialog(app, ui, &mut d);
- }
- "colorTheme" => color_theme(app, ui, &mut d),
- "documentSetup" => document_setup(app, ui, &mut d),
- "pdfExport" => pdf_export(app, ui, &mut d),
- "alert" => {
- let file = d.s("file");
- if !file.is_empty() {
- crate::rtl::label(ui, egui::RichText::new(crate::rtl::isolate(&file)).font(semibold(13.0)));
- ui.add_space(4.0);
}
- crate::rtl::label(ui, d.s("message"));
+ "ruby" => style_cjk::ruby_dialog(app, ui, &mut d),
+ "insertTable" => {
+ crate::rtl::label(ui, egui::RichText::new(crate::i18n::tr(&app.ui.language, "Table Dimensions")).font(semibold(12.0)));
+ egui::Grid::new("ins_table").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Body Rows"));
+ text_field(ui, &mut d, "bodyRows", 60.0);
+ crate::rtl::label(ui, crate::i18n::tr_context(&app.ui.language, "Columns", "table"));
+ text_field(ui, &mut d, "columns", 60.0);
+ ui.end_row();
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Header Rows"));
+ text_field(ui, &mut d, "headerRows", 60.0);
+ crate::rtl::label(ui, crate::i18n::tr(&app.ui.language, "Footer Rows"));
+ text_field(ui, &mut d, "footerRows", 60.0);
+ ui.end_row();
+ });
+ }
+ "cellOptions" => cell_options(app, ui, &mut d),
+ "createGuides" => create_guides_dialog(app, ui, &mut d),
+ "marginsAndColumns" => margins_and_columns_dialog(app, ui, &mut d),
+ "textFrameOptions" => {
+ seed_text_frame_options(app, &mut d);
+ text_frame_options_dialog(app, ui, &mut d);
+ }
++ "colorTheme" => color_theme(app, ui, &mut d),
+ "documentSetup" => {
+ // Adjust Layout applies at once.
+ let adjust = document_setup(app, ui, &mut d);
+ if adjust {
+ result = Some(true);
+ }
+ }
+ "numberingSection" => crate::section_options::body(app, ui, &mut d),
+ "pdfExport" => pdf_export(app, ui, &mut d),
+ "alert" => {
+ let file = d.s("file");
+ if !file.is_empty() {
+ crate::rtl::label(ui, egui::RichText::new(crate::rtl::isolate(&file)).font(semibold(13.0)));
+ ui.add_space(4.0);
+ }
+ crate::rtl::label(ui, d.s("message"));
+ }
+ _ => {}
}
- _ => {}
});
+ if side_actions {
+ return;
+ }
ui.add_space(12.0);
let ok_label = match d.id.as_str() {
- "colorTheme" => "Add to Swatches",
- "closeDocument" => " Save ",
- "updateLink" => " Update ",
- _ => " OK ",
++ "colorTheme" => crate::i18n::tr(&app.ui.language, "Add to Swatches").to_string(),
+ "closeDocument" => crate::i18n::tr(&app.ui.language, " Save ").to_string(),
+ "updateLink" => crate::i18n::tr(&app.ui.language, " Update ").to_string(),
+ "findFont" => crate::i18n::tr(&app.ui.language, "Replace All").to_string(),
+ "newDocument" => format!(" {} ", crate::i18n::tr(&app.ui.language, "Create")),
+ _ => crate::i18n::tr(&app.ui.language, " OK ").to_string(),
+ };
+ let cancel_label = match d.id.as_str() {
+ "newDocument" => "Close",
+ "findFont" => "Done",
+ _ => "Cancel",
};
ui.horizontal(|ui| {
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
diff --cc crates/ui-egui/src/menus.rs
index 64d7256ee,c51e323fe..f40a8b920
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@@ -2376,13 -2047,10 +2376,17 @@@ pub fn activate(app: &mut DesignApp, id
}
fn activate_inner(app: &mut DesignApp, id: &str, params: &Value) {
+ // Object › Effects › Drop Shadow… (and its shortcut): the Effects dialog on that page.
+ if params.is_null()
+ && let Some(page) = crate::effects_dialog::page_of_command(id)
+ {
+ crate::effects_dialog::open(app, page);
+ return;
+ }
+ if params.is_null() && id == "swatch.addColorTheme" {
+ crate::dialogs::open_color_theme(app, json!({}));
+ return;
+ }
if params.is_null() && id == "file.close" {
close_document(app, None);
return;
diff --cc crates/ui-egui/src/panels/swatches.rs
index 35c264657,252009dd0..3e7030e87
--- a/crates/ui-egui/src/panels/swatches.rs
+++ b/crates/ui-egui/src/panels/swatches.rs
@@@ -90,14 -78,10 +90,18 @@@ pub fn show(app: &mut DesignApp, ui: &m
let _ = app.run("swatch.newColorGroup", json!({}));
}
crate::menus::menu_button(ui, "☰", |ui| {
+ let current = fill_cur.as_deref().filter(|n| doc.swatch(n).is_some_and(|w| !w.hidden));
+ if ui
+ .add_enabled(current.is_some(), egui::Button::new(crate::rtl::widget(ui, crate::i18n::tr(&app.ui.language, "Swatch Options…"))))
+ .clicked()
+ {
+ let _ = app.run("app.swatchOptionsDialog", json!({"name": current}));
+ ui.close();
+ }
+ if ui.button(crate::rtl::widget(ui, crate::i18n::tr(&app.ui.language, "Color Theme…"))).clicked() {
+ crate::menus::activate(app, "swatch.addColorTheme", &serde_json::Value::Null);
+ ui.close();
+ }
crate::menus::menu_button(ui, crate::rtl::widget(ui, crate::i18n::tr(&app.ui.language, "Ink Manager")), |ui| {
let Ok(l) = app.session.execute("ink.list", &json!({})) else { return };
let mut all = l["allToProcess"].as_bool().unwrap_or(false);
diff --cc docs/agents.md
index 9913a939c,5ab6e804b..ed0d3bbd8
--- a/docs/agents.md
+++ b/docs/agents.md
@@@ -50,10 -50,15 +50,19 @@@ same references, and MCP's `batch` too
`--all-pages` that follow them, so one run can write several sizes
(`run --sample --scale 0.5 --export small.png --scale 2 --export large.png`); one with no export after it is an error.
+`--export` writes the file type its extension names: `.png` or `.jpg` (a page), `.pdf`, `.designcraft`, `.idml`,
+`.epub`, `.html`, and `.rtf` or `.txt` (the story being edited or of the selected frame). A name with no extension
+is a PNG of the page; another extension is an error, and nothing runs.
+
+ ## Color themes
+
+ `color.extractTheme {id?}` previews up to five RGB colours from a placed raster image (or the selected image).
+ `swatch.addColorTheme {colors, name?}` adds that palette as a colour group in one undo step.
+ Extraction samples the whole source image on a bounded grid, weights partial transparency, and ignores fully transparent pixels.
+ The image must contain at most 16 million pixels. PDF/SVG graphics are unsupported. This is local median-cut extraction,
+ not Adobe's palette algorithm. In the UI, click an image with the Color Theme Tool (Shift+I), or choose Color Theme…
+ in the Swatches panel menu with one image selected. Cancel keeps the document unchanged.
+
## Data merge
`data.source.select {path, sheet?}` links a CSV/TSV/`.xlsx` file to the document (`data.source.update` re-reads it,