Commit Graph

411 Commits

Author SHA1 Message Date
FredApps d9eba17efc Release: bump designcraft to v0.21.1 (#3064)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-23 12:48:02 -06:00
FredApps 4dfbbe1fac build: pin craft-libs to main 33be356 (craft-libs#778)
Move every craft-libs crate, including craft-idml, to one rev that is
merged on craft-libs main, so the strict JPEG EXIF orientation reader
from craft-libs#3067 is available for the follow-up caller switch.
2026-11-23 05:52:27 +07:00
Dylan M. Taylor d7401b647b images: restore strict JPEG APP1 EXIF scan (craft-libs#785) (#3105) 2026-11-21 12:36:17 -05:00
Dylan M. Taylor 0fc7a7894c images: replace local JPEG EXIF and PNG pHYs scans with shared readers (craft-libs#785) (#3101)
* images: use shared JPEG EXIF and PNG pHYs readers (craft-libs#785)

* images: repin craft-libs and use png_probe::pixels_per_meter (craft-libs#785)

* Cargo: patch vendored vello/linesweeper from craft-libs

* xtask: update pdf-deps craft-libs rev to c60e7a20
2026-11-21 12:14:16 -05:00
Dylan M. Taylor e8ac8790c9 idml: delegate remaining IDML part schema emission to craft-idml (#778) (#3047) 2026-11-20 07:16:52 -05:00
Dylan M. Taylor 055b590931 images: share resolution and header probes (#3022)
* deps: pin craft-libs uniformly to 3dff4793

* images: share resolution and header probes via craft-image-codecs
2026-11-20 06:21:41 -05:00
Dylan M. Taylor a354990c2b idml: separate designmap schema emission to craft-idml (#778) (#3044)
* idml: delegate designmap schema emission to craft-idml (#778)

* deps: align craft-xml rev with craft-idml (2f1e0a2a)

* fix(idml): remove redundant String::into() for clippy
2026-11-19 18:56:55 -05:00
Dylan M. Taylor 2ac602c134 mcp: cut over JSON-RPC/MCP framing to craft-mcp-server (#3042)
* mcp: cut over JSON-RPC/MCP framing to craft-mcp-server

* mcp: set tool_errors_as_results for transcript parity

* mcp: preserve stdio and resource errors and synchronize lockfile
2026-11-19 18:07:48 -05:00
.CooCoo 209c8ab919 Dependencies: unify craft-libs at 30a568b97 for shared cutovers (#2889)
* Dependencies: take craft-libs main at 3af718585c

Every craft-libs dependency and patch in Cargo.toml now uses one
revision, craft-libs main at 3af718585c60d8e9bab05c241d7a28282c61f85c.
Cargo.lock changes only craft-libs packages.

The newer crates need these changes:

- craft-xml is at one revision, so the craft-xml-dtd alias is removed
  and the DTD adapter uses craft_xml::dtd.
- craft-svg's gradient paint carries its stops and its pattern paint
  carries its tile. Paste uses the first stop's color as before, and
  skips embedded image nodes, which the scene still counts for the
  paste warning.
- craft_svg::sniff::viewbox_size came from a craft-libs commit that is
  not in main. The IDML importer keeps the same bounded viewBox sizing
  as a local function and no longer depends on craft-svg.
- craft-svg's Limits has tree_depth, the depth after references such as
  <use> are followed. Images set it to MAX_SVG_DEPTH, and a test checks
  that a long <use> chain is refused.
- craft-ui adds the flyout width and top layout actions, which the
  iconic dock sends when a flyout's side or top edge is dragged.
  window.panel.layout rejected every action it did not list, so both
  are now checked like the other per-panel actions. A test checks that
  they are kept for a registered panel and refused for an unknown one.

* Panels: a group docked back keeps its flyout's width and top

craft-ui at 3af718585c saves a dock group's flyout width and top when the
group floats and restores them in its own restore path. Dock Panel for a
group that floated as a whole goes through DesignCraft's own path, which
replayed the height, minimized state and column but not the two flyout
values, so a widened or moved flyout came back at its default size and
place. The path now replays ResizeFlyoutWidth and MoveFlyoutTop with the
other saved state.

The images test's doc comment gives the nesting depth of its `<use>`
chain as four levels, counting the root as one.

* PDF: pdf-deps expects craft-libs 3af718585c

`cargo xtask pdf-deps` checks that craft-pdf, Krilla and the Hayro
crates resolve to one craft-libs revision named in xtask. The workspace
now takes them at 3af718585c, so the check expects that revision, and
docs/pdf-backend.md names it.

* IDML: a placed SVG with a byte order mark keeps its viewBox size

The importer's viewBox sizing looked for `<` as the first byte, so a
linked viewBox-only SVG that starts with a UTF-8 byte order mark was
placed at its GraphicBounds instead of its viewBox size. The mark is now
skipped first.

* Tests: the discarded-pass input test clears its texture changes

discarded_pass_does_not_acknowledge_injected_input dropped its frame
output without clearing textures_delta, so epaint panicked on drop
whenever the frame carried a texture change. With craft-ui at
3af718585c it failed in 2 of 3 full ui-egui test runs. The test now
clears it, as the tests around it do.

* Dependencies: take craft-libs crates from craft-libs main at 453b0da782

Every craft-libs git dependency and [patch.crates-io] entry moves from
3af718585c to 453b0da782, and xtask pdf-deps and docs/pdf-backend.md
name the new commit.
Cargo.lock changes only the source revision of the 50 craft-libs
packages; no package is added or removed and no registry package
changes version.

craft-update now inspects a release the app offers on a thread of its
own (storytold/craft-libs#1149), so the prompt opens at a later tick
instead of inside offer. updates_ui's startup_prompt_shows_and_closes
waits for that answer: it ticks on each immediate repaint request the
offer's thread makes until the prompt is open.

* Updates: the startup prompt test fails instead of waiting forever

offer_and_wait waits for the one immediate repaint the offer's thread
requests after it answers, ticks once, and then asserts that the prompt
is open. Before, it waited for a repaint after every tick, so an offer
that ended without a prompt (the launcher pinning the app while the
files were read) blocked the test instead of failing it.

NOTICE names craft-libs 453b0da782 as the source of the patched Hayro
crates, the revision Cargo.toml fetches them at, adds hayro-postscript,
which is patched from the same revision, and names the PdfCraft
revision the snapshots were re-synced to.

* IDML: a placed SVG's viewBox size comes from its root tag alone

svg_viewbox_size reads only the root's start tag instead of parsing the
whole file, so placing the same large linked SVG many times no longer
parses it each time. Files over 16 MiB still give no size. A viewBox
with a value that is not a number, such as "0 0 junk 200 100", now
gives no size, so the frame's GraphicBounds size the graphic; before,
the bad value was dropped and the other numbers were read as the
viewBox.

* IDML: a placed SVG's root tag is read with craft-xml's first_start

svg_viewbox_size reads the root's start tag with Options::first_start and a
pattern that matches any name, in place of its own event loop. A file whose
root is not an svg element still gives no viewBox size; the placement test has
a case for it.

* Cargo: drop the unused craft-xml-dtd alias again

The merge of main kept the craft-xml-dtd alias at craft-libs a5ac3aa05c, which this branch had removed. No crate uses it, and Cargo.lock does not change.

* chore: resolve shared BMP dependency pin with Cargo [skip ci]

* test(color): align FOGRA39 references and isolate no-BPC accuracy [skip ci]

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-19 22:45:28 +07:00
Dylan M. Taylor a8f6be842e cutover: use craft_jpeg::decode_reduced (#2991) 2026-11-18 19:08:41 -05:00
Dylan M. Taylor 12fe81ca01 images: cut over EPS bounding_box and is_eps to craft-ps (#2972) 2026-11-18 16:30:59 -05:00
FredApps f405f89da4 Formats: port the craft-libs cutover follow-ups from #2734 to main (#2838)
* Formats: port the craft-libs cutover follow-ups from #2734 to main (craft-libs#778)

Brings #2734's changes (made against the release branch) to main:
IDML CDATA on write and table span parsing, DOCX plain-text accepted
changes, XLSX invalid number cells shown as written, shared CMYK JPEG
polarity, exact PPTX opacity, PDF CMYK fallback wording, and the
craft-libs re-pins. Imported DOCX built-in headings keep main's and
v0.21.0's spelling ("Heading 1"), with a test. craft-pdf, craft-prepress,
craft-cms, the krilla/hayro patches and craft-xml-dtd move to the #1322
squash merge on craft-libs main (a5ac3aa0).

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>

* Point the PDF dependency check at the craft-libs main pin

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>

* Formats: address review on the cutover follow-ups

- PDF: keep main's CMYK fallback warning. The shared decoder reads planar
  CMYK TIFFs and makes associated alpha straight, so neither falls back;
  a test now checks both keep their inks.
- DOCX plain-text import uses craft-wordmodel's Paragraph::final_text,
  which already drops tracked deletions and expands inline objects.
- IDML: a test pins numeric table spans (fractions round down, spans past
  the table or past 32 bits reach its edge, anything under 1 or not a
  number spans one cell).
- Cargo.lock: craft-rtf takes craft-codepage at bfea7d98 after the merge
  with main.

* PDF test: expect the CMYK fallback warning's main wording

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-15 22:45:42 +01:00
Dylan M. Taylor 3ddc3053cf Reuse shared Base64 encoding for HTML and serialization 2026-11-15 10:30:55 -05:00
.CooCoo 85aae4499d Updates: take craft-update from craft-libs main at e98299546 (#2608)
* Updates: take craft-update from craft-libs main at 6e03f65bf

craft-update moves from storytold/craft-libs at 1b34eba41 to 6e03f65bf. Cargo.lock follows.

* Updates: take craft-update from craft-libs main at e98299546

craft-libs e98299546 includes #923: the check of whether the copy can install itself now runs on the update-check thread instead of in Updater::tick on the UI thread.
2026-11-14 22:33:10 -06:00
FredApps 0e794cde4f Release: DesignCraft v0.21.0 on main (#2807)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-14 21:46:13 +01:00
aiongg bcb0711a7c Merge remote-tracking branch 'upstream/main' into perf-main 2026-11-14 13:50:31 +00:00
aiongg cef0612cce Pin craft-psd to storytold/craft-libs (#2791) 2026-11-14 08:28:46 -05: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 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 e8701e3f4c DES-10: pin craft-designcraft-format to storytold/craft-libs b1b4602 (#1264) 2026-11-14 07:13:44 +00:00
aiongg 4ad3038517 DES-10 T4: build linked assets and proxies from the T3 API; pin craft-libs 7df4cc9ab 2026-11-14 05:42:33 +00:00
aiongg e9a2712a5d DES-10 T4: native format 5 with linked assets and proxies 2026-11-14 05:37:57 +00:00
aiongg b9a5bcbecc DES-10 T3: linked asset store and the engine's file loader
AssetData::linked carries a LinkedSource (absolute and relative path, document,
size, fingerprint, content hash). Linked bytes load through a process-wide
single-flight LRU store (512 MiB, 1 GiB per file) and the Loader the engine
installs in Session:🆕 absolute path first, then relative; a changed
fingerprint is checked against the hash, and other bytes are Modified.
Proxy.data is an AssetData so its decodes have a key of their own.
2026-11-14 05:37:36 +00:00
Dylan M. Taylor 382fc27a5b fix(idml,images,pptx,textimport): update adapters and tests for craft-libs cutover 2026-11-14 03:35:09 +00:00
Dylan M. Taylor 32274e843a Merge codex/designcraft-craft-libs into origin/main: cut over document formats and codecs to craft-libs 2026-11-14 02:13:28 +00:00
Dylan M. Taylor 77991abe6f fix(file): preserve legacy JSON on INDD paths 2026-11-14 00:40:59 +00:00
Dylan M. Taylor b681b10733 Pin DesignCraft shared codecs to merged fixes 2026-11-13 23:53:29 +00:00
Dylan M. Taylor 1284edfa3b Pin shared CSV codec to merge commit 2026-11-13 21:08:18 +00:00
Dylan M. Taylor 59db0b67a7 Use shared IDML transparency writer 2026-11-13 09:43:29 -05:00
Dylan M. Taylor b409bccb0f Use shared IDML effect setting writers 2026-11-13 09:40:28 -05:00
Dylan M. Taylor 703ffed779 Use shared IDML text path writer 2026-11-13 09:37:36 -05:00
Dylan M. Taylor dab41a4f60 Use shared IDML hyperlink destination writer 2026-11-13 09:35:55 -05:00
Dylan M. Taylor 4fbe39af99 Use shared IDML index parser 2026-11-13 09:33:26 -05:00
Dylan M. Taylor 6bc26299fa Use shared IDML anchored setting writer 2026-11-13 09:30:04 -05:00
Dylan M. Taylor 1cb0c04143 Use shared IDML index writer 2026-11-13 09:27:22 -05:00
Dylan M. Taylor a9c4253e57 Use shared IDML page reference writer 2026-11-13 09:23:32 -05:00
Dylan M. Taylor c74cf007d0 Use shared cell and table style decorations 2026-11-13 09:13:02 -05:00
Dylan M. Taylor 61f6a83de5 Use shared IDML object style values 2026-11-13 09:10:17 -05:00
Dylan M. Taylor c94a29204d Use shared IDML graphic MIME fallback 2026-11-13 09:07:12 -05:00
Dylan M. Taylor 6a980c01c2 Pin IDML API after shared main rebase 2026-11-13 09:06:02 -05:00
Dylan M. Taylor 41bbd27a40 Use shared placed graphic metadata 2026-11-13 09:04:34 -05:00
Dylan M. Taylor 611fe571da Use shared IDML anchored object values 2026-11-13 09:00:48 -05:00
Dylan M. Taylor 7f2ac33275 Use shared IDML frame fitting values 2026-11-13 08:58:46 -05:00
Dylan M. Taylor a92db95301 Delegate IDML object style merging to craft-idml 2026-11-13 08:56:24 -05:00
Dylan M. Taylor 75eeeca16f Use shared IDML table style values 2026-11-13 08:50:49 -05:00
Dylan M. Taylor 862c052c2f Use shared IDML cell style values 2026-11-13 08:49:14 -05:00
Dylan M. Taylor ed0543639a Write IDML cross-reference format through craft-idml 2026-11-13 08:47:03 -05:00
Dylan M. Taylor b782bdde6d Read IDML conditions and lists from shared models 2026-11-13 08:44:55 -05:00
Dylan M. Taylor b45c58f2e3 Use shared IDML cross-reference and EPUB models 2026-11-13 08:43:04 -05:00
Dylan M. Taylor 5b524b5554 Read IDML text variables through shared model 2026-11-13 08:39:54 -05:00