Commit Graph

27 Commits

Author SHA1 Message Date
aiongg 0f4f382b0e
feat(text): improve editing, snapping, and threading
Add multi-click text selection, pending caret formatting and clipboard support, text-aware colour controls, guide/grid snapping, and frame threading with loaded-port interactions.

Include the layout, drop-cap and IDML updates carried from #83, with safeguards for generated and linked stories, external text references, local IDs, locked frames and atomic colour edits.

Fixes #23.

Co-authored-by: Sean Hammond <sean.hammond@und.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:41:46 -06:00
Brandon Thomas e862e0a613 fix: integrate batched community PRs (#572 with #662's fallible spread_param; #524's test helper back in its module)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:28:50 -04:00
Brandon Thomas 777d8c3251 Merge branch 'pr/572' into batch1
# Conflicts:
#	crates/tools/src/tests.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/uk.rs
2026-10-13 02:24:24 -04:00
Brandon Thomas 8255d58c2e Merge branch 'pr/667' into batch1 2026-10-13 02:21:39 -04:00
sanyamsingh001 f7adb11cdc PARITY-CHARACTER-STYLE: capture selected character formatting
Co-Authored-By: Codex <codex@openai.com>
2026-10-13 10:46:10 +10:00
moppeeer 9ab226d741 fix(eyedropper): Sample rasters only; colour text through object.color
A placed PDF, EPS or SVG under the Eyedropper matches attributes again,
as before, instead of failing with "no placed image under the point"
(Asset::is_raster, shared by the tool and color.sample). color.sample
hands its colour to object.color, which now colours selected text, the
text of selected frames ({text: true}), or the typing colour of an empty
story; a caret in existing text is refused before a swatch or undo step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:56:17 +02:00
moppeeer d7d6f27069 feat(eyedropper): Sample a placed image's colour into the selection
The Eyedropper on a placed image now does what InDesign does: with text
selected, clicking the photo colours the text with the image's colour under
the pointer; with objects selected, it fills them. The colour is an unnamed
colour (reused when the same colour is sampled again). Images on locked
layers can be sampled, and unfilled frames over the image let it show through.

- color.sample {at, spread?, target?: fill|stroke, ids?} samples the frontmost
  visible raster image at a spread point; one undo step; a caret or a point
  with no image is refused without an edit.
- object.color shares its swatch lookup with it.
- The Eyedropper tool sends color.sample over an image, matchAttributes
  elsewhere as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:56:17 +02:00
aiongg 5cdcac4ace
fix(save): replace files atomically
Replace native engine saves and engine/MCP exports atomically, preserving private permissions during staging and cleaning up failed writes. Add regressions for long filenames and caught writer unwinding.

Fixes #436.

Co-authored-by: aiongg <aiongtaigi@gmail.com>
Co-authored-by: skylar taylor-barrick <hi@skylar.cc>
2026-10-12 09:19:36 -06:00
KnottyDyes fae9bc84ce
fix(text): reject unknown character fill swatches
Reject unknown character fill swatches before modifying text or undo history. Registered swatch names remain valid, including names that resemble hex colours.

Validation: invalid-name atomicity and save/reopen regressions, plus all six cargo xtask ci gates on main after #514 and #523 (1,186 native tests passed, 3 ignored; 15 crates passed WASM compilation checks).

Task: #403
2026-10-11 21:30:21 -06:00
japbcoelho 597f0e649f
Color parsing: one scale per colour, not per component (#510)
A CMYK component of 1 or less was read as a fraction even when the other
components were percentages, so {"c": 0.7, "m": 0, "y": 12.2, "k": 0}
(a pale cream) became C 70 % Y 12.2 % and exported as
`0.7019608 0 0.12156863 0 k`. The same applied to RGB arrays.

Now a colour is read as percentages (0..100, or 0..255 for RGB) when any
component is above 1, and as fractions only when every component is
within 0..1.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:49:46 -06:00
aiongg 01500ceb04
Paragraph Rules: a dialog for the selected paragraphs and a section in Paragraph Style Options (#263)
* Paragraph rules: a partial ruleAbove/ruleBelow edit keeps the other rule fields; Rule Above honours Text width

* Paragraph Rules: dialog for the selected paragraphs and a Paragraph Style Options section

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:28:09 -04:00
aiongg 617e487dff
Styles: Character Style Options dialog (#144)
* Styles: editing a character style renames it everywhere it is used, changes its Based On and unsets attributes; [None] can't be edited

* 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…

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:14:30 -04:00
Shao Wenbin c861a9f75e TYPE1: Reapply Chinese and Arabic typesetting rules on main
Port the CJK1 and AR1 changes from 3ecdb78 and de83cdc onto current main. Resolve translation and font-stack conflicts by retaining main localization and craft-fonts integration while preserving all typesetting code, tests, and documentation.

Validation: all six CI gates passed, including 616 tests and WASM checks.
2026-10-07 18:16:32 +08:00
Brandon Thomas f05bbfeea2 Never crash: engine, MCP and tools
Commands return errors instead of expect()/unreachable!() (book, library,
undo/redo, paste, find/replace, Pathfinder, tables, QR, select, swatches,
anchors, articles, transform again, XML import). The sample document builder
propagates errors. Commands that add a key to their parameters no longer
panic when a caller (control channel, MCP, script) passes an array or a
string, and corrupt crash-recovery metadata is ignored. engine, mcp and
tools now deny unwrap/expect/panic/unimplemented/todo/unreachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:43:33 -04:00
Brandon Thomas 3d4bb45f9e A: tagged PDF by paragraph, with headings from Export Tagging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas 55e0efbc62 S: style Export Tagging for EPUB/HTML
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:48:58 -04:00
Brandon Thomas efb563673f C: Ink Manager — spots to process, ink aliases (PDF, IDML)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:47:58 -04:00
Brandon Thomas 902fd214c2 C: Swatches panel colour groups (+ IDML ColorGroup)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:45:59 -04:00
Brandon Thomas e433c77b55 S: table and cell styles (style.cell.*, style.table.*), Table panel pickers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:40:46 -04:00
Brandon Thomas 08727dfd7e S: style groups (style.group), renames reach table cells and footnotes; Package report preflight fix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:36:29 -04:00
Brandon Thomas 67dd4852ca F: Load/Save Swatches (.ase) — swatch.load, swatch.save, Swatches panel menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:49:27 -04:00
Brandon Thomas 66ab252044 F: Gradient Swatch tool, Gradient panel, unnamed gradients (object.gradient)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:15:01 -04:00
Brandon Thomas f8ccff2470 F: Color panel, Color Picker, unnamed colours
- color: Swatch.hidden — unnamed colours (applied, not listed in Swatches until added)
- engine: object.color (reuses a swatch with the same colour, else an unnamed one; fill or
  stroke), swatch.addToSwatches (optionally named; users follow the rename),
  swatch.addUnnamed (+ test)
- UI: Color panel with fill/stroke proxy, CMYK/RGB/Lab, channel sliders with gradient tracks and
  value fields, tint slider for named swatches, spectrum ramp, Add to Swatches; Color Picker
  dialog (double-click a proxy chip); Swatches hides unnamed colours

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:45:39 -04:00
Brandon Thomas 7a7d7b78a1 Merge main into M8 tables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:47:48 -04:00
Brandon Thomas 77a23151ba M8: tables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:44:45 -04:00
Brandon Thomas 6eb2cf2f83 M4: object styles (create from selection, apply fill/stroke/text frame options/paragraph style)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:26:53 -04:00
Brandon Thomas 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