Commit Graph
510 Commits
Author SHA1 Message Date
aiongg 35697cb807 Merge PR #1255: TOC separator and style notation
crates/idml/src/tests.rs: kept the PR's TOC tests, dropped the duplicate copy from #1249
crates/engine/src/tests/idml.rs: main's createBookmarks plus the PR's right-indent separator
crates/ui-egui/src/dialogs.rs: main's labelled_by fields plus the PR's special-character menu
crates/ui-egui/src/i18n/*.rs: kept both added rows
2026-10-30 23:26:42 +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 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 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 4834f41b03 Merge PR #1166: Native files: preserve automatic Ruby, Kenten and list-tab overrides 2026-10-30 19:44:36 +00:00
aiongg 19a8a7ae66 Merge PR #1463: Paragraph rules: Type, Gap Color and Tint, Keep In Frame
crates/ui-egui/src/dialogs/tests.rs: kept both sides' appended tests
2026-10-30 19:44:13 +00:00
Brandon Thomas 226b2c3c03 Merge storytold/main into PR #1985 2026-10-29 21:53:38 -04:00
Brandon Thomas 211619e949 Merge pull request #1935 from Silvertree2010/fix/1883-bug-report-designcraft-error-mes
Open documents whose items share an id
2026-10-29 21:53:07 -04:00
Brandon Thomas cddf074cc4 Merge pull request #1868 from Hamza0101/fix/table-allocation-cap
Tables: a shape a table cannot hold is clamped, not allocated (#1583)
2026-10-29 21:51:53 -04:00
Brandon ThomasandClaude Opus 5.5 84801932f2 Renumbering duplicate ids stops at the top of the id range instead of overflowing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:39:23 -04:00
moppeeerandClaude Opus 5.5 d42333fb9d Story: para_at's doc comment back on para_at
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 22:10:58 +01:00
moppeeer e16e0c4d61 Merge remote-tracking branch 'origin/main' into paragraph-rule-types
# Conflicts:
#	crates/compose/src/lib.rs
#	crates/doc/src/attrs.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
2026-10-29 12:08:24 +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 8e42d71af1 Merge remote-tracking branch 'origin/main' into codex/preserve-cjk-auto-overrides
# Conflicts:
#	crates/doc/src/attrs.rs
#	crates/format/src/lib.rs
2026-10-29 11:44:35 +01:00
moppeeer 94dad76ac1 Merge remote-tracking branch 'origin/main' into codex/toc-right-indent-separator
# Conflicts:
#	crates/idml/src/import.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n.rs
2026-10-29 11:44:26 +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
VoiceLessQ 30a0f08698 Story: copy a paragraph's format for all new returns at once (#1588)
insert_with_raw gave each return in the inserted text its own
Vec::insert of the paragraph's format, and each insert moves every
format after it. A ParaFormat is 2,888 bytes, so the time grew with
the square of the returns: Story::with_text took 2.2 s for 10,000
returns, 15.8 s for 20,000 and 90 s for 40,000. Placing a plain-text
file goes through it. The copies now go in with one splice.
2026-10-29 00:08:22 -02:00
Dylan M. Taylor 0104122f06 Refactor doc for strict Clippy checks 2026-10-28 11:39:26 +00:00
Hamza b49535624c Tables: a shape a table cannot hold is clamped, not allocated (#1583)
`Table::new` allocates `rows * cols` cells up front, and the counts reach it
from IDML and DOCX, where they are whatever the file claims. Measured here:
`size_of::<Cell>()` is 1,360 bytes, so the reported IDML case -- one `<Table>`
with 5,000 `<Row/>` and 5,000 `<Column/>`, about 1 KB zipped -- asks for 25M
cells, some 34 GB. That allocation does not fail politely: it aborts the
process through `handle_alloc_error`, which no `catch_unwind` can catch, so
every open document's unsaved work goes with it.

A table is clamped to InDesign's own limits, 10,000 rows and 1,000 columns,
and to 250,000 cells whatever its shape -- the row and column limits alone
would still allow 13.6 GB. Columns are clamped first and rows take what is
left, because a table is far more often long than wide.

The IDML importer walks the clamped slices and reports the difference.
Indexing its rows and columns by the file's own counts would be out of
bounds, which is how a 34 GB abort would otherwise have become a panic.

Rebased onto the post-split main: the constants and `clamped_size` live in
`doc`'s `table` module root, `Table::new` in `table/grid.rs`, and the IDML
table reader in `import/table.rs`.
2026-10-28 16:26:13 +05:00
NetterSilverandClaude Opus 5.5 8785934032 Open documents whose items share an id
Fixes #1883

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:50:17 +00:00
aiongg f553e17406 refactor(doc): move the CharAttrs and ParaAttrs sets to attrs/char_attrs.rs and attrs/para_attrs.rs 2026-10-26 21:00:23 +00:00
aiongg 2dd87273a2 refactor(doc): split attrs.rs into attrs/ 2026-10-26 21:00:23 +00:00
aiongg bc345384f6 refactor(doc): split table.rs into table/ 2026-10-26 21:00:23 +00:00
aiongg a24e9dffd1 refactor(doc): split item.rs into item/ 2026-10-26 21:00:23 +00:00
aiongg 256426ae99 refactor(doc): move the tests module of attrs.rs to attrs/tests.rs 2026-10-26 18:18:14 +00:00
aiongg d90881a8a9 Merge branch 'print-color' into print-color-separations
# Conflicts:
#	Cargo.toml
2026-10-26 01:11:35 +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 8e77e8db2d refactor: split complex functions in swatch_refs, xlsx, render group drawing (Sonar S3776) (#1733)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 17:33:59 -04: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
moppeeer 1bd9b2770c Merge remote-tracking branch 'origin/main' into codex/toc-right-indent-separator
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
2026-10-25 19:21:26 +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
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 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
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 d5d1b9236e Docs: stop claiming every placement in the placed_items comment 2026-10-24 17:55:46 -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 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 fa741a157d Doc: keep the pointer test clear of a clippy lint
`spreads.to_vec()` instead of `.iter().cloned().collect()`, which `-D warnings` rejects. Caught by
the gate run, not by the test.
2026-10-24 16:46:26 -06:00
skylar taylor-barrick e7b1c78324 Doc: copy only the branches an update reaches
Document::update_placed_items called Arc::make_mut on every spread and story, and the story
walk on every table and note, so an export pass copied the whole document even when nothing
matched. A story/spread/table/note whose subtree holds no match is now skipped, as
Document::update_items already does.

Test: update_placed_items_leaves_untouched_spreads_and_stories_shared asserts the spreads,
parents and stories are still the same allocations after a pass that matches nothing, and
that a matching pass still reaches an anchored object inside a table cell.
2026-10-24 16:11:28 -06:00
aiongg b595f1b7d3 EPUB: Split Document (export option and per-style Export Tagging) (#1787)
* EPUB: Split Document in a paragraph style's Export Tagging

* EPUB: Split Document as a document setting (off, one style, or export tags)

The document stores EPUB Export Options › Split Document (DocSettings.epub_split):
off (one content file, the default), a single paragraph style, or the
paragraph styles' Export Tagging › Split Document flags. document.epubSplit sets
it as one undo step; file.exportEpub takes a split that overrides it for one
export. A Style setting follows a renamed style and a deleted style's
replacement. IDML reads and writes EPubExportPreference BreakDocument and
ParagraphStyleName. A split before a list item or preformatted line closes the
open list or block first, so each content file is balanced.

* EPUB Export Options dialog with Split Document before Export EPUB

File › Export EPUB… opens EPUB Export Options, seeded from the document's
Split Document setting: a Split Document checkbox with Single Paragraph Style
(and its style) or Based on Paragraph Style Export Tags. OK stores a changed
setting through document.epubSplit, then continues to the save dialog; Cancel
does nothing. app.exportEpub with a path skips the dialog. Docs and the
progress log describe the setting.

* EPUB: the navigation test exports one content file with Split Document off

* EPUB export from the menu passes its options (cover, split) to the engine

* EPUB: Split Document on a style's EPUB tag map counts when the style says false; a caller's cover: false stays
2026-10-24 17:56:49 -04:00
skylar taylor-barrick 1266ce8236 M6: cover every placement when PDF layer choices are applied
Kept separate from the parent-page fix and from the all-on export fix: this is the traversal
remediation on its own.

The detection helpers already walked parent spreads, groups and the stories in table cells,
notes and endnotes, while the two exports walked document spreads only, and the write side
(Document::update_items) did not reach placements nested in those stories either. So a choice
on a frame anchored in a cell's text or in a footnote asked for the newer file format and was
named by the package report, yet the IDML copy carried the file's defaults. The walk was
narrow on main as well (see the probe evidence), so this is pre-existing for the older
hidden-list state; it becomes a wrong claim only because the paired PR added the variants and
said every placement counts.

Document::placed_items recurses those stories (depth budget 64, like the detection side) and
a new Document::update_placed_items applies the change where the placement actually is,
copying only the branches holding a match. update_items is untouched, so unrelated commands
keep their reach. Both exports also refuse rather than fall back when a document has a choice
but the walk found no placement to carry it.

Regression: nested_placements_keep_their_layer_choices_in_saves_and_exports runs a placement
anchored in a table cell's text, then in a footnote: the save keeps the choice, the embedded
IDML copy shows every layer, external-only IDML is rejected, PDF/A-2b export succeeds.
2026-10-24 15:49:40 -06:00
skylar taylor-barrick f09df5123e M6: keep placed-PDF layer choices for parent-page and anchored placements
The IDML layer-variant pass and the PDF/A-2b rasterisation pass both walked only
document-spread items, so a choice on a parent-page placement (or an anchored one) was
replaced by the file's defaults on export, and an external-only IDML export succeeded
when it could not carry the choice. Both now cover every placement through
Document::placed_items, and the choice is cleared where the placement actually is.

Regression: a parent-page placement with an explicit all-on choice keeps all layers in
embedded IDML, external-only IDML rejects it, and PDF/A-2b rasterises it.
2026-10-24 15:37:12 -06:00
skylar taylor-barrick faed705607 Merge contributor branch codex/pdf-layer-explicit-visibility (PR #1671) into the paired integration branch 2026-10-24 15:30:04 -06:00
skylar taylor-barrick 9fc02f8f7b Merge contributor branch codex/placed-graphic-layer-overrides (PR #1647) into main
Conflict resolutions:
- crates/pdf/src/export.rs: keep main's `graphic(.., hidden)` signature from
  #1241 and report retained graphic-layer overrides that drawing cannot apply.
- docs/gaps.md: keep main's change list and add the graphic-layer entry.
2026-10-24 15:30:03 -06:00
dotCooCoo 6bc5ac36fb Merge main into feat/file-info 2026-10-24 11:30:55 -07:00
dotCooCoo bfc36622e0 File Info: keywords with a comma keep their place, and the dialog stores into its own document
Editing one keyword in File Info re-split the whole field, so a stored
keyword holding a comma or semicolon became two. A stored keyword that is
still in the field whole now stays one keyword.

An Export PDF title equal to the document's name was dropped, so the PDF
took File Info's title. The dialog's title now starts empty, and a title
given there is always the PDF's title; without one the file is named
after the document.

file.info refuses parameters that are not an object; null reads the
fields like {}.

File Info's OK stores the fields in the document the dialog was opened
for, even when another document became active meanwhile, and stores
nothing once that document has closed.
2026-10-24 11:25:22 -07:00
Brandon Thomas a57d4cea1b Merge pull request #1752 from Hamza0101/fix/import-value-ranges
import: a value a file gives is one the engine can mean (#1593)
2026-10-24 10:23:05 -04:00
Brandon Thomas 8d6989c508 Merge pull request #1740 from Silvertree2010/fix/h1918-footnote-numbering-overflows-u32
Saturate footnote and endnote numbering at u32::MAX
2026-10-24 10:22:43 -04:00