craft-libs next: move the pin and fix the build

- egui fork pin follows craft-libs (6525c879).
- A value glyph is memo props: EdgeGlyph and LibraryGlyph derive MemoProps; a library glyph keys by its static icon's address, so it holds a 'static reference.
- The tests take craft::ui::testing through the facade's ui-testing feature.
This commit is contained in:
aiongg
2026-11-21 01:51:03 +00:00
parent 22314f552d
commit ecb3633aff
5 changed files with 180 additions and 299 deletions
Generated
+117 -241
View File
File diff suppressed because it is too large Load Diff
+52 -52
View File
@@ -37,20 +37,20 @@ wordcraft-pdf = { path = "crates/pdf" }
# reads the ca-valencia pack), #589 (French elision suggestions first), #497 (flag-based
# compounding), #496 (review follow-ups, en-AU) and the merged #482–#490/#495 stack; the font
# store's `language-pack` kind is #486 (CP4.1).
wordcraft-proof = { package = "craft-proof", git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-ssip = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
wordcraft-proof = { package = "craft-proof", git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-ssip = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
wordcraft-engine = { path = "crates/engine" }
wordcraft-mcp = { path = "crates/mcp" }
wordcraft-zotero = { path = "crates/zotero" }
wordcraft-control-key = { path = "crates/control-key" }
wordcraft-ui-egui = { path = "crates/ui-egui" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0", default-features = false }
craft-ui-test-kit = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0", default-features = false }
craft-ui-test-kit = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
# foundation
kurbo = { version = "0.13", features = ["serde"] }
@@ -81,28 +81,28 @@ wuff = "0.2.9"
brotli-decompressor = "5"
vello_cpu = "0.2"
image = { version = "0.25", default-features = false }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0", default-features = false, features = ["write"] }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0", default-features = false, features = ["write"] }
craft-wordmodel = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-docx = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0", features = ["doc"] }
craft-doc-binary = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-flow = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-odf = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0", features = ["text"] }
craft-markdown = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-html = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0", features = ["flow"] }
craft-latex = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-math = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0", features = ["detect"] }
craft-sheet = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-ods = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", version = "=0.1.0" }
craft-wordmodel = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-docx = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0", features = ["doc"] }
craft-doc-binary = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-flow = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-odf = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0", features = ["text"] }
craft-markdown = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-html = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0", features = ["flow"] }
craft-latex = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-math = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0", features = ["detect"] }
craft-sheet = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-ods = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", version = "=0.1.0" }
# zlib streams (compressed metafile pictures in `.doc` drawings); already in the lock as a dependency of other crates.
miniz_oxide = "0.9"
cfb = "0.15"
@@ -170,27 +170,27 @@ debug = 0
# The framework's patches, which Cargo does not carry over to dependents: its vendored crates from craft-libs,
# and the egui and winit forks it builds with.
[patch.crates-io]
krilla = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
emath = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "7e1c30d142bc7879d043e74b5ceb3ecfe7f51329" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
hayro = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
emath = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "6525c87923ca47465aac244460fe4b1139349060" }
winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" }
+4 -2
View File
@@ -16,7 +16,7 @@ craft = { workspace = true, features = [
"color", "color-ui", "control", "draw", "font-manager", "gpu", "menu", "pages", "print", "review", "table", "text",
"text-find", "web-api", "web-host", "window",
] }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd" }
wordcraft-geom = { workspace = true, features = ["image"] }
wordcraft-doc = { workspace = true }
wordcraft-fonts = { workspace = true }
@@ -69,9 +69,11 @@ egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] }
craft-zip = { workspace = true }
# The window tests' frame driver for child viewports; it is not part of the `craft` facade.
craft-ui-test-kit = { workspace = true }
# The interface tests' fixture and access tree (`craft::ui::testing`).
craft = { workspace = true, features = ["ui-testing"] }
[build-dependencies]
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "243d68e12d05e89122db6d154924bf1992e10d38", features = ["subset"] }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "3f440d3ff16a41b62b869d414226ac09233ccddd", features = ["subset"] }
serde_json = { workspace = true }
toml = "1"
@@ -272,6 +272,7 @@ fn edges_on(b: &Borders, edges: &str) -> bool {
/// A square showing which edges a border choice draws: the drawn edges in the icon colour, the
/// others as faint dotted guides.
#[derive(craft::ui::contract::MemoProps)]
struct EdgeGlyph {
edges: &'static str,
}
+6 -4
View File
@@ -427,16 +427,18 @@ pub fn for_command(id: &str) -> IconSpec<'static> {
/// An Insert › Icons library icon as a value glyph, drawn from the same path data the inserted
/// picture is rendered from (`wordcraft_render::icon_lib`).
pub struct LibraryGlyph<'a> {
icon: &'a wordcraft_render::icon_lib::Icon,
#[derive(craft::ui::contract::MemoProps)]
pub struct LibraryGlyph {
#[memo_props(address = "library icons are items of the static `ICONS`")]
icon: &'static wordcraft_render::icon_lib::Icon,
}
/// The glyph of a library icon; bind it to a local so `IconSpec::glyph(&glyph)` can borrow it.
pub fn library_glyph(icon: &wordcraft_render::icon_lib::Icon) -> impl Glyph + '_ {
pub fn library_glyph(icon: &'static wordcraft_render::icon_lib::Icon) -> impl Glyph {
LibraryGlyph { icon }
}
impl Glyph for LibraryGlyph<'_> {
impl Glyph for LibraryGlyph {
fn paint(&self, p: &Painter, _tokens: &UiTokens, r: Rect, c: Color32, _mirrored: bool) {
use wordcraft_render::icon_lib::{GRID, STROKE};
let s = r.width().min(r.height()) / GRID;