storytold main 83cb1133dd (291 commits) into the integration head bab1a99b85; 47 conflicted files.
- Domain test files (metafile, prepress, pdf plates, settings store, heif, media-testkit, atomic): tests next cut stay cut; tests new on main are kept, as trials where the crate's test target runs trials.
- atomic: main's group-bits test and Faulty::set_group go to src/tests.rs. audio: main's GSM and SBC oracles join tests/main.rs. cms constructors, pdf knockout_backdrop and testing_pdf join their crates' one test binary; timeline's preflight tests become src/preflight_tests.rs trials.
- update: main's changes to detect, install (linux, macos) and the tests land in next's split modules. The app's own offer is inspected on a thread of its own, picked up by tick's polling; settle_for_tests settles offers too. Later on a ready update drops the close it asked for. updater_pin_tests.rs stays deleted; its new pin test is in tests/it/update.rs.
- craft-color: main added a different crate at crates/color (the colour tags of compositor and display frames); it is next's craft-color module `tags`, re-exported at the root.
- Old crates/ui (combo, docking, testing, README) and keymap's ui/view.rs stay deleted; main's new crates/ui/src/testing files are dropped with them.
- New crates in the craft facade: ai, control, dds, frame, ipc, media-source, palette, press-print, score, ssip. testkit and xtask are listed outside it.
- Cargo.lock: the union of both locks, resolved by cargo metadata. Workflow: main's nextest Windows leg, with next's --keep-going clippy.
craft-flow
The model every text format maps to and from: a Flow is blocks, a block a paragraph (Para:
a Kind — normal, heading, title, quote, code line, rule — list membership, alignment, spacing
and formatted Inline spans: text, pictures, links, bookmarks, fields, notes, equations, ruby,
charts, shapes) or a table (FTable of Cells holding blocks), with the document's Meta.
to_doc and from_doc convert a flow to and from a craft_wordmodel::Document. A format reader
builds a flow and calls to_doc; a writer calls from_doc (or from_doc_with and FlowOpts for
what that format keeps: fields, boxes, paragraph formatting, tracked changes) and walks the flow.
Formats that keep more than the flow holds (ODT) carry it in the optional fields (extra,
kept, …), which the plain formats leave empty.
use craft_flow::{FBlock, Flow, Fmt, Inline, Kind, Para, from_doc, to_doc};
let p = Para { kind: Kind::Heading(1), inlines: vec![Inline::Text("Title".into(), Fmt::default())], ..Default::default() };
let doc = to_doc(&Flow { blocks: vec![FBlock::Para(p)], ..Default::default() });
let back = from_doc(&doc);
assert!(matches!(&back.blocks[..], [FBlock::Para(p)] if p.kind == Kind::Heading(1) && p.text() == "Title"));
Also here: picture sniffing and sizing (sniff_image, image_px, make_img), CSS colours
(parse_color), base64 and data: URIs, list labels (ListCounter), and the one-warning-per-kind
report of what an importer leaves out to stay within a limit (Dropped, begin_import,
dropped).
Provenance
WordCraft's crates/formats/src/model (at 07f97737), moved as it is onto craft-wordmodel.
Image decoding for re-encoding (decode_bounded) stays with the RTF writer that needs it.