Commit Graph
1287 Commits
Author SHA1 Message Date
aiongg ff5d4e1f8e Integration: #1509 spelling suggestions include the common words 2026-10-30 21:24:47 +00:00
aiongg 2bf89ce370 Integration: #1394 turning Auto-Fit off alone keeps the picture where it is 2026-10-30 21:23:07 +00:00
aiongg 6a1d554d44 Integration: #1554 prefs.set rejects unknown keys inside defaultUnits 2026-10-30 21:22:34 +00:00
aiongg 92327dcc4c Merge track b: swatches, canvas, tools and tables PRs
Conflicts: engine/src/tests.rs and i18n/*.rs: adjacent additions from both sides, both kept.
2026-10-30 20:49:48 +00:00
aiongg e15fc040b5 Merge track a: properties, object and layout PRs
Conflicts: dialogs/tests.rs and i18n/{ar,cs,it,ka,pl,pt_br,ru,uk}.rs: adjacent additions from both sides, both kept.
2026-10-30 20:49:28 +00:00
aiongg e3aa2c260a Merge PR #1509: Spelling: "we", "if", "email" and contractions with a typographer's apostrophe aren't misspelled 2026-10-30 19:46:49 +00:00
aiongg 4638b19387 Merge PR #1257: TOC: generate and refresh PDF bookmarks
crates/ui-egui/src/dialogs/tests.rs: kept HEAD, appended #1257's new test
2026-10-30 19:46:49 +00:00
aiongg eb2eb299f3 Merge PR #1508: Insert Pages dialog as InDesign's: before or after a page, at the start or end, with a parent
crates/ui-egui/src/i18n/*.rs: kept both sides' rows (unique keys)
2026-10-30 19:46:06 +00:00
aiongg 2f8c43a079 Merge PR #1554: Preferences: Units & Increments with no document open set the units of new documents, as in InDesign
crates/ui-egui/src/dialogs/tests.rs: kept HEAD, appended #1554's new test
2026-10-30 19:45:55 +00:00
aiongg 3fa5fbbbc7 Merge PR #1433: Fitting: Clear Frame Fitting Options, and the submenu grouped as the reference app's
Conflicts:
crates/ui-egui/src/menus/tables.rs: kept the Fitting separator from the Object menu order (#1413); #1433's own comment line dropped
crates/ui-egui/src/i18n/*.rs (ar, cs, de, it, ja, ka, pl, pt_br, ru, uk): kept both sides' keys, plus #1433's Clear Frame Fitting Options
2026-10-30 19:45:49 +00:00
aiongg 52ea6806df Merge PR #1496: Find/Change: Change Format, with a character or paragraph style
crates/ui-egui/src/dialogs/tests.rs: kept HEAD, appended #1496's new test
crates/ui-egui/src/i18n/*.rs: kept both sides' rows (unique keys)
2026-10-30 19:45:28 +00:00
aiongg 4a6be7eef5 Merge PR #1406: Object: Corner Options opens a dialog laid out as the reference app's, also from the Properties Corner link
Conflicts:
crates/ui-egui/src/i18n/*.rs (table, ar, cs, de, it, ja, ka, pl, pt_br, ru, uk): kept both sides' keys (#1414's Stroke Type/Corner Shape, #1406's Corner Size and Shape:), no duplicates
2026-10-30 19:45:16 +00:00
aiongg dc14a8c329 Merge PR #1492: Character styles: a new style from the selected text, applied to it
crates/ui-egui/src/dialogs/tests.rs: kept both sides (the new character-style test added next to #1464's)
crates/ui-egui/src/i18n/*.rs: kept #1464's rows and added only #1492's new keys (New Paragraph/Character Style); older copies of #1464 rows dropped
2026-10-30 19:45:05 +00:00
aiongg e703cd6f24 Merge PR #1390: Properties: Text Wrap shows the four wrap offsets, as in the reference app
Conflicts:
crates/ui-egui/src/panels/properties/tests.rs: kept both sides' tests (earlier merged tests plus #1390's text wrap offsets test)
2026-10-30 19:44:50 +00:00
aiongg 0a2a2039a5 Merge PR #1674: Tables: Shift+Tab goes back a cell, and Esc toggles between the text and the cell 2026-10-30 19:44:37 +00:00
aiongg 4e41f2ea0a Merge PR #1464: Paragraph styles: a new style from the selected text, Next Style, Reset To Base
crates/ui-egui/src/dialogs/tests.rs: kept both sides' appended tests
crates/ui-egui/src/i18n/*.rs (table, ar, cs, it, ka, pl, pt_br, ru, uk): kept both sides' rows (unique keys)
2026-10-30 19:44:32 +00:00
Dylan M. Taylor 15d13dde20 Update prompt shows the app icon and accent color instead of a letter (#2023)
UPDATE_APP (native builds; craft-update is a native-only dependency) carries our 128 px icon and accent (#7bb51c, its colour in ArtCraft Launcher). The updater, the self-update
helper and craft-update's startup prompt all get them through crate::UPDATE_APP; the
prompt draws the icon, the accent and "by ArtCraft" (craft-update's default developer).

craft-update is pinned to storytold/craft-libs main at 1065653e7 (#434).
Clippy fixes for Rust 1.99 in untouched code (same logic):
- crates/engine/src/cmd/export/text_tests.rs
- crates/pdf/src/gradient_inks.rs
2026-10-30 01:28:06 -04:00
Brandon Thomas 7e841a073e Merge pull request #1972 from VoiceLessQ/fix/1209-autoflow-parity-runaway
Autoflow: a frame a Start Paragraph option ends early sets no fill rate (fixes #1209)
2026-10-29 21:54:51 -04:00
Brandon Thomas 8867f312e9 Merge storytold/main into PR #1972 2026-10-29 21:53:38 -04:00
Brandon Thomas 7c24b673af Merge storytold/main into PR #1893
# Conflicts:
#	crates/engine/src/cmd/xml.rs
2026-10-29 21:53:38 -04:00
Brandon Thomas 08e8fdf655 Merge pull request #1909 from Hamza0101/fix/unc-test-runs-on-windows
Data merge: the UNC refusal is tested on Windows too (#1601)
2026-10-29 21:52:57 -04:00
Brandon Thomas f9fabc3334 Merge pull request #1840 from dotCooCoo/fix/print-test-driver-default-color
Print: the Windows print test expects the driver's default color
2026-10-29 21:52:42 -04:00
Brandon Thomas b4463b5b26 Merge pull request #1911 from Hamza0101/fix/merge-image-reads
Data merge: an image named by many records is read once (#1595)
2026-10-29 21:52:38 -04:00
Brandon Thomas 1f20480194 Merge pull request #1948 from Silvertree2010/fix/h3527-placing-a-plain-text-file-keeps
Strip story marker characters from placed plain text files
2026-10-29 21:52:33 -04:00
Brandon Thomas c0d1acd2b3 Merge pull request #1568 from Hamza0101/fix/table-insert-size
A table size Create Table cannot mean is refused
2026-10-29 21:52:22 -04:00
Brandon Thomas 0a05c1631c Merge pull request #1233 from seanth/running-header-order
[fix] Running headers read a page in text order, not by height
2026-10-29 21:52:08 -04:00
Brandon Thomas 9d73109012 Merge pull request #1908 from Silvertree2010/fix/h2951-xml-export-writes-control-charac
Drop XML-forbidden control characters in file.exportXml
2026-10-29 21:51:57 -04:00
moppeeerandClaude Opus 5.5 741fbe9fac Paragraph styles: create_para whole again, with the style name parameter helper before it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 23:06:21 +01:00
moppeeerandClaude Opus 5.5 948482d60f Tab in footnote text is typed, not taken for the next table cell
Footnote text is addressed as a cell too (as 2e44b190 handled for
Shift+Tab, Esc and the cell commands); text.insert now types the Tab
there instead of failing in table.nextCell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:34:27 +01:00
moppeeerandClaude Opus 5.5 e96baa7f7f Table keys: the selection helpers by their paths on main's split modules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:19:19 +01:00
moppeeer c4479a1152 Merge remote-tracking branch 'origin/main' into find-change-format
# Conflicts:
#	crates/engine/src/cmd/find.rs
#	crates/engine/src/cmd/style.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/icons.rs
2026-10-29 12:07:04 +01:00
moppeeer 190a5908f3 Merge remote-tracking branch 'origin/main' into paragraph-style-general
# Conflicts:
#	crates/engine/src/cmd/style.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
2026-10-29 11:52:24 +01:00
moppeeer d4a00a207f Merge remote-tracking branch 'origin/main' into character-style-from-selection
# Conflicts:
#	crates/engine/src/cmd/style.rs
#	crates/engine/src/cmd/text.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
2026-10-29 11:51:59 +01:00
moppeeer c0b4746c8d Merge remote-tracking branch 'origin/main' into codex/toc-pdf-bookmarks
# Conflicts:
#	crates/engine/src/cmd/style.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/dialogs.rs
2026-10-29 11:44:22 +01:00
moppeeer 271d20ba7f Merge remote-tracking branch 'origin/main' into properties-wrap-offsets
# Conflicts:
#	crates/ui-egui/src/panels/properties.rs
2026-10-29 11:43:59 +01:00
moppeeer b26ae037de Merge remote-tracking branch 'origin/main' into corner-options-dialog
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/panels/properties.rs
2026-10-29 11:43:35 +01:00
moppeeer e094562ef6 Merge remote-tracking branch 'origin/main' into clear-fitting-options
# Conflicts:
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/menus.rs
2026-10-29 11:42:45 +01:00
moppeeer 6b57bebd6b Merge remote-tracking branch 'origin/main' into insert-pages-dialog
# Conflicts:
#	crates/engine/src/cmd/layout.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/menus.rs
#	crates/ui-egui/src/panels/pages.rs
2026-10-29 11:40:06 +01:00
moppeeer fffafb7122 Merge remote-tracking branch 'origin/main' into global-units-preferences
# Conflicts:
#	crates/engine/src/cmd/file.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/menus.rs
2026-10-29 11:39:22 +01:00
moppeeer 0d9b7c74ac Merge remote-tracking branch 'origin/main' into table-cell-keys
# Conflicts:
#	crates/engine/src/cmd/table.rs
#	crates/engine/src/cmd/text.rs
2026-10-29 11:38:49 +01:00
VoiceLessQ 89ccfbb18c Autoflow: count each forced move once, and only visible breaks (#1209)
fit() counted every break character in the overset text and every
Start Paragraph option. A break followed by a paragraph whose option it
already meets moved the text once but asked for two frames, and breaks
that tracked changes delete or a hidden condition hides asked for
frames that composing never uses. Autoflow added those pages and
removed them again: 200 chapters that end in page breaks and start on
the next page took 61095 ids and 430 ms, now 798 ids and 16 ms.

Each paragraph composing places now counts once, when a visible break
ends the paragraph before it or its start option sends it on; after a
break it is at the top of a frame, where the option only fixes odd or
even page parity. A visible break inside a paragraph counts once more.
previous_visible_break and the new visible_break in designcraft-compose
are public, so the estimate and the composer use one rule.
2026-10-28 23:08:41 -02:00
VoiceLessQ ca85be89d2 Autoflow: skip deleted paragraphs and ask for every forced frame at once (#1209)
The start option lookup now reads the next paragraph composing places,
past tracked-deleted ones. Frames that start options and breaks force
are counted and asked for in one round, so a story with a paragraph per
page no longer gets one frame per round.
2026-10-28 22:32:07 -02:00
VoiceLessQ e248b63165 Autoflow: a frame a Start Paragraph option ends early sets no fill rate (fixes #1209)
fit() counted the frame before a paragraph that starts on the next
column, frame, page or odd/even page as a full frame. With a short
title before such a paragraph, autoflow estimated a page per few bytes
left and added up to 2000 pages before removing them again: placing
2000 words took 35.6 s in the app, now 0.36 s, with the same pages.

The option is resolved through the paragraph style, so an imported
Word style counts the same as a local override.
2026-10-28 21:46:56 -02:00
Claude 94e0e75249 Merge storytold/main (v0.14.0) into running-header-order
The running-header tests move to cmd/variables/tests.rs with upstream's split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
2026-10-28 18:00:57 +00:00
NetterSilverandClaude Haiku 5.5 79b871b94f Strip story marker characters from placed plain text files
Found while testing crates/textimport/src/lib.rs:140 (plain) and crates/engine/src/cmd/place_text.rs:372 (place_text)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 15:18:35 +00:00
Hamza 352609117f A table size Create Table cannot mean is refused
A size that was given but is not one a table can have was corrected in
silence: {"rows": 0} made a table with one row, -1 and 1.5 made the default
four, and 10000 was capped at 500 -- so a script asking for a shape the
command cannot honour got a different table and no indication of it.

A size that is absent still takes the default; a size that is present and
outside the range is refused, naming the key and the range.

Rebased onto the post-split main: `table.insert` moved to
table/structure.rs and the tests to table/sizing.rs. The helper is named
`given` rather than `count`, which that module already imports from
table/target.rs for the repeat count of a row or column insert.
2026-10-28 18:20:13 +05:00
Dylan M. Taylor 5b21472180 Refactor engine for strict Clippy checks 2026-10-28 11:39:26 +00:00
Hamza ff35b3561f Data merge: an extended-length drive path is a local file, not a refusal
Review caught a wrong assertion in my own test. `\\?\C:\x` is the
extended-length spelling of `C:\x`: craft-docpath parses it as
Root::VerbatimDrive, is_absolute, and its own suite classifies it
PathKind::Local. The test asserted it was refused, so it would have
failed on Windows -- the one platform it runs on.

A data file can already name C:\secret\x.png, so refusing the long
spelling would have shut out long paths without shutting anything out.
It is now asserted the other way, and the refusal list keeps a device
path in its place.

Each shape was checked against the pinned craft-docpath through
resolve(), which recognises Windows forms on every platform, so the
verdicts are first-hand and not read off the source: Network for the
extended UNC prefix, Device for \\.\pipe, GLOBALROOT, CON and NUL.png,
and Ok for \\?\C:\secret\x.png.
2026-10-28 15:33:12 +05:00
Hamza a30744fed1 Drop the unused ImageCache inspection methods
`len` and `is_empty` were added for a test that ended up counting reads
through `io::touched` instead, so they were dead code -- and the gate runs
`cargo clippy --workspace --all-targets -- -D warnings`, which turns
`dead_code` into a failure. Hosted CI was red on this PR.

My local check had been `cargo clippy -p designcraft-engine --all-targets`
without `-D warnings`, which is why I missed it; re-ran it the way the gate
does.

Found by the review bot, confirmed against the CI log.
2026-10-28 11:53:56 +05:00
Hamza 7c25cd97c4 Data merge: an image named by many records is read once (#1595)
`place_image` stat'd and read its file for every record, so a sheet naming one
image in many rows read it once per row -- up to 256 MiB each time. The audit's
case is a 100,000-row CSV naming one large file: about 25 TB of I/O for one
merge.

A merge now carries an `ImageCache`: the bytes by resolved path, read once and
shared. The asset takes the cached `Arc` rather than a copy, so the records
share one buffer as well. The cache stops growing past 256 MB of distinct
files, so a merge over many large images is slow rather than out of memory.

Measured by counting what the engine hands the file system (`io::touched`):

    without the cache   50 reads for 25 records   (a stat and a read each)
    with it             2

A note on the test, because the first one I wrote was useless: asserting on the
bytes the document holds passes either way, since `add_asset` already dedupes
identical content. Memory never showed this; the I/O is the bug, so the test
counts reads.

Audit DC-14. Its second half -- capping the pages a merge produces -- is not
here: how many pages a merge may make is a product decision, and the records
are the user's own data rather than something arriving from outside.
2026-10-27 15:25:27 +05:00