Commit Graph
1680 Commits
Author SHA1 Message Date
aiongg e2ae0d10ea docs(dialogs, docking, themes): name the library crate behind each craft_ui module 2026-11-12 14:32:39 +00:00
aiongg c49f9329d4 docs(authoring): which library crate a component goes in, the test executables of library and family crates, story groups and titles, cl commands 2026-11-12 14:32:39 +00:00
aiongg 8f4490ff99 docs(craft-framework): the split UI library, the egui fork, gates and landing as the code has them
- 3.1 to 3.4: the six library crates and the craft-ui facade, with a dependency
  diagram, the crate table and the craft-win32 unsafe exception; taxonomy covers
  every crate.
- 2.1 and 2.3: the gallery profile, cl and the story renderer.
- 3.6: layout memory's kept text; the scroll extent lives beside the offset.
- 3.7: the aiongg/egui pin, its 19 commits and what landing needs.
- 7.1: the step rule of closed list controls (Entry::stepped).
- 8.2: the gates that exist.
- 9.7 to 9.9: measured series size, landing rows without the pasted step rows,
  the facade and API map in place of deprecated aliases, aliases as a question.
- Appendix B: entries for craft-behavior, each library crate and craft-win32;
  where each concept lives.
2026-11-12 14:32:39 +00:00
aiongg afa3b3f6d7 docs(glossary): state where Lives in and Defined in point; drop the doc-test claim and DebugInspector 2026-11-12 14:32:39 +00:00
aiongg 37bb6cc4ec Comments: the story renderer shows StoryBody; drop the gallery manifest's component-sheet notes 2026-11-12 14:32:38 +00:00
aiongg 6d5ba693f7 Doc comments: drop DebugInspector and DragBadge, which no crate defines 2026-11-12 14:32:38 +00:00
aiongg 5040dd0879 docs: regenerate contract-api.md from the split library crates 2026-11-12 14:32:38 +00:00
aiongg 57d3c88b0a contract-api: read the shared modules from craft-ui-contract and craft-ui-widgets
The generator parsed crates/ui/src/lib.rs, which is a re-export facade over
the six library crates, so it found none of the shared modules. It parses
craft-ui-contract as craft_ui and craft-ui-widgets' layout_components, and
reads a path into any library crate as the craft_ui path the facade gives it.
2026-11-12 14:32:38 +00:00
aiongg 9bc147affd Level tables key every type of the library under craft_ui
The surface and story layout tables name the library's types under
craft_ui, but since the split a type's crate target is the crate that
declares it, so no library row matched: Slider's value groups lost their
form rows and every library type sat on the panel surface. The table key
reads a type of any library crate as craft_ui, as the level rows already
read a library module path. The stale-row check runs in the craft-ui
facade's trials, where every crate of the library is linked, and checks
the library's rows whenever one of its crates is.
2026-11-12 14:32:38 +00:00
aiongg 16b43d84a5 A kept measurement serves the value text its run found
A record of layout memory holds a measure or a text. emit_text hands a
text forward through the same transcript as emit_record: a body that
takes its kept measurement gives the text its measuring run found, where
the content that found it does not run, and a real run's text other than
the kept one shows the transcript changed. The gallery card emits each
story's value text in its shell and the form rows read it beside the
story, so a settled Slider card runs one pass per frame.
2026-11-12 14:32:38 +00:00
aiongg 9305448598 Gallery cards run each story once: an embedded shell as tall as its content
AppShell::content_height sizes an embedded shell from its body's measure,
which its body keeps while its inputs hold. The body pane is a pane at its
rect as tall as its content, taking its height in the scope's flow. The
gallery card drops its two measure_in runs and its detached shell record;
the value text and the dialog record come from the shell's real run, and a
story whose shell showed a dialog gets the card's whole room.
2026-11-12 14:32:38 +00:00
aiongg 64e3e6f4e5 A scroll body keeps its content extent with its offset
The extent that bounds a body's offset lived in shown memory (`BodyView`),
which is evicted soon after a body stops showing, while the offset and its
anchor live in session memory (`ScrollState`). A body shown again after a
longer hide clamped its kept offset against an extent of 0 and came back
at the top. The extent now lives in `ScrollState` beside the offset, with
the same lifetime; `BodyView` keeps the view rect.

The anchor rule runs only in the run that lays the content out for the
view: a measure run places no Lazy children, so it would clear the anchor.
2026-11-12 14:32:38 +00:00
aiongg e872978edc Overview first show runs only the cards in view
A Lazy child no pass showed yet takes the estimate its app gives
(`Lazy::new(key, estimate)`): that long along the axes its scroll area
scrolls, nothing across them, as a collection places rows it never built
by its item layout's estimate. The never-shown "always run" branch of
`lazy::decide` is gone. Gallery cards estimate their height from their
story rows.

A scroll position the framework holds is also named by content: the
first child at or after the view's start (`lazy::Anchor`, kept with the
offset in `ScrollState` and a collection's `Scrolled`). When extents
before it change, the offset follows the child and the pass runs again,
so the content in view does not move. Bound offsets keep no anchor.

Entries of the out-of-view store record their scroll area. A frame drops
only the entries an area that ran did not reach, so a hidden area (a tab
switched away) keeps its children's extents.

Trials: first show, shown again after a hide, content in view stays when
an estimate above it resolves, collection rows stay when a row above them
changes height; the gallery trial asserts each level first runs the cards
in view.
2026-11-12 14:32:38 +00:00
aiongg 0cb5bc3db9 cl test works for every framework crate: the runtime's testing includes snapshot; cl doctor checks that every canonical set resolves
cl test failed for craft-ui-panels, canvas, patterns and shell: their canonical set named craft-ui-contract/snapshot, and cargo lets a command name a feature only of a direct dependency, which the runtime is not for crates above widgets. craft-ui-contract's testing now includes snapshot (the resolved feature set of the runtime in a test build is the same three features as before, so no unit changes), and the canonical sets drop the snapshot entries. cl doctor resolves every crate's canonical set against cargo metadata, with no build: a plain feature must be the crate's own, a dep/feature must name a direct dependency and a feature it has. docs/development.md states what CI covers (ui.yml for the seven ui crates, theme.yml, docs.yml, path-filtered workflows for some leaf crates) and what it does not (the domain crates on the framework, the gallery, the renderer, the umbrella crate, any workspace-wide build).
2026-11-12 14:32:38 +00:00
aiongg 78193f81b6 Activation suite: a step is the one the control took, declared before the key
An arrow's step is read from the focused node's number: Increment when it rose,
Decrement when it fell, and the arrow's own direction only when the node reports no
number on both sides of the key. The step counts only when it was declared before
the key, the state an AccessKit user acts from. A Select holding its first entry
(story select_first) steps forward on ArrowDown, which is its Increment.
2026-11-12 14:32:38 +00:00
aiongg c09e0a6798 Entries a step skips: Entry::stepped, one step rule for Select and ComboBox
A step over a closed control stops on the enabled, stepped entries only. A value on
none of them (mixed, or an entry only the open list offers) has no place: it reports
no number, so both steps are offered, and a step forward lands on the first stop and
a step back on the last. Select and ComboBox step with the shared step_stops and
step_stop.

LutPicker marks Load 3D LUT…, the folder files and the loaded LUT as not stepped, in
place of its filter on step events. The loaded LUT then offers both steps, which the
craft-color activation suite asks for.
2026-11-12 14:32:38 +00:00
aiongg 3a0736c569 Docs: the framework, development workflow, design notes and migration records 2026-11-12 14:32:38 +00:00
aiongg 21e354ec67 design-lint: architecture and look rules for the framework 2026-11-12 14:32:38 +00:00
aiongg a5469d5446 Gallery and story renderer: every component's stories, old/new comparison 2026-11-12 14:32:38 +00:00
aiongg 25597ecfc7 Media, formats and engine crates: follow-ups from the framework migration 2026-11-12 14:32:38 +00:00
aiongg 8735a8b1c5 Document and app crates on the framework: text, pages, table, review, timeline, menu, browse, dialogs, print, font manager, theme store, update, automation 2026-11-12 14:32:38 +00:00
aiongg fa139e6d3d Picture crates on the framework: imaging, draw, colour, layers 2026-11-12 14:09:48 +00:00
aiongg e59460135e Base crates on the framework: theme, behaviour, keymap, platform, window, settings, i18n, fonts 2026-11-12 14:09:48 +00:00
aiongg a2676b8eac Framework UI crates: widgets, panels, canvas, patterns, shell and the craft-ui facade 2026-11-12 14:09:32 +00:00
aiongg e4d2fc38fb Runtime and contract: craft-ui-contract, macros and the test kit 2026-11-12 14:09:32 +00:00
aiongg 673e9e8e63 Workspace, build tooling and CI: the cl command, profiles, one feature set, workflows 2026-11-12 14:09:31 +00:00
Dylan M. Taylor 6cb00467a5 craft-aaf: rustfmt the roundtrip comparison added in #1108
* craft-aaf: rustfmt the roundtrip comparison added in #1108
2026-11-12 07:49:33 -05:00
Dylan M. Taylor 70fabd64dc craft-aaf: retain master names on unnamed clips
* craft-aaf: retain master names on unnamed clips
2026-11-12 07:30:59 -05:00
Dylan M. Taylor e947d5d799 dxf: a refused allocation for binary tags is an error, not an abort
* dxf: a refused allocation for binary tags is an error, not an abort

* dxf: a refused allocation for binary tags is an error, not an abort
2026-11-12 07:25:00 -05:00
Dylan M. Taylor 3728fd1ffb craft-aaf: use referenced slot rates for source offsets
* craft-aaf: use referenced slot rate for source offsets
2026-11-12 07:04:54 -05:00
Dylan M. Taylor c95885f6d9 craft-aaf: compare a re-written edit without its generated mob ids
`Composition::aaf_mob_id` is documented as a read identity: writers generate
fresh format identifiers and never preserve it. The roundtrip test compared
whole compositions after the second write, so it broke as soon as #1098
exposed the field. Compare them with the id cleared, as the surrounding
comment already described.
2026-11-12 06:53:08 -05:00
Dylan M. Taylor e2dbb04aec craft-pdn: stop surface reads when the visitor fails
* pdn: let surface visitors stop decoding

* pdn: preserve the legacy surface reader error type
2026-11-12 06:26:30 -05:00
Dylan M. Taylor 7e09989ce4 craft-xcf: allow cancellation between layer records
* xcf: stop parsing layer metadata on cancellation
2026-11-12 06:26:24 -05:00
Dylan M. Taylor 9fd3db9484 craft-svg: report the decoded size of nested SVGZ input
* svg: include decoded size in nested stream errors
2026-11-12 06:26:19 -05:00
Dylan M. Taylor d13ac58a15 craft-fig: map FigJam stickies to native board items
* craft-fig: map FigJam stickies to native board items
2026-11-12 06:26:14 -05:00
Dylan M. Taylor ceb78f63af craft-mesh: preserve glTF tangents
* gltf: test preserving authored tangents

* gltf: expose authored tangent attributes
2026-11-12 06:26:09 -05:00
Dylan M. TaylorandNetterSilver e3c6ec4a23 craft-mesh: ignore empty OBJ material assignments
* Ignore empty OBJ material assignments

* Preserve empty material resets in OBJ writes

Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>

---------

Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
2026-11-12 06:26:04 -05:00
Dylan M. Taylor f759a35db8 craft-aaf: reject cyclic root mini-stream chains
* craft-aaf: reject cyclic root mini-stream chains
2026-11-12 06:25:55 -05:00
Dylan M. Taylor 584d87f9e1 craft-aaf: report flattened selector structures
* craft-aaf: report flattened selector structures
2026-11-12 06:25:47 -05:00
Dylan M. Taylor 80144afd9c craft-raw: count a TIFF image's chunks from its offsets table
craft-tiff caps chunk descriptors at the file's length (storytold/craft-libs#827), so a grid of tiles sharing one payload lists fewer chunks than the image declares. Comparing that capped list against the grid refused a file shorter than its tile count for "missing chunks" instead of for the data it actually holds. Compare the offsets table, which is the source of truth, and cover the short-file case.
2026-11-12 06:22:37 -05:00
Dylan M. Taylor d6134e51cb craft-aaf: decode relative media locator escapes (#1101)
* craft-aaf: decode relative media locator escapes

* Preserve literal percent escapes in relative paths
2026-11-12 05:48:58 -05:00
8958340761 craft-drawingml: preset geometry, text warp, custom geometry and colour fixes from open DeckCraft PRs (#1023)
* craft-drawingml preset: the extra outlines dispatch on a Name enum

Ported from storytold/deckcraft#739 by @Bryson14.

* craft-drawingml preset: the 3- and 4-bend elbow and the curved connectors follow presetShapeDefinitions

Ported from storytold/deckcraft#1851 by @Hamza0101.

* craft-drawingml warp: text on a guide sets each glyph down whole

Ported from storytold/deckcraft#1799 by @leobasilio.

* craft-drawingml preset: the Name dispatch test's digests as this repository builds the outlines

The digests in storytold/deckcraft#739 were taken on DeckCraft's fc35ad67. Here two curved arrows
digest differently both before and after the refactor (the preset sources are identical), so the
test now holds the values from craft-libs 2b35d243, before the refactor.

* craft-drawingml preset: every preset's text rectangle from presetShapeDefinitions

Ported from storytold/deckcraft#650 by @NikitkaRa. Its preset::defaults is #1851's
adjust_defaults, which this repository already has.

* craft-drawingml custgeom: connection sites (a:cxnLst) read in the shape space and written back

Ported from the format part of storytold/deckcraft#1748 by @jagjordi.

* craft-drawingml color: behaviour-preserving cleanups

Ported from storytold/deckcraft#1610 by Cédric Legrand.

* craft-drawingml: resolve current-main API and test conflicts

* craft-pptx: use DrawingML writer defaults for custom paths

* craft-drawingml: strengthen geometry regression checks

---------

Co-authored-by: Bryson Meiling <bryson.meiling@gmail.com>
Co-authored-by: Hamza <mail.hamzanaveed@gmail.com>
Co-authored-by: Leonardo <leobasilio@gmail.com>
Co-authored-by: Nikita Rakitin <nnnrrr93@gmail.com>
Co-authored-by: Jordi <jordiag@kth.se>
Co-authored-by: Cédric Legrand <cedric@legrand-tech.fr>
2026-11-12 05:35:48 -05:00
Dylan M. Taylor c6db9e834e craft-aaf: expose composition mob identity (#1098) 2026-11-12 03:29:50 -05:00
Terra854 398c186924 Expose bounded exact X11 color lookup (#1096) 2026-11-12 03:20:05 -05:00
1fc4c17fff prepress: printer's marks (#754)
* prepress: printer's marks

Marks::new lays out crop marks, bleed marks, registration targets and
process color bars around a trim box, with the sheet that holds them and
room for a page-information line. Marks::draw paints them onto a krilla
surface: lines in the registration color (Separation /All), bars in
DeviceCMYK. ISO 32000-2 14.11.3, 14.11.2, 8.6.6.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* prepress: keep the info line clear of the bottom target

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* prepress: clear targets only when drawn; cap line width at a third of the mark

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: KenM76 <KenM76>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 06:44:39 +01:00
Dylan M. Taylorandwhatever-industries 4cb271b785 craft-audio: apply final Matroska duration to all laces (#1088)
Co-authored-by: whatever-industries <77seventy77@users.noreply.github.com>
2026-11-12 00:14:52 -05:00
Melchi Aaron Zedek bb57d422d0 craft-video: HEVC 4:2:2 8/10-bit decoding (Main 4:2:2 10) (#1087)
Port of storytold/filmcraft#1952, reviewed and approved there before the
decoder moved to craft-libs. 4:2:2 streams that use no range-extension
coding tools (what cameras and libx265 write) now decode:

- chroma geometry from the SPS chroma format (ChromaFormat shifts) in the
  picture store, intra, inter, transform tree, deblocking and SAO;
- Table 8-3 IntraPredModeC mapping for ChromaArrayType 2;
- stacked chroma transform blocks with their second cbf flags;
- chroma QP = Min(qPi, 51) for non-4:2:0 (Table 8-10 applies to 4:2:0 only);
- chroma motion vectors scaled per axis;
- a PPS that scales SAO offsets (a RExt tool) is refused as unsupported.

Tests: 22 libx265 4:2:2 fixtures (8- and 10-bit) compared sample-exactly
with ffmpeg, the Table 8-3 derivation, and the SAO offset scale check.
2026-11-11 23:52:20 -05:00
Dylan M. Taylor 09dcbc225b fix: sync Cargo.lock with craft-rtf's dependencies (#1086)
craft-rtf gained craft-flow, craft-metafile, craft-wordmodel and image in
its manifest, but Cargo.lock was not regenerated. Every --locked cargo
command then tried to rewrite the lock and failed, so all crate workflows
on main stopped during dependency resolution.

Regenerated with cargo metadata.
2026-11-11 22:57:40 -05:00
Dylan M. Taylor fa389c7883 craft-pdf: the PDF object layer from PdfCraft (cos), on filters and crypt
craft-pdf: the PDF object layer from PdfCraft (`cos`), on filters and crypt

* hayro-jbig2: bound a stream's total decode work and what a page retains; no i32 overflow

Port of pdfcraft 85c10051 (patches 5-9), 82439525 (patch 10) and 10107d94 (patch 12).

* hayro-jbig2: PdfCraft's JBIG2 follow-ups (refinement fixes, file header, work accounting, dictionary pixel cap)

Ports pdfcraft 72e763ad, b7ec3669, e3bc4e85, 01d3479f, b9e068aa, 858ce960, 07f44038, e38b9d18, 8717a085, 58c30af3 and the hayro-jbig2 part of e2464e14 (with the hayro-jbig2 part of 0ed33990 they build on).

* Add craft-stream-codecs: the codec modules of PdfCraft's stream filters

LZW, ASCII85, ASCIIHex, RunLength, the TIFF and PNG predictors, bounded CCITT
fax decoding (through hayro-ccitt) with Group 4 encoding (through fax), and
the lossless JBIG2 encoder with its MQ coder, from pdfcraft-filters at
PdfCraft revision 80e26e674d1aa33078e83c8139875047f3289eb6.

The crate sits below craft-pdf and craft-tiff: it knows no container. The
PDF filter chain, Flate and the bounded JBIG2 decoding entry are not part of
it.

* craft-pdf: the PDF filter chain from PdfCraft (`filters`)

Adds the `filters` feature: the /Filter chain of pdfcraft-filters (PdfCraft
revision 80e26e674d1aa33078e83c8139875047f3289eb6) as craft_pdf::filters,
over the codecs in craft-stream-codecs. It adds Flate, strict and tolerant
chain decoding, byte accounting and a shared work allowance, and encoding,
with the chain's unit tests, its property tests and its fuzz target.

The code is unchanged apart from the imports of the moved codecs; FilterError
is craft-stream-codecs' CodecError under its old name.

* craft-stream-codecs: bounded JBIG2 decoding (decode_jbig2_within)

The JBIG2 decoding entry of pdfcraft-filters (PdfCraft revision
80e26e674d1aa33078e83c8139875047f3289eb6, src/jbig2/decode.rs) with its tests.
It spends from the caller's work allowance through hayro-jbig2's
Image::decode_within and charge_reading, which come with
fix/sec-hayro-jbig2-followups (#886).

* vendor/README.craft-reader.md: one #831 paragraph, the follow-ups after it

* craft-pdf: filters re-exports decode_jbig2_within (and lib.rs module order)

* craft-pdf: the object layer from PdfCraft (`cos`)

Adds the `cos` feature: PdfCraft's pdfcraft-cos crate (revision
1d2af9907ba772b368f6b54811359805fa5428e9) as craft_pdf::cos, on crypt and
filters, with its unit tests, integration tests and examples. Its test helpers
come with it: pdfcraft-testkit as src/cos/testkit.rs (cfg(test)) and the qpdf
runner of pdfcraft-oracle as tests/cos/oracle.rs.

The code is unchanged apart from module paths and doc comments. The child test
of file_identifier is named by its module path, since the integration tests
are one binary.

* craft-pdf: cos unit tests build for wasm

The property tests in src/cos/writer.rs need proptest, a dev-dependency of
the non-wasm targets only, and one test in src/cos/document/tests.rs times a
load on a thread, which wasm32-unknown-unknown does not have. Both are
compiled for non-wasm targets only; the other unit tests still build for wasm.
2026-11-11 22:44:59 -05:00
Dylan M. Taylor 7dcc9950a1 craft-xlsx: pictures in cells and dynamic-array metadata
craft-xlsx: pictures in cells and dynamic-array metadata

* craft-xlsx: read parts with canonical prefixes so kept trees can be written back

The part layer read every part by local name, so extLst children (x14:, xr:, xm:),
mc:AlternateContent and r:id lost their namespaces and could not be written back.
Parts are now read with one fixed prefix per namespace (the main namespace unprefixed),
mc:Ignorable and mc:Choice/@Requires are rewritten to match, and ns::declare prepares a
kept tree for writing. craft-xml: a namespace listed with the empty prefix reads unprefixed.

* craft-xlsx: write SpreadsheetML workbooks (Document read and write)

Document holds a whole workbook: the workbook part, shared strings, styles, each worksheet's
rows and the rest of its part, and every other part kept as bytes. write regenerates the
workbook part, worksheets, shared strings and styles from the model, keeps unknown children
in place (schema order for regenerated ones), keeps part names and relationship ids, and
writes kept parts unchanged. Writers: Styles::to_xml and to_el for each table entry,
StringItem::to_el (phonetic runs checked as on reading), SheetPart::to_xml with rows
streamed, Workbook::to_el, XlsxKind. Row and DefinedName keep their other attributes;
CellStyle reads iLevel. craft-opc: LazyPackage::canonical gives a part's stored name.

* craft-xlsx: typed worksheet features and comments, written back

SheetPart::features lifts sheet views, print setup, data validation, conditional formats,
hyperlinks and the legacy drawing into types that mirror their elements (optional attributes,
unnamed ones kept) and writes them in schema order. Comments come from the comments part,
note shapes from the VML drawing; a sheet that gains comments without a VML drawing gets one.
A hyperlink to a new URL gets its own relationship. craft-sheet: Range derives Default.

* craft-xlsx: drawings, charts and the theme on craft-drawingml

Drawing reads a sheet's xdr:wsDr into anchors with typed placements and objects kept as
written; Anchor gives the object's kind, properties, chart or image relationship and xfrm.
Package::drawing, Package::chart (c: and cx: parts through craft-drawingml) and
Package::theme. Document worksheets hold their drawing part, regenerated with its
relationships kept by id; add_chart and add_picture add new chart parts (chartEx behind
mc:AlternateContent) and images with their anchors. More drawing namespaces get prefixes
(a16, asvg, aink, am3d, cx1-cx4, dgm).

* craft-xlsx: tables (ListObjects) read and written back

Table mirrors CT_Table: every attribute, columns with calculated and totals formulas, the
style info, autoFilter/sortState/extensions kept as written. Package::tables reads a sheet's
table parts; Document worksheets hold them as TableParts, regenerated with their
relationships and tableParts entries. Part names a document keeps are reserved before new
parts are named, so a new part never takes a name a later sheet keeps.

* craft-xlsx: PivotTables (caches, records, tables) read and written

Typed pivot cache definitions (source, fields, shared items, grouping),
streamed cache records and PivotTable definitions (location, fields and
items, axes, page and data fields, style), with every unmodelled child
and attribute kept. Workbook::pivot_caches lifts pivotCaches. A Document
holds caches and tables and regenerates their parts, relationships and
pivotCaches entries; an OLAP cache or a table on one stays a kept part.
SharedItems::describe gives Excel's shared-item flags and records_xml
writes a records part, after GridCraft's pivot writer.

* craft-xlsx: pictures in cells and dynamic-array metadata

Package::cell_pictures follows a cell's vm through the value and future
metadata to its _localImage rich value and image, bounded and lenient as
GridCraft's richdata.rs reads it. Document::add_cell_metadata writes the
metadata part (XLDAPR for dynamic arrays, XLRICHVALUE for pictures), the
rich-value parts and the images as GridCraft writes them.
2026-11-11 22:44:39 -05:00