Commit Graph
15 Commits
Author SHA1 Message Date
aiongg 71074a987b Merge #84: Text editing, snapping and text threading (#23)
Conflict: crates/ui-egui/src/control.rs: tests only; kept #118's automation_contract_tests module and #84's tests module
Conflict: crates/ui-egui/src/lib.rs: kept #119's ImportedFile Inbox type and #84's ClipboardFn
Conflict: crates/ui-egui/src/menus.rs: tests only; kept #239's two Quick Apply tests and #84's copy/paste test
2026-10-09 22:41:29 +00:00
aiongg ca0ab6e551 UI: Character Style Options edits a character style's name, Based On and character formats, opened by double-clicking the style, Edit in its menu, or New Character Style… 2026-10-08 10:03:57 -04:00
Brandon ThomasandClaude Opus 5.5 fc6101d10f Merge origin/main into feat/text-editing-and-frames
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:58:36 -04:00
Brandon ThomasandClaude Opus 5.5 962234fbdf Merge origin/main into feat/text-editing-and-frames
Resolve conflicts with the CJK/Arabic work: trailing spaces follow the line
only in left-to-right paragraphs without right-to-left glyphs (layout_line
now takes the bidi info); style linking moves to ScopedFonts so the
document's own fonts count (FontDb delegates to scope 0); threading keeps
the receiving story's direction and Vertical Type, and frames split off by
threading or removed from a thread keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:41:43 -04:00
Brandon ThomasandClaude Opus 5.5 48dfbcfd19 Merge origin/main into data-merge
Resolve conflicts keeping both sides: doc gains both `cjk` and
`datamerge` modules; file.open resolves data-merge sources and loads the
document's fonts; DocState keeps preview_stash/preview_record and fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:28:15 -04:00
Brandon Thomas 27909c6cbb Merge pull request #66 from Luskish/fix/control-close-on-malformed-input
Control: close the connection on input that isn't a request
2026-10-07 22:04:11 -04:00
Brandon ThomasandClaude Opus 5.5 2531f039fe Data merge: review fixes (bounded reads, no truncation, safe links, docs)
- Remove the docs/superpowers planning spec.
- textimport: cap decompressed zip parts at 64 MiB (protects Place and
  xlsx data sources); oversized part is an error. Regression test.
- datamerge: refuse data files over 256 MiB and skip image candidates
  over 256 MiB by metadata before reading.
- datamerge: assign_page uses get_mut instead of indexing spreads.
- datamerge: one/limit over u32 are errors, not truncated.
- select_records dedupes with a HashSet (was O(n^2)), order kept.
- Hyperlink cells: only http, https, ftp and mailto schemes link.
- Document data.* commands and data.merge creating a new document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:54:38 -04:00
aiongg 7861297237 Threading: load text from a port and click to thread 2026-10-07 00:16:50 -04:00
aiongg 2d6213d40d Text editing: clicks, trailing spaces, bold/italic, clipboard, formatting affects text (#23)
- Double-clicking a text frame with the Selection tool edits its text. The
  canvas counts presses itself (egui reports double clicks only on release,
  so the press never saw them): 2 clicks select the word or run of spaces
  under the pointer, 3 the line, 4 the paragraph, 5 the story
  (`text.selectAt`; pointer events carry `clicks`).
- The caret moves past spaces typed at the end of a line: trailing spaces
  follow the line undrawn instead of being dropped.
- Bold and Italic (Shift+Cmd+B / Shift+Cmd+I, B and I in the Character
  panel) toggle the family's own styles per run, keeping the other trait
  (Italic + Bold = Bold Italic). Formatting chosen at a caret applies to
  what is typed next.
- Copy, Cut and Paste reach the system clipboard however they are chosen,
  including from the native macOS menu; without a native menu the copy and
  paste keys work for objects too.
- Formatting Affects Text (J, Tools panel) sends swatches, colours, tints,
  None, Swap and Default to the text of the selected frames; the proxy and
  the Swatches and Color panels show the text's colours.
2026-10-07 00:16:27 -04:00
Luskish 7100bf9ec3 Control: close the connection on input that isn't a request
A line that is not a JSON object with a string `method` (an HTTP request
line, other non-JSON text, a JSON array, invalid UTF-8, a line over 4 MiB)
now gets one error reply and the connection is closed, so a browser's
cross-origin fetch can't smuggle a command in its body. Connections are
capped at 16. Same transport as LightCraft (storytold/lightcraft#129) and
FilmCraft (storytold/filmcraft#123).
2026-10-06 22:54:21 -04:00
epfabianandClaude Opus 5.5 9bbaa2940a Canvas: middle-mouse drag pans the view
Dragging with the middle mouse button pans the canvas with any tool, like
Space-drag, and shows the grabbing hand. Tools still only see the primary
button. ui.click / ui.drag accept "button": "middle".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 20:34:28 +02:00
Brandon ThomasandClaude Opus 5.5 fcef655ba8 T: nested styles and GREP styles (compose overlays, Paragraph Style Options); ui.dialog.open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:47:52 -04:00
Brandon ThomasandClaude Opus 5.5 3ad71d5a76 M7: footnotes — Insert Footnote, Document Footnote Options, column-bottom layout, PDF/IDML; generic command dialogs
- doc: FOOTNOTE_REF marker + Story::notes (kept in sync on insert/delete/thread), FootnoteOptions,
  NumberStyle::Symbols, footnote text addressed like cell text (CellAddr::footnote)
- compose: notes numbered (continuous / restart per page, spread, section), composed at column
  width, body text makes room, stacked at the column bottom with the rule above
- render + PDF draw footnote text; IDML export/import in InDesign's structure (verified in
  InDesign 2026), FootnoteOption preferences
- engine: footnote.insert/options/list/setText/delete/goToReference (+ tests)
- UI: caret/selection in footnote text, Footnote Options dialog, Type menu entries; menu items
  labelled '…' with parameters open a dialog generated from the command's params doc
- sample magazine carries a footnote

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:01:27 -04:00
Brandon ThomasandClaude Opus 5.5 67ac9f1dfb UI: fidelity pass 2 (Properties sections, spinner fields, task bar, inverse text selection, Pages/Layers panels)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:46:43 -04:00
Brandon ThomasandClaude Opus 5.5 91ae2b3cc9 M0: engine, tools, egui UI, desktop app, CLI, sample document, docs
Engine with command registry (~100 commands), tool hosting with one-step
undo per gesture, InDesign-style egui frontend (app bar, Control panel,
Tools panel, rulers, guides, frame edges, ports/threads, Properties/Pages/
Layers dock, panels, dialogs), JSON control channel, headless CLI renderer,
generated sample magazine, README/AGENTS/ROADMAP/ASSETS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:39:15 -04:00