Commit Graph
5896 Commits
Author SHA1 Message Date
aiongg 183d99f0c2 design-lint: props: derive the setters of print components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 290f3f45f1 design-lint: props: derive the setters of imaging components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 305bc92fbd design-lint: props: derive the setters of draw components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg 6697fc9ebc design-lint: props: derive the setters of color components (#[prop]) and drop the hand setters 2026-11-16 13:27:45 +00:00
aiongg d580ecfc16 design-lint: rustfmt the files of the contract fixes 2026-11-16 13:25:07 +00:00
aiongg f6ac586b18 design-lint: contract/entry, contract/pointer: CropSession::show_frame; the reset button reads the contract's click 2026-11-16 13:23:38 +00:00
aiongg af3758b54e design-lint: contract/egui-widget: the comp comment tip is a Text 2026-11-16 13:23:38 +00:00
aiongg 98500a9576 design-lint: contract/memory, test/literal-size: each preset kind's browser keyed by a salted Stack; the guide trial asserts the typed position 2026-11-16 13:23:38 +00:00
aiongg 25ea7622ba Merge branch 'fw/merge-i' into area/fwb2 2026-11-16 13:23:08 +00:00
aiongg ca1a3c72bf Merge branch 'fw/merge-h' into area/fwb2 2026-11-16 13:23:08 +00:00
aiongg 404e03bc63 design-lint: contract/platform, contract/memory: the freedesktop icon lookup lives in craft-window (theme_svgs), so caption icons need no target cfg; desktop icons kept in a session slot; the memory rule's scope_builder test reads the builder argument, not the closure body 2026-11-16 13:22:31 +00:00
aiongg 3af946a321 design-lint: contract/memory, contract/shadow: dock request lists in a runtime::memory session slot; Flyout::show_popup no longer hides the library's show 2026-11-16 13:22:31 +00:00
aiongg b96b48666f merge-fwh: pen: PenTool::deletes, Delete and Backspace left to the app for a draft the selected tool does not own (a864229579) 2026-11-16 13:21:50 +00:00
aiongg 839b67b628 Merge branch 'fw/merge-fb' into area/fwb2 2026-11-16 13:20:06 +00:00
aiongg 2c129a64e3 merge-fwf: F3 pointer slop: Sense::FOLLOWS_IN_SLOP (Sense widens to u32) declares a drag part that begins at the first move inside slop; TransformBox's following parts declare it; the suite's pointer-slop case expects one gesture ending in a Commit within slop for it, reading the part's sense by owner 2026-11-16 13:19:54 +00:00
aiongg 62523e765b design-lint: contract/egui-import, contract/memory, test/cfg-test: ui-canvas's picture slot is a contract PaintSlot (PaintUi::reserve_slot); tool fixture and brush story ids and memory through runtime::memory and StoryData; ruler tick trial in the integration binary 2026-11-16 13:19:50 +00:00
Dylan M. TaylorandVoiceLessQ 6ef2c053df tiff: share allocation-free first-image compression probe (#1867)
* tiff: share WordCraft classic compression probe

Extracted from storytold/wordcraft crates/geom/src/picture.rs at fe8a8a838cde68b272ac68429e53049347feab40. Original implementation by VoiceLessQ; retains Dylan Taylor duplicate-tag hardening from ab0020d6f.

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

* tiff: cover compression probe refusal and endian parity

* test(tiff): allow assertions on bounded fixture conversions

---------

Co-authored-by: VoiceLessQ <t12kaem@gmail.com>
2026-11-16 08:19:29 -05:00
aiongg 464ded51f4 merge-fwi: craft-settings: SettingsStore::read, a read-only load on the store's own load path 2026-11-16 13:18:40 +00:00
2f8b328c6f Add craft-elf: ELF program headers and dynamic entries from Craft Anything (#1851)
Moves the header pieces of Craft Anything's crates/formats/src/elf.rs
into a pure-Rust crate: the class/endian-aware reader, program_headers,
ProgramHeader, dynamic_entries, va_to_off, and the segment type,
permission and dynamic tag names. Mitigations, dynamic symbols, symbol
versions and core-file notes stay in the app.

Part of #778.

Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
2026-11-16 08:18:20 -05:00
aiongg 858b1c1793 merge-fwh: anchor tools: AnchorTool, the canvas tool of Add/Delete Anchor, Convert Point and Direct Selection (no press, own cursor, shown pen draft) 2026-11-16 13:17:17 +00:00
Dylan M. TaylorandAndy Ching 046a7229af fix(docx): integrate VML fallbacks without breaking linked text-box stories (#1864)
* craft-docx: write Word 2010 shapes inside mc:AlternateContent with a VML fallback

A shape was written as a bare `wps:wsp` in `w:drawing`. Word 2007, and
Word 2000-2003 with the Office Compatibility Pack, don't know `wps` and
refuse the whole file. Word writes such shapes in `mc:AlternateContent`.

`write_shape` now guards the drawing with `mc:Choice Requires="wps"` and,
for rectangles, text boxes, rounded rectangles and ellipses, adds an
`mc:Fallback` with the shape as VML: size, position, z-order, wrapping,
fill, outline and the text box's text (copied from the choice's output,
so the story isn't written twice). Other kinds get no fallback; an old
reader skips that shape and still opens the file.

Refs storytold/wordcraft#6849

* craft-docx: guard a shape only when it gets a VML fallback; keep more in the fallback

A shape guarded by `mc:AlternateContent` with no fallback is skipped by
a reader that doesn't know `wps`, and dropped on that reader's next save:
worse than refusing the file. Such shapes are written bare again; only
shapes with a VML form are guarded.

The VML fallback also keeps the shape's own stacking order (a floating
object in its text box moved `self.z` on), its wrap distances, its hidden
flag and its text box's text direction.

* craft-docx: keep behind-text shapes' order in the VML fallback

A behind-text shape's fallback `z-index` was the negated `z`, which
reverses the order of overlapping behind-text shapes. It is now `z`
shifted below zero within signed 32-bit range, so a higher `z` still
stacks higher; other shapes' `z-index` is capped at `i32::MAX`.

* fix(docx): preserve linked text boxes without an incomplete VML fallback

---------

Co-authored-by: Andy Ching <53651198+andyching168@users.noreply.github.com>
2026-11-16 08:16:40 -05:00
FredApps dd345db898 image-codecs: read a raster's resolution from its headers (resolution_probe) (#1838)
* image-codecs: read a raster's resolution from its headers (resolution_probe)

file_resolution(bytes) gives the pixels per inch a JPEG, PNG, WebP, BMP or
classic TIFF records without decoding pixels. JPEG uses the decoder's marker
scan (Photoshop, XMP, EXIF, then JFIF), PNG reads pHYs as the decoder does and
falls back to eXIf, WebP its EXIF chunk, TIFF its IFD0 tags; BMP reads the
info header's pixels per metre. Values outside 1-100000 ppi count as none.

DesignCraft (crates/images/src/resolution.rs) and FigCraft
(crates/format/src/density.rs) each carry their own marker and chunk walkers
for this; they can switch to the shared probe.

Part of #778 and #785.

* image-codecs: resolution_probe reads only a whole nine-byte pHYs, and a zero one leaves eXIf

A pHYs chunk that declares any other length, or is cut off before its
CRC, records nothing, and its data is no longer read from the bytes
after it. A zero pixels-per-metre count records nothing either, as in the
decoder, so the eXIf resolution still answers.
2026-11-16 08:14:38 -05:00
aiongg 889089b4d6 design-lint: contract/egui-import, contract/keys: ui-contract names layers through runtime::egui::areas and reads Tab and step keys in runtime::egui::input; pointer art sides marked as art data 2026-11-16 13:14:21 +00:00
aiongg de96ac0c86 merge-fwf: F3/F4 trials: the box trials press inside away from the reference point; the Ruler trial's tool forwards its cursor; the ruler's line part names its keyboard path (the tool's arrows move the whole ruler); rustfmt 2026-11-16 13:14:17 +00:00
FredApps af8981f596 craft-drawingml: chart legend entries and engineering-format rounding from DeckCraft (#792) (#1871) 2026-11-16 08:13:29 -05:00
aiongg c321c26d35 merge-fwf: StyledPreview: one composite store per filter in a context, keyed by the preview's name, so closed previews' composites are evicted; trial 2026-11-16 13:13:18 +00:00
aiongg cb0b9afa4a merge-fwf: F7 settled regions: a Loading answer of the texture loader notes the asking code as still moving, so a settled region showing a stand-in reruns when the job lands; trial: the mip trial in a settling region 2026-11-16 13:13:18 +00:00
aiongg 81f6211ee5 merge-fwg: automation trials: oversized reply, bad JSON id, repeat auth, unwritable token file 2026-11-16 13:11:32 +00:00
FredApps becf2a0a55 svg: recognise rectangles, rounded rectangles and ellipses in scene paths (#778, #789) (#1869)
tree::primitive::recognize (and Path::primitive) returns the axis-aligned
basic shape a path draws: one closed contour whose points all lie on a
(rounded) rectangle's or ellipse's outline and that encloses its area. usvg
turns rect, circle and ellipse into paths; apps that edit them as shapes get
them back from the segments.
2026-11-16 08:07:44 -05:00
aiongg 743218ea23 Merge branch 'fw/merge-b3' into area/fwb2 2026-11-16 13:07:31 +00:00
aiongg f8354db6f7 merge-fwb3: A11: a focus move after typed input waits for the next frame
Strip::use_of classifies a press once for press() and ends_pass(). A Tab or pane key after key input of the same pass ends the pass's key events: the key stage cuts it and every later event and hands them to HeldInput (hold_ahead), ahead of what the one-press rule held. The focused field reads its text before the Tab that leaves it, as with Enter.
2026-11-16 13:06:58 +00:00
aiongg 6f31184efe merge-fwb3: FW12: text a claim or a framework taker takes leaves egui's input
The hook keeps every text event and records whether a claim took its press; route::begin withdraws a claimed text, or one routed to a taker other than the focused text field's egui widget (a menu level, a driven list, digits, type-ahead), together with the held presses (withdraw_taken, egui input::withdraw). A menu letter that runs a row and returns focus to a text field in the same pass no longer types into the field.
2026-11-16 13:06:58 +00:00
aiongg 0ebbb830a8 merge-fwf: F3 design-lint fixture: match PressPhase::Held { .. } 2026-11-16 13:05:18 +00:00
aiongg b27d09d155 merge-fwf: F4 ruler cursors: read the part's hover before borrowing the press slot 2026-11-16 13:04:26 +00:00
aiongg 55845f323a Merge branch 'fw/merge-c3' into area/fwb2 2026-11-16 13:02:52 +00:00
aiongg 0347762847 Merge branch 'fw/merge-f' into fw/merge-fb 2026-11-16 13:01:41 +00:00
aiongg f77d72c556 merge-f: F7: PreviewTextures builds mip levels on the shared TextureLoader, the closest finer level standing in (#13382); one store per context keyed by name and level, revisioned per preview; the loader drops finished results of keys nobody asked for 2026-11-16 13:00:43 +00:00
Dylan M. Taylor 21ceafea04 fix(svg): validate declaration encodings and internal subset boundaries 2026-11-16 07:59:10 -05:00
aiongg 6cc4c78bde Merge branch 'fw/merge-c4' into area/fwb2 2026-11-16 12:59:07 +00:00
aiongg 45273b3a74 merge-c2: stroke width range alert: StrokeCells::show reports StrokeCellsOutput { events, out_of_range }; the Shape bar passes it through Cells::alert; trial case in shape_cells 2026-11-16 12:58:36 +00:00
aiongg c6dec7428b merge-fwd: FW9: ui-contract and ui-shell draw through craft-svg (lockfile) 2026-11-16 12:57:58 +00:00
aiongg 4119da5b95 Merge branch 'fw/merge-d' into area/fwb2 2026-11-16 12:57:54 +00:00
aiongg 2b3056407b merge-fwd: item 5: FW15 trial: wheel to the list's end in steps as its extent grows; the selected filter, the list's lead, is out of view after scrolling up 2026-11-16 12:57:21 +00:00
aiongg 8dfe281524 merge-fwe: E1: craft-ai-agents at 35e0352666 (lockfile) 2026-11-16 12:56:36 +00:00
aiongg 3718ba3ee2 Merge branch 'fw/merge-e' into area/fwb2 2026-11-16 12:56:36 +00:00
aiongg f8b7b010a6 merge-c3: rustfmt 2026-11-16 12:56:33 +00:00
aiongg 00559e1fd2 merge-c3: 2.2: trial keeps the vertical case inside the canvas 2026-11-16 12:56:19 +00:00
aiongg e9f172d604 merge-fwb: FW8: craft-keymap reads .kys with craft-xml (lockfile) 2026-11-16 12:55:51 +00:00
aiongg 7c739a93ff Merge branch 'fw/merge-b2' into area/fwb2 2026-11-16 12:55:51 +00:00
aiongg 70fda8a853 merge-c3: Magnetic Lasso cursor reads the canvas's precise cursor (cx.precise()); MagneticLassoTool::precise_cursor removed 2026-11-16 12:55:44 +00:00