Commit Graph
1044 Commits
Author SHA1 Message Date
Brandon Thomas affce22f4f Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/gaps.md
2026-10-19 02:52:49 -04:00
Brandon Thomas f78bf721e8 Merge storytold/main into codex/delete-parent-pages 2026-10-19 02:52:27 -04:00
Brandon Thomas 96957ef53f Merge storytold/main into fix/340-package-relative-links 2026-10-19 02:52:13 -04:00
Brandon Thomas 0e4d1cef7e Merge storytold/main into fonts/reload-changed-fonts 2026-10-19 02:51:28 -04:00
Brandon Thomas fcb83fd12d Merge storytold/main into codex/delete-parent-pages 2026-10-19 02:51:25 -04:00
Brandon Thomas 0ac836d6cb Merge storytold/main into fix/340-package-relative-links 2026-10-19 02:51:22 -04:00
Brandon Thomas 157035aa9e Merge storytold/main into squad/stroke-type-validation 2026-10-19 02:51:17 -04:00
Brandon Thomas 992a171b78 Merge pull request #1117 from Silvertree2010/fix/h1992-table-moverow-table-dropcells-ca
Refuse table row moves across the header/footer boundary
2026-10-19 02:50:34 -04:00
Brandon Thomas 8ce4c31bac Merge pull request #1078 from marcoarnulfo/feat/vt-forced-break
Text parameters: a vertical tab is a forced line break
2026-10-19 02:50:31 -04:00
Brandon Thomas c9c25b10d6 Merge pull request #1169 from Silvertree2010/fix/1165-placing-text-into-a-primary-text
Remove empty pages autoflow adds when placing into the primary frame
2026-10-19 02:50:27 -04:00
Brandon Thomas 5442d648eb Merge pull request #1193 from Silvertree2010/fix/h2418-idml-import-accepts-nan-inf-in-s
Ignore NaN and infinite numbers when importing IDML
2026-10-19 02:50:02 -04:00
Brandon Thomas d7a1bb3ad7 Merge pull request #1218 from MarekSpodBiedry/issue-1208
Keep the mapped style of the first paragraph when placing text at an empty caret (#1208)
2026-10-19 02:49:47 -04:00
Brandon Thomas 0a06c495e9 Merge pull request #1215 from Silvertree2010/fix/h2484-math-insert-with-id-jumps-a-move
Keep a moved equation in place when editing its LaTeX
2026-10-19 02:49:44 -04:00
Brandon Thomas 54052d77f9 Merge pull request #1237 from aykutfirat/fix/cell-first-baseline
Tables: cell First Baseline offset (Cell Options › Text › First Baseline)
2026-10-19 02:49:33 -04:00
Brandon Thomas 2745aa13ea Merge pull request #1284 from Silvertree2010/fix/h2791-object-stroke-accepts-an-unbound
Clamp object.stroke tint and gapTint to 0..1
2026-10-19 02:49:24 -04:00
Brandon Thomas f559680518 Merge pull request #1288 from MarekSpodBiedry/issue-1245
Let single-line paths be resized along their length (#1245)
2026-10-19 02:49:20 -04:00
Brandon Thomas e537f6065f Merge pull request #1292 from MarekSpodBiedry/issue-1267
Reject invalid story.replaceRange offsets with an error (#1267)
2026-10-19 02:49:04 -04:00
Brandon ThomasandClaude Opus 5.5 0d0fa585a0 story.replaceRange: convert offsets with usize::try_from (wasm32-safe)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 02:23:07 -04:00
NetterSilverandClaude Haiku 5.5 3b3544477d Show page and resolution of anchored images in the Links panel
Fixes #1269

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 04:04:40 +00:00
KnottyDyes 287b65f788 Object: reject malformed stroke types 2026-10-18 17:25:35 -06:00
MarekSpodBiedry 251ceda1e0 Reject invalid story.replaceRange offsets with an error (#1267) 2026-10-18 23:37:25 +02:00
MarekSpodBiedry 6fc7172628 Let single-line paths be resized along their length (#1245) 2026-10-18 23:35:56 +02:00
NetterSilverandClaude Haiku 5.5 103d7eb3ff Clamp object.stroke tint and gapTint to 0..1
Found while testing crates/engine/src/cmd/object.rs:299-313 (object.stroke: `st.tint = v as f32`, `st.gap_tint = v as f32`; the no-selection path at :273 clamps, this one doesn't)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 19:59:59 +00:00
Paul GandClaude Sonnet 5.5 17848dd1e9 Package: link the packaged document and IDML relative to the package (fixes #340)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDKUo6t8zLKhzeuPrJxa3n
2026-10-17 17:11:31 -07:00
harrisonoconnorhover 9434e96dbf fix: integrate parent deletion with current main (#956) 2026-10-17 17:52:04 -04:00
Aykut FiratandClaude Opus 5.5 08ce444054 Tables: cell First Baseline offset (Cell Options › Text › First Baseline)
Cells and cell styles had no first-baseline setting, so every cell set its first line by the
Ascent offset (the font's typographic ascender). IDML documents that set FirstBaselineOffset on a
cell style (CapHeight is common, often through a table style's body region) composed every row
taller than the document asked for. With a font whose typographic ascender is a full em (Avenir),
each row grew about 2.6 pt and long tables overset, losing their last rows.

- doc: Cell.first_baseline / first_baseline_min; CellStyle.first_baseline / first_baseline_min,
  applied by CellStyle::apply_to and carried through resolve_cell_style's BasedOn chain.
- idml: FirstBaselineOffset and MinimumFirstBaselineOffset read and written on cells and cell styles.
- compose: a cell's text frame uses the cell's first baseline offset and minimum.
- engine: table.setCell, style.cell.create/edit take firstBaseline / firstBaselineMin; table.get
  reports them; style.cell.create fromSelection captures them.
- tests: import through BasedOn and a table style's body region, a cell's own override, IDML round
  trip; composer cap height vs ascent and a fixed minimum; command parameters and validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:07:46 -04:00
skylar taylor-barrick 9fd0a881f7 Merge storytold/main into linked-path-checks
The conflict was in links.rs, where main's atomic relink work (b050343a) and
this branch's path gate both changed `update`. Kept main's mechanism (build the
replacement with relinked_asset, then insert it) and this branch's gate (a link
craft-docpath refuses is missing and never read).

relinked_asset now takes the path to read and the link to record separately.
Previously they were one argument, safe only because update passed the raw stored
link; passing the resolved path to the old signature would have rewritten every
relative link to an absolute one on each refresh.

Also passes None for the document in main's embedded-status test, where the asset
has no link so the document is irrelevant.
2026-10-17 12:39:14 -06:00
MarekSpodBiedry b13b1ec408 Keep the mapped style of the first paragraph when placing text at an empty caret (#1208) 2026-10-17 15:05:08 +02:00
NetterSilverandClaude Haiku 5.5 7762573344 Keep a moved equation in place when editing its LaTeX
Found while testing crates/engine/src/cmd/mathexpr.rs:73-83

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 12:39:38 +00:00
NetterSilverandClaude Haiku 5.5 ec4fbb270f Ignore NaN and infinite numbers when importing IDML
Found while testing crates/idml/src/import.rs:2748 (stroke_from: StrokeWeight, MiterLimit), also El::num in crates/idml/src/xml.rs:96 and the plain `.parse().ok()` calls around import.rs:1833, 2823 and 2832

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 06:20:21 +02:00
skylar taylor-barrick c43a63f71e Reconcile this branch's EPS work with main's placement and format changes
The merge compiled, but six tests showed where the two branches meant
different things. Fixes, in order of consequence:

- Format version: both branches had independently defined version 2 —
  here for retained EPS sources, on main for pinned Keep Lines Together
  and drop cap defaults, with an `upgrade` that runs below 2. Writing 1
  for documents without EPS then re-ran that upgrade on load and rewrote
  their paragraph styles, so saving and reloading changed the document.
  EPS now asks for version 3 and everything else stays at 2.

- place.drop into a frame: main turned Auto-Fit off so that resizing a
  frame crops rather than refits, and this branch had carried the older
  FillProportionally along while moving the geometry out of the edit.
  Main's behaviour is the intended one.

- save() compacts unreferenced assets now, so the format test has to
  place its EPS for the version sniff to see it at all.

- EPUB entries are named from the asset's file stem (asset_path), not
  its bare id: images/logo-<id>.png.

- Command parameters are validated strictly, so the PDF page test sends
  each command only the parameters it takes.

- The relink batch's "commits once" check read a process-wide revision
  counter, which a test running beside it can advance; the single undo
  step is what actually shows it committed once.

The EPS place tests move to cmd/file/eps_place_tests.rs: they write real
files, and main's file-system guard reads src files without seeing inline
#[cfg(test)] modules, but exempts _tests.rs ones.
2026-10-16 20:20:53 -06:00
skylar taylor-barrick bc840130a4 Satisfy clippy's nonminimal_bool on rustc 1.96
Four sites already on main that `cargo xtask ci` cannot get past with the
current toolchain; each rewrite is the one clippy suggests and changes no
behaviour. `!x.is_some_and(f)` becomes `x.is_none_or(!f)`, and pdf_bounds
folds `!(a && b) || !c` into `!(a && b && c)` by De Morgan.

Unrelated to the merge they are committed beside; separated so that merge
stays a merge.
2026-10-16 20:20:36 -06:00
skylar taylor-barrick 0d541deab7 Merge upstream/main into codex/fix-relink-eps
Resolve 12 conflicted files. Where both sides changed the same code:

- format: keep main's bounded-read load_zip (MAX_ENTRIES, read_entry) and
  this branch's u64 version reporting, so a version above u32::MAX is named
  as written rather than clamped. Both sides had fixed the same truncation.
- render: main's natural_size supersedes image_natural_size (it already
  reads an EPS bounding box and also handles PDF pages); callers in table
  and data merge now use it.
- images: keep the DSC-aware header scan and (atend) trailer lookup, take
  main's classic-Mac line endings, and carry its overflow guard into
  parse_box. eps_proxy draws main's simple rectangles before falling back
  to the placeholder, still over a retained EPS source.
- engine/file: take main's placement shape (add_asset, crop box geometry,
  place cursor, finite_rect, object effects) and keep this branch's
  validate_placement in both branches; edit() works on a clone and commits
  only on Ok, so validating inside it stays all-or-nothing.
- engine/links: keep building the replacement before edit() so a file that
  cannot be read leaves the document untouched, and move main's crop_pdf
  refresh into relinked_asset, which both relink and update go through.
- engine/export: EPS preview warnings join the font-embedding warnings
  rather than shadowing them.
- idml: an EPS element keeps ActualPpi (its pixels are a preview raster);
  main's PDF exclusion is unchanged.

Cargo.lock regenerated. Tests and doc strings from both sides kept.
2026-10-16 19:57:08 -06:00
aiongg 248e10908b Follow paths stored in documents only on this computer or the document's share
Links, data sources, IDML package links and book chapters go through
io::document_path (craft-docpath) before they reach the file system:
relative paths resolve beside the document, and paths to other computers,
devices and URLs are missing, with the reason in links.list and Preflight.

IDML and INDD packages read a linked file where its link points on this
computer, then from the link's trailing names beside the package, only
when it is a regular file up to 256 MB holding an image or a graphic. A
file URI that names a host keeps it as a network path.
2026-10-16 17:05:09 +00:00
NetterSilverandClaude Haiku 5.5 4b520066e3 Remove empty pages autoflow adds when placing into the primary frame
Fixes #1165

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:58:01 +02:00
Abdelrehman Fouad d78783b6bd Fonts: Type › Reload Fonts reads fonts changed on disk again
Fonts installed, edited or removed while the app runs needed a restart
(#328, #547). font.reload rescans the font folders, lets go of the shared
faces whose installed file changed (length or modification time) or is
gone, so the next lookup reads the file as it is now, and recomposes the
open documents with a new composition cache. It isn't an undo step.
2026-10-16 17:15:47 +02:00
harrisonoconnorhover 91a32730ef fix: allow deleting parent pages (#956) 2026-10-16 08:02:23 -04:00
NetterSilverandClaude Haiku 5.5 230b29be60 Refuse table row moves across the header/footer boundary
Found while testing crates/doc/src/table.rs:882 (Table::move_row, called from crates/engine/src/cmd/table.rs:1437 and :1369)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 05:54:41 +00:00
aiongg 21a6e6d90f Merge branch 'batch-tB' into next-integ
# Conflicts:
#	docs/gaps.md
2026-10-16 04:48:56 +00:00
aiongg 833db788af Merge branch 'batch-tA' into next-integ 2026-10-16 04:48:48 +00:00
aiongg 45178f283a Merge branch 'batch-tC' into next-integ 2026-10-16 04:48:45 +00:00
aiongg 7e539fee8d Integration: #1002 Cmd borrows the last-used selection tool
Holding Cmd/Ctrl with a non-selection tool borrows whichever of Selection and Direct Selection was chosen last, instead of a fixed tool per tool family. The session records the last chosen selection tool; the busy() guard stays.
2026-10-16 04:33:07 +00:00
aiongg 25aa75a6e5 Integration: renaming a character style updates the drop cap style once 2026-10-16 04:29:27 +00:00
aiongg bd99e59e81 Integration: data merge checks the read roots before the file size 2026-10-16 04:29:27 +00:00
aiongg 1014d841ac Integration: a dropped file without an extension is recognised from its first bytes 2026-10-16 04:29:27 +00:00
aiongg e8aadde385 Integration: start-screen previews read only the zip directory and the preview entry 2026-10-16 04:29:27 +00:00
aiongg 94d21edfa1 Integration: sentence selection tests return; selecting around a point drops the pending typing format 2026-10-16 04:29:27 +00:00
aiongg 6a22e38b1e Merge PR #1002: Tools: Cmd held with another tool borrows the Selection tool for one gesture
tooling.rs: kept #366's IME handling (with_ctx passes the session; a press ends the composition first) and #1002's borrowed tool, which pointer, key, overlay, cursor and wants_text reach through gesture_tool().
2026-10-16 04:28:48 +00:00
aiongg 7979a417fe Integration: cargo fmt 2026-10-16 04:21:41 +00:00
aiongg dc39c38471 Merge PR #988: Swatches: Load Swatches numbers repeated .ase names and names unnamed colors by value 2026-10-16 04:18:37 +00:00