mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-19 02:10:15 -05:00
main
62
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
de8a81c1e4 |
References: Word sources file import in Manage Sources (#2640) (#2897)
* References: Word sources file import in Manage Sources (#2640) Manage Sources gains Import… and references.sources an "import": path parameter: it reads a b:Sources document (Word's own Sources.xml) into the document's sources with the same reader as a document's own bibliography part. A tag already here is left alone, an untagged entry is matched by title and author or gets a tag like a new source, the whole import is one undo step, and a file that isn't b:Sources is refused. Desktop only; the web build hides the button. The docx reader now shares the b:Sources parser (crates/docx/src/ bibliography.rs) with the import, with the same dedupe and 10,000-source cap; the hostile-input cap test still passes. Tests: docx unit tests (names, kinds, accessed/DOI fallbacks, repeated tags, empty entries, wrong root), engine import test (add, undo, second import, untagged matching, refused file), ui tests (the dialog button asks for a "sources" file; finish_pick imports), wordcraft-cli end to end (import, cite, bibliography, save, reopen; the package's customXml carries the sources). The button's label is in every interface catalogue. ROADMAP progress log and docs/roadmap.md, gaps.md, file-format-parity.md and target-app-parity.md get their rows. * References: review fixes for the sources import (#2640) - read_sources validates the root namespace instead of the local name alone: an un-namespaced or unrelated <Sources> is refused, and both bibliography namespaces read — OOXML's and Word's own 2004/10 (the VBA Source.XML format), the latter mapped onto the canonical b prefix with parse_ns. Tests: the 2004/10 namespace is accepted; a no-namespace or unrelated root is refused. - The import loop builds the tag and (title, author-or-editor) sets once and keeps a per-stem counter, with the stem rule shared with auto_tag (auto_tag_base). Importing thousands of untagged sources no longer costs O(n^3). Test: untagged sources sharing a stem get Riv21, Riv211, Src, and a second import adds none. - docs/target-app-parity.md and docs/file-format-parity.md no longer claim bibliography sources aren't saved in DOCX: #169 and #532 are closed and the round trip exists (#790). * References: doc comments for the sources import helpers (#2640) Hoist the untagged-source matching helper (by_author) to module level and document sources, auto_tag_base and sources_ui, so the functions this PR touches meet CodeRabbit's docstring-coverage pre-merge check. * References: re-apply the sources import's progress notes (#2640) The rebase onto current main took upstream's copies of ROADMAP.md, docs/file-format-parity.md and docs/gaps.md, because the rows this PR adds conflicted with upstream's own appends. Re-apply them on the current text: the progress log and revision rows, the bibliography row's source-format note, and #15's evidence, with each status line's change note. The other two documents (docs/roadmap.md, docs/target-app-parity.md) merged cleanly and keep their rows. --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
8c812bf1d6 |
#1230: Insert Caption on pictures and shapes; Different First Page in Page Setup (#2615)
* #1230: Insert Caption on pictures and shapes; Page Setup header and footer options - Right-clicking a picture, shape, text box or chart offers Insert Caption…, as in Word. - references.caption with a picture or shape selected puts the caption next to the paragraph holding it, in the same cell or text box (it used to go after the whole table). - The Caption dialog proposes Figure for a picture selected in a table, not Table. - Page Setup: Headers and footers check boxes (Different Odd & Even Pages, Different First Page), applied on OK only if changed, in one undo step; a title page can go unnumbered. - Tests: engine caption_for_an_object_in_a_cell_stays_in_the_cell; kittest right_click_on_a_picture_offers_insert_caption and page_setup_different_first_page_leaves_the_title_page_unnumbered. - Docs: ui-parity, target-app-parity, ROADMAP progress log. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8veLveuUsJJm6UEcQPEuW * ui-parity: keep Insert Caption on the context-menu row --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
913621c1c4 |
Font dialog: Kerning for fonts and its Points and above size (#2295)
Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
874e5a76a0 |
#2052: a second picture style, border or artistic effect replaces the first (#2148)
Picture Styles, Picture Border and Artistic Effects now draw again from the
bitmap under them (kept per drawn picture in Session::picture_looks), so
Thick Frame then Simple Frame is only a simple frame, a border replaces the
border and keeps the style, a style replaces the border, and an effect
replaces the effect ("none" removes it), as in Word. Transparency was already
absolute (#1175); the test pins it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
|
||
|
|
1b45615940 |
Insert › Shapes keeps the selected shape and text (#2019) (#2030)
Inserting a second shape removed the first: after an insert the new shape stays selected, and `insert.shape` replaced the selection, so each shape replaced the one before. Word draws a new shape beside whatever is selected and never deletes it (checked by hand in Word for Windows: a second shape is drawn over the first, which stays). The new shape now goes after the selection, which is left alone, and becomes the selection. Selected text stays too. A picture still replaces a selected picture, which is what Word does as well (checked in Word for Windows), so `insert.picture` is unchanged. Tests: three shapes inserted in a row are all kept, which fails with the old code (1 of 3 kept); a shape inserted over selected text keeps the text and is selected itself; a picture inserted over a selected picture replaces it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
b8279c4da5 |
#1960: add editable table cell margins dialog (#1988)
Co-authored-by: justinjohn0306 <babyjjbabyjj549@gmail.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
1cea0f7e11 |
Equations: a script runs until a space or operator, as in Word (V_dd, x_2a) (#1609) (#1951)
* WIP for #1609 * Equations: a script after _ or ^ is the whole run of letters and digits (#1609) Word for Mac 16.113.4: V_dd and V_(dd) build up the same (dd is all subscript), likewise x^ab, and Linear format shows V_dd bare. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Equations: bare scripts end at a space, digits continue a script run, upright function names (#1609) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Equations: a bare script also ends before a following period (#1609 review) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * ROADMAP: drop three progress rows main already has Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
86ad3ddb63 |
DOCX: two lines in one and horizontal in vertical (w:eastAsianLayout) survive a save (#2486)
Read w:eastAsianLayout (ISO/IEC 29500-1 §17.3.2.10) into a new CharProps::east_asian_layout and write it back after w:lang, in runs and styles. Values outside the schema are left unset. Layout is unchanged. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
6e25d482c4 |
proof: Czech (cs-CZ) spelling from the installed Hunspell dictionary (#1048)
Same pattern as Portuguese (#797) and Polish (#346): the cs_CZ dictionary is read from the system at runtime (e.g. Debian/Ubuntu hunspell-cs), nothing is bundled. Suggestions use the dictionary's own MAP/REP/TRY/KEY; grammar stays generic (repeated word, spacing), with digit ratios like "3 : 1" exempt. The Czech interface now writes new documents (and opened .txt/.md) in cs-CZ. Engine fixes the Czech dictionary needs, also used by pl/pt: - PFX/SFX header lines may carry a trailing comment (cs_CZ has "SFX y Y 80 #…"); rule lines are left literal; - NOSUGGEST stems are accepted when typed but never offered; - KEY is parsed for neighbour-key suggestions. Tests use a hand-written synthetic Czech dictionary only; an end-to-end engine test mirrors the Portuguese one. Co-authored-by: Losminek <301412321+Losminek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
e5780698f2 |
Accessibility: Windows Magnifier follows the caret onto a new line (#1119) (#1247)
Windows Magnifier keeps the text cursor in view through UI Automation: the caret's own box has no width, so it takes the box of the character after the caret, and when that has none either, of the two characters before it. The canvas described a line's end mark (the paragraph mark, a line break) with no width, so on the empty line Enter or Shift+Enter makes Magnifier looked at the end of the line above and stayed there until two more letters were typed. A line's end mark now takes the room a selection shows a paragraph mark with: PARA_MARK_WIDTH (5 pt, now shared with selection_rects) at the line's visual end (Line::mark_box). Checked live with Windows Magnifier, its view read with MagGetFullscreenTransform: after Enter and Shift+Enter it moves to the new line at once. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
3d8f8144d9 |
File: recover unsaved work after a crash (#518) (#586)
* M10: retain local crash recovery on current main * i18n: Backstage Recover in every catalog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3e9dde7799 |
Docs: encrypted DOCX row, duplicate document-grid rows, dated issue count (#1072)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
666b9afc5a |
Draw: Ink to Shape recognises arrows (#1520)
* feat-ink-to-shape-arrows: WIP * Draw: Ink to Shape recognises arrows (gap 12) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Ink to Shape arrows: hand-drawn shafts, more tests, docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Ink to Shape arrows: the tip is the first near-farthest point Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Ink to Shape arrows: step to the real tip on dense strokes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
2689f3c6a3 |
Italian proofing: it_IT and it_CH spelling, suggestions, grammar and hyphenation (#951) (#1090)
* Italian proofing: it-IT spelling, suggestions and grammar (#951) * Italian proofing: Review Language menu and editing language * Italian proofing: interface test for editing language * Italian proofing: find the Swiss it_CH dictionary too * Italian proofing: TeX hyphenation patterns (MIT option) --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
7ee3cea875 |
Fonts: documents use the craft-fonts Simplified Chinese face too (#888)
Builds with craft-fonts (releases, the FreeBSD job) put only its Japanese faces in the document font database; Noto Sans CJK SC served the interface alone. Simplified-only ideographs in a document then had no face unless the system had one, and the run-level CJK pick from #567 found no face covering a mixed run, which the FreeBSD job's east_asian_run_uses_one_face_covering_the_whole_run caught. The Chinese craft faces now follow the Japanese ones (Mincho stays first for Japanese text). fallback_reads_each_installed_font_file_once_however_many_characters_miss used U+30001.., part of which Noto Sans CJK SC maps (CJK Extension G); it now uses Supplementary Private Use Area-A, which no font here maps. Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
cd6b2bbe46 |
Tables: Ctrl, Alt, left-edge and selected-cells border drags (#720)
* Rulers: table column and row markers; indents in a cell measured from it (#700) With the caret in a table, the rulers show the table, as Word's do: - The horizontal ruler marks the column borders of the caret's row (past the table's left edge); the vertical ruler marks the bottom of each of the table's rows on the page. Each marker has the resize pointer, a tooltip and a name for screen readers. - Dragging a marker drags that border exactly like a drag on the page (#600): a dashed guide, Escape cancels, one undo step on release through `table.resizeDrag`. On the horizontal ruler only the column left of the border changes and the columns right of it move along, so the table's width changes (Word's ruler); a row marker sets the row's height. The markers follow any drag of the table's borders, on the ruler or on the page. - In a cell, the indent markers and tabs are measured from the cell's text area (its box less its margins); they were placed as if the paragraph started at the page's margin. - Layout: `cell_margins` (a cell's own margins, else the table's, else Word's), so the ruler uses what the layout does. - UI: crates/ui-egui/src/table_ruler.rs; table_resize.rs starts a drag from a ruler marker (`grab`) and tells the ruler where a dragged border is (`moved`), sharing that computation with the dashed guide. - Tests: layout (cell_margins matches where each cell's text starts); kittest with real pointer events: a column marker drag (the marker follows, one undo step, the columns right of it keep their widths), a row marker drag, and an 18 pt drag of the left-indent marker in a cell indenting the paragraph 18 pt. Progress docs updated: ui-parity (rulers 70% -> 85%), gaps (the ruler's column markers are off the list), target-app-parity, ROADMAP. No new commands or labels (the tooltips reuse "Table Column Width" and "Table Row Height"). `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rulers: Shift works the other way round on the ruler; row markers beside a vertical merge Checked against Word (2019, Windows): on the ruler a column marker drag changes only the column on its left and the columns right of it move along (as before), and with Shift the neighbour makes up the difference, so the table keeps its width; on the page Shift does the opposite. The ruler now follows that: `ResizeDrag::plan` takes the Shift key and flips it for a drag started on a ruler marker. Since #669 a vertically merged cell's box spans all its rows, so a row marker took the merge's bottom when the merge was the row's leftmost cell. The marker now sits on the row's shortest box. (`Placed::Cell` patterns take `..` for #669's new field.) - Test (kittest, real pointer events): a Shift drag of a column marker on the ruler gives the neighbour's width to the column on the left and keeps the table's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: Ctrl, Alt, left-edge and selected-cells border drags (#711) Word's border drags that #600 left out: - Ctrl while dragging a column border: the columns right of it share the change in proportion to their widths, so the table keeps its width (none narrower than the minimum). Ctrl wins over Shift; on the table's right edge only the last column changes. - The table's left edge can be dragged, from just outside it: the table's indent moves and the first column makes up the difference, so the other borders stay. A centred or right-aligned table becomes left-aligned where the edge was dropped; a floating table moves its horizontal offset. The horizontal ruler has a marker on it too. - Alt while dragging a column border: the horizontal ruler shows each column's width as it is going to be. - With the selection across two or more cells, dragging one of their column borders (in one of their rows) moves it only in their rows; the grid gets a line for the new border and the cells' spans follow. A border of a cell merged down past the selection moves in the whole column. Text selected within one cell isn't a cell selection (it can't be told from one selected cell yet), so it moves the whole column. - Engine: `Share` (who makes up a column border's move), `Edge::Column(0)`, `ResizeTarget::limit_to_selection`/`only`/ `planned_x`, `Plan::indent_by`/`cells`; `table.resizeDrag` takes `"ctrl"`. `plan` still takes a bool for Shift. Each drag is one command and one undo step. - UI: table_resize.rs (keys, a guide down the rows that move, `measuring`), table_ruler.rs (left-edge marker, `widths`). - Tests: engine (Ctrl in proportion and at the minimum; the left edge, also of a centred table; selected cells' rows only, with the grid and spans; a merged cell past the selection); kittest with real pointer events (a Ctrl drag, the left edge and its ruler marker, Alt's widths mid-drag). Progress docs updated: ui-parity (tables on the page 80% -> 90%), target-app-parity, ROADMAP. No new commands or labels. `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a centred or right-aligned table keeps its alignment when its left edge is dragged Checked against Word (2019, Windows): dragging the left edge of a centred table widens the first column by the whole drag and the table stays centred (each side moves half); a right-aligned table keeps its right edge and grows to the left. Only a left-aligned table's indent moves. #711 made such a table left-aligned where the edge was dropped; now `move_left_edge` leaves a centred or right-aligned table's alignment and indent alone and says whether it moved anything, and the drop-point correction runs only then. The ruler's Shift (from #710) now goes through `share`: on a ruler marker Shift makes the neighbour take up the change, without it only the column on the left changes. - Tests: the left-edge test checks the centred table (first column +20 pt, the others unchanged, still centred) and a right-aligned one (only the left edge moves); a kittest Shift drag on the ruler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
8c8d5611a4 |
Rulers: table column and row markers; indents in a cell measured from it (#710)
* Rulers: table column and row markers; indents in a cell measured from it (#700) With the caret in a table, the rulers show the table, as Word's do: - The horizontal ruler marks the column borders of the caret's row (past the table's left edge); the vertical ruler marks the bottom of each of the table's rows on the page. Each marker has the resize pointer, a tooltip and a name for screen readers. - Dragging a marker drags that border exactly like a drag on the page (#600): a dashed guide, Escape cancels, one undo step on release through `table.resizeDrag`. On the horizontal ruler only the column left of the border changes and the columns right of it move along, so the table's width changes (Word's ruler); a row marker sets the row's height. The markers follow any drag of the table's borders, on the ruler or on the page. - In a cell, the indent markers and tabs are measured from the cell's text area (its box less its margins); they were placed as if the paragraph started at the page's margin. - Layout: `cell_margins` (a cell's own margins, else the table's, else Word's), so the ruler uses what the layout does. - UI: crates/ui-egui/src/table_ruler.rs; table_resize.rs starts a drag from a ruler marker (`grab`) and tells the ruler where a dragged border is (`moved`), sharing that computation with the dashed guide. - Tests: layout (cell_margins matches where each cell's text starts); kittest with real pointer events: a column marker drag (the marker follows, one undo step, the columns right of it keep their widths), a row marker drag, and an 18 pt drag of the left-indent marker in a cell indenting the paragraph 18 pt. Progress docs updated: ui-parity (rulers 70% -> 85%), gaps (the ruler's column markers are off the list), target-app-parity, ROADMAP. No new commands or labels (the tooltips reuse "Table Column Width" and "Table Row Height"). `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rulers: Shift works the other way round on the ruler; row markers beside a vertical merge Checked against Word (2019, Windows): on the ruler a column marker drag changes only the column on its left and the columns right of it move along (as before), and with Shift the neighbour makes up the difference, so the table keeps its width; on the page Shift does the opposite. The ruler now follows that: `ResizeDrag::plan` takes the Shift key and flips it for a drag started on a ruler marker. Since #669 a vertically merged cell's box spans all its rows, so a row marker took the merge's bottom when the merge was the row's leftmost cell. The marker now sits on the row's shortest box. (`Placed::Cell` patterns take `..` for #669's new field.) - Test (kittest, real pointer events): a Shift drag of a column marker on the ruler gives the neighbour's width to the column on the left and keeps the table's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
f24a5b22b2 |
Tables: drags and Shift+arrows over cells select whole cells (#722)
* Tables: select, insert and move with the mouse; double-click a border to AutoFit Like Word, on top of the border resizing: - Selection areas: just above a column the pointer becomes a down arrow, left of a row the row arrow, along a cell's left edge (inside it) the cell arrow. A click selects the column, row or cell; a drag selects every one up to the pointer. Selected cells are shaded as cells, empty ones too. - Insert buttons: left of a row border and above a column border a "+" shows with the border marked; a click adds a row or column there and puts the caret in it. - Move handle past the table's top-left corner: a click selects the table; a drag shows a dashed outline and, on release, the table floats where it is dropped with the text wrapping around it (Word's behaviour). One undo step. Nested tables and tables outside the main text are only selected. - A double-click on a column border fits the column left of it to its contents (the right neighbour gives or takes the room; on the right edge the table's width changes, up to the right margin). - Table Layout > Select > Select Column (catalog 418/449). Whole-cell selection: a column (or a rectangle of cells over several rows) is not one run of the text, so selecting it makes a block of its cells' paragraphs (`CellRange` on the existing `ColumnBlock`). Bold, alignment, Delete, typing, copy and numbering act on those cells only (a numbered column is one list); table commands (shading, merge, delete columns) take the rectangle; Tab moves on without clearing it; Undo brings the selection back. Cells of one row, or whole rows, stay an ordinary stream selection. The format painter no longer clears a block's text (edit.pasteFormat was handled like a paste). The mini toolbar stays hidden over whole-cell selections and during these drags: pinned above the selection it covered the column areas, the "+" buttons and the move handle. Engine: crates/engine/src/cmd/table_mouse.rs - table.selectAt, table.insertAt, table.moveDrag, table.fitColumn (page coordinates, so agents and the control channel can do the same) and table.selectColumn; hit testing reuses table_resize's drawn geometry, and borders keep priority for resizing. 10 engine tests (areas, a column edited cell by cell, numbering, rows/cells/drags, insert buttons, move, fit, format painter, hostile params). UI: crates/ui-egui/src/table_mouse.rs, wired into the existing canvas mouse handler (no extra ui.interact areas, so clicks in a cell's text still place the caret); kittest tests with real pointer events: column click, row drag, "+" button, move-handle drag in one undo step, double-click fit. New labels translated in all eleven catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP, parity checklist. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a selected column's word count is its cells'; merged cells shade once With whole cells selected (a column, or a rectangle that isn't one run of the text) the status bar said "12 of 23 words": `Session::selected_text` took everything between the selection's ends. It now takes each piece's own text, a line each, for a column block too, so the status bar, Word Count and the other callers see what is selected. Since #669 a vertically merged cell is one box as tall as its rows, with a `covered` box for each continuation row; shading selected cells skips those, so a merged cell isn't shaded twice. `selected_paths` follows main's `para_paths_in` (#418): a selection ending at the start of the next paragraph doesn't take it. - Test: a selected column's text is its three cells' and Word Count says three words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: double-click AutoFit and the "+" buttons work as in Word Checked against Word (2019, Windows): - A double-click on a column border fits the column left of it to its contents and the columns right of it keep their widths, moving with the border, so the table narrows or widens (up to the right margin). The right neighbour used to give or take the difference. - A "+" insert button selects the new row or column (the caret used to go into it); typing then goes into its first cell. If the table can't take another row or column, nothing changes. - A double-click along a cell's left edge (the cell selection area) selects its row. - Tests: engine (fit keeps the columns on the right; insert selects the new row or column, typing lands in its first cell) and kittest (real double-click on a border; "+" selects the row; double-click by a cell's edge selects the row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: drags and Shift+arrows over cells select whole cells An ordinary drag, Shift+click or Shift+arrow from one table cell into another now selects the rectangle of whole cells between them, as Word does, instead of the run of text between the two points: bold, alignment and Delete leave the cells outside the rectangle alone (they already did for Select Column and the table's selection areas). Between a cell and text outside its table the selection takes whole rows, from the cell's row out to the table's edge, and the text beyond. Extending again goes on from where the selection really started and ends: dragging back into the first cell selects its text again, Shift+Up after Shift+Down shrinks the rectangle, and from a nested table's cell into another cell of the table around it the outer table's cells are taken. - Engine: `table::extend_selection` (the rule, down through nested tables) and `Session::sel_ends` (where a widened selection really runs); every caret command run with `extend` goes through it in `column::dispatch`, so agents get the same with `caret.*`. - UI: a text drag extends through `caret.set` (still straight to the session, so nothing scrolls on every frame); the view follows the real caret. - Tests: engine (drag across cells and back, nested tables, Shift+Down and Shift+Up through and past a table, Shift+click, from text into a table) and a kittest with a real mouse drag. Progress docs updated: gaps (the known gap from #637 is gone), ui-parity, target-app-parity, ROADMAP. `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
284818b467 |
Tables: the right-click menu offers the table's commands (#694)
* Tables: select, insert and move with the mouse; double-click a border to AutoFit Like Word, on top of the border resizing: - Selection areas: just above a column the pointer becomes a down arrow, left of a row the row arrow, along a cell's left edge (inside it) the cell arrow. A click selects the column, row or cell; a drag selects every one up to the pointer. Selected cells are shaded as cells, empty ones too. - Insert buttons: left of a row border and above a column border a "+" shows with the border marked; a click adds a row or column there and puts the caret in it. - Move handle past the table's top-left corner: a click selects the table; a drag shows a dashed outline and, on release, the table floats where it is dropped with the text wrapping around it (Word's behaviour). One undo step. Nested tables and tables outside the main text are only selected. - A double-click on a column border fits the column left of it to its contents (the right neighbour gives or takes the room; on the right edge the table's width changes, up to the right margin). - Table Layout > Select > Select Column (catalog 418/449). Whole-cell selection: a column (or a rectangle of cells over several rows) is not one run of the text, so selecting it makes a block of its cells' paragraphs (`CellRange` on the existing `ColumnBlock`). Bold, alignment, Delete, typing, copy and numbering act on those cells only (a numbered column is one list); table commands (shading, merge, delete columns) take the rectangle; Tab moves on without clearing it; Undo brings the selection back. Cells of one row, or whole rows, stay an ordinary stream selection. The format painter no longer clears a block's text (edit.pasteFormat was handled like a paste). The mini toolbar stays hidden over whole-cell selections and during these drags: pinned above the selection it covered the column areas, the "+" buttons and the move handle. Engine: crates/engine/src/cmd/table_mouse.rs - table.selectAt, table.insertAt, table.moveDrag, table.fitColumn (page coordinates, so agents and the control channel can do the same) and table.selectColumn; hit testing reuses table_resize's drawn geometry, and borders keep priority for resizing. 10 engine tests (areas, a column edited cell by cell, numbering, rows/cells/drags, insert buttons, move, fit, format painter, hostile params). UI: crates/ui-egui/src/table_mouse.rs, wired into the existing canvas mouse handler (no extra ui.interact areas, so clicks in a cell's text still place the caret); kittest tests with real pointer events: column click, row drag, "+" button, move-handle drag in one undo step, double-click fit. New labels translated in all eleven catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP, parity checklist. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a selected column's word count is its cells'; merged cells shade once With whole cells selected (a column, or a rectangle that isn't one run of the text) the status bar said "12 of 23 words": `Session::selected_text` took everything between the selection's ends. It now takes each piece's own text, a line each, for a column block too, so the status bar, Word Count and the other callers see what is selected. Since #669 a vertically merged cell is one box as tall as its rows, with a `covered` box for each continuation row; shading selected cells skips those, so a merged cell isn't shaded twice. `selected_paths` follows main's `para_paths_in` (#418): a selection ending at the start of the next paragraph doesn't take it. - Test: a selected column's text is its three cells' and Word Count says three words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: double-click AutoFit and the "+" buttons work as in Word Checked against Word (2019, Windows): - A double-click on a column border fits the column left of it to its contents and the columns right of it keep their widths, moving with the border, so the table narrows or widens (up to the right margin). The right neighbour used to give or take the difference. - A "+" insert button selects the new row or column (the caret used to go into it); typing then goes into its first cell. If the table can't take another row or column, nothing changes. - A double-click along a cell's left edge (the cell selection area) selects its row. - Tests: engine (fit keeps the columns on the right; insert selects the new row or column, typing lands in its first cell) and kittest (real double-click on a border; "+" selects the row; double-click by a cell's edge selects the row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: the right-click menu offers the table's commands Right-clicking a table cell now offers what Word's table menu does, all through existing commands: Insert (rows above/below, columns left/right), Delete (cells, rows, columns, table), Select (cell, column, row, table), Merge Cells, Split Cells, Distribute Rows, Distribute Columns, AutoFit (contents, window, fixed column width), Text Direction, Cell Alignment (the nine alignments) and Table Properties… (opens the dialog, as the ribbon's button does). A right-click beside selected cells now moves the caret there, as in Word: with a column selected, the cells between its first and last cell in the text (the other columns of those rows) counted as "inside the selection", so the selection stayed and the menu acted on the column instead of the cell clicked. A right-click on a selected cell keeps the selection, so Cell Alignment, Distribute and the rest act on it. - UI only (crates/ui-egui/src/canvas.rs): the table part of `context_menu()` and a small check before the right-click caret logic (separate from it, so it doesn't overlap #521's change to that block). Table Layout's nine cell alignments are one shared list (`CELL_ALIGN` in ribbon.rs) for the ribbon grid and the menu. - Two new labels, "Cell Alignment" and "Table Properties…", translated in all eleven catalogs; the rest reuse the ribbon's labels. - Tests: kittest with real pointer events: right-click in a cell, the menu's table entries, Select > Select Column; with a column selected, a right-click on it keeps it and Cell Alignment > Align Bottom Right aligns just the column (one undo step), and a right-click beside it drops it. Progress docs updated: ui-parity (context menus 55% -> 60%), gaps, target-app-parity, ROADMAP. No new commands, so the catalog is unchanged. `cargo xtask ci` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: the right-click menu's table items follow the selection, as in Word Checked against Word (2019, Windows): Word's table items in the context menu depend on what is selected, and there is no Select or Cell Alignment submenu among them. - Caret in a cell: Insert, Delete Cells, Split Cells, Text Direction, Table Properties… - Several cells: Insert, Delete Cells, Merge Cells, Text Direction, Table Properties… - Whole columns: Insert, Delete Columns, Merge Cells, Distribute Rows, Distribute Columns, Text Direction, Table Properties… (whole rows the same with Delete Rows; not checked in Word). - The whole table: Insert, Delete Table, Distribute Rows and Columns, AutoFit, Text Direction, Insert Caption…, Table Properties… Insert lists the columns first, as Word does. Select and Cell Alignment are gone, and with them the shared CELL_ALIGN constant in the ribbon; "Insert Caption…" replaces "Cell Alignment" in all fifteen catalogs. Word's Border Styles and Insert Cells… aren't here yet. - Tests (kittest, real right-clicks): the menu with the caret in a cell and with the whole table; a selected column keeps its column menu and Text Direction turns only it; beside it the menu is a cell's again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
8ca285ca9d |
Tables: select, insert and move with the mouse; double-click a border to AutoFit (#637)
* Tables: select, insert and move with the mouse; double-click a border to AutoFit Like Word, on top of the border resizing: - Selection areas: just above a column the pointer becomes a down arrow, left of a row the row arrow, along a cell's left edge (inside it) the cell arrow. A click selects the column, row or cell; a drag selects every one up to the pointer. Selected cells are shaded as cells, empty ones too. - Insert buttons: left of a row border and above a column border a "+" shows with the border marked; a click adds a row or column there and puts the caret in it. - Move handle past the table's top-left corner: a click selects the table; a drag shows a dashed outline and, on release, the table floats where it is dropped with the text wrapping around it (Word's behaviour). One undo step. Nested tables and tables outside the main text are only selected. - A double-click on a column border fits the column left of it to its contents (the right neighbour gives or takes the room; on the right edge the table's width changes, up to the right margin). - Table Layout > Select > Select Column (catalog 418/449). Whole-cell selection: a column (or a rectangle of cells over several rows) is not one run of the text, so selecting it makes a block of its cells' paragraphs (`CellRange` on the existing `ColumnBlock`). Bold, alignment, Delete, typing, copy and numbering act on those cells only (a numbered column is one list); table commands (shading, merge, delete columns) take the rectangle; Tab moves on without clearing it; Undo brings the selection back. Cells of one row, or whole rows, stay an ordinary stream selection. The format painter no longer clears a block's text (edit.pasteFormat was handled like a paste). The mini toolbar stays hidden over whole-cell selections and during these drags: pinned above the selection it covered the column areas, the "+" buttons and the move handle. Engine: crates/engine/src/cmd/table_mouse.rs - table.selectAt, table.insertAt, table.moveDrag, table.fitColumn (page coordinates, so agents and the control channel can do the same) and table.selectColumn; hit testing reuses table_resize's drawn geometry, and borders keep priority for resizing. 10 engine tests (areas, a column edited cell by cell, numbering, rows/cells/drags, insert buttons, move, fit, format painter, hostile params). UI: crates/ui-egui/src/table_mouse.rs, wired into the existing canvas mouse handler (no extra ui.interact areas, so clicks in a cell's text still place the caret); kittest tests with real pointer events: column click, row drag, "+" button, move-handle drag in one undo step, double-click fit. New labels translated in all eleven catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP, parity checklist. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: a selected column's word count is its cells'; merged cells shade once With whole cells selected (a column, or a rectangle that isn't one run of the text) the status bar said "12 of 23 words": `Session::selected_text` took everything between the selection's ends. It now takes each piece's own text, a line each, for a column block too, so the status bar, Word Count and the other callers see what is selected. Since #669 a vertically merged cell is one box as tall as its rows, with a `covered` box for each continuation row; shading selected cells skips those, so a merged cell isn't shaded twice. `selected_paths` follows main's `para_paths_in` (#418): a selection ending at the start of the next paragraph doesn't take it. - Test: a selected column's text is its three cells' and Word Count says three words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tables: double-click AutoFit and the "+" buttons work as in Word Checked against Word (2019, Windows): - A double-click on a column border fits the column left of it to its contents and the columns right of it keep their widths, moving with the border, so the table narrows or widens (up to the right margin). The right neighbour used to give or take the difference. - A "+" insert button selects the new row or column (the caret used to go into it); typing then goes into its first cell. If the table can't take another row or column, nothing changes. - A double-click along a cell's left edge (the cell selection area) selects its row. - Tests: engine (fit keeps the columns on the right; insert selects the new row or column, typing lands in its first cell) and kittest (real double-click on a border; "+" selects the row; double-click by a cell's edge selects the row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
55bfc33418 |
Undo history list beside the Quick Access Toolbar's Undo (#701) (#855)
* #701: Undo history list beside the Quick Access Toolbar's Undo A drop-down arrow next to Undo lists recent steps, newest first; hovering a row highlights it and every newer step, the footer reads "Undo N Actions" (Cancel when none is highlighted), and a click undoes them all at once. Engine: Session::undo_history (newest first, capped at UNDO_LIST_MAX = 100) and Session::undo_steps; edit.undoTo {"count": n} (0, negative and non-number counts rejected, counts past the depth clamped, stops at protection) and the read-only edit.undoHistory for CLI and MCP. Catalog: Undo List. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n: Hungarian and French strings for this change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #701: Bulgarian for the Undo history strings; drop a duplicate Turkish entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
1677c2d9cf |
Ribbon groups fit above their labels (View › Show, Developer › Controls, Layout › Paragraph) (#910)
View › Show stacked four check boxes in a column made for three: since Hide White Space (#645) joined Ruler, Gridlines and Navigation Pane, the fourth row was drawn over the "Show" group label. It now sits in a second column. A new test draws every tab in every interface language and fails on any group taller than the ribbon's content area (CONTENT_H, 66 pt). It found: - Developer › Controls, 75 pt: 3 pt after each row of small buttons. The rows now fill the height with no gaps, like every other stack. - Layout › Paragraph (#654), which panicked in debug builds: `add_space` between grid cells trips egui's "add_space makes no sense in a grid layout" assertion. The 8 pt gap before the Spacing column now sits inside those cells, so it looks the same. The group was also 68.5 pt: 1.5 pt between rows instead of 3 fits it. - widgets.rs: under cfg(test), group_titled records any group whose content is taller than CONTENT_H. - ribbon.rs: ribbon_groups_fit_above_their_labels. - ROADMAP progress log and docs/ui-parity.md revision history. - contributors/people.toml: my own entry. Co-authored-by: Manuel Carmona <328347120+manucarcor@users.noreply.github.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
1e53adf9d6 |
Portuguese proofing: pt-BR spelling, suggestions, grammar and hyphenation (#100) (#797)
* M15: Polish interface, and Polish spelling, grammar and hyphenation
Interface
- Polish is the tenth interface language ("Polski", pl.tsv, 1,045 entries);
pl, pl-PL and pl_PL.UTF-8 system locales select it automatically.
- Right-click menu labels now go through translation in every language.
- Review > Language is a menu (English US/UK, Polski, Do not check spelling
or grammar); the status bar shows the language at the caret.
- With a Polish interface, new blank documents and opened .txt/.md files
default to pl-PL.
Proofing
- Each run is checked in its own language (w:lang, resolved through
styles): squiggles, F7, review.issues, suggestions and hyphenation.
Text in languages without proofing tools is no longer flagged as English.
- Polish spelling from the SJP.PL Hunspell dictionary (Apache-2.0 option),
read by a new Rust affix engine (crates/proof/src/affix.rs); 875 KB asset,
~4.5M word forms. Regenerate with the pl_dictionary example.
- Polish suggestions: case, missing diacritics, rz/ż, ó/u, ch/h confusions,
missing spaces (napewno -> na pewno), edit distance.
- Conservative Polish grammar rules: repeated words, spacing, doubled
punctuation, sentence capitals, missing comma before że/który/ponieważ/
aby/żeby/jeśli…, we/ze forms.
- Polish hyphenation with the hyph-utf8 hyph-pl.tex patterns (MIT option);
pattern keys widened to 20 letters, TeX exceptions parsed; the heuristic
no longer treats ł, ż, ś… as vowels.
review.language validates and normalizes tags, can set noProof alone and
the document default; format.state reports lang and noProof.
Tests for every part, docs and ATTRIBUTION.md/NOTICE updated;
cargo xtask ci passes (fmt, clippy, test, assets, layers, wasm).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Layout: rustfmt the test module order left unformatted by #391
cargo fmt --check failed on main after #391 added mod tests_grid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Review fixes for #346: read Polish spelling from the installed Hunspell dictionary
- Polish spelling uses the Hunspell pl_PL dictionary installed on the
system (OS packages, Homebrew, LibreOffice, ~/.local/share/hunspell, or
WORDCRAFT_DICTIONARIES) instead of a bundled 870 KB SJP.PL file;
without one, Polish text gets no spelling marks, like Word without the
language's proofing tools. .aff/.dic are size-capped and decoded from
UTF-8 or ISO 8859-2 (crates/proof/src/hunspell.rs).
- The dictionary can be replaced at runtime (install_dictionary) or
re-searched (reload_dictionary); an empty one accepts every word.
- Tests use small synthetic dictionaries written for them, so they don't
depend on what the machine has installed.
- The bundled pl.dic, its ATTRIBUTION/NOTICE entries and the generator
example are removed; docs describe the installed dictionary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #100: affix — accept FLAG UTF-8 and DEFAULT flag modes
Per-character flag modes are what the reader already parses; only the
multi-character encodings (long, num) stay errors. VERO pt_BR declares
FLAG UTF-8.
* #100: affix — widen flag masks to u128 (128 flag capacity)
VERO pt_BR needs 106 distinct flags; the u64 bitmask capped at 64.
Serialization is unaffected: WCAFF1 stores flag characters and
re-derives the masks on load.
* #100: affix — support FORBIDDENWORD
VERO pt_BR marks spellings it must reject with a forbidden flag (ý).
Stems carrying it are listed but never correct and never inflect.
* #100: affix — continuation classes in check
SFX A 0 able/B: the form derived by A carries flag B, licensing a
further suffix of class B (workable -> workables) while the bare stem
cannot take one. form_has_flag walks the chain depth-bounded
(MAX_CHAIN = 3); with no continuations declared it degenerates to the
stem lookup, so existing dictionaries are unaffected. VERO pt_BR uses
26 continuation rules.
* #100: affix — continuation classes in forms
Enumerate chained suffix forms (workable -> workables) under the same
MAX_CHAIN bound the checker walks, so every form the checker accepts
is listed and vice versa.
* #100: affix — round-trip continuations and FORBIDDENWORD through WCAFF1
The compact format keeps its WCAFF1 magic: continuation classes ride
on the rule's appended field (as in the .aff source) and the forbidden
flag becomes a FORBIDDENWORD line. Old files read as before.
* #100: affix — strip a UTF-8 BOM from .aff/.dic input
VERO's files open with a BOM; glued to the count line it parsed as a
stem (one garbage entry per load) and to SET it hid the directive.
* #782: affix — the module doc still rejected what the code now reads
Continuation classes and FORBIDDENWORD are supported; the header said
Rejected for both.
* #100: pt — Portuguese spelling, following the Polish module
ProofLang::Pt resolves pt/pt-BR/pt-PT/por tags; the pt module reads the
installed Hunspell pt_BR dictionary (VERO) through the affix engine —
FLAG UTF-8 flags, continuation classes and FORBIDDENWORD spellings all
exercised by the synthetic test dictionary. Hyphenated compounds are
checked part by part (guarda-roupa, ex-marido); without a dictionary
installed, Portuguese text gets no marks. Spelling message in
Portuguese; suggestions and grammar land next.
* #100: pt — Portuguese suggestions
Rounds of rising cost, driven by the dictionary's own tables: missing
accents from MAP (coraçao -> coração, saude -> saúde), the REP
confusions (seje -> seja, excessão -> exceção), a missing space after a
short function word (nãoé -> não é, dagua -> da água), one typo over
TRY, and an accent-folding stem scan — the Polish rounds, retuned for
Portuguese.
* #100: pt — Portuguese grammar flags
Conservative rules with Portuguese messages: repeated words (except
the emphatic doubles Portuguese allows), space before punctuation and
double spaces, sentence capitals knowing the Portuguese abbreviations
and dialogue dashes, and doubled punctuation. No comma rule: que opens
a clause only sometimes, so a wrong flag would cost more than a missed
one.
* #100: pt — Portuguese hyphenation
hyph-utf8's hyph-pt.tex bundled unmodified (BSD 3-clause, ATTRIBUTION
row with source and hash): 426 Liang patterns and 2 exception words;
falls back to the generic heuristic outside their reach.
* #100: pt — Review › Language offers Português (Brasil), and a pt-br interface writes pt-BR
The menu's fourth entry sets the run language; the status bar names
Portuguese; editing_lang is now allowed for pt-br (wordcraft-proof
proofs it), so new documents under a Portuguese interface are
Portuguese by default.
* #100: pt — engine test: Portuguese proofing through the review commands
review.language pt-BR normalizes the tag, review.issues reports
Portuguese spelling and grammar with the lang field, F7 and Change
apply a suggestion, Add to Dictionary works for Portuguese.
* #100: pt — Portuguese in the mixed-language proofing tests and docs
check_text proofs a Portuguese span with the Portuguese message; the
never-panic loops and the module docs cover the third language.
* #100: docs — Portuguese proofing in the gap, parity and roadmap docs
Gap 8 narrowed (English, Polish and Portuguese), localization parity
gains a Portuguese row and a revision entry, target-app-parity's
Proofing row moves 40% -> 42%, and the ROADMAP progress log records
what landed.
* #100: hunspell — LibreOffice extension folders follow the language
The search paths hardcoded LibreOffice's dict-pl; a pt_BR user whose
only dictionary is LibreOffice's dict-pt-BR extension — on Windows the
only realistic on-disk source — got silently no spelling. Both the
primary-language folder and the dashed full name are now tried, so
Polish keeps dict-pl and Portuguese finds dict-pt-BR.
* #100: pt — review fixes
Suggestion ties break toward the change nearest the word's start
(saúde before saudê, proven against a fixture that has both); the
Language menu's label is the English source "Portuguese (Brazil)" with
translations in all twelve catalogs (as Polish is); the attribution
counts pt.pat's 2 exception words; the pt fixture drops a duplicate
stem; docs/roadmap.md catches up with the landing; the throwaway spike
is gone.
* Review fixes for #782: two-suffix chain limit, module doc
- MAX_CHAIN = 2 counts suffixes in a row, matching Hunspell's two-suffix limit
(the old bound of 3 allowed up to four); test pins that a third is rejected.
- Module doc: say probes allocate small scratch strings instead of claiming none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Review fixes for #797: NOTICE for pt.pat, no indexing in the LibreOffice folder helper
- NOTICE reproduces hyph-pt.tex's BSD 3-Clause copyright notice, conditions and
disclaimer, which the licence requires for binary redistributions.
- hunspell::lo_ext_dirs builds its list without indexing (never-crash rule).
- Catalogs: main already translates "Portuguese (Brazil)" in every language, so the
duplicate rows the branch added are dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: witkowski01 <konradwitkowski01@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
|
||
|
|
b30cda1535 |
Persist the custom dictionary across sessions (#40) (#796)
* Persist the custom dictionary across sessions (#40) * Review fixes for #796: session-only Ignore All, desktop-only persistence, capped atomic I/O - review.ignoreAll no longer adds to (and saves) the custom dictionary: ignored words go to a separate session-only list, as Ignore All does in Word. - Only the desktop app wires the dictionary file. Headless MCP and `wordcraft-cli run` keep words in memory, so an agent never reads or changes the person's dictionary (and nothing writes outside an automation write root, #769). - Loading reads through `take(1 MB)`, so a huge file is never read whole; lines that aren't a single word (spaces, control characters, invalid UTF-8, over 64 characters) are skipped. - review.addToDictionary applies the same word rule (proof::custom_word), so a word added is never dropped on the next load. - Saving merges the words on disk first (another process's additions survive; words just removed stay out), creates the folder, and replaces the file atomically (temp + rename). The file I/O lives in the proof crate, so the engine doesn't touch std::fs itself. - Tests for each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d4d28e01f4 |
Skip non-English runs in proofing instead of flagging them (#100) (#741)
Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1fa5333b26 |
M15: Polish interface, and Polish spelling, grammar and hyphenation (#346)
* M15: Polish interface, and Polish spelling, grammar and hyphenation
Interface
- Polish is the tenth interface language ("Polski", pl.tsv, 1,045 entries);
pl, pl-PL and pl_PL.UTF-8 system locales select it automatically.
- Right-click menu labels now go through translation in every language.
- Review > Language is a menu (English US/UK, Polski, Do not check spelling
or grammar); the status bar shows the language at the caret.
- With a Polish interface, new blank documents and opened .txt/.md files
default to pl-PL.
Proofing
- Each run is checked in its own language (w:lang, resolved through
styles): squiggles, F7, review.issues, suggestions and hyphenation.
Text in languages without proofing tools is no longer flagged as English.
- Polish spelling from the SJP.PL Hunspell dictionary (Apache-2.0 option),
read by a new Rust affix engine (crates/proof/src/affix.rs); 875 KB asset,
~4.5M word forms. Regenerate with the pl_dictionary example.
- Polish suggestions: case, missing diacritics, rz/ż, ó/u, ch/h confusions,
missing spaces (napewno -> na pewno), edit distance.
- Conservative Polish grammar rules: repeated words, spacing, doubled
punctuation, sentence capitals, missing comma before że/który/ponieważ/
aby/żeby/jeśli…, we/ze forms.
- Polish hyphenation with the hyph-utf8 hyph-pl.tex patterns (MIT option);
pattern keys widened to 20 letters, TeX exceptions parsed; the heuristic
no longer treats ł, ż, ś… as vowels.
review.language validates and normalizes tags, can set noProof alone and
the document default; format.state reports lang and noProof.
Tests for every part, docs and ATTRIBUTION.md/NOTICE updated;
cargo xtask ci passes (fmt, clippy, test, assets, layers, wasm).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Layout: rustfmt the test module order left unformatted by #391
cargo fmt --check failed on main after #391 added mod tests_grid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Review fixes for #346: read Polish spelling from the installed Hunspell dictionary
- Polish spelling uses the Hunspell pl_PL dictionary installed on the
system (OS packages, Homebrew, LibreOffice, ~/.local/share/hunspell, or
WORDCRAFT_DICTIONARIES) instead of a bundled 870 KB SJP.PL file;
without one, Polish text gets no spelling marks, like Word without the
language's proofing tools. .aff/.dic are size-capped and decoded from
UTF-8 or ISO 8859-2 (crates/proof/src/hunspell.rs).
- The dictionary can be replaced at runtime (install_dictionary) or
re-searched (reload_dictionary); an empty one accepts every word.
- Tests use small synthetic dictionaries written for them, so they don't
depend on what the machine has installed.
- The bundled pl.dic, its ATTRIBUTION/NOTICE entries and the generator
example are removed; docs describe the installed dictionary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* M15: Polish catalog covers the interface text merged from main
The merge of main (
|
||
|
|
ad8c264420 |
Tables: resize by dragging column borders, row borders and the corner handle (#217) (#600)
Like Word: the pointer turns into a resize arrow over a column border or a row's bottom border, and a small handle shows past the table's bottom-right corner. Dragging shows a dashed guide; releasing runs the new `table.resizeDrag` command (page coordinates), so a drag is one undo step and the selection is kept. Esc cancels a drag. - Column border: the right neighbour gives or takes the difference, so the table keeps its width; Shift, or the table's right edge, changes only the column on the left. Columns stay at least 6 pt wide. - Row border: sets the row's "at least" height; the margins and border bands the layout adds are measured and taken off, so the row is drawn at the dragged height. - Corner handle: scales every column and the rows on that page. - Widths come from the drawn layout, so autofit and percentage widths don't make the result jump; a merged cell hides the border it covers. - Borders are hit-tested in the existing canvas mouse handler, only within a few pixels of a border, so clicks in cells still place the caret. Engine: crates/engine/src/cmd/table_resize.rs (7 tests). UI: crates/ui-egui/src/table_resize.rs, wired into canvas.rs; kittest tests drive real pointer events through the whole window (one undo step per drag, selection kept, clicks in cells still move the caret, Esc cancels). The command label is translated in all nine interface catalogs. Progress docs updated: gaps, ui-parity, target-app-parity, ROADMAP. `cargo xtask ci` passes (fmt, clippy, test, assets, layers, wasm). Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
833d0b00c2 |
#755: Line Numbers and Hyphenation measure in the Options unit (#795)
File > Options > Advanced > Measurement units (#485) missed these two dialogs: the Line Numbers "From text" distance and the Hyphenation zone read and sent inches whatever the preference was. They now convert through options::unit() like every other dialog; params still send points. Reported by @Ledity. Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
a520fb362d |
Track Changes: show deletions in balloons when 'Show revisions in balloons' is on - balloons now work (#734)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
f7a84fbfb8 |
Print Markup: comments in PDF, print, images and text copies (#589) (#667)
Rebased onto main as one commit (the branch had merge commits from main). Co-authored-by: Dmitrii Khlapov <19991457+dkhlapov@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
6a22d7257b |
Insert › SmartArt: create and edit list, process, cycle, hierarchy, pyramid, radial, matrix and venn graphics (#497) (#503)
- Model (doc::smart_art): layout, items (text + level), colour variant; capped at 100 items, 255 characters, 8 levels. - Layout algorithms of our own (docx::smart_art) place rounded rects, circles, bands, arrows and connectors; WordCraft draws the graphic from the same dsp:drawing it saves. - DOCX: data (dgm:dataModel points and connections), our own layout/quick-style/colour definitions under the built-in identifiers, the drawing part, relationships and content types. A diagram reads back editable only when its data part is exactly what WordCraft writes. - Commands: insert.smartArt, smartArt.items/addShape/promote/demote/layout/colors/reset/textPane, one undo step each; picture.size relays out a SmartArt graphic. - UI: layout picker with previews drawn in code, SmartArt Design tab, Text Pane; strings in all 9 catalogs. - Diagram reader draws `line` presets top-left to bottom-right (was the other diagonal). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
900c0f4412 |
Outline view: Outlining tab, levels, collapse/expand, Show Level (#493) (#499)
* Outline view: Outlining tab, levels, collapse/expand, Show Level (#493) - View › Outline is its own view mode: the body on one long sheet, each paragraph indented by its outline level behind a symbol drawn in code (circled plus for a heading with content, circled minus for one without, a dot for body text); paragraph indents and alignment hidden. - Collapsed headings hide their subtree and get a wavy line; Show Level 1-9 / All; Show First Line Only; Show Text Formatting off draws everything in the Normal style. All of it is view state (ViewState.outline), not saved; collapsed headings are found again by their text after edits, and a caret entering hidden text moves on to the next shown paragraph. - Commands: outline.promoteToHeading1/promote/demote/demoteToBody/level/moveUp/moveDown, outline.expand/collapse/toggle/selectSubtree, outline.showLevel (+ showLevel1-9, showAll), outline.firstLineOnly, outline.showFormatting, outline.close, outline.state. In Outline view Move Up/Down and Promote/Demote take a collapsed heading's hidden content along. - Keys: Alt+Shift+Plus/Minus expand/collapse, Alt+Shift+1-9 and Alt+Shift+A Show Level. - Outlining tab (next to File while in Outline view): level box, promote/demote, move, expand/collapse, Show Level, the two check boxes, Close Outline View. Clicking a symbol selects the heading with its content; double-clicking expands or collapses it. - Catalog: Outlining tab rows (421/453, 92.9%); translations in all nine catalogs; docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Docs: drop the stale shortcut and dialog rows left by the rebase (#493) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
50acc0c5f3 |
Vertical text for sections (w:textDirection) (#491) (#496)
- Model: SectionProps.text_direction (horizontal, tbRl, btLr); unknown values read as horizontal. - DOCX: w:textDirection in w:sectPr read and written in CT_SectPr order (after w:titlePg, before w:bidi), also inside w:sectPrChange. - Layout: a vertical section is laid out on its page turned on its side (margins, page borders and columns turned with it) and each page is turned onto the real page: tbRl lines run top to bottom stacking from the right, btLr bottom to top from the left. Pictures, shapes and text boxes stay upright; headers and footers stay horizontal; a section turning the other way starts a new page. - Display: in top-to-bottom text ideographs, kana, Hangul and full-width forms stand upright (ideographic comma/full stop moved to the upper right); Latin lies on its side. Raster and PDF draw it unchanged. - Hit testing: clicks outside turned lines find the nearest turned line. - Command layout.textDirection (Layout › Page Setup › Text Direction): turns the selected cells or the text box the caret is in, else the section; ribbon menu and keytip. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
e46133817a |
Templates and Add-ins: attached template, update styles, Organizer (#377) (#382)
* Templates and Add-ins: attached template, update styles, Organizer (#377) - Model + DOCX: Settings keep the attached template (w:attachedTemplate's external relationship of the settings part) and w:linkStyles; both round-trip, written in CT_Settings order (after w:mirrorMargins, before w:trackRevisions). - Engine: tools.templates (state), tools.attachTemplate, tools.detachTemplate, tools.linkStyles, tools.updateStyles (copy the template's styles and defaults, one undo step; path or base64 data), styles.organizer (list), styles.copyFrom (copies missing bases, linked halves and the lists a style numbers with), styles.rename. The template path comes from the document, so it is never read automatically (not on open either): only an explicit tools.updateStyles / attach with update reads it. - UI: View > Templates > Templates and Add-ins dialog (path, Attach..., automatically update document styles, Organizer...) and a two-list Organizer (Copy, Delete, Rename...); strings in every catalog, Estonian included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Review fixes for #382: never follow a template path to another machine A document's w:attachedTemplate can name \\host\share\T.dotx, //host/share or file://host/share. Opening it (Update Styles, Organizer) would make Windows authenticate to that host over SMB and leak the user's NTLM credentials. local_path now returns None for network paths; regression test added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #377: refresh catalog count and parity checklist after rebase --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
91b960ed74 |
Accessibility: the document canvas exposes its text to screen readers (#488) (#489)
The canvas is now the AccessKit document node: body paragraphs become paragraph, heading (with level) or list item (with level, grouped into lists, list numbers as list markers) nodes holding one text run per laid-out line with character lengths, positions, widths and word starts; tables are table/row/cell nodes, pictures and charts image nodes named by alt text, hyperlinks link nodes around their runs. The caret and selection are an AccessKit text selection on the document node. Only pages on screen and one either side are described, capped at 6000 nodes; nothing is built unless AccessKit is active, and the tree is rebuilt only when the layout, selection, described pages or their screen place change. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
4b5ed293d7 |
Compare, Restrict Editing and AutoCorrect Options dialogs (#412) (#476)
* Compare, Restrict Editing and AutoCorrect Options dialogs (#412) - Compare / Combine Documents dialog: original (this document or a file) and revised document, label changes with, More >> comparison settings, word or character level, show changes in. review.compare honours case changes, white space, formatting (tracked formatting changes), tables (compared and kept, no longer dropped) and character level; the LCS no longer drops text past its size cap. Unsupported settings are accepted and reported. - Restrict Editing pane: formatting restrictions (locked styles, w:formatting), editing restrictions, exceptions for everyone (w:permStart/permEnd), Start Enforcing Protection with an optional password (SHA-512, salt, spin count 100000; ECMA-376 §17.15.1.29) and Stop Protection. Enforced in Session::run: outside the exceptions nothing may change; undo can't lift protection; passwords never land in Repeat/macros. DOCX round trip of protection, hash attributes, locked styles and ranges. - AutoCorrect Options dialog: replacement list (add/replace/delete, built-in entries too), capitalization options with exceptions, AutoFormat As You Type switches, Math AutoCorrect list. Saved per user in ui.json; damaged values read as defaults. Names of days are capitalised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Restrict Editing: verify Word's legacy protection hash; refuse unsupported forms (#412) - Stop Protection checks Word's legacy w:documentProtection hash (w:cryptAlgorithmSid/w:hash/w:salt/w:cryptSpinCount) like Word: the password becomes the legacy 32-bit key (ECMA-376 Part 4 §14.8.1 initial code array and encryption matrix), its reversed bytes as an upper-case hex string are hashed with the salt prepended and the iteration number appended. A wrong password is rejected; the form no longer unlocks with any password. - Unsupported or damaged hashes (MD2/MD4/MD5 and other SIDs, w:algIdExt, unknown algorithmName, spin counts above 10,000,000, bad base64) refuse with "This password type isn't supported" and the protection stays on. A protection without a hash still stops without a password. - Known-answer tests: the specification's "Example" key 0x64CEED7E and an independently computed SHA-1 hash; pane message in all 9 catalogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
2ffba93b51 |
WordArt text effects and transforms, and shape connectors (#416) (#481)
* WordArt text effects and transforms, and shape connectors (#416) - Model: WordArt text effects on runs (fill solid/gradient/none, outline, shadow, glow, reflection), text warps on shapes (all DrawingML presets kept, adjust values capped), connector kinds (straight, elbow, curved) with glued ends, arrowheads and drawing ids (ShapeExtra). - DOCX: w14:textFill/textOutline/shadow/glow/reflection in w:rPr, a:prstTxWarp in wps:bodyPr, wps:cNvCnPr a:stCxn/a:endCxn, a:headEnd/a:tailEnd; glued-to shapes keep their docPr ids. - Layout/render/PDF: text with effects drawn from glyph outlines as paint layers (gradients, shadow/glow bands, faded reflection); warped text boxes bent along arch up/down, circle, wave, slant, inflate/deflate, chevron and triangle; connectors and arrowheads drawn as paths. - Engine: insert.wordArt makes a floating WordArt text box with our own styles; format.textEffects, wordArt.style/textFill/textOutline/transform, shape.connect; glued connectors re-route after object edits. - UI: WordArt style gallery (Insert, Home › Text Effects, Shape Format › WordArt Styles), Text Fill/Outline/Effects menus, Transform previews drawn from the warp geometry, connectors in Insert › Shapes, drag a connector end onto a shape to glue it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix tests for ShapeExtra, regenerate parity checklist, fmt (#416) * Regenerate parity checklist after rebase (#416) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
053bb0fd85 |
Content controls: keep, show and edit w:sdt (#381) (#392)
* Content controls: keep, show and edit w:sdt (#381) Content controls are now part of the model instead of being unwrapped on open: ControlStart/ControlEnd markers around their content (inline or around whole paragraphs), with table, row and cell wraps for controls around tables, repeating-section rows and cells. All sdtPr properties round-trip (title, tag, id, lock, placeholder, temporary, rich/plain text, w14 check box, combo box, drop-down list, date, picture, building block gallery, w15 repeating sections); unknown children are kept verbatim. The writer plans per block list which controls are written inline and which around blocks so the XML always nests, and drops markers that lost their partner. Editing: deletions keep a marker whose partner is outside the range, typing replaces a shown placeholder, emptying a control brings it back, sdtLocked and contentLocked refuse with a status message. Developer tab with insert commands, Design Mode, Properties dialog; frames and title tabs on the page, check boxes toggle on click, list and calendar pickers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #381: refresh catalog count and parity checklist after rebase --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
fd014ea9a1 |
Insert › Chart: create and edit column, bar, line, pie, area, scatter and doughnut charts (#409) (#415)
* Insert › Chart: create and edit column, bar, line, pie, area, scatter and doughnut charts (#409) - Chart model (wordcraft_doc::chart::ChartSpec): type (clustered/stacked column and bar, line, area, pie, doughnut, scatter), categories, series, title, legend, data labels; sanitized (255 series, 4000 points, 100k cells, 255-char text, non-finite values dropped). - DOCX: charts with a model are written as word/charts/chartN.xml (c:chartSpace, ECMA-376 §21.2, data as c:strLit/c:numLit, no c:externalData) with relationship and content type. On read, a chart part becomes editable only when writing its model again gives the same markup; every other chart stays read-only and kept as before (#319). - Drawing reuses read/chart.rs (the model is drawn from its generated part); data labels (c:dLbls showVal) are now drawn for bar, line, area, scatter, pie and doughnut charts. - Commands: insert.chart, chart.type, chart.editData, chart.title, chart.legend, chart.dataLabels (one undo step each); picture.size redraws an editable chart at its size. - UI: Insert › Chart gallery with previews drawn in code, Chart Design contextual tab, Edit Data grid dialog; strings in all 9 catalogs; catalog 408/439. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #409: refresh catalog count and parity checklist after rebase --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d5bcb9b490 |
Accessibility: alt text for every object, decorative flag, more checker rules (#386) (#396)
- Model: Float carries AltText (title, decorative; the description of shapes and groups);
InlineObject::alt_text/set_alt_text/is_decorative; TableProps.description. Capped input.
- DOCX: wp:docPr / pic:cNvPr / wps:cNvPr descr, title and the [MS-ODRAWXML] adec:decorative
extension read and written for pictures, shapes, text boxes, groups and members, charts;
OLE objects get their alt text in the kept XML; w:tblCaption + w:tblDescription.
- Commands: object.altText {text?, title?, decorative?} (picture.altText kept as alias),
table.altText {title?, text?}, view.accessibilityPane, view.altTextPane.
- Checker (cmd/accessibility.rs): alt text on every object and table (decorative passes),
heading order, header rows, blank table rows/columns, merged cells, WCAG contrast,
floating objects, blank paragraphs; issues carry pos/select and fix actions.
- UI: Accessibility pane (grouped, jump-to, fix buttons), Alt Text pane, Picture/Shape
Format > Accessibility > Alt Text, right-click > View Alt Text...; strings in all catalogs.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
|
||
|
|
56f9456f03 |
References dialogs: Caption, Index, Table of Contents, Create Source (#402) (#410)
* References dialogs: Caption, Index, Table of Contents, Create Source (#402) - Caption: labels (built-in plus New/Delete Label, kept with the interface settings), above/below the item, leave the label out, Numbering (format, chapter number from a heading level with a separator) -> SEQ \* \s and STYLEREF n \s fields; Update Field renumbers SEQ with \s restarts, \r, \c, \h. - Index: indented/run-in, columns, right-aligned page numbers with tab leader, letter headings -> INDEX \h \c \e \r; Mark Index Entry (subentry, cross-reference, page-range bookmark, bold/italic page numbers, Mark All) -> XE \t \r \b \i. The index is rebuilt honouring them; columns become a continuous section of their own. Index commands move to cmd/index.rs. - Custom Table of Contents: page numbers, right align, tab leader, hyperlinks, levels, Options (heading styles, other styles with levels, outline levels, TC fields), Modify for TOC 1-9 -> TOC \o \h \z \u \t \f \l \n \p; updating honours them (hyperlinks to _Toc bookmarks). - Source Manager and Create/Edit Source: source types with their fields, show every bibliography field (new Source fields); Insert Citation menu lists the sources and Add New Source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fmt (#402) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
4ca58d67e1 |
Draw: Lasso Select, Add Pen, Ink to Shape and Ink Replay (#395) (#408)
* Draw: Lasso Select, Add Pen, Ink to Shape and Ink Replay (#395) - draw.lasso: with no points picks up the lasso; with a loop on a page it selects the strokes mostly inside it and drawings whose centre is inside. draw.lassoMove / draw.lassoColor / draw.lassoDelete move, recolour and delete the selection (one undo step each); it lasts until the document changes otherwise. In the app: drag a loop, drag the selection to move it, Delete deletes, Esc lets go, the Color menu recolours it. - draw.addPen / draw.removePen: a pen gallery (kind, colour, width; capped, validated) shown after the built-in pens, kept in ui.json; damaged entries are dropped on reading. Right-click a gallery pen to remove it. - draw.inkToShape: toggles Ink to Shape (pen and pencil strokes that look like a line, rectangle/square, ellipse/circle, triangle or polygon of up to eight corners become that shape, in the same undo step); with ink lasso-selected it converts the selection (draw.convertInk). Our own recogniser (cmd/ink_shape.rs): chord test for lines, closure test, ellipse RMS fit, closed RDP simplification with corner merging. - draw.replay: Ink Replay plays the strokes back in drawing order with a Rewind / Play-Pause / Forward / Close bar; pages are drawn without ink meanwhile. Each new stroke records its drawing order (Freeform::order), written to DOCX in the drawing name (`Ink Pen 3 #12`) and read back. Catalog 402/434 -> 406/434 (93.5%). New strings in all nine catalogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Regenerate parity checklist after rebase (#395) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
6526b134be |
Document grid: lines per page and characters per line (#391) (#401)
- Model: `SectionProps::doc_grid` (`w:docGrid` type, line pitch, charSpace) and the paragraph `w:snapToGrid` flag; DOCX read and write (ECMA-376 §17.6.5). - Layout: with a line grid, lines of snapping paragraphs take whole line pitches with their text centred; with a character grid, East Asian characters take whole cells of the character pitch (all text with snapToChars), Latin text stays proportional. Hostile pitches and charSpace are clamped. Headers and footers don't snap. - Command `layout.documentGrid` (type, linesPerPage, charsPerLine, linePitch, charSpace), one undo step, section scope; catalog row under Layout › Page Setup. - Page Setup dialog: Document Grid section; View › Gridlines draws the document grid of a section that has one. UI strings in every catalog (incl. et, sr, sr-latn). - Tests: DOCX round trip, line pitch and lines per page, character pitch placement, command with clamping and undo. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
30993ffb3f |
Track Changes: moves (w:moveFrom/w:moveTo) (#400) (#404)
Moved text is tracked as a move instead of a deletion plus an insertion: - Model: Revision::move_name links the source (a deletion revision) and the destination (an insertion revision) of a move; runs and paragraph marks keep using ins/del, so everything that hides deletions or exports the result treats the moved-away text like a deletion. - DOCX: w:moveFrom / w:moveTo inside w:moveFromRangeStart/End and w:moveToRangeStart/End (ECMA-376 17.13.5.21-28) are read as linked moves, paragraph marks included; on save the ranges are written around each moved stretch with the move's name, author and date, moved-away text in w:t. A move missing an end, or whose range never ends, opens as a plain deletion and insertion. - Recording: with Track Changes on, a cut of a paragraph or at least a sentence gets a revision of its own; pasting it right after makes both a move (pasted paragraph marks are tracked as inserted too). - Accept/Reject at either end resolves both; the Reviewing Pane lists moveFrom/moveTo with the move name and "Moved from"/"Moved to". - Markup: green, double strikethrough at the source and double underline at the destination; "Moved from"/"Moved to" balloons. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
4e710a920b |
Footnote and Endnote options per section (#385) (#390)
- Model: NoteProps (pos, numFmt, numStart, numRestart) in the settings and each section; Document::note_options resolves section > document > defaults. - DOCX: w:footnotePr / w:endnotePr read and written in settings and every w:sectPr in schema order; hostile numStart clamped (ECMA-376 §17.11). - Layout: footnotes below the text, endnotes at the end of each section, numbering restarted per section or per page (from where notes land, at most three passes), per-section number formats. - Commands: references.noteOptions takes kind/pos/numFmt/numStart/ numRestart/scope; references.convertNotes (footnote/endnote/swap, one undo step); references.footnote/endnote take a custom mark. - UI: Footnote and Endnote dialog from the Footnotes group launcher; strings in every catalog. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f8f1d80c38 |
Shape Format › Text: direction, alignment and linked text boxes (#369) (#380)
- Model: TextBody on text box parts (vert, anchor, next link); chain resolution ignores cycles, self-links and second claimants and caps chains at 256 boxes; pruning a box clears links to it. - Layout: text boxes lay out in their own frame and turn like table cells (rotate 90°/270°), stacked text one letter to a line, Align Text top/middle/bottom; linked boxes split the first box's story by line, each at its own line length. - DOCX: wps:bodyPr vert/anchor, wps:txbx id and wps:linkedTxbx id/seq read and written (ECMA-376). - Commands shape.textDirection, shape.alignText, shape.link, shape.breakLink; ribbon Shape Format › Text group with drawn icons; Create Link waits for a click on the target box. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
72e59f9f0b |
Drawing Canvas: insert a canvas and draw shapes, pictures and text boxes inside it (#344) (#356)
Insert > Illustrations > Shapes > New Drawing Canvas (and Draw > Drawing Canvas) inserts a 6" x 3" canvas in line with text. While it is selected, Pictures, Shapes and Text Box put the new object inside it. Fit, Expand and Scale Drawing change its frame, Shape Fill and Shape Outline colour its background and border, and canvas.member moves, resizes or removes a member. The canvas is the group object with a canvas style: its frame is independent of its members, and members outside it are clipped on screen and in PDF (new Draw::Clip / Placed::Clip). DOCX reads and writes wpc:wpc with wpc:bg, wpc:whole and wps:wsp / pic:pic members. A canvas turns and flips as a whole, like a group (#332): its background, outline and clipped members are drawn inside its turn (Draw::Rotated around Draw::Clip; Placed::Clip carries the spin, its members sit in the unturned frame), and hit testing follows the turned frame. The canvas schema has no transform of its own, so a turned canvas keeps its rot/flipH/flipV as an a:xfrm in a wpc:extLst extension (urn:wordcraft:canvas-xfrm), which Word skips. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
589e82e050 |
Mail merge recipients from Excel and OpenDocument spreadsheets (#334) (#341)
Select Recipients › Use an Existing List… now reads .xlsx, .xlsm and .ods workbooks besides CSV. A new read-only SpreadsheetML / ODF spreadsheet reader in wordcraft-formats lists the sheets and turns one sheet into rows of display strings: shared, inline and rich strings, numbers, booleans, cached formula results, dates and times as ISO 8601 from the cell's number format, sparse cells, ODS value types, repeated rows/columns and covered cells. Zip entries, rows, columns, cells, string lengths and repeat counts are capped, and nothing recurses. mailings.recipients takes "data" (base64) and "sheet" and "headers"; a workbook with several sheets and no sheet answers with the sheet names, and the app shows a Select Table dialog with "First row of data contains column headers". The desktop picker, dropped files and the web inbox route spreadsheets to the recipient list. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
8a2a8bb60d |
Insert > Icons: an original icon library, a searchable picker and Icon Color (#309) (#318)
Adds wordcraft_render::icon_lib, 61 monochrome icons in ten categories
(Arrows, Communication, Office, People, Nature, Weather, Shapes, Symbols,
Technology, Transport). They are original WordCraft artwork: simple
geometric line drawings designed on a 24x24 grid as path data in code, with
no icon files and nothing copied from another icon set.
insert.icon {"id", "color"?, "size"?} renders the chosen icon with vello_cpu
to a transparent PNG at about 300 ppi and inserts it at the caret through the
ordinary picture path, so it saves to .docx and every other format. Without
an id it lists the library (narrowed by query and category) and asks the
front end for the picker. picture.iconColor repaints a one-colour picture
in a new colour and keeps its transparency.
Insert > Illustrations > Icons opens a dialog with a search box, category
chips and a grid of icons drawn live by the egui painter from the same path
data; Insert or a double click places the selection. Picture Format > Adjust
gains an Icon Color menu. New strings are translated in every catalog.
Catalog parity 393/434 -> 394/434 (90.8%).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
|
||
|
|
a5b17eb3a4 |
Enclose Characters: put a character in a circle, square, triangle or diamond (#301)
* Home › Font › Enclose Characters: circle, square, triangle or diamond around a character (#297) New command format.enclose {"shape": "circle|square|triangle|diamond" | null, "style"?: "shrink|enlarge", "text"?: string} puts one full-width or up to two half-width characters in an enclosure, changes its shape, or (null) takes the text back out. It is stored the way ECMA-376 describes it: an EQ field with the overstrike switch, eq \o\ac(○,字), with the text as its plain-text result. Layout now draws EQ \o fields: the arguments overstruck as one cluster (centred, \al or \ar). An enclosure symbol among them is drawn as a vector shape around the text in the text's colour, so it never depends on the font having ○ □ △ ◇; "shrink text" scales the text into a one-em shape, "enlarge symbol" grows the shape around text at its own size. Screen and PDF both get it through the display list. Imported Word documents with enclosed characters used to show nothing (the field has no result); they now render. .docx: written as Word stores enclosed characters (begin, the code split so the symbol and the text have their own run sizes, end, no result); the reader recovers the style from those sizes. The style lives in the model as a trailing \* enlarge on the code, never written to a file. Home › Font gets an Enclose Characters button that opens a dialog (Style: None / Shrink text / Enlarge symbol, Text, Enclosure list, a drawn preview); scripts with a shape never see it. Strings in every interface catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Merge fix: keep both sides (enclosures and ruby; tests); regenerate parity checklist --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |