Commit Graph
1248 Commits
Author SHA1 Message Date
aiongg 7445b8eee7 refactor(engine): move cmd/datamerge/mod.rs to cmd/datamerge.rs 2026-10-26 18:15:31 +00:00
aiongg 8b56a75f19 refactor(engine): move cmd/mod.rs to cmd.rs 2026-10-26 18:15:31 +00:00
aiongg ae732c3a90 Pin the export time in the page-list export test (#1850) 2026-10-25 23:20:52 -04:00
aiongg 2e6df922c8 Merge remote-tracking branch 'upstream/main' into print-color-separations
# Conflicts:
#	Cargo.lock
#	crates/engine/src/cmd/export.rs
2026-10-26 02:05:49 +00:00
aiongg 7cc4f7111c Merge pull request #1384 from aiongg/print-color-x1a
Print color: PDF/X-1a export through craft-prepress's flattener
2026-10-25 21:59:30 -04:00
aiongg 3c19a24e68 Merge pull request #1374 from aiongg/print-color
Print color: overprint, knockout, CMYK blending and spot gradients through craft-pdf
2026-10-25 21:58:20 -04:00
Dylan M. Taylor 42463ce99d Reduce cognitive complexity in variables, PDF graphics, compose frames and menu shortcuts (#1847)
* refactor(engine): split convert_all's per-story plan into convert_plan

Resolves SonarCloud rust:S3776 on convert_all (cmd/variables.rs).

* refactor(pdf): split graphic_unclipped into per-kind helpers

Resolves SonarCloud rust:S3776 on graphic_unclipped (pdf/src/export.rs).

* refactor(compose): extract wrap exclusions and frame text area from frame_specs_placed

Resolves SonarCloud rust:S3776 on frame_specs_placed (compose/src/lib.rs).

* refactor(ui): extract command shortcut lookup from shortcut_key

Resolves SonarCloud rust:S3776 on shortcut_key (ui-egui/src/menus.rs).
2026-10-25 21:25:52 -04:00
Dylan M. Taylor e413cdf59b Reduce cognitive complexity in find, lists, PDF font/layer scans; fix wildcard import (#1846)
* test(pdf): replace wildcard super import in registration_tests

Resolves SonarCloud rust:S2208 (new code).

* test(engine): extract child-scope rejection assertions in find tests

Resolves SonarCloud rust:S3776 on find_scope_children_error_atomically_and_parent_requests_stay_top_level.

* refactor(engine): extract per-paragraph list update from apply_list

Resolves SonarCloud rust:S3776 on apply_list.

* refactor(pdf): extract form scanning from FontScan::content

Resolves SonarCloud rust:S3776 on FontScan::content (pdfx/fonts.rs).

* refactor(pdf): extract layer helpers from optional_content::prepare

Resolves SonarCloud rust:S3776 on prepare (optional_content.rs).
2026-10-25 21:25:48 -04:00
aiongg d90881a8a9 Merge branch 'print-color' into print-color-separations
# Conflicts:
#	Cargo.toml
2026-10-26 01:11:35 +00:00
aiongg c856db68f1 Merge branch 'print-color' into print-color-x1a
# Conflicts:
#	Cargo.toml
2026-10-26 01:11:11 +00:00
aiongg 240dbcf731 Merge remote-tracking branch 'upstream/main' into print-color
# Conflicts:
#	Cargo.toml
#	crates/idml/src/export.rs
2026-10-26 01:10:39 +00:00
Dylan M. TaylorandClaude Sonnet 5.5 3eeab5aead refactor(engine): reduce complexity in path join and paragraph style apply (Sonar) (#1729)
* refactor(engine): split join_paths and apply_para (Sonar S3776)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(engine): use the resolved style types in apply_para_in_story

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Pass the resolved styles by reference at the call site

* Drop the range binding the call no longer uses

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 17:48:35 -04:00
Dylan M. Taylor 98ada498d5 Fix the imports the explicit-import refactor missed
The Sonar S2208 sweep replaced use super::* with explicit lists, but
tests_ime.rs and panel_docking_tests.rs use helpers added after it was
written, so main stopped compiling.
2026-10-25 16:49:17 -04:00
Dylan M. Taylor 4322609d4b Merge pull request #1722 from storytold/sonar/engine-datamerge
refactor(engine): data merge complexity and parameter counts (Sonar)
2026-10-25 16:31:23 -04:00
Dylan M. Taylor a4143e031a Merge pull request #1735 from storytold/sonar/engine-d
refactor(engine): reduce complexity in find.change and used_fonts (Sonar)
2026-10-25 16:30:36 -04:00
Dylan M. Taylor 19bc14fe03 Merge pull request #1718 from storytold/sonar/s1612-b
chore: method paths for remaining closures (Sonar S1612)
2026-10-25 16:30:13 -04:00
Dylan M. Taylor 05e5f17913 Merge pull request #1717 from storytold/sonar/s2208-a
chore: explicit imports in test modules (Sonar S2208)
2026-10-25 16:29:55 -04:00
aiongg 074db00079 Merge print-color into print-color-x1a
Brings in #1374 with upstream main merged (egui 0.37, craft-libs at
storytold/craft-libs e3b9e239).

Conflicts:
- Cargo.toml: print-color's pins (storytold/craft-libs e3b9e239 for
  craft-pdf, craft-prepress, krilla and the hayro crates; winit and egui
  patches), with craft-prepress keeping the `flatten` feature.
- xtask/src/pdf_deps.rs: print-color's REPO/REV.
- Cargo.lock: print-color's, relocked with cargo metadata; adds only
  craft-prepress and linesweeper.
- crates/pdf/src/export.rs: main's optional-content registration and
  add_form_fields helper; the helper leaves form fields and media out of
  PDF/X-1a with a warning.
- crates/engine/src/cmd/export.rs: the X-1a parameter docs plus main's
  `created`; the X-1a flatten and shadow-mask path on top of main's
  PDF/A-2b-only rasterize_layered.

Also: x1a_tests builds FlattenTotals through Default, since the struct is
non_exhaustive at e3b9e239.
2026-10-25 19:55:21 +00:00
aiongg 9c977f41a6 Merge print-color (#1374 with main: egui 0.37, craft-libs e3b9e239) into print-color-separations
print_pdf, shared by Export PDF, File › Print and Separations Preview, takes main's two
changes to the inline export pipeline: rasterize_layered runs only for PDF/A-2b (other
standards keep hidden placed-PDF layers as optional content), and the report gets
GRAPHIC_LAYER_RENDERING_WARNING when the source document has graphic layer visibility
overrides and the writer did not report it. The Separations Preview command matches
craft_prepress::Conversion with a fallback arm, since the enum is non-exhaustive at
craft-libs e3b9e239.
2026-10-25 19:54:40 +00:00
aiongg 65c387732d Merge upstream/main into print-color
PDF/X and CMYK groups keep this branch's approach: krilla's serialize
settings (pdfx::print_settings) write the CMYK page and transparency
groups, the GTS_PDFX output intent and the PDF/X Info and XMP entries.
make_pdfx4 adds only the XMP dates, so main's title argument and its
output-intent, Info and pdfxid XMP edits are dropped, and both
cmyk_group_spaces calls after writer.finish() (Export PDF, Print
Booklet) stay removed. Main's new parts are kept: file_info_metadata
(also for Print Booklet, on top of the print settings), optional content
registration and layer errors, add_form_fields, and pdfx's fonts module.
Main's metadata panic test calls the two-argument make_pdfx4.

craft-libs and the krilla patch are pinned to storytold/craft-libs
e3b9e239; Cargo.lock is main's, relocked without updates.
2026-10-25 19:47:27 +00:00
skylar taylor-barrick bd4b9dd1d2 egui-037: reconcile shared window integration with main 2026-10-25 18:34:10 +01:00
Brandon Thomas 743eced7ba Merge pull request #1712 from dotCooCoo/feat/file-info
File Info: PDF export writes the document's title, author, description and keywords
2026-10-25 12:26:32 -04:00
Brandon Thomas 58402f01e2 Merge pull request #1783 from dotCooCoo/feat/split-note
Notes: Split Note splits a note in two at the insertion point in its text, as in InDesign
2026-10-25 12:26:26 -04:00
Brandon Thomas 019c1d9e67 Merge pull request #1785 from dotCooCoo/fix/editorial-note-keeps-caret
Notes: deleting a note or converting it to text keeps the caret on the same text
2026-10-25 12:26:20 -04:00
Brandon Thomas 94bf1bf7f9 Merge pull request #1780 from dotCooCoo/fix/note-delete-keeps-caret
Footnotes: deleting a footnote or endnote keeps the caret on the same text
2026-10-25 12:26:13 -04:00
Brandon Thomas bb45cdcc50 Merge pull request #1775 from dotCooCoo/fix/footnote-moves-drop-typing-format
Footnotes: moving the caret into or out of a footnote drops formatting not yet typed
2026-10-25 12:26:06 -04:00
Brandon Thomas f2b62c9473 Merge pull request #1778 from dotCooCoo/fix/link-tests-on-windows
Links: the folder relink and IDML link tests expect Windows paths on Windows
2026-10-25 12:25:54 -04:00
Brandon Thomas a8b8b3eb62 Merge pull request #1779 from dotCooCoo/fix/automation-roots-tests-on-windows
MCP: the several-roots tests expect Windows paths without the \\?\ prefix
2026-10-25 12:25:47 -04:00
Brandon Thomas 564b3befc5 Merge pull request #1796 from dotCooCoo/fix/preflight-test-absolute-temp-dir
Preflight: the missing-link test makes the temporary folder absolute
2026-10-25 12:25:35 -04:00
skylartaylor 6bc2e25792 M0.37: fix accessible controls and simplify reviewed engine paths 2026-10-25 08:31:14 +01:00
skylartaylor b350488906 Reconcile current DesignCraft main with the egui 0.37 migration 2026-10-25 07:16:33 +01:00
skylar taylor-barrick 7ca39c6c10 Merge pull request #1806 from storytold/fix/idml-nested-pdf-layer-agreement
Keep nested placed-PDF layer choices in embedded IDML
2026-10-24 23:45:11 -06:00
skylar taylor-barrick 7417172663 M6: reject conflicting shared-id PDF layer choices in IDML 2026-10-24 22:59:09 -06:00
skylar taylor-barrick dae8a622eb Count distinct placement ids in the IDML layer-variant guard
A duplicated text frame holding an anchored placed PDF leaves two placements sharing one ItemId, so the raw update count exceeded the variant count and a correct export failed. The guard now checks that every mapped id was reached. Replaces the mismatch test with a duplicated-frame export regression.
2026-10-24 21:13:58 -06:00
skylar taylor-barrick 3bacb1b022 Text: reject malformed explicit Story Options targets 2026-10-24 21:06:21 -06:00
skylar taylor-barrick 21a54becce M6: guard IDML variant coverage and strengthen export tests 2026-10-24 20:45:22 -06:00
skylartaylor 8a6ed75d41 egui037: reconcile current DesignCraft main and qualify CI 2026-10-25 03:38:13 +01:00
skylar taylor-barrick 25218f3759 M6: preserve nested PDF layer choices in embedded IDML 2026-10-24 20:16:22 -06:00
skylar taylor-barrick 53d9b6d7f8 M6: merge current main and retain nested PDF/A placement traversal 2026-10-24 19:25:12 -06:00
dotCooCoo 0f037cb67e Merge main into feat/file-info 2026-10-24 18:14:03 -07:00
skylar taylor-barrick df526527cd Merge main into the explicit-visibility branch 2026-10-24 18:58:31 -06:00
skylar taylor-barrick 0f1ff65e7a Merge pull request #1647 from andeecollard/codex/placed-graphic-layer-overrides
M6: preserve placed-graphic layer settings across IDML and native saves
2026-10-24 18:55:32 -06:00
aiongg befc2e0346 Styles: renaming a style keeps its Export Tagging (#1790)
* Styles: renaming a style keeps its Export Tagging

Renaming a paragraph or character style, or moving it into a style
group, moves its Export Tagging to the new name. Deleting a style drops
its tagging and leaves the replacement's own tagging unchanged.

* Styles: a paragraph style can't be renamed onto another style's name

* Styles: a refused rename says the name is taken and shows the General section

Renaming a paragraph or character style onto a name another style has
now says so ("a paragraph style named `Body` already exists"); empty
or bracketed names keep the generic message. The Paragraph Style Options
dialog switches to General, where the name field is, when the rename is
refused. Paragraph style names are trimmed like character style names,
and a renamed style never picks up an export tag left under its new name.

* Styles: the rename test's stale tagging takes the Split Document field

* ROADMAP: date the style rename line 2026-10-24
2026-10-24 20:37:21 -04:00
skylar taylor-barrick 9f6cb08591 M6: preserve nested placed-PDF layer choices in PDF/A export 2026-10-24 18:07:19 -06:00
skylar taylor-barrick 040e388e68 M6: let rustfmt lay out the anchored regression's item
Formatting only: the gate's `cargo fmt --check` rejected the three-argument layout.
2026-10-24 17:50:41 -06:00
skylar taylor-barrick 921fcc16d0 Merge current main (b595f1b7) into the #1647+#1671 pair 2026-10-24 17:45:15 -06:00
skylar taylor-barrick 2d81510d19 M6: keep an anchored placement's layer choice in a regression
The parent-page regression covers a placement a page inherits. The other placement the export
walks reach is an object anchored in a story: the IDML copy gets a variant that shows every
layer, an external-only copy is refused, and PDF/A-2b rasterises it and warns. The nested-story
regression that used to cover this case also asserted placements anchored inside a table cell and
a footnote, which this pass does not reach; this one keeps the anchored case alone.
2026-10-24 17:45:12 -06:00
skylar taylor-barrick dfba0a3f9d M6: leave placements nested in cells and notes out of the PDF layer pass
Both exports walk Document::placed_items: document and parent spreads, groups, and the objects
anchored in a story. That is the walk the parent-page and anchored fix introduced. The
nested-story traversal (table cells, notes, endnotes), Document::update_placed_items and the
fail-closed refusals that went with it are not part of it: that is the traversal change on its
own, not the placements this pass carries. update_items keeps its reach, so the two exports clear
the choice where the placement actually is again.

A choice anchored inside a table cell's or a note's text therefore stays on the document and is
not carried into the embedded IDML copy, as on main; the refusal that turned that silent
difference into an export error goes with the traversal it guarded, since asking the walk's own
predicate it could never fire. The stale-field half keeps: has_applicable_pdf_layer_overrides
still asks for a graphic whose asset is a PDF, so relinking a placed PDF to an image no longer
makes the package report name a choice that does not exist.

Tests: the nested-placement regression and the relink integration test of the removed refusal
go; the parent-page regression, the stale-field predicate test and the format 4 cell-only reader
test stay. The comments no longer claim every placement counts.
2026-10-24 17:44:02 -06:00
skylar taylor-barrick a32ad396f3 PDF: give the test-only Graphic literals the layer_options field
Graphic gained an optional layer_options field, so the test-only literals in the PDF
crate and in the engine's optional-content support need it. No behaviour changes.
2026-10-24 17:39:46 -06:00
skylartaylor df9d51f4e2 egui037: Integrate DesignCraft main EPUB and PDF updates 2026-10-25 01:34:16 +02:00