5493 Commits

Author SHA1 Message Date
FredApps ff33879182 Merge pull request #2734 from dylanmtaylor/codex/designcraft-craft-libs
Move document formats and SVG preflight to craft-libs
2026-11-16 08:59:13 +01:00
FredApps cbc8275cc2 Keep imported DOCX heading names consistent with shipped styles
Port the heading-name fix and regression from FredApps b17fa4c8 (#2838) to the release follow-up. Leave the release target and shared-pin decisions separate.
2026-11-15 10:54:32 -05:00
FredApps 2c2a2be9b1 PDF: an image the header check can't read counts as colour again (#2734 merge) 2026-11-15 15:23:34 +01:00
FredApps 28cb51554a textimport: show XLSX number cells that aren't numbers as written (#2734) 2026-11-15 15:23:34 +01:00
Dylan M. Taylor e43c78b4d4 Keep shared CMYK JPEG ink polarity 2026-11-14 23:08:43 +00:00
Dylan M. Taylor 494c07f53a Merge current release into native format cutover 2026-11-14 22:30:51 +00:00
FredApps 6f0e0448a6 Release: DesignCraft v0.21.0 2026-11-14 21:45:14 +01:00
Dylan M. Taylor f5087eae96 PDF: allow only web and mail link schemes (#2804)
* PDF: allow only web and mail link schemes

Hyperlink and button URLs were written into PDF link annotations whatever
their scheme, so a document could carry javascript:, data:, file: or a custom
scheme into a reader. Only http, https, mailto and ftp targets are written
now; other strings are left out of the PDF.

* pdf: move the link-scheme test below the items it tests
2026-11-14 15:21:20 -05:00
Dylan M. Taylor 01ed421986 Clamp PPTX opacity before exact conversion 2026-11-14 19:34:07 +00:00
Dylan M. Taylor f17433e2ef Preserve exact shape opacity in PPTX export 2026-11-14 19:30:57 +00:00
Dylan M. Taylor a2258d1e36 Tag unprofiled WebP as sRGB in PDF/X 2026-11-14 18:45:03 +00:00
Dylan M. Taylor 9924e0f0fb Update DesignCraft image cache contracts for shared decoder 2026-11-14 18:27:42 +00:00
Dylan M. Taylor 28cbde2f9b Use shared CMYK JPEG polarity handling 2026-11-14 17:24:09 +00:00
Dylan M. Taylor 1127fbeaec Align release image import with main compatibility 2026-11-14 17:10:12 +00:00
Dylan M. Taylor 100104c8a3 Preserve image import limits on release base 2026-11-14 16:01:12 +00:00
FredApps 8b169f8ee7 Merge pull request #2797 from FredApps/fix-fifo-test-freebsd
Tests: the FIFO read test accepts a would-block error (main's FreeBSD nightly is red)
2026-11-14 16:43:25 +01:00
FredApps 8b8837bcf1 Tests: a FIFO read may end or report would-block, as long as it returns (FreeBSD) 2026-11-14 16:28:03 +01:00
Dylan M. Taylor c5226dfeae Repin shared formats and preserve DOCX numbering warnings 2026-11-14 15:19:41 +00:00
autocraft-bot[bot] fca649eda8 Merge pull request #2787 from dotCooCoo/fix/stroke-rejects-out-of-range-values
Stroke: object.stroke refuses out-of-range numbers and unknown names
2026-11-14 14:25:09 +00:00
Dylan M. Taylor 2ca0af77e3 Merge pull request #2793 from storytold/codex/sonar-pinned-fonts
ci: provision pinned fonts for Sonar coverage
2026-11-14 09:18:55 -05:00
aiongg 81a0eb66c0 Merge pull request #2794 from aiongg/links-followup
Linked images: a save waits for link checks; warm accounting from #2717
2026-11-14 09:18:31 -05:00
autocraft-bot[bot] b5a4e784c8 Merge main into fix/stroke-rejects-out-of-range-values 2026-11-14 14:08:21 +00:00
aiongg a977747cea Merge pull request #2765 from aiongg/image-perf
Images: background decoding, linked images and multi-image place
2026-11-14 09:05:22 -05:00
Dylan M. Taylor a3b06557a7 ci: provision pinned fonts for coverage tests 2026-11-14 14:03:05 +00:00
dotCooCoo b018151978 Images: count the cached levels of an image in view once when warming
When an image in view lacked a level for one of its drawings, warm left
it to decode and counted its decode estimate, but also kept its cached
levels in the bytes of other images, so a decode that fit could be left
to the render. The levels the estimate covers (the levels drawn for a
full decode, the levels from the one read from the blocks to the one
drawn for a reduced JPEG) now count only with the image; other cached
levels stay with the other images. A JPEG without a reduced estimate
(CMYK) is counted at its full decode, and so are its levels. The
estimates are worked out only for the images that still need decoding,
after the check that two or more do.

The one-at-a-time test checks the peak against the two values the
thread timing allows: one large reservation, or one large and the small
image's.
2026-11-14 13:59:30 +00:00
dotCooCoo 3d69f25376 Images: test the decode peak of a 16-bit CMYK TIFF with alpha
A 16-bit CMYKA TIFF counts its five 16-bit samples beside the 8-bit CMYKA copy and the inks and alpha split from it, 20 bytes a pixel. The tiff encoder has no 16-bit CMYKA type, so the test defines one.
2026-11-14 13:59:30 +00:00
aiongg 7ac9cafa7e DES-10: a save waits for the open-time checks of linked files
File > Save, Save As, Save a Copy and the saves before close and quit,
asked for while the open-time link or migration checks of the document
run, wait for them and then write, so the first save of a document saved
before linked storage already writes links. The UI defers the save and
re-issues it once links.checking() turns false; the status line counts
the files left ("Checking N linked images…"), Esc saves at once.
Recovery snapshots and the control channel's file.save don't wait.
links.progress reports how many files are left.
2026-11-14 13:57:06 +00:00
aiongg bcb0711a7c Merge remote-tracking branch 'upstream/main' into perf-main 2026-11-14 13:50:31 +00:00
aiongg 357c9dcd8c DES-10: exports check kept linked bytes against the file; PDF output cache only for links
- AssetData::load_for_output uses linked bytes already in memory only while
  the file still holds them (Loader::holds: fingerprint, else hash, else the
  kept bytes); a changed file is exported from disk with the warning.
- PDF export keeps output bytes per asset only for linked assets, and tells a
  placed PDF by its bytes (a proxy by the asset's type).
- links.list reports a link outside the automation read roots as missing
  while the open-time check still runs.
2026-11-14 13:40:37 +00:00
FredApps e230c4e406 Merge pull request #2751 from AlPaka1234/fix/2743-pdf-cmyk-profile
PDF export: attach working CMYK profile as /DefaultCMYK (#2743)
2026-11-14 14:37:17 +01:00
Dylan M. Taylor 4134887e6e Pin PSD codec to official craft-libs main 2026-11-14 13:36:13 +00:00
aiongg cef0612cce Pin craft-psd to storytold/craft-libs (#2791) 2026-11-14 08:28:46 -05:00
FredApps 447d4749bc 2743: collapse image tone guard for strict clippy 2026-11-14 14:13:12 +01:00
aiongg d380fca0d0 DES-10: link placed files at once; saves make missing proxies, never hashes
A file placed from a path becomes a link immediately, with its size and
time as the fingerprint and its bytes kept resident. The background job
adds the content hash and proxy to the live document, undo history and
saved state without changing storage. Saves (file.save, saveACopy,
serialize, recovery snapshots) make the proxies still missing and write
links without a hash. An open hashes a no-hash link whose file matches by
size and time. embed:true placements hash while placing. The embed-until-
hashed path (settle_pending, settle_copy, keep_embedded) is gone.
2026-11-14 13:10:36 +00:00
aiongg 7d4e757435 DES-10 review: Links panel badge text without a copy 2026-11-14 13:00:00 +00:00
aiongg 03169f1ca5 DES-10 review: clippy (needless borrows, split preflight's modified-link check) 2026-11-14 12:57:16 +00:00
aiongg c9c0f6deb4 DES-10 review: placing returns before proxies and hashes are made
Placing from files (file.place, place.load, table and media posters)
embeds each graphic with its link record and queues its content hash
and proxy on the link-check thread; the poll links it under the same
key, in the live document, the undo history and the saved state. A
save before then hashes the pending graphics from their bytes and
writes them embedded. crop_pdf checks the crop choice and mime before
reading, and place and relink pass the bytes they already hold.
2026-11-14 12:51:26 +00:00
aiongg d41970f6f3 DES-10 review: Escape with nothing loaded leaves the place tool 2026-11-14 12:50:09 +00:00
aiongg 7a2efd9c6d DES-10 review: IDML stored previews are checked before they become proxies
A linked graphic's stored preview is decoded, re-encoded within the
proxy limits when bigger (1024 px, 512 KiB) and dropped when it doesn't
decode. It is used only when it shows the whole raster image; otherwise
(a PDF, whose preview shows its crop, or other proportions) the proxy is
made from the file, with the preview as the fallback. Graphics that stay
embedded keep no proxy.
2026-11-14 12:48:13 +00:00
aiongg f06f11b52f DES-10 review: PDF layer variants, crop boxes and tones read no file on the drawing thread
A frame that doesn't wait for images queues the work (reading a linked
file, rewriting a PDF with layers hidden, measuring a Bounding Box crop,
finding an image's tone) on a background thread and draws a stand-in:
decodes cached under a layer variant's key, else the loading box. Each
checks images::unavailable first, so a missing or modified link is read
once until the links change, and loads happen outside the caches' locks.
Kept layer variants have a 256 MiB byte budget besides the count limit.
2026-11-14 12:48:13 +00:00
aiongg 12e0e2341c Merge fixup: keep the streaming designcraft_format::write 2026-11-14 12:48:12 +00:00
aiongg 0fc62ec30b DES-10 review: package warnings in the file-format parity doc 2026-11-14 12:47:11 +00:00
aiongg 3bd9332a6c DES-10 review: export linked graphics in EPUB/HTML, PPTX, IDML and packages; cache output bytes in PDF export 2026-11-14 12:47:03 +00:00
aiongg 829e5b86c3 Merge remote-tracking branch 'upstream/main' into image-perf
# Conflicts:
#	crates/render/src/decode.rs
2026-11-14 12:47:03 +00:00
aiongg b8be148b4c DES-10 review: link status after open, preflight without reading originals
- Open queues every linked file's lookup (stat, then hash) for the background
  check instead of stating candidates on the UI thread.
- links.list, links.update and relinkFolder use the open's status only while
  its check is still running; afterwards the file is looked at as it is now.
- Preflight tells Modified from size, time and the remembered hash checks
  (the worker keeps them between passes) and the vector test from the mime
  type; it never loads a linked original.
- A modification time of 0 never vouches for a file's bytes.
- Migration keeps an unsettled time as UNVERIFIED_MTIME; recovery snapshots
  keep images not yet saved as links embedded.
- Links panel test fixture has real files, so its Embedded assertions hold.
2026-11-14 12:46:23 +00:00
aiongg b73c3dd87a Build: restore designcraft_format::write; render decode without the image crate (#2780)
* Build: restore designcraft_format::write for recovery; render decodes without naming the image crate

* Build: collapse the nested if in images tone (clippy)

* IDML export: placements in cells and footnotes embed their PDF layer choices

* Tests: Word fixtures carry the document relationships part

* PDF/X-4: untagged WebP images carry sRGB

* Images: CMYK TIFFs with other inks fall back to RGB; associated alpha keeps its inks

craft-image-codecs' TiffPage lists InkSet (storytold/craft-libs#1307), so decode_cmyk_tiff
again refuses InkSet 2 instead of reading other inks as C, M, Y and K. Associated alpha
is made straight by the decoder; the PDF tests check those inks and that alpha.

* PDF tests: CMYK fallback expects the screen's RGB; alpha images read the masked image

The RGB fallback for other inks converts through the working CMYK space, as decode_rgba
does, so the test takes its expected samples from decode_rgba. image_color_samples took the
first image stream, which for an image with alpha is its soft mask.

* Images: repin craft-image-codecs to the InkSet enum (storytold/craft-libs#1307)

* Pin craft-image-codecs to storytold/craft-libs ea1c842 (#1307)
2026-11-14 07:42:07 -05:00
aiongg 18e1ba14b3 DES-10 T11: docs for linked artwork and multi-image placement 2026-11-14 12:28:58 +00:00
aiongg 191489652c DES-10 T10: Links panel shows storage, status badges, proxy thumbnails; Embed, Unembed, Update; progress polling and migration notice 2026-11-14 12:28:44 +00:00
FredApps 11bd7d9c8d 2743: correct integrated imports and CI formatting
Remove duplicate flate2 imports introduced during integration and apply the three exact rustfmt corrections reported in main migration files. Hosted CI will validate per owner direction.
2026-11-14 13:27:46 +01:00
FredApps f07bf58d5b 2743: integrate DefaultCMYK export with shared PDF APIs
Resolve main dependency migration; retain flate2 production usage and route new PDF parsing through craft-pdf. Owner directs hosted CI validation for this integration; full local gate not run.
2026-11-14 13:17:29 +01:00