From 58b758f2473b755fd5e1b66cb6cdce3d247c4a05 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 00:54:20 +0000 Subject: [PATCH 01/24] minimal-port repin: 38 edits (revs 30, features 8) --- Cargo.toml | 60 +++++++++++++++++------------------ apps/materialcraft/Cargo.toml | 2 +- crates/ui-egui/Cargo.toml | 6 ++-- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d01020b4..0380d751 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", version = "0.1.0" } +craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "380a2f79f6a195c090a5372e819cbcda2b703c09" } +craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "512a1b8e8b59a7b325e7f69f6131aa8628470288" } +craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,42 +91,42 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "7a7a18cb40ac4cd5fca29c0dc224ac5178d40a89" } -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", features = ["serde"] } +craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", features = ["egui"] } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } -craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", features = ["egui"] } -craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["ui"] } +craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", features = ["egui"] } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc", features = ["egui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "453b0da782ccef39be9a6dac8d27c80b553ef1cc" } +craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "5a913a42abc9fed0cfc588114788e400229f5108", features = ["parallel"] } +craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] -ecolor = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -emath = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -epaint = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -egui = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -egui-winit = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -egui_glow = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } +ecolor = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +emath = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +epaint = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +egui = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +egui-winit = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +egui_glow = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } # egui-phosphor has no release for egui 0.37 (vendor/egui-phosphor/VENDORED.md). egui-phosphor = { path = "vendor/egui-phosphor" } diff --git a/apps/materialcraft/Cargo.toml b/apps/materialcraft/Cargo.toml index 3815c016..c8675c2f 100644 --- a/apps/materialcraft/Cargo.toml +++ b/apps/materialcraft/Cargo.toml @@ -23,7 +23,7 @@ log = { workspace = true } rfd = { workspace = true } # The window frame's choice applies before the window exists. -craft-window = { workspace = true, features = ["egui"] } +craft-window = { workspace = true, features = ["ui"] } # The Windows update helper is a copy of this program started with `--finish-update`. [target.'cfg(windows)'.dependencies] diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 9750f558..45b01576 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -29,10 +29,10 @@ sha2 = { workspace = true } sys-locale = "0.3" craft-update = { workspace = true } craft-dialogs = { workspace = true } -craft-quit = { workspace = true, features = ["egui"] } -craft-window = { workspace = true, features = ["egui"] } +craft-quit = { workspace = true, features = ["ui"] } +craft-window = { workspace = true, features = ["ui"] } # Floating panels open as OS windows. -craft-ui = { workspace = true, features = ["native-windows"] } +craft-ui = { workspace = true } # Browser file I/O (web_files.rs): async pickers and Blob downloads. [target.'cfg(target_arch = "wasm32")'.dependencies] From 9583d9238aaa503b3d27d231fe3abd3cd9b4a3d9 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 00:54:30 +0000 Subject: [PATCH 02/24] minimal-port rewrite: 14 edits (split rename 6, dock 2, deps 2, dock rename 1, split 1, keymap 1, keymap rename 1) --- Cargo.toml | 1 + crates/ui-egui/Cargo.toml | 1 + crates/ui-egui/src/docking.rs | 20 +++++++++++--------- crates/ui-egui/src/menus.rs | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0380d751..870bff04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,6 +95,7 @@ craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c9 # MCMAT v3 uses its merged archive revision and the matching ZIP crate craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 45b01576..f6b7d5bb 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -14,6 +14,7 @@ materialcraft-render = { workspace = true } eframe = { workspace = true, features = ["default_fonts", "wgpu", "persistence"] } egui = { workspace = true } craft-ui = { workspace = true } +craft-behavior = { workspace = true } craft-keymap = { workspace = true, features = ["egui"] } egui-phosphor = { version = "0.14", features = ["regular"] } serde = { workspace = true } diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs index f2ca03a9..bc6742a6 100644 --- a/crates/ui-egui/src/docking.rs +++ b/crates/ui-egui/src/docking.rs @@ -8,8 +8,10 @@ //! cannot close or float. The layout persists with `UiState` as a craft-ui `Workspace`; a layout //! that does not load or validate becomes the default. -use craft_ui::docking::{Action, DockArea, DockContent, DockStyle, Layout, Location, Node, PanelLimits, PanelState, Permissions, Placement}; -use craft_ui::layout::{SplitAxis, SplitSize}; +use craft_behavior::dock::{Action, DockPlacement, Layout, Location, Node, PanelState, Permissions}; +use craft_ui::docking::{DockArea, DockContent, DockStyle, PanelLimits}; +use craft_behavior::flow::Axis; +use craft_behavior::dock::SplitSize; use egui::{Id, Margin, RichText, Ui, vec2}; use serde::{Deserialize, Serialize}; use serde_json::Value; @@ -75,7 +77,7 @@ impl Panel { } /// The saved panel arrangement: craft-ui's workspace over MaterialCraft's panels. -pub type Workspace = craft_ui::docking::Workspace; +pub type Workspace = craft_behavior::dock::Workspace; /// The graph never moves, floats, closes or takes tabs; panels dock beside it. pub fn permissions(panel: &Panel) -> Permissions { @@ -86,7 +88,7 @@ fn tabs(panels: &[Panel]) -> Node { Node::Tabs { panels: panels.to_vec(), active: 0 } } -fn split(axis: SplitAxis, ratio: f32, first: Node, second: Node) -> Node { +fn split(axis: Axis, ratio: f32, first: Node, second: Node) -> Node { Node::Split { axis, size: SplitSize::Ratio(ratio), first: Box::new(first), second: Box::new(second) } } @@ -94,17 +96,17 @@ fn split(axis: SplitAxis, ratio: f32, first: Node, second: Node) - /// middle; properties on the right. Console and history are closed and open floating. pub fn default_workspace() -> Workspace { use Panel::*; - let left = split(SplitAxis::Vertical, 0.36, tabs(&[Explorer]), tabs(&[Library])); - let views = split(SplitAxis::Horizontal, 0.5, tabs(&[View3d]), tabs(&[View2d])); - let center = split(SplitAxis::Vertical, 0.52, tabs(&[Graph]), views); - let root = split(SplitAxis::Horizontal, 0.15, left, split(SplitAxis::Horizontal, 0.8, center, tabs(&[Properties]))); + let left = split(Axis::Y, 0.36, tabs(&[Explorer]), tabs(&[Library])); + let views = split(Axis::X, 0.5, tabs(&[View3d]), tabs(&[View2d])); + let center = split(Axis::Y, 0.52, tabs(&[Graph]), views); + let root = split(Axis::X, 0.15, left, split(Axis::X, 0.8, center, tabs(&[Properties]))); let mut workspace = Workspace::new(Layout { root: Some(root), floating: Vec::new() }); for panel in Panel::ALL { if let Some(rect) = panel.float_rect() { let location = Location { floating: Some(rect), anchor: None, - placement: Placement::Tab { before: None }, + placement: DockPlacement::Tab { before: None }, size: None, stack: None, sibling: Vec::new(), diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 915ceee6..f8c1b33c 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -1,6 +1,6 @@ //! Menu actions and shortcuts share stable command ids -use craft_keymap::{Active, Bindable, Binding, Chord, Keymap, Platform, Scope, Scopes}; +use craft_keymap::{Active, Binding, Chord, CommandDef, Keymap, Platform, Scope, Scopes}; use egui::class::HasClasses as _; use serde_json::Value; @@ -318,7 +318,7 @@ pub(crate) fn shortcut_table() -> Vec<(&'static str, &'static str)> { pub(crate) fn keymap(platform: Platform) -> Keymap { let catalog = shortcut_table() .into_iter() - .filter_map(|(id, text)| Some(Bindable::new(id, id, Scope::app()).with_default(Binding::new(parse_shortcut(text)?)))) + .filter_map(|(id, text)| Some(CommandDef::new(id, id, Scope::app()).with_default(Binding::new(parse_shortcut(text)?)))) .collect(); Keymap::new(catalog, Scopes::new(), platform) } From 2afa397987f58f89c59f381d7b26fb1f2e14d604 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 01:18:57 +0000 Subject: [PATCH 03/24] Host MaterialCraft's egui UI on craft-libs next's runtime The runtime is installed in the desktop and web shells and fed each frame; the unsaved-work question decides in the framework's close path. Panels dock in next's DockArea beside the saved workspace (file format unchanged), with the graph as the canvas group. The update dialogs run on a DialogHost. Where the app draws the window frame, the menu bar sits in the framework's title bar. Escape no app widget takes arrives as the window's cancel and still runs the Escape shortcuts. Shortcuts match through craft_keymap::Matcher with the old dispatcher's contract. Removed framework helpers (widget palette, icon button painter, interface direction) are app-local or come from craft-i18n. Test harnesses that draw the app install the runtime. --- Cargo.lock | 1356 +++++++++++++++-- Cargo.toml | 3 + apps/materialcraft-web/src/web.rs | 1 + apps/materialcraft/src/main.rs | 8 +- crates/ui-egui/Cargo.toml | 8 +- crates/ui-egui/src/docking.rs | 279 ++-- crates/ui-egui/src/explorer/actions.rs | 2 +- crates/ui-egui/src/fonts.rs | 2 +- crates/ui-egui/src/framework.rs | 144 ++ crates/ui-egui/src/function/search.rs | 5 +- crates/ui-egui/src/graph/canvas_tests.rs | 1 + crates/ui-egui/src/graph/frames.rs | 5 +- crates/ui-egui/src/graph/gesture.rs | 2 +- crates/ui-egui/src/graph/search.rs | 5 +- crates/ui-egui/src/i18n.rs | 2 +- crates/ui-egui/src/lib.rs | 2 + crates/ui-egui/src/material_craft_app.rs | 41 +- crates/ui-egui/src/material_craft_app.test.rs | 9 +- crates/ui-egui/src/menus.rs | 124 +- crates/ui-egui/src/native_dialogs.rs | 4 +- crates/ui-egui/src/native_dialogs.test.rs | 32 +- .../ui-egui/src/preference/shortcuts_page.rs | 5 + crates/ui-egui/src/shell/modality.test.rs | 1 + crates/ui-egui/src/shortcut_dispatch.rs | 249 +++ crates/ui-egui/src/theme.rs | 22 +- crates/ui-egui/src/unsaved.rs | 35 +- crates/ui-egui/src/updates_ui.rs | 53 +- crates/ui-egui/src/updates_ui.test.rs | 17 +- crates/ui-egui/src/view3d/navigation.rs | 2 +- crates/ui-egui/src/web_files/package_save.rs | 2 +- crates/ui-egui/src/widgets.rs | 40 +- crates/ui-egui/src/window_controls.rs | 50 +- crates/ui-egui/src/window_controls.test.rs | 26 +- crates/ui-egui/src/windows.test.rs | 2 +- .../ui-egui/tests/it/clipboard_shortcuts.rs | 2 +- crates/ui-egui/tests/it/dialogs.rs | 2 +- crates/ui-egui/tests/it/export_window.rs | 2 +- crates/ui-egui/tests/it/graph_properties.rs | 6 +- crates/ui-egui/tests/it/interface_scale.rs | 2 +- crates/ui-egui/tests/it/menu_bar.rs | 2 +- crates/ui-egui/tests/it/new_graph_dialog.rs | 2 +- crates/ui-egui/tests/it/node_look.rs | 2 +- crates/ui-egui/tests/it/normal_maps.rs | 4 +- crates/ui-egui/tests/it/numeric_input.rs | 4 +- crates/ui-egui/tests/it/preferences_window.rs | 2 +- crates/ui-egui/tests/it/preview_resolution.rs | 2 +- crates/ui-egui/tests/it/search.rs | 2 +- .../ui-egui/tests/it/slider_round_values.rs | 6 +- crates/ui-egui/tests/it/unsaved_changes.rs | 2 +- crates/ui-egui/tests/resize.rs | 2 +- crates/ui-egui/tests/snapshot.rs | 2 +- 51 files changed, 2106 insertions(+), 479 deletions(-) create mode 100644 crates/ui-egui/src/framework.rs create mode 100644 crates/ui-egui/src/shortcut_dispatch.rs diff --git a/Cargo.lock b/Cargo.lock index 0daa69e0..7ae22ac1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,6 +132,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + [[package]] name = "alloc-no-stdlib" version = "3.0.0" @@ -193,6 +202,22 @@ dependencies = [ "libc", ] +[[package]] +name = "annotate-snippets" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" +dependencies = [ + "anstyle", + "unicode-width", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + [[package]] name = "anyhow" version = "1.0.104" @@ -457,6 +482,25 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "annotate-snippets", + "bitflags 2.13.2", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.3", + "shlex 1.3.0", + "syn 2.0.119", +] + [[package]] name = "bit-set" version = "0.10.0" @@ -493,6 +537,12 @@ dependencies = [ "serde_core", ] +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + [[package]] name = "block-buffer" version = "0.10.4" @@ -581,6 +631,16 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +[[package]] +name = "calendrical_calculations" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5abbd6eeda6885048d357edc66748eea6e0268e3dd11f326fff5bd248d779c26" +dependencies = [ + "core_maths", + "displaydoc", +] + [[package]] name = "calloop" version = "0.13.0" @@ -646,7 +706,26 @@ dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex", + "shlex 2.0.1", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom 7.1.3", +] + +[[package]] +name = "cfg-expr" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd44d82755fb9210fb10d9daf8dd7e522da0efe1d5f263cffc5db07725663ff" +dependencies = [ + "smallvec", + "target-lexicon", ] [[package]] @@ -670,6 +749,17 @@ dependencies = [ "libc", ] +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core", +] + [[package]] name = "chrono" version = "0.4.45" @@ -677,11 +767,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", + "js-sys", "num-traits", "serde", + "wasm-bindgen", "windows-link", ] +[[package]] +name = "clang-sys" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clipboard-win" version = "5.4.3" @@ -764,6 +867,12 @@ dependencies = [ "rustversion", ] +[[package]] +name = "cookie-factory" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" + [[package]] name = "core-foundation" version = "0.9.4" @@ -814,12 +923,34 @@ dependencies = [ "libc", ] +[[package]] +name = "core-graphics2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b65858d95344d2711161cd92196732f67d6c5fea238cf12f994584828731a5c" +dependencies = [ + "bitflags 2.13.2", + "block", + "cfg-if", + "core-foundation 0.10.1", + "libc", +] + [[package]] name = "core_detect" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -829,23 +960,58 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "rustix 1.1.6", ] +[[package]] +name = "craft-behavior" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "accesskit", + "bitflags 2.13.2", + "craft-host", + "craft-keymap", + "craft-theme", + "craft-tracked", + "craft-ui-macros", + "emath", + "kurbo", + "serde", + "smallvec", +] + +[[package]] +name = "craft-cloud-ui" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "egui", +] + [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=380a2f79f6a195c090a5372e819cbcda2b703c09#380a2f79f6a195c090a5372e819cbcda2b703c09" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "rayon", ] @@ -853,27 +1019,73 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "block2 0.6.2", + "craft-atomic", + "craft-host", + "craft-i18n", + "craft-platform", + "futures-lite", + "log", "objc2 0.6.5", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", "raw-window-handle", "rfd", + "zbus", +] + +[[package]] +name = "craft-docpath" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "serde", +] + +[[package]] +name = "craft-font-catalog" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "harfrust 0.13.3", + "kurbo", + "skrifa 0.47.0", + "thiserror 2.0.21", + "unicode-bidi", + "unicode-segmentation", + "windows-registry", ] [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" + +[[package]] +name = "craft-host" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "bitflags 2.13.2", + "craft-i18n", + "egui", + "serde", + "toml", + "web-time", +] [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ + "chrono", "fixed_decimal", + "icu_calendar", + "icu_collator", + "icu_datetime", "icu_decimal", "icu_locale_core", "icu_locale_fallback", @@ -883,6 +1095,7 @@ dependencies = [ "icu_provider", "icu_provider_adapters", "icu_provider_blob", + "icu_time", "log", "objc2-foundation 0.3.2", "sys-locale", @@ -894,7 +1107,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "craft-dds", "craft-jpeg", @@ -921,7 +1134,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "thiserror 2.0.21", ] @@ -929,8 +1142,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ + "craft-host", + "craft-i18n", + "craft-tracked", + "craft-ui-macros", + "craft-xml", "egui", "serde", "serde_json", @@ -939,18 +1157,18 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc)", + "craft-xml", "thiserror 2.0.21", ] [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=7a7a18cb40ac4cd5fca29c0dc224ac5178d40a89#7a7a18cb40ac4cd5fca29c0dc224ac5178d40a89" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ - "craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=7a7a18cb40ac4cd5fca29c0dc224ac5178d40a89)", + "craft-zip", "serde", "serde_json", "thiserror 2.0.21", @@ -959,20 +1177,25 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ + "craft-behavior", + "craft-host", + "craft-i18n", "craft-keymap", "craft-quit", + "craft-theme", + "craft-ui", + "craft-window", "egui", - "muda", - "objc2 0.6.5", - "objc2-app-kit 0.3.2", + "serde", + "serde_json", ] [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "serde_json", ] @@ -980,7 +1203,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "brotli-decompressor", "chrono", @@ -992,56 +1215,106 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=380a2f79f6a195c090a5372e819cbcda2b703c09#380a2f79f6a195c090a5372e819cbcda2b703c09" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "chrono", "craft-codepage", "encoding_rs", ] +[[package]] +name = "craft-pdf" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "serde", +] + [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ + "async-channel", + "async-io", + "async-process", + "core-graphics2", + "craft-atomic", + "craft-docpath", + "craft-host", + "craft-i18n", + "craft-theme", + "futures-lite", "js-sys", + "log", + "objc2-app-kit 0.3.2", + "rfd", + "serde", + "serde_json", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", + "web-time", + "windows", + "x11rb", + "xcap", + "zbus", ] [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "dispatch2", "egui", "objc2 0.6.5", "objc2-app-kit 0.3.2", + "wasm-bindgen", + "web-sys", ] [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=380a2f79f6a195c090a5372e819cbcda2b703c09#380a2f79f6a195c090a5372e819cbcda2b703c09" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "base64 0.23.1", "craft-mime", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=380a2f79f6a195c090a5372e819cbcda2b703c09)", + "craft-xml", "flate2", "roxmltree", "thiserror 2.0.21", ] +[[package]] +name = "craft-settings" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "craft-atomic", + "craft-host", + "dirs", + "log", + "serde", + "serde_json", + "toml", + "toml_edit", + "web-sys", + "web-time", +] + [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "craft-image-codecs", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc)", + "craft-xml", "data-url", "flate2", + "gif", + "image-webp", "kurbo", "quick-xml 0.41.0", "resvg", @@ -1055,7 +1328,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a913a42abc9fed0cfc588114788e400229f5108#5a913a42abc9fed0cfc588114788e400229f5108" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "bytemuck", "dds", @@ -1063,46 +1336,205 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-theme" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "bitflags 2.13.2", + "craft-tracked", + "craft-ui-macros", + "ecolor", + "log", + "serde", + "serde_json", + "smallvec", +] + [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "serde", "thiserror 2.0.21", + "tiff", ] +[[package]] +name = "craft-tracked" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" + [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ - "craft-fonts-build", + "craft-cloud-ui", + "craft-ui-canvas", + "craft-ui-contract", + "craft-ui-panels", + "craft-ui-patterns", + "craft-ui-shell", + "craft-ui-widgets", +] + +[[package]] +name = "craft-ui-canvas" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "craft-behavior", "craft-i18n", + "craft-keymap", + "craft-theme", + "craft-ui-macros", + "craft-ui-panels", "egui", - "epaint", - "js-sys", - "log", - "objc2 0.6.5", - "objc2-app-kit 0.3.2", - "objc2-foundation 0.3.2", "serde", - "skrifa", - "wasm-bindgen", + "serde_json", +] + +[[package]] +name = "craft-ui-contract" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "accesskit", + "craft-behavior", + "craft-codepage", + "craft-font-catalog", + "craft-fonts-build", + "craft-host", + "craft-i18n", + "craft-keymap", + "craft-platform", + "craft-quit", + "craft-settings", + "craft-svg", + "craft-theme", + "craft-tracked", + "craft-ui-macros", + "craft-window", + "egui", + "epaint_default_fonts", + "flate2", + "inventory", + "log", + "scoped-tls", + "serde", + "serde_json", + "siphasher", + "skrifa 0.44.0", + "smallvec", + "toml", + "typeid", "wasm-bindgen-futures", - "web-sys", + "web-time", +] + +[[package]] +name = "craft-ui-macros" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "craft-ui-panels" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "craft-behavior", + "craft-host", + "craft-i18n", + "craft-keymap", + "craft-quit", + "craft-theme", + "craft-ui-macros", + "craft-ui-widgets", + "egui", + "serde", + "serde_json", +] + +[[package]] +name = "craft-ui-patterns" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "craft-behavior", + "craft-host", + "craft-i18n", + "craft-keymap", + "craft-pdf", + "craft-theme", + "craft-ui-macros", + "craft-ui-panels", + "egui", + "serde", + "serde_json", + "toml", + "toml_edit", + "zeroize", +] + +[[package]] +name = "craft-ui-shell" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "craft-behavior", + "craft-host", + "craft-i18n", + "craft-platform", + "craft-svg", + "craft-theme", + "craft-ui-macros", + "craft-ui-panels", + "craft-window", + "egui", + "raw-window-handle", + "serde", + "web-time", +] + +[[package]] +name = "craft-ui-widgets" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "craft-behavior", + "craft-host", + "craft-i18n", + "craft-keymap", + "craft-svg", + "craft-theme", + "craft-ui-contract", + "craft-ui-macros", + "egui", + "log", + "serde", + "smallvec", ] [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "chrono", + "craft-host", + "craft-theme", + "craft-ui", "dunce", "egui", "flate2", - "getrandom 0.3.4", "image", "log", "plist", @@ -1120,31 +1552,40 @@ dependencies = [ "zip 9.5.0", ] +[[package]] +name = "craft-win32" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +dependencies = [ + "winsafe", +] + [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ + "craft-atomic", + "craft-behavior", + "craft-host", + "craft-settings", + "craft-win32", "egui", + "muda", "objc2 0.6.5", "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "raw-window-handle", + "serde", + "serde_json", "wayland-client", + "winsafe", ] [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=380a2f79f6a195c090a5372e819cbcda2b703c09#380a2f79f6a195c090a5372e819cbcda2b703c09" -dependencies = [ - "quick-xml 0.41.0", - "serde", - "thiserror 2.0.21", -] - -[[package]] -name = "craft-xml" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc#453b0da782ccef39be9a6dac8d27c80b553ef1cc" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1154,17 +1595,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=512a1b8e8b59a7b325e7f69f6131aa8628470288#512a1b8e8b59a7b325e7f69f6131aa8628470288" -dependencies = [ - "flate2", - "thiserror 2.0.21", - "zip 9.5.0", -] - -[[package]] -name = "craft-zip" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=7a7a18cb40ac4cd5fca29c0dc224ac5178d40a89#7a7a18cb40ac4cd5fca29c0dc224ac5178d40a89" +source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1329,6 +1760,27 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dirs" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.59.0", +] + [[package]] name = "dispatch" version = "0.2.0" @@ -1388,6 +1840,61 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +[[package]] +name = "drm" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bc8c5c6c2941f70a55c15f8d9f00f9710ebda3ffda98075f996a0e6c92756f" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "drm-ffi", + "drm-fourcc", + "libc", + "rustix 0.38.44", +] + +[[package]] +name = "drm" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a41816e58f47f49acfd956651055ddcf137c4882c2098c30c448817af21183a" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "bytemuck_derive", + "drm-ffi", + "drm-fourcc", + "libc", + "rustix 1.1.6", +] + +[[package]] +name = "drm-ffi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51a91c9b32ac4e8105dec255e849e0d66e27d7c34d184364fb93e469db08f690" +dependencies = [ + "drm-sys", + "rustix 1.1.6", +] + +[[package]] +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8e1361066d91f5ffccff060a3c3be9c3ecde15be2959c1937595f7a82a9f8" +dependencies = [ + "libc", + "linux-raw-sys 0.9.4", +] + [[package]] name = "dunce" version = "1.0.5" @@ -1403,7 +1910,7 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "bytemuck", "emath", @@ -1413,7 +1920,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "ahash", "bytemuck", @@ -1450,14 +1957,14 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "accesskit", "ahash", "bitflags 2.13.2", "emath", "epaint", - "itertools", + "itertools 0.15.0", "log", "nohash-hasher", "profiling", @@ -1478,7 +1985,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "ahash", "bytemuck", @@ -1497,7 +2004,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "accesskit_winit", "arboard", @@ -1520,7 +2027,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "bytemuck", "egui", @@ -1533,7 +2040,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "dify", "eframe", @@ -1559,12 +2066,24 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "bytemuck", "serde", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encoding_rs" version = "0.8.44" @@ -1620,7 +2139,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" dependencies = [ "ahash", "bytemuck", @@ -1628,14 +2147,14 @@ dependencies = [ "emath", "epaint_default_fonts", "font-types", - "harfrust", + "harfrust 0.12.0", "log", "nohash-hasher", "parking_lot", "profiling", "self_cell", "serde", - "skrifa", + "skrifa 0.44.0", "smallvec", "unicode-bidi", "unicode-general-category", @@ -1647,7 +2166,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=6d518fc799681571963842f95b55a6b68431b15a#6d518fc799681571963842f95b55a6b68431b15a" +source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" [[package]] name = "equivalent" @@ -1854,6 +2373,15 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" +[[package]] +name = "form_urlencoded" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" +dependencies = [ + "percent-encoding", +] + [[package]] name = "fs-set-times" version = "0.20.3" @@ -1966,6 +2494,30 @@ dependencies = [ "slab", ] +[[package]] +name = "gbm" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce852e998d3ca5e4a97014fb31c940dc5ef344ec7d364984525fd11e8a547e6a" +dependencies = [ + "bitflags 2.13.2", + "drm 0.14.1", + "drm-fourcc", + "gbm-sys", + "libc", + "wayland-backend", + "wayland-server", +] + +[[package]] +name = "gbm-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13a5f2acc785d8fb6bf6b7ab6bfb0ef5dad4f4d97e8e70bb8e470722312f76f" +dependencies = [ + "libc", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2028,6 +2580,7 @@ dependencies = [ "js-sys", "libc", "r-efi 6.0.0", + "rand_core", "wasm-bindgen", ] @@ -2041,6 +2594,15 @@ dependencies = [ "weezl", ] +[[package]] +name = "gl" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94edab108827d67608095e269cf862e60d920f144a5026d3dbcfd8b877fb404" +dependencies = [ + "gl_generator", +] + [[package]] name = "gl_generator" version = "0.14.0" @@ -2085,11 +2647,17 @@ dependencies = [ "hashbrown 0.17.1", "log", "peniko", - "skrifa", + "skrifa 0.44.0", "smallvec", "vello_common", ] +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + [[package]] name = "glow" version = "0.17.0" @@ -2211,7 +2779,20 @@ checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" dependencies = [ "bitflags 2.13.2", "bytemuck", - "read-fonts", + "read-fonts 0.41.0", + "smallvec", +] + +[[package]] +name = "harfrust" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "948d0741125ba89cd3e1c23e5642415b6ade7e1d29d67ba25fb925b533e989d6" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "once_cell", + "read-fonts 0.43.3", "smallvec", ] @@ -2253,6 +2834,12 @@ dependencies = [ "fearless_simd", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.5.3" @@ -2305,6 +2892,39 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_calendar" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58655df2f728e46e4eee80bddebefacf52ec3e77cdb925014b47c5a5905eb55c" +dependencies = [ + "calendrical_calculations", + "displaydoc", + "icu_locale_core", + "icu_provider", + "serde", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_collator" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08984ed58ac439ebf3e13d2cf26b0c46a60afcd21721c1d14087c0b240344dda" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_normalizer", + "icu_properties", + "icu_provider", + "serde", + "smallvec", + "utf16_iter", + "utf8_iter", + "zerovec", +] + [[package]] name = "icu_collections" version = "2.3.0" @@ -2313,12 +2933,37 @@ checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" dependencies = [ "displaydoc", "potential_utf", + "serde", "utf8_iter", "yoke", "zerofrom", "zerovec", ] +[[package]] +name = "icu_datetime" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44df99c4c5297b05653d1a1629f13bdc9fd4044acfbbaf30b15194a1eed4cd6" +dependencies = [ + "displaydoc", + "fixed_decimal", + "icu_calendar", + "icu_decimal", + "icu_locale_core", + "icu_pattern", + "icu_plurals", + "icu_provider", + "icu_time", + "potential_utf", + "serde", + "smallvec", + "tinystr", + "writeable", + "zerotrie", + "zerovec", +] + [[package]] name = "icu_decimal" version = "2.3.0" @@ -2380,6 +3025,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", + "serde", "smallvec", "utf16_iter", "utf8_iter", @@ -2430,6 +3076,7 @@ dependencies = [ "icu_locale_core", "icu_properties_data", "icu_provider", + "serde", "zerotrie", "zerovec", ] @@ -2482,12 +3129,49 @@ dependencies = [ "zerovec", ] +[[package]] +name = "icu_time" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af37e1c3b9f3ab564b619fdf4b22de169f6381eb0f7048e3ca454290c438126b" +dependencies = [ + "calendrical_calculations", + "displaydoc", + "icu_calendar", + "icu_locale_core", + "icu_provider", + "serde", + "zerotrie", + "zerovec", +] + [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + [[package]] name = "image" version = "0.25.10" @@ -2537,6 +3221,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + [[package]] name = "io-extras" version = "0.19.0" @@ -2584,6 +3277,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.15.0" @@ -2780,6 +3482,54 @@ dependencies = [ "redox_syscall 0.9.5", ] +[[package]] +name = "libspa" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882f7427e7989dcc9d388b7f05c4630390a1d7696f9ffa469cd4a7a48f0b4c40" +dependencies = [ + "bitflags 2.13.2", + "cc", + "cookie-factory", + "libc", + "libspa-sys", + "nom 8.0.0", + "rustix 1.1.6", + "system-deps", +] + +[[package]] +name = "libspa-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6e17bdaf63ed0d5e4144022624032b41fd9733112e8c74ac26fc9bf1291924" +dependencies = [ + "bindgen", + "cc", + "system-deps", +] + +[[package]] +name = "libwayshot-xcap" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8a46e4d016ef464e386e4970f5415fe0939c2d63abe0c2f539c05ef88c5fe5" +dependencies = [ + "drm 0.15.0", + "gbm", + "gl", + "image", + "khronos-egl", + "memmap2", + "rustix 1.1.6", + "thiserror 2.0.21", + "tracing", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-wlr", +] + [[package]] name = "linebender_resource_handle" version = "0.1.1" @@ -2805,6 +3555,12 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -2946,8 +3702,8 @@ dependencies = [ "craft-sbs", "craft-svg", "craft-texture", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=453b0da782ccef39be9a6dac8d27c80b553ef1cc)", - "craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=512a1b8e8b59a7b325e7f69f6131aa8628470288)", + "craft-xml", + "craft-zip", "dds", "flate2", "image", @@ -2999,10 +3755,13 @@ version = "0.4.1" dependencies = [ "base64 0.22.1", "craft-atomic", + "craft-behavior", "craft-dialogs", + "craft-host", + "craft-i18n", "craft-keymap", "craft-platform", - "craft-quit", + "craft-theme", "craft-ui", "craft-update", "craft-window", @@ -3079,6 +3838,12 @@ dependencies = [ "glam 0.15.2", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3230,6 +3995,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "nom" version = "8.0.0" @@ -3322,8 +4097,8 @@ dependencies = [ "block2 0.5.1", "libc", "objc2 0.5.3", - "objc2-core-data", - "objc2-core-image", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", "objc2-foundation 0.2.2", "objc2-quartz-core 0.2.2", ] @@ -3336,9 +4111,48 @@ checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ "bitflags 2.13.2", "block2 0.6.2", + "libc", "objc2 0.6.5", + "objc2-cloud-kit 0.3.2", + "objc2-core-data 0.3.2", "objc2-core-foundation", "objc2-core-graphics", + "objc2-core-image 0.3.2", + "objc2-core-text", + "objc2-core-video", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "objc2-av-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478ae33fcac9df0a18db8302387c666b8ef08a3e2d62b510ca4fc278a384b6c0" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "dispatch2", + "objc2 0.6.5", + "objc2-avf-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image 0.3.2", + "objc2-core-video", + "objc2-foundation 0.3.2", + "objc2-image-io", + "objc2-media-toolbox", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "objc2-avf-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a380031deed8e99db00065c45937da434ca987c034e13b87e4441f9e4090be" +dependencies = [ + "objc2 0.6.5", "objc2-foundation 0.3.2", ] @@ -3355,6 +4169,17 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-contacts" version = "0.2.2" @@ -3366,6 +4191,28 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-core-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" +dependencies = [ + "dispatch2", + "objc2 0.6.5", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-audio-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -3378,6 +4225,17 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-core-foundation" version = "0.3.2" @@ -3385,7 +4243,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.13.2", + "block2 0.6.2", "dispatch2", + "libc", "objc2 0.6.5", ] @@ -3396,10 +4256,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ "bitflags 2.13.2", + "block2 0.6.2", "dispatch2", + "libc", "objc2 0.6.5", "objc2-core-foundation", "objc2-io-surface", + "objc2-metal 0.3.2", ] [[package]] @@ -3414,6 +4277,16 @@ dependencies = [ "objc2-metal 0.2.2", ] +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-core-location" version = "0.2.2" @@ -3426,6 +4299,49 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-core-media" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ec576860167a15dd9fce7fbee7512beb4e31f532159d3482d1f9c6caedf31d" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "dispatch2", + "objc2 0.6.5", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-core-video", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-core-video" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-io-surface", + "objc2-metal 0.3.2", +] + [[package]] name = "objc2-encode" version = "4.1.0" @@ -3453,10 +4369,22 @@ checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.13.2", "block2 0.6.2", + "libc", "objc2 0.6.5", "objc2-core-foundation", ] +[[package]] +name = "objc2-image-io" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b0446e98cf4a784cc7a0177715ff317eeaa8463841c616cfc78aa4f953c4ea" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", +] + [[package]] name = "objc2-io-surface" version = "0.3.2" @@ -3480,6 +4408,18 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-media-toolbox" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd9fdde720df3da7046bb9097811000c1e7ab5cd579fa89d96b27d56781fb30" +dependencies = [ + "objc2 0.6.5", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-core-media", +] + [[package]] name = "objc2-metal" version = "0.2.2" @@ -3550,9 +4490,9 @@ dependencies = [ "bitflags 2.13.2", "block2 0.5.1", "objc2 0.5.3", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", + "objc2-cloud-kit 0.2.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", "objc2-core-location", "objc2-foundation 0.2.2", "objc2-link-presentation", @@ -3620,6 +4560,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orbclient" version = "0.3.55" @@ -3816,6 +4762,31 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pipewire" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde71084c4e25959d68f1ea54daa75e5ecdb338e5caf0b5510143b79baa32d5c" +dependencies = [ + "bitflags 2.13.2", + "libc", + "libspa", + "libspa-sys", + "pipewire-sys", + "rustix 1.1.6", +] + +[[package]] +name = "pipewire-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce653f53e63e5b93853218092ee9a8906a5d082c92f3f1db26316955dd63ce0" +dependencies = [ + "bindgen", + "libspa-sys", + "system-deps", +] + [[package]] name = "pkg-config" version = "0.3.34" @@ -3911,6 +4882,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" dependencies = [ "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", "serde", ] @@ -4044,6 +5017,23 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rand" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "range-alloc" version = "0.1.5" @@ -4108,6 +5098,28 @@ dependencies = [ "once_cell", ] +[[package]] +name = "read-fonts" +version = "0.43.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "005c8acf251756c478b0bf402885bfd88a1476020c4c7e6060edc1aa68da38ea" +dependencies = [ + "bytemuck", + "font-types", + "once_cell", +] + +[[package]] +name = "read-fonts" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a0cf4bb6cbce4c29756270d189a5e400ac05e91192161d83a0bcb6e68492e8" +dependencies = [ + "bytemuck", + "font-types", + "once_cell", +] + [[package]] name = "reborrow" version = "0.5.5" @@ -4141,6 +5153,16 @@ dependencies = [ "bitflags 2.13.2", ] +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror 2.0.21", +] + [[package]] name = "ref-cast" version = "1.0.27" @@ -4161,6 +5183,35 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "regex" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" + [[package]] name = "renderdoc-sys" version = "1.1.0" @@ -4622,10 +5673,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "shlex" version = "2.0.1" @@ -4686,7 +5743,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.41.0", +] + +[[package]] +name = "skrifa" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "526e654b303ff4ad73a5a40b25de2b3ce3d039c5e3b6da5f89ae6e57004cb40f" +dependencies = [ + "bytemuck", + "read-fonts 0.44.0", ] [[package]] @@ -4854,6 +5921,19 @@ dependencies = [ "web-sys", ] +[[package]] +name = "system-deps" +version = "7.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396a35feb67335377e0251fcbc1092fc85c484bd4e3a7a54319399da127796e7" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + [[package]] name = "tar" version = "0.4.46" @@ -4864,6 +5944,12 @@ dependencies = [ "libc", ] +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + [[package]] name = "tempfile" version = "3.27.0" @@ -5095,8 +6181,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" dependencies = [ "indexmap", + "serde_core", + "serde_spanned", "toml_datetime", "toml_parser", + "toml_writer", "winnow", ] @@ -5153,7 +6242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" dependencies = [ "memchr", - "nom", + "nom 8.0.0", "petgraph", ] @@ -5278,6 +6367,18 @@ dependencies = [ "log", ] +[[package]] +name = "url" +version = "2.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + [[package]] name = "usvg" version = "0.48.1" @@ -5287,7 +6388,7 @@ dependencies = [ "base64 0.23.1", "data-url", "fontdb", - "harfrust", + "harfrust 0.12.0", "imagesize", "kurbo", "log", @@ -5295,7 +6396,7 @@ dependencies = [ "roxmltree", "simplecss", "siphasher", - "skrifa", + "skrifa 0.44.0", "strict-num", "svgtypes", "tiny-skia-path", @@ -5405,6 +6506,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + [[package]] name = "version_check" version = "0.9.5" @@ -5588,6 +6695,19 @@ dependencies = [ "quote", ] +[[package]] +name = "wayland-server" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde9c29be0f723a573977de51ee455bf3dfa03652730a74f9dd3b337e374d75" +dependencies = [ + "bitflags 2.13.2", + "downcast-rs", + "rustix 1.1.6", + "wayland-backend", + "wayland-scanner", +] + [[package]] name = "wayland-sys" version = "0.31.11" @@ -5595,7 +6715,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" dependencies = [ "dlib", + "libc", "log", + "memoffset", "once_cell", "pkg-config", ] @@ -5818,6 +6940,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + [[package]] name = "winapi-util" version = "0.1.11" @@ -6279,6 +7407,48 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" +[[package]] +name = "xcap" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da270fd7c8581d43d731cb690bcc791fc0a7b3bc96e131a4b6552d0379640a9e" +dependencies = [ + "dispatch2", + "image", + "libwayshot-xcap", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-av-foundation", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-media", + "objc2-core-video", + "objc2-foundation 0.3.2", + "percent-encoding", + "pipewire", + "rand", + "scopeguard", + "serde", + "thiserror 2.0.21", + "url", + "widestring", + "windows", + "xcb", + "zbus", +] + +[[package]] +name = "xcb" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6c2ad15e0e922856ee89afe862b8992334bbe7953adad56cd1199358cb30566" +dependencies = [ + "bitflags 2.13.2", + "libc", + "quick-xml 0.41.0", +] + [[package]] name = "xcursor" version = "0.3.11" diff --git a/Cargo.toml b/Cargo.toml index 870bff04..dd3c697a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,6 +96,9 @@ craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c9 craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 diff --git a/apps/materialcraft-web/src/web.rs b/apps/materialcraft-web/src/web.rs index 850b8d84..73430837 100644 --- a/apps/materialcraft-web/src/web.rs +++ b/apps/materialcraft-web/src/web.rs @@ -60,6 +60,7 @@ async fn run(canvas: web_sys::HtmlCanvasElement) -> Result<(), String> { canvas, options, Box::new(|cc| { + materialcraft_ui_egui::framework::install_headless(&cc.egui_ctx); let mut app = MaterialCraftApp::new(cc, session); // One thread cooks in the browser, so keep previews small diff --git a/apps/materialcraft/src/main.rs b/apps/materialcraft/src/main.rs index 672c499e..5326c0eb 100644 --- a/apps/materialcraft/src/main.rs +++ b/apps/materialcraft/src/main.rs @@ -102,10 +102,10 @@ fn main() { prev(info); })); let session = initial_session(&args); - let window_frame = craft_window::Choice::probe(craft_window::Prefix::new("MATERIALCRAFT")).into_frame(); - let mut viewport = craft_window::decorate( + let window_frame = materialcraft_ui_egui::framework::decide_frame(); + let mut viewport = craft_window::policy::apply( egui::ViewportBuilder::default().with_title("MaterialCraft").with_inner_size(DEFAULT_SIZE).with_min_inner_size(MIN_SIZE), - &window_frame, + &window_frame.frame, ); if let Some(i) = icon() { viewport = viewport.with_icon(i); @@ -120,8 +120,8 @@ fn main() { "MaterialCraft", options, Box::new(move |cc| { + materialcraft_ui_egui::framework::install(&cc.egui_ctx, window_frame)?; let mut app = MaterialCraftApp::new(cc, session); - app.window_layout = window_frame.layout().cloned(); // Called from the creator: winit installs its default menu before this runs. On error winit's menu stays, whose Quit does not ask #[cfg(target_os = "macos")] if let Err(error) = craft_menu::mac::install_app_menu(&cc.egui_ctx, "MaterialCraft") { diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index f6b7d5bb..d2341db0 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -15,6 +15,10 @@ eframe = { workspace = true, features = ["default_fonts", "wgpu", "persistence"] egui = { workspace = true } craft-ui = { workspace = true } craft-behavior = { workspace = true } +craft-host = { workspace = true } +craft-theme = { workspace = true } +craft-i18n = { workspace = true } +craft-window = { workspace = true, features = ["ui"] } craft-keymap = { workspace = true, features = ["egui"] } egui-phosphor = { version = "0.14", features = ["regular"] } serde = { workspace = true } @@ -30,10 +34,6 @@ sha2 = { workspace = true } sys-locale = "0.3" craft-update = { workspace = true } craft-dialogs = { workspace = true } -craft-quit = { workspace = true, features = ["ui"] } -craft-window = { workspace = true, features = ["ui"] } -# Floating panels open as OS windows. -craft-ui = { workspace = true } # Browser file I/O (web_files.rs): async pickers and Blob downloads. [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs index bc6742a6..77d99b7d 100644 --- a/crates/ui-egui/src/docking.rs +++ b/crates/ui-egui/src/docking.rs @@ -1,24 +1,26 @@ //! The dock host: every panel (explorer, library, graph, 3D view, 2D view, properties, console, -//! history) is a tab that can be docked, tabbed, resized, floated and closed. craft-ui's shared -//! docking (`craft_ui::docking`) draws the frames, tab strips, floating windows and drop previews -//! and owns the gestures; this module names the panels, builds the default arrangement, applies -//! the dock's changes and hosts the panel bodies. +//! history) is a tab that can be docked, tabbed, resized, floated and closed. craft-ui's +//! `DockArea` draws the frames, tab strips, floating windows and drop previews and owns the +//! gestures; this module names the panels, builds the default arrangement, applies the dock's +//! changes and hosts the panel bodies. //! //! The graph is the central canvas: it stays docked, never takes tabs and is the only panel that -//! cannot close or float. The layout persists with `UiState` as a craft-ui `Workspace`; a layout -//! that does not load or validate becomes the default. +//! cannot close or float. The layout persists with `UiState` as a craft-behavior `Workspace`; a +//! layout that does not load or validate becomes the default. -use craft_behavior::dock::{Action, DockPlacement, Layout, Location, Node, PanelState, Permissions}; -use craft_ui::docking::{DockArea, DockContent, DockStyle, PanelLimits}; +use std::sync::Arc; + +use craft_behavior::dock::{Action, DockPlacement, Layout, Location, Node, PanelState, Permissions, SplitSize}; use craft_behavior::flow::Axis; -use craft_behavior::dock::SplitSize; -use egui::{Id, Margin, RichText, Ui, vec2}; +use craft_ui::contract::{Bind, BodyCx, PlainData, SizeLimits, Tracked}; +use craft_ui::docking::{DockConfig, DockPanels, GroupAt, PanelSpec, PanelSpecs}; +use craft_ui::patterns::dock::DockArea; +use egui::{Margin, Rect, Ui, vec2}; use serde::{Deserialize, Serialize}; use serde_json::Value; use crate::MaterialCraftApp; use crate::i18n::tr; -use crate::theme::Tokens; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Panel { @@ -65,31 +67,31 @@ impl Panel { } } - /// Where the panel floats when it has never been laid out: `[x, y, width, height]`, cascaded. - fn float_rect(self) -> Option<[f32; 4]> { + /// Where the panel floats when it has never been laid out, cascaded. + fn float_rect(self) -> Option { let slot = match self { Panel::Console => 0.0, Panel::History => 1.0, _ => return None, }; - Some([900.0, 120.0 + 50.0 * slot, 420.0, 320.0]) + Some(Rect::from_min_size(egui::pos2(900.0, 120.0 + 50.0 * slot), vec2(420.0, 320.0))) } } -/// The saved panel arrangement: craft-ui's workspace over MaterialCraft's panels. +/// The saved panel arrangement: craft-behavior's workspace over MaterialCraft's panels. pub type Workspace = craft_behavior::dock::Workspace; /// The graph never moves, floats, closes or takes tabs; panels dock beside it. pub fn permissions(panel: &Panel) -> Permissions { - if *panel == Panel::Graph { Permissions { accepts_splits: true, ..Permissions::PROTECTED } } else { Permissions::default() } + if *panel == Panel::Graph { Permissions::PROTECTED.accepts_splits(true) } else { Permissions::default() } } fn tabs(panels: &[Panel]) -> Node { - Node::Tabs { panels: panels.to_vec(), active: 0 } + Node::tabs(panels.to_vec(), 0) } fn split(axis: Axis, ratio: f32, first: Node, second: Node) -> Node { - Node::Split { axis, size: SplitSize::Ratio(ratio), first: Box::new(first), second: Box::new(second) } + Node::split(axis, SplitSize::Ratio(ratio), first, second) } /// The default: explorer over library on the left; the graph over the 3D and 2D views in the @@ -100,33 +102,27 @@ pub fn default_workspace() -> Workspace { let views = split(Axis::X, 0.5, tabs(&[View3d]), tabs(&[View2d])); let center = split(Axis::Y, 0.52, tabs(&[Graph]), views); let root = split(Axis::X, 0.15, left, split(Axis::X, 0.8, center, tabs(&[Properties]))); - let mut workspace = Workspace::new(Layout { root: Some(root), floating: Vec::new() }); - for panel in Panel::ALL { - if let Some(rect) = panel.float_rect() { - let location = Location { - floating: Some(rect), - anchor: None, - placement: DockPlacement::Tab { before: None }, - size: None, - stack: None, - sibling: Vec::new(), - group: None, - }; - workspace.hidden.push((panel, location)); - } - } - workspace + let hidden = Panel::ALL + .into_iter() + .filter_map(|panel| { + let rect = panel.float_rect()?; + let mut location = Location::new(None, DockPlacement::tab(None)); + location.floating = Some(rect); + Some((panel, location)) + }) + .collect(); + Workspace::from_parts(Layout::new(Some(root), Vec::new()), hidden, Vec::new()) } -/// craft-ui's checks plus the graph's: a saved or hand-edited file cannot hide, float, group -/// or collapse it. +/// craft-behavior's checks plus the graph's: a saved or hand-edited file cannot hide, float, +/// group or collapse it. pub fn validate(workspace: &Workspace) -> Result<(), String> { workspace.validate().map_err(|error| error.to_string())?; - let layout = &workspace.layout; + let layout = workspace.layout(); if layout.floating.iter().any(|window| window.contains(&Panel::Graph)) { return Err("The graph cannot float".into()); } - if workspace.hidden.iter().any(|(panel, _)| *panel == Panel::Graph) { + if workspace.hidden().iter().any(|(panel, _)| *panel == Panel::Graph) { return Err("The graph cannot be hidden".into()); } let mut found = false; @@ -143,7 +139,7 @@ pub fn validate(workspace: &Workspace) -> Result<(), String> { } found = true; } - Node::Stack { entries } if entries.iter().any(|entry| entry.panel == Panel::Graph) => { + Node::Stack { entries, .. } if entries.iter().any(|entry| entry.panel == Panel::Graph) => { return Err("The graph cannot be collapsed".into()); } Node::Dock { columns, .. } if columns.iter().flat_map(|column| &column.groups).any(|group| group.panels.contains(&Panel::Graph)) => { @@ -158,17 +154,15 @@ pub fn validate(workspace: &Workspace) -> Result<(), String> { // --------------------------------------------------------------------------------------------- // The live dock -/// The dock layout (part of `UiState`; serialized as a craft-ui `Workspace`). +/// The dock layout (part of `UiState`; serialized as a craft-behavior `Workspace`). #[derive(Clone, Debug)] pub struct Dock { workspace: Workspace, - /// A panel to bring in front of the other floating windows on the next frame. - raise: Option, } impl Default for Dock { fn default() -> Self { - Dock { workspace: default_workspace(), raise: None } + Dock { workspace: default_workspace() } } } @@ -201,7 +195,7 @@ impl Dock { if validate(&workspace).is_err() { return Dock::default(); } - Dock { workspace, raise: None } + Dock { workspace } } pub fn workspace(&self) -> &Workspace { @@ -209,12 +203,12 @@ impl Dock { } pub fn is_open(&self, p: Panel) -> bool { - self.workspace.layout.contains(&p) + self.workspace.layout().contains(&p) } /// Open and the front tab of its group. pub fn is_visible(&self, p: Panel) -> bool { - self.workspace.layout.panel_state(&p) == PanelState::Front + self.workspace.layout().panel_state(&p) == PanelState::Front } /// Hide a visible panel, otherwise bring it up. @@ -223,7 +217,7 @@ impl Dock { } pub fn close(&mut self, p: Panel) { - if let Err(error) = self.workspace.set_visible(p, false, None, permissions) { + if let Err(error) = self.workspace.set_visible(p, false, None, false, permissions) { log::warn!("panel {p:?} was not closed: {error}"); } } @@ -232,11 +226,8 @@ impl Dock { /// front. pub fn focus(&mut self, p: Panel) { let mut next = self.workspace.clone(); - match next.set_visible(p, true, None, permissions) { - Ok(()) if validate(&next).is_ok() => { - self.workspace = next; - self.raise = Some(p); - } + match next.set_visible(p, true, None, false, permissions) { + Ok(()) if validate(&next).is_ok() => self.workspace = next, Ok(()) => log::warn!("panel {p:?} was not opened: it would break the graph's rules"), Err(error) => log::warn!("panel {p:?} was not opened: {error}"), } @@ -246,7 +237,7 @@ impl Dock { /// it was. fn apply(&mut self, action: Action) { let mut next = self.workspace.clone(); - match next.apply(action, permissions) { + match next.apply(action, false, permissions) { Ok(_) if validate(&next).is_ok() => self.workspace = next, Ok(_) => log::warn!("a panel move would break the graph's rules"), Err(error) => log::warn!("a panel move was not applied: {error}"), @@ -254,73 +245,117 @@ impl Dock { } } +/// What the dock area keeps between passes: the workspace it shows and the panels' specs. +#[derive(Default)] +pub(crate) struct LiveDock { + shown: Option>, + specs: Tracked, +} + +impl LiveDock { + /// The `Arc` the dock shows for `workspace`: the last one while the arrangement is the same, + /// so an idle pass keeps the workspace's revision and the dock reads no spec. + fn shown(&mut self, workspace: &Workspace) -> Arc { + if let Some(shown) = self.shown.as_ref().filter(|shown| ***shown == *workspace) { + return Arc::clone(shown); + } + let shown = Arc::new(workspace.clone()); + self.shown = Some(Arc::clone(&shown)); + shown + } +} + +/// What the dock reads of the panels: their tab names, in [`Panel::ALL`] order. +#[derive(Clone, Debug, Default, PartialEq, PlainData)] +struct DockSpecs { + labels: Vec, +} + +impl PanelSpecs for DockSpecs { + fn spec(&self, panel: &Panel) -> PanelSpec { + let label = Panel::ALL.iter().position(|p| p == panel).and_then(|index| self.labels.get(index)).cloned().unwrap_or_default(); + // Every panel body is MaterialCraft's own egui code: the dock runs it with the window's style. + let spec = PanelSpec::new(label).limits(limits(panel)).float_size(vec2(420.0, 320.0)).host_body(); + if *panel == Panel::Graph { spec.canvas() } else { spec } + } + + fn permissions(&self, panel: &Panel) -> Permissions { + permissions(panel) + } +} + +/// Smallest body sizes a divider drag leaves. +fn limits(panel: &Panel) -> SizeLimits { + SizeLimits::at_least(if *panel == Panel::Graph { vec2(240.0, 160.0) } else { vec2(120.0, 60.0) }) +} + +/// The tab name of `panel`: what it shows (the selection, the scene, the image) in the interface +/// language. +fn label(app: &MaterialCraftApp, panel: Panel) -> String { + match panel { + Panel::Properties => crate::properties::title(app), + Panel::Graph => app.session.graph().map(|g| format!("{} - {}", g.name, tr("Graph"))).unwrap_or_else(|_| tr("Graph").into()), + Panel::View3d => format!("{} - {}", crate::view3d::scene_label(app), tr("3D View")), + Panel::View2d => crate::view2d::title(app), + p => tr(p.name()).to_string(), + } +} + +/// Reads the tab names, moving the specs' revision only when one changed. +fn refresh_specs(app: &mut MaterialCraftApp) { + let labels: Vec = Panel::ALL.iter().map(|panel| label(app, *panel)).collect(); + if app.docks.specs.labels != labels { + app.docks.specs.labels = labels; + } +} + // --------------------------------------------------------------------------------------------- // Drawing -fn area_id() -> Id { - Id::unique("materialcraft-docking") -} - -/// The dock look: every panel group is a card on the window's frame colour, its tab strip -/// without hard lines, the shown tab a pill, uppercase captions. -fn style(ui: &Ui, t: &Tokens) -> DockStyle { - let mut s = DockStyle::from_ui(ui); - s.gap = 6.0; - // Smallest panel extent a divider drag leaves. - s.min_pane = 60.0; - s.background = t.panel; - s.tab_background = t.panel; - s.active_background = t.button; - s.text = t.text_strong; - s.inactive_text = t.text_dim; - s.border = egui::Stroke::NONE; - s.accent = t.accent; - s.floating_background = t.panel; - s.floating_stroke = egui::Stroke::new(1.0, t.button_border); - s.font = egui::FontId::proportional(10.5); - s.min_tab_width = 54.0; - s.tab_height = 30.0; - // Panels arrange in a split tree around the graph; floating title bars only move windows. - s.new_dock_zones = false; - s.title_bar_docks = false; - s +/// The graph editor's id as the window's document canvas. +fn graph_canvas_id() -> egui::Id { + egui::Id::unique("materialcraft-graph-canvas") } /// Draw the dock (graph and panels) into `ui`. pub fn show(app: &mut MaterialCraftApp, ui: &mut Ui) { let ctx = ui.ctx().clone(); - let tk = Tokens::get(&ctx); - let style = style(ui, &tk); - let layout = app.ui.dock.workspace.layout.clone(); - let mut area = DockArea::new(area_id()).input_blocked(crate::shell::modality::Modality::capture(app, &ctx).is_blocked()); - if let Some(panel) = app.ui.dock.raise.take() { - area = area.raise_panel(panel); - } - let output = area.show_content(ui, &layout, &style, &mut Panels { app }); + refresh_specs(app); + let shown = app.docks.shown(&app.ui.dock.workspace); + // The specs leave the app while its panels borrow it, and come back with their revision. + let specs = std::mem::take(&mut app.docks.specs); + // Panels arrange in a split tree around the graph; floating title bars only move windows. + let config = DockConfig::default().new_dock_zones(false).title_bar_docks(false); + let output = { + let mut panels = Panels { app: &mut *app }; + DockArea::new("Panels", Bind::given(Arc::clone(&shown)), &specs, &mut panels, config).show(ui) + }; + app.docks.specs = specs; if let Some(error) = &output.error { - log::warn!("docking: {error}"); + log::warn!("docking: {:?}", error.error); } // A body that changed the layout (a panel opened from its own menu) wins over this frame's // gestures, which were made against the old one. - if app.ui.dock.workspace.layout != layout { - craft_ui::docking::cancel_drag::(&ctx, area_id()); + if app.ui.dock.workspace != *shown { + craft_ui::runtime::drag::cancel(&ctx, craft_behavior::CancelReason::HostChanged); return; } - for action in output.actions { + for action in output.actions.into_iter().chain(output.requested) { app.ui.dock.apply(action); } } -/// The panels' contents, names and limits for the dock area. +/// The panels' contents for the dock area. struct Panels<'a> { app: &'a mut MaterialCraftApp, } -impl DockContent for Panels<'_> { - fn body(&mut self, ui: &mut Ui, panel: &Panel) { +impl DockPanels for Panels<'_> { + fn body(&mut self, panel: &Panel, ui: &mut Ui, _: &mut BodyCx<'_>) { let app = &mut *self.app; match panel { - Panel::Graph => crate::graph::show(app, ui), + // The graph is its group's `group_view`. + Panel::Graph => {} Panel::View3d => crate::view3d::show(app, ui), Panel::View2d => crate::view2d::show(app, ui), _ => { @@ -336,31 +371,15 @@ impl DockContent for Panels<'_> { } } - fn logical_label(&self, panel: &Panel) -> String { - match panel { - Panel::Properties => crate::properties::title(self.app), - Panel::Graph => self.app.session.graph().map(|g| format!("{} - {}", g.name, tr("Graph"))).unwrap_or_else(|_| tr("Graph").into()), - Panel::View3d => format!("{} - {}", crate::view3d::scene_label(self.app), tr("3D View")), - Panel::View2d => crate::view2d::title(self.app), - p => tr(p.name()).to_string(), + /// The graph editor, edge to edge in its group, as the window's document canvas. + fn group_view(&mut self, panels: &[Panel], _: usize, ui: &mut Ui, at: GroupAt, _: &mut BodyCx<'_>) -> Option { + let GroupAt::Show(rect) = at else { return None }; + if !panels.contains(&Panel::Graph) { + return None; } - } - - fn label(&mut self, _ui: &Ui, _panel: &Panel, logical: &str, font: &egui::FontId, color: egui::Color32) -> egui::WidgetText { - RichText::new(logical.to_uppercase()).font(font.clone()).strong().color(color).into() - } - - fn permissions(&self, panel: &Panel) -> Permissions { - permissions(panel) - } - - fn limits(&self, panel: &Panel) -> PanelLimits { - let min = if *panel == Panel::Graph { vec2(240.0, 160.0) } else { vec2(120.0, 60.0) }; - PanelLimits { min, ..PanelLimits::default() } - } - - fn floating_size(&self, _panel: &Panel) -> Option { - Some(vec2(420.0, 320.0)) + crate::framework::host_canvas(ui.ctx(), graph_canvas_id()); + crate::graph::show(self.app, ui); + Some(rect.height()) } } @@ -373,28 +392,10 @@ mod tests { let w = default_workspace(); assert!(validate(&w).is_ok()); for panel in Panel::ALL { - assert!(w.layout.contains(&panel) || w.hidden.iter().any(|(p, _)| *p == panel), "{panel:?} is neither shown nor hidden"); + assert!(w.layout().contains(&panel) || w.hidden().iter().any(|(p, _)| *p == panel), "{panel:?} is neither shown nor hidden"); } } - #[test] - fn floating_panels_stop_while_a_dialog_is_open() { - let mut app = crate::MaterialCraftApp::headless(materialcraft_engine::sample_session(), crate::UiState::default()); - let ctx = egui::Context::default(); - let screen_rect = Some(egui::Rect::from_min_size(egui::Pos2::ZERO, vec2(1200.0, 800.0))); - let frame = |app: &mut crate::MaterialCraftApp| { - ctx.run_ui(egui::RawInput { screen_rect, ..Default::default() }, |ui| show(app, ui)).textures_delta.clear(); - ctx.data(|data| data.get_temp::(area_id().with("input-blocked"))) - }; - - assert_eq!(frame(&mut app), Some(false)); - app.ui.windows.unsaved = Some(crate::unsaved::Guarded::Quit); - assert_eq!(frame(&mut app), Some(true), "the panels stop on the frame the prompt opens"); - app.ui.windows.unsaved = None; - app.ui.windows.shortcuts = true; - assert_eq!(frame(&mut app), Some(false), "the Shortcuts list does not block"); - } - #[test] fn default_dock_round_trips() { let dock = Dock::default(); diff --git a/crates/ui-egui/src/explorer/actions.rs b/crates/ui-egui/src/explorer/actions.rs index f743227e..bec17d4a 100644 --- a/crates/ui-egui/src/explorer/actions.rs +++ b/crates/ui-egui/src/explorer/actions.rs @@ -167,7 +167,7 @@ pub(super) fn rename_dialog(app: &mut MaterialCraftApp, ctx: &egui::Context) { cancel |= ui.button(tr("Cancel")).clicked(); }); }); - cancel |= ctx.input(|input| input.key_pressed(egui::Key::Escape)); + cancel |= crate::framework::escape_pressed(ctx); app.ui.explorer.rename = if open && !cancel { Some((target.clone(), name.clone())) } else { None }; if accept && activate(app, target.document()) { let mut parameters = target.parameters(); diff --git a/crates/ui-egui/src/fonts.rs b/crates/ui-egui/src/fonts.rs index 4be466bc..a1e9d757 100644 --- a/crates/ui-egui/src/fonts.rs +++ b/crates/ui-egui/src/fonts.rs @@ -58,7 +58,7 @@ impl UiFonts { defs.font_data.insert(name.clone(), data); defs.families.entry(FontFamily::Proportional).or_default().push(name.clone()); defs.families.entry(FontFamily::Monospace).or_default().push(name); - ctx.set_fonts(defs); + crate::theme::load_fonts(ctx, defs); self.installed = true; } diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs new file mode 100644 index 00000000..4b2258fb --- /dev/null +++ b/crates/ui-egui/src/framework.rs @@ -0,0 +1,144 @@ +//! The craft-ui runtime, hosted from MaterialCraft's own eframe `App` (craft-libs docs/craft-framework.md, section +//! 2.2). The desktop app calls [`install`] once, [`MaterialCraftApp::before_input`] in `raw_input_hook`, +//! [`MaterialCraftApp::close_path`] last in `logic`, and [`before_ui`] first in `ui`; the browser build and tests +//! install with [`install_headless`]. The framework dialogs run on [`MaterialCraftApp::framework_dialogs`] after +//! MaterialCraft's own UI. +//! +//! The runtime takes Escape, Tab and the clipboard events for the whole window unless one of MaterialCraft's own egui +//! widgets has the keyboard. The window's Escape is read with [`escape_pressed`] and taken with +//! [`take_window_cancel`]; the graph editor is declared to the runtime with [`host_canvas`], which keeps Tab, the edit +//! chords and the clipboard events in egui's input for MaterialCraft's shortcuts. + +use std::sync::Arc; + +use craft_host::target::ShellInfo; +use craft_host::{AppInfo, Host}; +use craft_ui::fonts::{I18nScripts, SystemFonts, UiFonts}; +use craft_ui::runtime::env::{RootEnv, Scale}; +use craft_ui::runtime::focus::{EditSet, KeepKeys, KeyUse}; +use craft_ui::runtime::frame::{FrameInput, FrameOutput}; +use craft_ui::runtime::keys::{Intent, with_window_intents}; +use craft_ui::shell::embed::{self, CloseDecision}; +use craft_window::policy::Decision; +use craft_window::system::WindowSystem; + +use crate::MaterialCraftApp; + +/// Each pass of the root window, first in `App::ui`: hands the runtime the native window it answers the hit test of +/// (Windows) and fits the window to its monitor once. +#[cfg(not(target_arch = "wasm32"))] +pub use craft_ui::shell::embed::before_ui; + +/// The id every OS window of the app carries, as the desktop entry and the update app name it. +const APP_ID: &str = "ai.storyteller.materialcraft"; + +/// The environment-variable prefix of the frame override: `MATERIALCRAFT_TITLEBAR`. +#[cfg(not(target_arch = "wasm32"))] +const FRAME_PREFIX: craft_window::Prefix = craft_window::Prefix::new("MATERIALCRAFT"); + +/// The scripts of the interface languages, for the font stack. +static SCRIPTS: I18nScripts = I18nScripts; + +/// The runtime's first font stack: egui's bundled faces and no installed system fonts. MaterialCraft's own definitions +/// ([`crate::theme::install`]) replace it before anything is drawn. +fn ui_fonts() -> UiFonts<'static> { + UiFonts::new(&SCRIPTS).system_fonts(SystemFonts::Off) +} + +fn install_with(ctx: &egui::Context, shell: ShellInfo, windows: Arc, frame: Option) -> Result<(), String> { + let mut spec = craft_ui::InstallSpec::new(shell, windows).app_id(APP_ID); + if let Some(frame) = frame { + spec = spec.frame(frame); + } + embed::install(ctx, spec, &ui_fonts()).map(drop).map_err(|error| format!("the UI runtime could not be installed: {error}")) +} + +/// Who draws the main window's frame. The app's bar is the title bar only where the desktop leaves the frame to the +/// app (GNOME on Wayland) or `MATERIALCRAFT_TITLEBAR=app` asks for it; everywhere else the system draws it. Call it +/// once, before the window exists: the desktop app builds its window with [`craft_window::policy::apply`] and hands +/// the decision to [`install`]. +#[cfg(not(target_arch = "wasm32"))] +pub fn decide_frame() -> Decision { + use craft_window::policy::{TitleBarPref, decide_for}; + let pref = if craft_window::Choice::probe(FRAME_PREFIX).frame().decorations() { TitleBarPref::System } else { TitleBarPref::Integrated }; + decide_for(FRAME_PREFIX, craft_host::target::Backend::from_env(), pref) +} + +/// Installs the runtime on the desktop window's context, once, before the first pass, with the window's `frame`. +#[cfg(not(target_arch = "wasm32"))] +pub fn install(ctx: &egui::Context, frame: Decision) -> Result<(), String> { + let shell = ShellInfo::default().backend(craft_host::target::Backend::from_env()); + install_with(ctx, shell, Arc::new(craft_window::system::SystemWindows), Some(frame)) +} + +/// Installs the runtime on a context with no native window of its own: the browser build's canvas and test windows. +pub fn install_headless(ctx: &egui::Context) { + if let Err(error) = install_with(ctx, ShellInfo::default(), Arc::new(craft_window::system::NoWindows), None) { + log::warn!("{error}"); + } +} + +/// Who MaterialCraft is to the framework's dialogs (the update dialogs show its name). +pub(crate) fn host() -> Arc { + Arc::new(Host::builder(AppInfo { id: "materialcraft", name: "MaterialCraft", version: materialcraft_engine::VERSION }).build()) +} + +impl MaterialCraftApp { + /// The framework's part of `App::raw_input_hook`, once per frame before the first pass: takes what the runtime + /// gathered since the last frame and gives the coming passes the root values (theme mode, interface scale and + /// direction). + pub fn before_input(&mut self, ctx: &egui::Context) { + // MaterialCraft applies the interface scale itself (`step`), so the runtime keeps the zoom it applied last. + let scale = ctx.zoom_factor(); + embed::before_input(ctx, |output| self.frame_input(output, scale)); + } + + /// The root values of this frame. MaterialCraft registers no commands with the runtime and lets it toggle no + /// chrome, so the output carries nothing it acts on. + fn frame_input(&mut self, _output: FrameOutput, scale: f32) -> FrameInput { + use crate::theme::Brightness; + let mode = match self.ui.prefs.brightness { + Brightness::Light | Brightness::MediumLight => craft_theme::Mode::Light, + Brightness::Dark | Brightness::MediumDark => craft_theme::Mode::Dark, + }; + let direction = if crate::i18n::is_rtl() { craft_i18n::Direction::Rtl } else { craft_i18n::Direction::Ltr }; + let root = RootEnv::new().mode(mode).scale(Scale::new(scale)).direction(direction); + FrameInput::new(root).host(Arc::clone(&self.framework_host)) + } + + /// The framework's part of `App::logic`, after MaterialCraft's own: the root window's close path. Unsaved work + /// holds the window open while Save / Discard / Cancel asks ([`crate::unsaved::close_requested`]); a confirmed + /// quit closes it. + pub fn close_path(&mut self, ctx: &egui::Context) { + embed::logic(ctx, || if crate::unsaved::close_requested(self) { CloseDecision::Hold } else { CloseDecision::Close }); + } +} + +/// Declares the graph editor `id`, drawn in this pass, as the window's document canvas. With nothing focused it is the +/// window's key target: Tab (node search), the edit chords and the clipboard events stay in egui's input for +/// MaterialCraft's shortcuts. +pub(crate) fn host_canvas(ctx: &egui::Context, id: egui::Id) { + const KEYS: KeyUse = KeyUse::CANVAS.with_keep(KeepKeys::Tab).with_edits(EditSet::ALL); + craft_ui::runtime::focus::host_canvas(ctx, id, KEYS); +} + +/// Whether Escape was pressed in this pass: from egui while one of MaterialCraft's own widgets or popups has the +/// keyboard, otherwise the window's cancel, which the runtime routes to no component. Leaves it for later readers. +pub(crate) fn escape_pressed(ctx: &egui::Context) -> bool { + ctx.input(|i| i.key_pressed(egui::Key::Escape)) || window_cancel(ctx, false) +} + +/// Takes the window's cancel (an Escape while nothing has framework focus) when it is there: no later reader sees it. +pub(crate) fn take_window_cancel(ctx: &egui::Context) -> bool { + window_cancel(ctx, true) +} + +/// Whether the window's cancel is there and untaken; `take` takes it. +fn window_cancel(ctx: &egui::Context, take: bool) -> bool { + let mut pending = false; + with_window_intents(ctx, false, |intents| { + pending = if take { intents.take(Intent::Cancel) } else { intents.untaken(&Intent::Cancel) }; + take && pending + }); + pending +} diff --git a/crates/ui-egui/src/function/search.rs b/crates/ui-egui/src/function/search.rs index fc24d6ea..95c9de89 100644 --- a/crates/ui-egui/src/function/search.rs +++ b/crates/ui-egui/src/function/search.rs @@ -115,10 +115,11 @@ pub(super) fn show(app: &mut MaterialCraftApp, editor: &mut FunctionEditor, ui: } }); let list = candidates(app, editor, &search.text); - let (up, down, enter, escape) = ui.input(|input| { + let (up, down, enter) = ui.input(|input| { let pressed = |key| !blocked && input.key_pressed(key); - (pressed(egui::Key::ArrowUp), pressed(egui::Key::ArrowDown), pressed(egui::Key::Enter), pressed(egui::Key::Escape)) + (pressed(egui::Key::ArrowUp), pressed(egui::Key::ArrowDown), pressed(egui::Key::Enter)) }); + let escape = !blocked && crate::framework::escape_pressed(ui.ctx()); if down { search.selected_index = (search.selected_index + 1).min(list.len().saturating_sub(1)); } diff --git a/crates/ui-egui/src/graph/canvas_tests.rs b/crates/ui-egui/src/graph/canvas_tests.rs index de23bc95..f09c0201 100644 --- a/crates/ui-egui/src/graph/canvas_tests.rs +++ b/crates/ui-egui/src/graph/canvas_tests.rs @@ -97,6 +97,7 @@ fn clicked_wires_swap_with_x_and_delete_together() { app.run("graph.connect", json!({"from": a, "to": blend, "toPort": "foreground"})); app.run("graph.connect", json!({"from": b, "to": blend, "toPort": "background"})); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut frame = |app: &mut MaterialCraftApp, mut events: Vec, modifiers: egui::Modifiers| { events.insert(0, egui::Event::ModifiersChanged(modifiers)); let input = egui::RawInput { events, ..Default::default() }; diff --git a/crates/ui-egui/src/graph/frames.rs b/crates/ui-egui/src/graph/frames.rs index b9bf8ebc..a79edcb1 100644 --- a/crates/ui-egui/src/graph/frames.rs +++ b/crates/ui-egui/src/graph/frames.rs @@ -13,8 +13,9 @@ pub(super) struct Frames { impl Frames { /// `session` after a few frames, so the canvas is laid out pub(super) fn new(session: materialcraft_engine::Session) -> Frames { - let mut f = - Frames { ctx: egui::Context::default(), app: MaterialCraftApp::headless(session, crate::UiState::default()), time: 0.0, canvas_text: Vec::new() }; + let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); + let mut f = Frames { ctx, app: MaterialCraftApp::headless(session, crate::UiState::default()), time: 0.0, canvas_text: Vec::new() }; for _ in 0..3 { f.run(Vec::new(), egui::Modifiers::NONE); } diff --git a/crates/ui-egui/src/graph/gesture.rs b/crates/ui-egui/src/graph/gesture.rs index 94d18680..bdd7e5b5 100644 --- a/crates/ui-egui/src/graph/gesture.rs +++ b/crates/ui-egui/src/graph/gesture.rs @@ -9,5 +9,5 @@ pub(crate) fn finished(ui: &Ui, owner: PointerButton) -> bool { } pub(crate) fn cancelled(ui: &Ui) -> bool { - ui.input(|input| !input.focused || input.key_pressed(egui::Key::Escape)) + !ui.input(|input| input.focused) || crate::framework::escape_pressed(ui.ctx()) } diff --git a/crates/ui-egui/src/graph/search.rs b/crates/ui-egui/src/graph/search.rs index 055092a8..4b910140 100644 --- a/crates/ui-egui/src/graph/search.rs +++ b/crates/ui-egui/src/graph/search.rs @@ -71,10 +71,11 @@ pub(super) fn show(app: &mut MaterialCraftApp, ui: &mut Ui, cam: &GraphCamera) { if s.connect_to.is_some() { list.retain(|definition| !definition.outputs.is_empty()); } - let (up, down, enter, esc) = ui.input(|i| { + let (up, down, enter) = ui.input(|i| { let pressed = |key| !blocked && i.key_pressed(key); - (pressed(egui::Key::ArrowUp), pressed(egui::Key::ArrowDown), pressed(egui::Key::Enter), pressed(egui::Key::Escape)) + (pressed(egui::Key::ArrowUp), pressed(egui::Key::ArrowDown), pressed(egui::Key::Enter)) }); + let esc = !blocked && crate::framework::escape_pressed(ui.ctx()); if down { s.sel = (s.sel + 1).min(list.len().saturating_sub(1)); } diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index 39d1e5f4..4cbd1153 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -41,7 +41,7 @@ pub fn current() -> &'static Language { /// Returns true if `code` is a right-to-left language (e.g. Arabic `"ar"`). pub fn is_rtl_code(code: &str) -> bool { - craft_ui::direction::resolve(code, craft_ui::direction::Setting::Language) == craft_ui::direction::Direction::Rtl + craft_i18n::direction(code) == craft_i18n::Direction::Rtl } /// Returns true if the current UI language is right-to-left. diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 83b0b057..e6ce1ce4 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -8,6 +8,7 @@ pub mod docking; pub mod explorer; pub mod export; pub mod fonts; +pub mod framework; pub mod function; pub mod graph; mod graph_drag_payload; @@ -26,6 +27,7 @@ mod preview_resolution; #[path = "property/mod.rs"] pub mod properties; mod shell; +mod shortcut_dispatch; pub mod state; pub mod theme; pub mod thumbs; diff --git a/crates/ui-egui/src/material_craft_app.rs b/crates/ui-egui/src/material_craft_app.rs index e775d2bb..13b2f413 100644 --- a/crates/ui-egui/src/material_craft_app.rs +++ b/crates/ui-egui/src/material_craft_app.rs @@ -58,12 +58,15 @@ pub struct MaterialCraftApp { pub(crate) material_export_job: Option>>, /// The held action waiting for the Save dialog the unsaved-changes prompt opened pub(crate) awaiting_save: Option, - /// The window buttons to draw when the app draws the window frame; `None` while the desktop draws it (desktop only) - #[cfg(not(target_arch = "wasm32"))] - pub window_layout: Option, /// Keyboard shortcuts and their dispatch pub(crate) keymap: craft_keymap::Keymap, - pub(crate) dispatcher: craft_keymap::egui::Dispatcher, + pub(crate) dispatcher: crate::shortcut_dispatch::Dispatcher, + /// The dock area's workspace and panel specs between passes + pub(crate) docks: docking::LiveDock, + /// The framework dialogs (the update dialogs), run once per pass after MaterialCraft's own UI + pub framework_dialogs: craft_ui::dialog::DialogHost, + /// Who MaterialCraft is to the framework's dialogs + pub(crate) framework_host: std::sync::Arc, /// What Copy or Cut put on the clipboard this frame, for the system clipboard pub(crate) system_clipboard: Option, /// Fallback fonts for Arabic @@ -135,12 +138,11 @@ impl MaterialCraftApp { #[cfg(not(target_arch = "wasm32"))] material_export_job: None, awaiting_save: None, - #[cfg(not(target_arch = "wasm32"))] - window_layout: None, keymap: menus::keymap(craft_keymap::Platform::current()), - - // Accept clipboard events without duplicating web key commands - dispatcher: craft_keymap::egui::Dispatcher::new().with_repeat(true).with_clipboard_events(true), + dispatcher: crate::shortcut_dispatch::Dispatcher::default(), + docks: docking::LiveDock::default(), + framework_dialogs: craft_ui::dialog::DialogHost::new(), + framework_host: crate::framework::host(), system_clipboard: None, fonts: fonts::UiFonts::default(), fonts_ready: false, @@ -450,18 +452,19 @@ impl eframe::App for MaterialCraftApp { } } - fn raw_input_hook(&mut self, _ctx: &egui::Context, raw: &mut egui::RawInput) { + fn raw_input_hook(&mut self, ctx: &egui::Context, raw: &mut egui::RawInput) { control::feed_input(self, raw); + self.before_input(ctx); } fn logic(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - #[cfg(not(target_arch = "wasm32"))] - self.step_then(ctx, craft_quit::on_close_request); - #[cfg(target_arch = "wasm32")] self.step(ctx); + self.close_path(ctx); } fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) { + #[cfg(not(target_arch = "wasm32"))] + crate::framework::before_ui(ui.ctx(), &*frame); self.draw(ui); #[cfg(not(target_arch = "wasm32"))] self.dialogs.show_pending(Some(&*frame)); @@ -471,13 +474,6 @@ impl eframe::App for MaterialCraftApp { } impl MaterialCraftApp { - /// [`Self::step`], then the platform's close handling, which sees a close `step` canceled - #[cfg(not(target_arch = "wasm32"))] - fn step_then(&mut self, ctx: &egui::Context, close: impl FnOnce(&egui::Context) -> bool) { - self.step(ctx); - close(ctx); - } - /// Per-frame logic before drawing: styles, the control channel, cooking, shortcuts pub fn step(&mut self, ctx: &egui::Context) { if !self.fonts_ready { @@ -509,7 +505,7 @@ impl MaterialCraftApp { self.session.finish_edit(); } - crate::unsaved::handle_close(self, ctx); + crate::unsaved::finish_quit(self, ctx); control::poll(self, ctx); web_files::poll(self); #[cfg(not(target_arch = "wasm32"))] @@ -565,8 +561,9 @@ impl MaterialCraftApp { self.ui.explorer.hovered = false; egui::CentralPanel::default().frame(egui::Frame::NONE.fill(theme::Tokens::get(&ctx).chrome)).show(ui, |ui| docking::show(self, ui)); windows::show(self, &ctx); + self.framework_dialogs.run(ui); #[cfg(not(target_arch = "wasm32"))] - if self.window_layout.is_some() { + if crate::window_controls::app_draws_frame(&ctx) { crate::window_controls::resize_zones(ui); } diff --git a/crates/ui-egui/src/material_craft_app.test.rs b/crates/ui-egui/src/material_craft_app.test.rs index df5940a0..30e34881 100644 --- a/crates/ui-egui/src/material_craft_app.test.rs +++ b/crates/ui-egui/src/material_craft_app.test.rs @@ -57,6 +57,7 @@ mod lib_tests { app.ui.explorer.hovered = true; app.ui.dock.close(crate::docking::Panel::Explorer); let context = egui::Context::default(); + crate::framework::install_headless(&context); context.run_ui(egui::RawInput::default(), |ui| app.draw(ui)).textures_delta.clear(); @@ -79,14 +80,14 @@ mod close_order_tests { fn close_frame(app: &mut MaterialCraftApp) -> bool { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut input = egui::RawInput::default(); input.viewports.entry(egui::ViewportId::ROOT).or_default().events.push(egui::ViewportEvent::Close); let mut canceled = false; ctx.run_ui(input, |ui| { - app.step_then(ui.ctx(), |ctx| { - canceled = ctx.viewport(|viewport| viewport.commands.contains(&egui::ViewportCommand::CancelClose)); - false - }); + app.step(ui.ctx()); + app.close_path(ui.ctx()); + canceled = ui.ctx().viewport(|viewport| viewport.commands.contains(&egui::ViewportCommand::CancelClose)); }) .textures_delta .clear(); diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index f8c1b33c..167a3d96 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -1,6 +1,6 @@ //! Menu actions and shortcuts share stable command ids -use craft_keymap::{Active, Binding, Chord, CommandDef, Keymap, Platform, Scope, Scopes}; +use craft_keymap::{Binding, Chord, CommandDef, Keymap, Platform, Scope, Scopes}; use egui::class::HasClasses as _; use serde_json::Value; @@ -328,61 +328,61 @@ pub fn shortcut_of(id: &str) -> Option<&'static str> { CATALOG.iter().find(|i| i.id == id).and_then(|i| i.shortcut).or_else(|| materialcraft_engine::find(id).and_then(|c| c.shortcut)) } -/// Draw menu bars with aligned labels and a separate gutter for checkmarks. +/// Draw menu bars with aligned labels and a separate gutter for checkmarks. Where the app draws the window's frame, the +/// menu bar is the window's title bar: the framework's title bar holds it, with the move area and the caption buttons +/// of the desktop's layout. pub fn menu_bar(app: &mut MaterialCraftApp, ui: &mut egui::Ui) { let tokens = Tokens::get(ui.ctx()); - egui::Panel::top("menu_bar").exact_size(24.0).frame(egui::Frame::NONE.fill(tokens.chrome).inner_margin(egui::Margin::symmetric(6, 0))).show(ui, |ui| { - #[cfg(not(target_arch = "wasm32"))] - let window_layout = app.window_layout.clone(); - #[cfg(not(target_arch = "wasm32"))] - if window_layout.is_some() { - craft_window::title_bar::empty_area(ui, ui.max_rect()); - } - - egui::MenuBar::new().ui(ui, |ui| { - let context = ui.ctx().clone(); - #[cfg(not(target_arch = "wasm32"))] - if let Some(layout) = &window_layout { - crate::window_controls::buttons(ui, &context, &layout.left); - } - for top in TOP { - ui.menu_button(tr(top), |ui| { - ui.set_min_width(220.0); - let mut current_submenu: Option<&str> = None; - let items: Vec = CATALOG.iter().filter(|item| item.menu == top).copied().collect(); - for item in &items { - if let Some(submenu) = item.sub { - if current_submenu == Some(submenu) { - continue; - } - - current_submenu = Some(submenu); - ui.menu_button(menu_label(tr(submenu)), |ui| { - for entry in items.iter().filter(|entry| entry.sub == Some(submenu)) { - menu_item(app, &context, ui, entry); - } - }); - continue; - } - - if item.label == "-" { - ui.separator(); - continue; - } - - menu_item(app, &context, ui, item); - } - }); - } - #[cfg(not(target_arch = "wasm32"))] - if let Some(layout) = window_layout.as_ref().filter(|layout| !layout.right.is_empty()) { - ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { - let mut right = layout.right.clone(); - right.reverse(); - crate::window_controls::buttons(ui, &context, &right); - }); + #[cfg(not(target_arch = "wasm32"))] + if crate::window_controls::app_bar_is_title_bar(ui.ctx()) { + use craft_ui::contract::ShowContainer as _; + egui::Panel::top("menu_bar").frame(egui::Frame::NONE.fill(tokens.chrome)).show(ui, |ui| { + let bar = craft_ui::shell::TitleBar::new().show(ui, |ui, _| menus(app, ui)).output; + if bar.close_requested { + ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); } }); + return; + } + egui::Panel::top("menu_bar") + .exact_size(24.0) + .frame(egui::Frame::NONE.fill(tokens.chrome).inner_margin(egui::Margin::symmetric(6, 0))) + .show(ui, |ui| menus(app, ui)); +} + +/// The top-level menus, in a menu bar +fn menus(app: &mut MaterialCraftApp, ui: &mut egui::Ui) { + egui::MenuBar::new().ui(ui, |ui| { + let context = ui.ctx().clone(); + for top in TOP { + ui.menu_button(tr(top), |ui| { + ui.set_min_width(220.0); + let mut current_submenu: Option<&str> = None; + let items: Vec = CATALOG.iter().filter(|item| item.menu == top).copied().collect(); + for item in &items { + if let Some(submenu) = item.sub { + if current_submenu == Some(submenu) { + continue; + } + + current_submenu = Some(submenu); + ui.menu_button(menu_label(tr(submenu)), |ui| { + for entry in items.iter().filter(|entry| entry.sub == Some(submenu)) { + menu_item(app, &context, ui, entry); + } + }); + continue; + } + + if item.label == "-" { + ui.separator(); + continue; + } + + menu_item(app, &context, ui, item); + } + }); + } }); } @@ -460,6 +460,14 @@ pub fn shortcuts(app: &mut MaterialCraftApp, ctx: &egui::Context) { return; } + // A plain Escape no widget of MaterialCraft's took is the window's cancel: it runs the Escape shortcuts + if crate::framework::take_window_cancel(ctx) { + ctx.input_mut(|i| { + let modifiers = i.modifiers; + i.events.insert(0, egui::Event::Key { key: egui::Key::Escape, physical_key: Some(egui::Key::Escape), pressed: true, repeat: false, modifiers }); + }); + } + // The desktop sends Copy, Cut and Paste events in place of their key presses if !ctx .input(|i| i.events.iter().any(|e| matches!(e, egui::Event::Key { pressed: true, .. } | egui::Event::Copy | egui::Event::Cut | egui::Event::Paste(_)))) @@ -491,7 +499,7 @@ pub fn shortcuts(app: &mut MaterialCraftApp, ctx: &egui::Context) { let gesture_in_progress = ctx.input(|i| i.pointer.any_down()); let node_search_open = app.graph.search_is_open() || app.function_editor.as_ref().is_some_and(|editor| editor.search.is_some()); let hits = ctx.input_mut(|i| { - app.dispatcher.dispatch_filtered(i, &app.keymap, &Active::NONE, |hit| { + app.dispatcher.dispatch_filtered(i, &app.keymap, |hit| { let id = hit.command.id.as_str(); let keeps_escape = id == "ui.cook.cancel" && (!app.cooker.busy() || gesture_in_progress || node_search_open || label_selected); modality.allows(id) && !(label_selected && matches!(id, "edit.copy" | "edit.cut")) && !unavailable_clipboard_commands.contains(&id) && !keeps_escape @@ -551,7 +559,7 @@ mod tests { owners.entry(chord.to_string()).or_insert((id, chord)); } for (id, chord) in owners.into_values() { - assert_eq!(map.lookup(&chord, false, &Active::NONE), craft_keymap::Lookup::Run(id.into()), "{chord}"); + assert_eq!(map.lookup(&chord, false, &craft_keymap::Active::NONE), craft_keymap::Lookup::Run(id.into()), "{chord}"); } } } @@ -782,7 +790,7 @@ mod tests { let mut app = app(); app.ui.recent.push("recent.sbs".into()); - let mut harness = egui_kittest::Harness::builder().build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); + let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); harness.run_steps(2); harness.get_by_label("File").click(); harness.run_steps(3); @@ -802,7 +810,7 @@ mod tests { let mut app = app(); app.dialogs.ask(craft_dialogs::FileDialog::open(), crate::native_dialogs::Then::OpenPackage); - let mut harness = egui_kittest::Harness::builder().build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); + let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); harness.run_steps(2); harness.get_by_label("File").click(); harness.run_steps(3); @@ -898,7 +906,7 @@ mod tests { #[test] fn a_web_copy_press_runs_edit_copy() { let mut app = app(); - app.dispatcher = craft_keymap::egui::Dispatcher::new().with_repeat(true).with_clipboard_events(true); + app.dispatcher = crate::shortcut_dispatch::Dispatcher::default(); app.run("edit.selectAll", serde_json::json!({})); let ctx = egui::Context::default(); copy_event_kept(&mut app, &ctx, press_c(vec![egui::Event::Copy])); @@ -908,7 +916,7 @@ mod tests { #[test] fn selected_label_text_keeps_its_copy_on_the_web() { let mut app = app(); - app.dispatcher = craft_keymap::egui::Dispatcher::new().with_repeat(true).with_clipboard_events(true); + app.dispatcher = crate::shortcut_dispatch::Dispatcher::default(); app.run("edit.selectAll", serde_json::json!({})); let ctx = egui::Context::default(); select_label_text(&ctx); diff --git a/crates/ui-egui/src/native_dialogs.rs b/crates/ui-egui/src/native_dialogs.rs index 83d80743..e4921467 100644 --- a/crates/ui-egui/src/native_dialogs.rs +++ b/crates/ui-egui/src/native_dialogs.rs @@ -63,13 +63,13 @@ impl GraphRef { /// A queue for an app that has no window to wake yet (offscreen snapshots and tests) pub(crate) fn unattached() -> Dialogs { - craft_dialogs::Dialogs::new(std::sync::Arc::new(|| {})) + craft_dialogs::Dialogs::new(craft_dialogs::Wake::none()) } /// A queue whose answers wake the window pub(crate) fn attached(ctx: &egui::Context) -> Dialogs { let ctx = ctx.clone(); - craft_dialogs::Dialogs::new(std::sync::Arc::new(move || ctx.request_repaint())) + craft_dialogs::Dialogs::new(craft_dialogs::Wake::new(move || ctx.request_repaint())) } /// Queue a dialog unless one is already open or waiting, in which case the open one comes forward diff --git a/crates/ui-egui/src/native_dialogs.test.rs b/crates/ui-egui/src/native_dialogs.test.rs index 50d18a31..092dee2c 100644 --- a/crates/ui-egui/src/native_dialogs.test.rs +++ b/crates/ui-egui/src/native_dialogs.test.rs @@ -248,7 +248,7 @@ fn the_prompts_save_with_a_path_saves_and_runs_the_action_at_once() { #[test] fn the_app_shows_a_requested_dialog_and_applies_its_answer() { - let mut harness = egui_kittest::Harness::builder().build_eframe(|_| app()); + let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_eframe(|_| app()); harness.step(); harness.step(); let path = temp("frames.sbs"); @@ -452,29 +452,31 @@ fn a_held_close_waits_for_the_save_dialog() { answer_prompt_with_save(&mut app); app.session.modified = false; let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut input = egui::RawInput::default(); input.viewports.entry(egui::ViewportId::ROOT).or_default().events.push(egui::ViewportEvent::Close); - let mut output = ctx.run_ui(input, |ui| crate::unsaved::handle_close(&mut app, ui.ctx())); + let mut output = ctx.run_ui(input, |ui| app.close_path(ui.ctx())); output.textures_delta.clear(); let commands = output.viewport_output.remove(&egui::ViewportId::ROOT).map(|root| root.commands).unwrap_or_default(); assert!(commands.contains(&egui::ViewportCommand::CancelClose)); } +/// The runtime brings a held window forward, a minimized one included, so the prompt can show. #[test] fn a_held_close_restores_a_minimized_window() { - for (minimized, restored) in [(Some(true), true), (Some(false), false), (None, false)] { - let mut app = modified_app_asking_to_quit(); - app.ui.windows.unsaved = None; - let ctx = egui::Context::default(); - let mut input = egui::RawInput::default(); - let root = input.viewports.entry(egui::ViewportId::ROOT).or_default(); - root.minimized = minimized; - root.events.push(egui::ViewportEvent::Close); - let mut output = ctx.run_ui(input, |ui| crate::unsaved::handle_close(&mut app, ui.ctx())); - output.textures_delta.clear(); - let commands = output.viewport_output.remove(&egui::ViewportId::ROOT).map(|root| root.commands).unwrap_or_default(); - assert_eq!(commands.contains(&egui::ViewportCommand::Minimized(false)), restored, "{minimized:?}"); - } + let mut app = modified_app_asking_to_quit(); + app.ui.windows.unsaved = None; + let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); + let mut input = egui::RawInput::default(); + let root = input.viewports.entry(egui::ViewportId::ROOT).or_default(); + root.minimized = Some(true); + root.events.push(egui::ViewportEvent::Close); + let mut output = ctx.run_ui(input, |ui| app.close_path(ui.ctx())); + output.textures_delta.clear(); + let commands = output.viewport_output.remove(&egui::ViewportId::ROOT).map(|root| root.commands).unwrap_or_default(); + assert!(commands.contains(&egui::ViewportCommand::Minimized(false)), "{commands:?}"); + assert!(app.ui.windows.unsaved.is_some(), "the prompt asks"); } #[test] diff --git a/crates/ui-egui/src/preference/shortcuts_page.rs b/crates/ui-egui/src/preference/shortcuts_page.rs index 5cb393a9..c6954541 100644 --- a/crates/ui-egui/src/preference/shortcuts_page.rs +++ b/crates/ui-egui/src/preference/shortcuts_page.rs @@ -108,6 +108,11 @@ fn field(app: &mut MaterialCraftApp, ui: &mut Ui, entry: &str, label: &str) { fn capture(app: &mut MaterialCraftApp, ui: &mut Ui) { let Some(entry) = app.ui.preferences.capturing.clone() else { return }; + // A plain Escape cancels the wait; with no field of MaterialCraft's focused it is the window's cancel + if crate::framework::take_window_cancel(ui.ctx()) { + app.ui.preferences.capturing = None; + return; + } let platform = craft_keymap::egui::platform(ui.ctx()); let chord = ui.input(|input| input.events.iter().find_map(|event| crate::node_shortcuts::event_chord(event, platform))); let Some(chord) = chord else { return }; diff --git a/crates/ui-egui/src/shell/modality.test.rs b/crates/ui-egui/src/shell/modality.test.rs index f9245397..2f312c4f 100644 --- a/crates/ui-egui/src/shell/modality.test.rs +++ b/crates/ui-egui/src/shell/modality.test.rs @@ -145,6 +145,7 @@ fn a_file_dropped_behind_a_prompt_does_not_reach_the_package() { let mut app = app(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); frame(&mut app, &ctx, Vec::new()); frame(&mut app, &ctx, Vec::new()); let png = encode(&Image::filled(2, 2, Kind::Gray, [0.5; 4]), "png", Depth::U8, false).unwrap(); diff --git a/crates/ui-egui/src/shortcut_dispatch.rs b/crates/ui-egui/src/shortcut_dispatch.rs new file mode 100644 index 00000000..ec8dfdfb --- /dev/null +++ b/crates/ui-egui/src/shortcut_dispatch.rs @@ -0,0 +1,249 @@ +//! The frame's key presses and clipboard events as the shortcuts they run: egui's events fed to +//! `craft_keymap::Matcher`, one press at a time in press order. +//! +//! - A press that runs a command is removed from egui's input, with the text it typed; one that +//! runs nothing, or whose hit the caller declines, stays. +//! - Held keys run their command again on each repeat (a held arrow nudges); repeats never count +//! toward a double press. +//! - egui's Copy, Cut and Paste events count as their plain chords (Cmd+C, Cmd+X, Cmd+V; +//! Shift+Delete and Shift+Insert), so the desktop's clipboard events run the edit commands. The +//! web build sends a clipboard press and the clipboard event it causes: the press decides, and +//! its event goes with it when it runs a command and stays otherwise. +//! - The keyboard layout is learned from what plain presses type, and taken from egui when the +//! integration reports whether it is Latin. + +use craft_keymap::{Active, Hit, Key, KeyInput, Keymap, Layout, Matcher, Mods, Platform, Press}; +use egui::{Event, InputState, Key as EguiKey}; + +/// eframe's web build sends a press's Text event first when no text field has focus. +const TEXT_FIRST: bool = cfg!(target_arch = "wasm32"); + +/// What matching carries between frames: the previous press (double presses) and the layout. +#[derive(Default)] +pub(crate) struct Dispatcher { + matcher: Matcher, + layout: Layout, + /// Whether right Alt is held. egui-winit reports AltGr with neither Ctrl nor Alt, so its + /// presses would otherwise teach the layout as plain ones. + right_alt: bool, +} + +impl Dispatcher { + /// The commands this frame's key presses and clipboard events run, in press order, with + /// `accept` deciding each hit before its event is removed. A declined hit is left out and its + /// event, with any text it typed, stays in egui's input in its place. + pub(crate) fn dispatch_filtered(&mut self, input: &mut InputState, keymap: &Keymap, mut accept: impl FnMut(&Hit) -> bool) -> Vec { + let platform = keymap.platform(); + let now = input.time; + let frame_mods = Mods::from_egui(&input.modifiers, platform); + let events = std::mem::take(&mut input.events); + let text_of = text_of_press(&events, TEXT_FIRST); + if let Some(latin) = input.keyboard_layout_is_latin() { + self.layout.set_latin(Some(latin)); + } + self.learn(&events, &text_of, platform); + let causes = clipboard_event_follows(&events, &self.layout, platform, input); + let mut caused_taken: Vec> = vec![None; events.len()]; + let mut drop = vec![false; events.len()]; + let mut hits = Vec::new(); + let mut kept = Vec::with_capacity(events.len()); + for (i, event) in events.into_iter().enumerate() { + match &event { + Event::Key { pressed: true, repeat, .. } => { + let key = key_input(&event, platform, input); + if self.layout.resolve(&key).is_some() { + let press = Press { input: &key, repeat: *repeat, now, active: &Active::NONE, outer: &[] }; + let hit = self.matcher.press(&self.layout, keymap, &press).filter(&mut accept); + if let Some((j, _)) = causes[i] { + caused_taken[j] = Some(hit.is_some()); + } + if let Some(hit) = hit { + hits.push(hit); + if let Some(j) = text_of[i].filter(|_| !(key.mods.cmd || key.mods.ctrl)) { + drop[j] = true; + } + continue; + } + } + } + // Desktop clipboard events, and web ones whose press ran nothing. + Event::Copy | Event::Cut | Event::Paste(_) => match caused_taken[i] { + Some(true) => continue, + Some(false) => {} + None => { + let (key, held) = clipboard_chord(&event, frame_mods); + let press = Press { input: &KeyInput::new(held).with_typed(key), repeat: false, now, active: &Active::NONE, outer: &[] }; + if let Some(hit) = self.matcher.press(&self.layout, keymap, &press).filter(&mut accept) { + hits.push(hit); + continue; + } + } + }, + _ => {} + } + kept.push((i, event)); + } + input.events = kept.into_iter().filter(|(i, _)| !drop[*i]).map(|(_, e)| e).collect(); + hits + } + + /// Teaches the layout what this frame's presses typed. + fn learn(&mut self, events: &[Event], text_of: &[Option], platform: Platform) { + for (event, text) in events.iter().zip(text_of) { + match event { + Event::Key { physical_key: Some(EguiKey::AltRight), pressed, .. } => self.right_alt = *pressed, + Event::WindowFocused(false) => self.right_alt = false, + _ => {} + } + if self.right_alt { + continue; + } + let Some(Event::Text(text)) = text.and_then(|j| events.get(j)) else { continue }; + if let Some(KeyInput { mods, physical: Some(physical), .. }) = KeyInput::from_egui(event, platform) { + self.layout.observe(physical, mods, text); + } + } + } +} + +/// A press as [`KeyInput::from_egui`] reads it, with the Latin layout's character `input` reports +/// for its key. +fn key_input(event: &Event, platform: Platform, input: &InputState) -> KeyInput { + let mut key = KeyInput::from_egui(event, platform).unwrap_or(KeyInput::new(Mods::NONE)); + if let Event::Key { physical_key: Some(physical), .. } = event { + key.latin = input.latin_layout_char(*physical); + } + key +} + +/// A clipboard event's kind. +#[derive(Clone, Copy)] +enum Clip { + Copy, + Cut, + Paste, +} + +fn event_clip(event: &Event) -> Option { + match event { + Event::Copy => Some(Clip::Copy), + Event::Cut => Some(Clip::Cut), + Event::Paste(_) => Some(Clip::Paste), + _ => None, + } +} + +/// The clipboard event a backend sends for a press, if any. +fn clipboard_kind(key: Key, held: Mods) -> Option { + match key { + Key::C if held.cmd => Some(Clip::Copy), + Key::X if held.cmd => Some(Clip::Cut), + Key::V if held.cmd => Some(Clip::Paste), + Key::Delete if held.shift => Some(Clip::Cut), + Key::Insert if held.shift => Some(Clip::Paste), + Key::Insert if held.cmd || held.ctrl => Some(Clip::Copy), + _ => None, + } +} + +/// For each clipboard key press whose clipboard event comes later in the frame, as the web build +/// sends them: the index of that event, and the text of a Paste event. +fn clipboard_event_follows(events: &[Event], layout: &Layout, platform: Platform, input: &InputState) -> Vec)>> { + let mut out = vec![None; events.len()]; + let mut ahead: [Option; 3] = [None; 3]; + for (i, event) in events.iter().enumerate().rev() { + if let Some(seen) = event_clip(event).and_then(|c| ahead.get_mut(c as usize)) { + *seen = Some(i); + } else if let Event::Key { pressed: true, .. } = event { + let chord = layout.resolve(&key_input(event, platform, input)); + let clip = chord.and_then(|c| clipboard_kind(c.key, c.mods)); + if let Some(j) = clip.and_then(|c| ahead.get_mut(c as usize)).and_then(Option::take) { + let text = if let Some(Event::Paste(text)) = events.get(j) { Some(text.clone()) } else { None }; + out[i] = Some((j, text)); + } + } + } + out +} + +/// For each key press, the index of the Text event it typed. egui-winit, and eframe's web text +/// agent while a text field has focus, send the Text after the press, before the next one. +/// With `text_first`, eframe's web build with no text field focused, the Text comes right before +/// its press, and only for a press without Ctrl or Cmd. +fn text_of_press(events: &[Event], text_first: bool) -> Vec> { + let is_text = |e: Option<&Event>| matches!(e, Some(Event::Text(t)) if !t.is_empty()); + let mut out = vec![None; events.len()]; + if text_first { + for (i, event) in events.iter().enumerate().skip(1) { + if let Event::Key { pressed: true, modifiers, .. } = event + && !(modifiers.ctrl || modifiers.command || modifiers.mac_cmd) + && is_text(events.get(i - 1)) + { + out[i] = Some(i - 1); + } + } + return out; + } + let mut text_ahead = None; + for (i, event) in events.iter().enumerate().rev() { + match event { + Event::Key { pressed: true, .. } => out[i] = text_ahead.take(), + _ if is_text(Some(event)) => text_ahead = Some(i), + _ => {} + } + } + out +} + +/// The press a clipboard event stands for, with the modifiers held. Off macOS egui-winit also +/// sends Cut for Shift+Delete and Paste for Shift+Insert. +fn clipboard_chord(event: &Event, held: Mods) -> (Key, Mods) { + let with_cmd = Mods { cmd: true, ..held }; + let shift_only = held.shift && !held.cmd; + match event { + Event::Cut if shift_only => (Key::Delete, held), + Event::Cut => (Key::X, with_cmd), + Event::Paste(_) if shift_only => (Key::Insert, held), + Event::Paste(_) => (Key::V, with_cmd), + _ => (Key::C, with_cmd), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use craft_keymap::{Binding, CommandDef, Scope, Scopes}; + + fn keymap() -> Keymap { + let def = |id: &'static str, binding: &str| CommandDef::new(id, id, Scope::app()).with_default(Binding::parse(binding).unwrap()); + Keymap::new(vec![def("tool.marquee", "M"), def("edit.copy", "Ctrl+C")], Scopes::new(), Platform::Windows) + } + + fn press(key: EguiKey, modifiers: egui::Modifiers) -> Event { + Event::Key { key, physical_key: Some(key), pressed: true, repeat: false, modifiers } + } + + /// A press that runs a command leaves egui's input with the text it typed; the others stay, in order. + #[test] + fn a_bound_press_and_its_text_leave_the_input() { + let mut input = InputState::default(); + input.events = vec![press(EguiKey::M, egui::Modifiers::NONE), Event::Text("m".into()), press(EguiKey::Q, egui::Modifiers::NONE), Event::Text("q".into())]; + let hits = Dispatcher::default().dispatch_filtered(&mut input, &keymap(), |_| true); + assert_eq!(hits.iter().map(|hit| hit.command.id.as_str()).collect::>(), ["tool.marquee"]); + assert_eq!(input.events, [press(EguiKey::Q, egui::Modifiers::NONE), Event::Text("q".into())]); + } + + /// The desktop's Copy event runs the copy command; declined, it stays for egui. + #[test] + fn a_clipboard_event_runs_its_chord_unless_declined() { + let mut input = InputState::default(); + input.events = vec![Event::Copy]; + let hits = Dispatcher::default().dispatch_filtered(&mut input, &keymap(), |_| true); + assert_eq!(hits.iter().map(|hit| hit.command.id.as_str()).collect::>(), ["edit.copy"]); + assert!(input.events.is_empty()); + + input.events = vec![Event::Copy]; + assert!(Dispatcher::default().dispatch_filtered(&mut input, &keymap(), |_| false).is_empty()); + assert_eq!(input.events, [Event::Copy]); + } +} diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index d2ab9114..6150efdb 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -292,9 +292,19 @@ pub fn font_definitions() -> egui::FontDefinitions { fonts } +/// Gives the context `fonts` through the framework runtime, which keeps its layout memory in step with them. The +/// framework's chrome (the dock, the update dialogs) also draws in the signature and semibold families; both take the +/// proportional faces, as MaterialCraft has no bold face. A family left out draws missing-glyph boxes. +pub fn load_fonts(ctx: &egui::Context, mut fonts: egui::FontDefinitions) { + let proportional = fonts.families.get(&FontFamily::Proportional).cloned().unwrap_or_default(); + fonts.families.insert(craft_ui::fonts::FontRef::signature().family(), proportional.clone()); + fonts.families.insert(FontFamily::Name(craft_ui::fonts::SEMIBOLD.into()), proportional); + craft_ui::fonts::load(ctx, fonts); +} + /// Install the fonts (once, at startup; the app applies the style from its settings). pub fn install(ctx: &egui::Context) { - ctx.set_fonts(font_definitions()); + load_fonts(ctx, font_definitions()); } /// Apply brightness `b` and `accent`: store the tokens for [`Tokens::get`] and style egui with @@ -334,8 +344,14 @@ pub fn apply(ctx: &egui::Context, b: Brightness, accent: Accent) { v.selection.stroke = Stroke::new(1.0, t.accent); v.hyperlink_color = t.accent; let w = &mut v.widgets; - craft_ui::theme::WidgetPalette { noninteractive: t.panel, inactive: t.button, hovered: t.row_hover, active: t.tool_active, open: t.row_hover } - .apply_to(w, t.cr(), Stroke::new(1.0, t.text)); + for (widget, fill) in + [(&mut w.noninteractive, t.panel), (&mut w.inactive, t.button), (&mut w.hovered, t.row_hover), (&mut w.active, t.tool_active), (&mut w.open, t.row_hover)] + { + widget.bg_fill = fill; + widget.weak_bg_fill = fill; + widget.corner_radius = t.cr(); + widget.fg_stroke = Stroke::new(1.0, t.text); + } // Hovered and pressed lettering, and `RichText::strong` (captions), in the strong colour. w.hovered.fg_stroke.color = t.text_strong; w.active.fg_stroke.color = t.text_strong; diff --git a/crates/ui-egui/src/unsaved.rs b/crates/ui-egui/src/unsaved.rs index c743e842..dd3812a9 100644 --- a/crates/ui-egui/src/unsaved.rs +++ b/crates/ui-egui/src/unsaved.rs @@ -118,22 +118,25 @@ fn perform(app: &mut MaterialCraftApp, action: Guarded) { } } -/// Per frame: hold back a window close while there is unsaved work, and finish a confirmed quit -pub fn handle_close(app: &mut MaterialCraftApp, ctx: &Context) { - if ctx.input(|i| i.viewport().close_requested()) && !app.quit_confirmed { - // Focused text is still a draft when the OS asks to close the window - crate::properties::GraphPropertyDraft::commit(app); - // While the Save dialog of a held action is open, the close waits for its answer - if app.awaiting_save.is_some() || holds_close(needs_confirmation(&app.session), app.quit_confirmed) { - ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose); - // The prompt is drawn only while the window is visible - if ctx.input(|i| i.viewport().minimized) == Some(true) { - ctx.send_viewport_cmd(egui::ViewportCommand::Minimized(false)); - ctx.send_viewport_cmd(egui::ViewportCommand::Focus); - } - guard(app, Guarded::Quit); - } +/// The root window was asked to close: whether unsaved work holds it open. Holding asks Save / Discard / Cancel for +/// the modified packages, and the runtime keeps the window open and brings it forward while the question is up. +/// Runs in the framework's close path ([`MaterialCraftApp::close_path`]). +pub fn close_requested(app: &mut MaterialCraftApp) -> bool { + if app.quit_confirmed { + return false; } + // Focused text is still a draft when the OS asks to close the window + crate::properties::GraphPropertyDraft::commit(app); + // While the Save dialog of a held action is open, the close waits for its answer + let holds = app.awaiting_save.is_some() || holds_close(needs_confirmation(&app.session), app.quit_confirmed); + if holds { + guard(app, Guarded::Quit); + } + holds +} + +/// Per frame: close the window once a quit is confirmed +pub fn finish_quit(app: &MaterialCraftApp, ctx: &Context) { if app.quit_confirmed { ctx.send_viewport_cmd(egui::ViewportCommand::Close); } @@ -174,7 +177,7 @@ pub fn show(app: &mut MaterialCraftApp, ctx: &Context) { } }); }); - if choice.is_none() && ctx.input(|i| i.key_pressed(egui::Key::Escape)) { + if choice.is_none() && crate::framework::escape_pressed(ctx) { choice = Some(Choice::Cancel); } let Some(choice) = choice else { return }; diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index f26e5468..d450a0be 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -1,8 +1,10 @@ //! Software updates on the desktop: the background check at startup, Help > Check for updates and -//! the prompts that report them +//! the prompts that report them, as craft-update's dialogs on the app's +//! [`DialogHost`](craft_ui::dialog::DialogHost) +use craft_ui::dialog::DialogResult; +use craft_update::stack_dialogs::{CheckChoice, UpdateCheckDialog}; use craft_update::updater::{Action, Status, Updater}; -use craft_update::{CheckResultDialog, CheckResultResponse}; use crate::MaterialCraftApp; @@ -58,9 +60,9 @@ pub(crate) fn tick(app: &mut MaterialCraftApp, ctx: &egui::Context) { let rt = &mut app.updates_rt; rt.repaint = Some(ctx.clone()); if std::mem::take(&mut rt.check_requested) { - rt.updater.check_now(ctx); + rt.updater.check_now(); } else if rt.startup_check { - rt.updater.check_at_start(ctx); + rt.updater.check_at_start(); } rt.updater.tick(ctx); } @@ -72,25 +74,44 @@ fn result_window_shows(status: &Status, prompt_open: bool) -> bool { !prompt_open && !matches!(status, Status::Idle) } +/// One pass of the update flow, before the dialog host runs: answers the result dialog closed in +/// the last pass, drives the startup prompt, and keeps the result dialog open and current while the +/// updater has something to report pub(crate) fn show(app: &mut MaterialCraftApp, ctx: &egui::Context) { // An installation, and the close for a ready update, wait until nothing is unsaved let clean = !crate::unsaved::needs_confirmation(&app.session); - match app.updates_rt.updater.show_if(ctx, clean) { + // Answered before the dialog is kept open below, so a dismissed outcome does not open again at once + match app.framework_dialogs.take::() { + Some(DialogResult::Ok(CheckChoice::CheckNow | CheckChoice::CheckAgain)) => app.updates_rt.check_requested = true, + // The next `run` asks the window to close once nothing is unsaved + Some(DialogResult::Ok(CheckChoice::RestartToUpdate)) => app.updates_rt.updater.restart_to_update(), + Some(DialogResult::Ok(CheckChoice::Update)) => { + app.updates_rt.updater.request_install(clean); + } + Some(DialogResult::Ok(CheckChoice::Download)) => ctx.open_url(egui::OpenUrl::new_tab(crate::UPDATE_APP.releases_url())), + // Closing the dialog dismisses the outcome it showed + Some(_) => app.updates_rt.updater.dismiss_status(), + None => {} + } + match app.updates_rt.updater.run(&mut app.framework_dialogs, clean) { Action::OpenUrl(url) => ctx.open_url(egui::OpenUrl::new_tab(url)), Action::Close => ctx.send_viewport_cmd(egui::ViewportCommand::Close), - Action::None => {} + _ => {} } // A found update opens the startup prompt and leaves the status idle, which ends the result dialog - let rt = &mut app.updates_rt; - if result_window_shows(rt.updater.status(), rt.updater.prompt_open()) { - match CheckResultDialog::new(&crate::UPDATE_APP, materialcraft_engine::VERSION).with_translator(translate).show(ctx, rt.updater.status()) { - CheckResultResponse::None => {} - // Closing the dialog dismisses the outcome it showed - CheckResultResponse::Close => rt.updater.dismiss_status(), - CheckResultResponse::CheckAgain => rt.check_requested = true, - // The next `show_if` asks the window to close once nothing is unsaved - CheckResultResponse::RestartToUpdate => rt.updater.restart_to_update(), - } + let updater = &app.updates_rt.updater; + let shows = result_window_shows(updater.status(), updater.prompt_open()); + let (status, installing, message) = (updater.status().clone(), updater.is_installing(), updater.status_message()); + let dialogs = &mut app.framework_dialogs; + if shows && !dialogs.is_open::() { + dialogs.open(UpdateCheckDialog::new(materialcraft_engine::VERSION)); + } else if !shows && dialogs.is_open::() { + dialogs.cancel::(ctx); + } + if let Some(dialog) = dialogs.get_mut::() { + dialog.set_status(status); + dialog.set_installing(installing); + dialog.set_message(message); } } diff --git a/crates/ui-egui/src/updates_ui.test.rs b/crates/ui-egui/src/updates_ui.test.rs index 36442b40..887f0f5c 100644 --- a/crates/ui-egui/src/updates_ui.test.rs +++ b/crates/ui-egui/src/updates_ui.test.rs @@ -111,6 +111,7 @@ fn frame(app: &mut MaterialCraftApp, ctx: &egui::Context) { fn the_menu_command_starts_a_check_on_the_next_frame() { let (mut app, checks, _) = app_with_source(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); frame(&mut app, &ctx); menus::invoke(&mut app, &ctx, COMMAND); assert!(app.updates_rt.check_requested); @@ -167,7 +168,13 @@ fn an_offered_release_opens_the_prompt_over_the_window() { assert!(blocks_input(&app)); - let mut harness = egui_kittest::Harness::builder().build_ui_state(|ui, app: &mut MaterialCraftApp| crate::windows::show(app, ui.ctx()), app); + let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_ui_state( + |ui, app: &mut MaterialCraftApp| { + crate::windows::show(app, ui.ctx()); + app.framework_dialogs.run(ui); + }, + app, + ); harness.run_steps(3); @@ -191,7 +198,13 @@ fn a_requested_check_shows_its_progress() { check(&mut app); tick(&mut app, &egui::Context::default()); - let mut harness = egui_kittest::Harness::builder().build_ui_state(|ui, app: &mut MaterialCraftApp| crate::windows::show(app, ui.ctx()), app); + let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_ui_state( + |ui, app: &mut MaterialCraftApp| { + crate::windows::show(app, ui.ctx()); + app.framework_dialogs.run(ui); + }, + app, + ); harness.run_steps(3); let _ = harness.get_by_label("Checking for updates…"); drop(release); diff --git a/crates/ui-egui/src/view3d/navigation.rs b/crates/ui-egui/src/view3d/navigation.rs index ad0b0bc1..bf142cc6 100644 --- a/crates/ui-egui/src/view3d/navigation.rs +++ b/crates/ui-egui/src/view3d/navigation.rs @@ -156,7 +156,7 @@ fn keys(app: &mut MaterialCraftApp, ui: &Ui, response: &Response) { if pressed(Modifiers::NONE, Key::L) { app.view3d.tool = Tool::Light; } - if pressed(Modifiers::NONE, Key::Escape) { + if ui.input(|input| input.modifiers.is_none()) && crate::framework::escape_pressed(ui.ctx()) { app.view3d.selected = false; } } diff --git a/crates/ui-egui/src/web_files/package_save.rs b/crates/ui-egui/src/web_files/package_save.rs index 72afe680..ae6eddb8 100644 --- a/crates/ui-egui/src/web_files/package_save.rs +++ b/crates/ui-egui/src/web_files/package_save.rs @@ -65,7 +65,7 @@ impl PackageSave { }); }); app.ui.windows.package_save = Some(request); - let dismissed = !open || cancel || ctx.input(|input| input.key_pressed(egui::Key::Escape)); + let dismissed = !open || cancel || crate::framework::escape_pressed(ctx); if accept || dismissed { Self::finish(app, accept && !dismissed, download); } diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs index f57d83d7..a435544e 100644 --- a/crates/ui-egui/src/widgets.rs +++ b/crates/ui-egui/src/widgets.rs @@ -1,7 +1,6 @@ //! Compact widgets matching the app's look: labelled slim sliders, icon buttons, section //! headers, channel toggle chips and color swatches. -use craft_ui::buttons::{ButtonVisuals, IconButton, IconButtonStyle}; use egui::{Color32, CornerRadius, Response, RichText, Sense, Stroke, Ui, vec2}; use crate::theme::Tokens; @@ -179,24 +178,33 @@ pub fn elided(painter: &egui::Painter, text: impl Into, size: f32, color } /// A square icon button (Phosphor glyph) in a rounded tool well: `selected` sits in the accent -/// tinted well (the shared Craft icon button, `craft_ui::buttons`). +/// tinted well, a hovered one in the row-hover well and a pressed one in the tool well; keyboard +/// focus draws an inset accent outline. `tooltip` is its accessible name and tooltip. A +/// non-finite, non-positive or oversized (over 4096 points) size gives an inert zero-size response. pub fn icon_button(ui: &mut Ui, icon: &str, tooltip: &str, selected: bool, size: f32) -> Response { let tk = Tokens::get(ui.ctx()); - let well = |fill, icon| ButtonVisuals { fill, stroke: Stroke::NONE, icon }; - let style = IconButtonStyle { - normal: well(Color32::TRANSPARENT, tk.text), - hovered: well(tk.row_hover, tk.text_strong), - pressed: Some(well(tk.tool_active, tk.text_strong)), - selected: well(tk.tool_active, tk.text_strong), - corner_radius: CornerRadius::same(6), - focus_stroke: Stroke::new(1.0, tk.accent), + let valid = size.is_finite() && size > 0.0 && size <= 4096.0; + let (rect, response) = ui.allocate_exact_size(if valid { vec2(size, size) } else { egui::Vec2::ZERO }, if valid { Sense::click() } else { Sense::hover() }); + response.widget_info(|| egui::WidgetInfo::selected(egui::Role::Button, valid && ui.is_enabled(), selected, tooltip)); + if !valid { + return response; + } + let (fill, color) = if selected || response.is_pointer_button_down_on() { + (tk.tool_active, tk.text_strong) + } else if response.hovered() { + (tk.row_hover, tk.text_strong) + } else { + (Color32::TRANSPARENT, tk.text) }; - IconButton::new(tooltip, vec2(size, size), &style) - .selected(selected) - .show(ui, |ui, rect, color| { - ui.painter().text(rect.center(), egui::Align2::CENTER_CENTER, icon, egui::FontId::proportional(size * 0.62), color); - }) - .on_hover_text(tooltip) + let radius = CornerRadius::same(6); + if fill != Color32::TRANSPARENT { + ui.painter().rect_filled(rect, radius, fill); + } + ui.painter().text(rect.center(), egui::Align2::CENTER_CENTER, icon, egui::FontId::proportional(size * 0.62), color); + if response.has_focus() && rect.width() > 4.0 && rect.height() > 4.0 { + ui.painter().rect_stroke(rect.shrink(2.0), radius, Stroke::new(1.0, tk.accent), egui::StrokeKind::Inside); + } + response.on_hover_text(tooltip) } /// A flat button filled with the accent, white lettering (a dialog's main action). diff --git a/crates/ui-egui/src/window_controls.rs b/crates/ui-egui/src/window_controls.rs index cb0bd4ae..f69141a9 100644 --- a/crates/ui-egui/src/window_controls.rs +++ b/crates/ui-egui/src/window_controls.rs @@ -1,34 +1,20 @@ -//! The menu bar as the title bar, where the desktop leaves the window frame to the app (GNOME on Wayland) +//! The window's own frame where the desktop leaves it to the app (GNOME on Wayland): which frame the runtime has, and +//! the resize zones along the window's edges. The menu bar is the title bar there (`menus::menu_bar`). -use craft_window::Button; +use craft_ui::runtime::windows::WindowHost; +use craft_window::policy::Frame; use egui::viewport::ResizeDirection; -use egui::{Context, CursorIcon, Id, LayerId, Order, PointerButton, Rect, Sense, Ui, ViewportCommand, pos2, vec2}; -use egui_phosphor::regular as icon; +use egui::{CursorIcon, Id, LayerId, Order, PointerButton, Rect, Sense, Ui, ViewportCommand, pos2, vec2}; -use crate::i18n::tr; - -fn label(button: Button) -> &'static str { - match button { - Button::Minimize => "Minimize", - Button::Maximize => "Maximize", - Button::Close => "Close", - } +/// Whether the app's menu bar is the window's title bar: the frame the runtime has for the window is the app's. +pub(crate) fn app_bar_is_title_bar(ctx: &egui::Context) -> bool { + !matches!(WindowHost::of(ctx).frame(), Frame::Native) } -fn glyph(button: Button) -> &'static str { - match button { - Button::Minimize => icon::MINUS, - Button::Maximize => icon::SQUARE, - Button::Close => icon::X, - } -} - -fn command(button: Button, maximized: bool) -> ViewportCommand { - match button { - Button::Minimize => ViewportCommand::Minimized(true), - Button::Maximize => ViewportCommand::Maximized(!maximized), - Button::Close => ViewportCommand::Close, - } +/// Whether the window has no frame of the system's, so the app gives it its resize edges (macOS keeps its own edges +/// under an inset title bar). +pub(crate) fn app_draws_frame(ctx: &egui::Context) -> bool { + matches!(WindowHost::of(ctx).frame(), Frame::Integrated(_)) } const EDGE: f32 = 5.0; @@ -70,18 +56,6 @@ pub(crate) fn resize_zones(ui: &mut Ui) { } } -/// Draw `buttons` in the given left-to-right order -pub(crate) fn buttons(ui: &mut Ui, ctx: &Context, buttons: &[Button]) { - for &button in buttons { - let response = crate::widgets::icon_button(ui, glyph(button), tr(label(button)), false, 18.0); - crate::widgets::name(&response, egui::Role::Button, label(button)); - if response.clicked() { - let maximized = ctx.input(|input| input.viewport().maximized).unwrap_or(false); - ctx.send_viewport_cmd(command(button, maximized)); - } - } -} - #[cfg(test)] #[path = "window_controls.test.rs"] mod tests; diff --git a/crates/ui-egui/src/window_controls.test.rs b/crates/ui-egui/src/window_controls.test.rs index e73504eb..3bf05a57 100644 --- a/crates/ui-egui/src/window_controls.test.rs +++ b/crates/ui-egui/src/window_controls.test.rs @@ -1,13 +1,5 @@ use super::*; -#[test] -fn each_button_sends_its_viewport_command() { - assert_eq!(command(Button::Minimize, false), ViewportCommand::Minimized(true)); - assert_eq!(command(Button::Maximize, false), ViewportCommand::Maximized(true)); - assert_eq!(command(Button::Maximize, true), ViewportCommand::Maximized(false)); - assert_eq!(command(Button::Close, false), ViewportCommand::Close); -} - fn commands_after_press_at(pos: egui::Pos2) -> Vec { let ctx = egui::Context::default(); let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(800.0, 600.0)); @@ -43,12 +35,22 @@ fn a_press_inside_the_window_does_not_resize() { assert!(!commands.iter().any(|command| matches!(command, ViewportCommand::BeginResize(_))), "{commands:?}"); } +/// The frame decision of a window whose bar the app draws, with the caption buttons of `layout`. +fn app_frame(layout: craft_window::Layout) -> craft_window::policy::Decision { + use craft_window::policy::{CaptionFamily, Captions, Decision}; + let desktop = craft_window::desktop::Desktop { kind: craft_window::desktop::DesktopKind::Other, ssd: Some(false), gtk_theme: None, icon_theme: None }; + Decision { frame: Frame::Integrated(Captions { family: CaptionFamily::Generic, layout }), overridden: Some(true), desktop } +} + #[test] fn the_menu_bar_shows_window_buttons_only_when_the_app_draws_the_frame() { let mut app = crate::MaterialCraftApp::headless(materialcraft_engine::sample_session(), crate::UiState::default()); - let mut labels_drawn = |layout: Option| { - app.window_layout = layout; + let mut labels_drawn = |frame: Option| { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); + if let Some(frame) = frame { + WindowHost::of(&ctx).set_root_frame(frame); + } ctx.enable_accesskit(); let mut output = ctx.run_ui(egui::RawInput::default(), |ui| crate::menus::menu_bar(&mut app, ui)); output.textures_delta.clear(); @@ -59,12 +61,12 @@ fn the_menu_bar_shows_window_buttons_only_when_the_app_draws_the_frame() { let desktop = labels_drawn(None); assert!(!desktop.iter().any(|label| label == "Close"), "{desktop:?}"); - let drawn = labels_drawn(Some(craft_window::Layout::default())); + let drawn = labels_drawn(Some(app_frame(craft_window::Layout::default()))); for button in ["Minimize", "Maximize", "Close"] { assert!(drawn.iter().any(|label| label == button), "{button} in {drawn:?}"); } - let left = labels_drawn(Some(craft_window::Layout { left: vec![Button::Close], right: Vec::new() })); + let left = labels_drawn(Some(app_frame(craft_window::Layout { left: vec![craft_window::Button::Close], right: Vec::new() }))); assert!(left.iter().any(|label| label == "Close"), "{left:?}"); assert!(!left.iter().any(|label| label == "Minimize"), "{left:?}"); } diff --git a/crates/ui-egui/src/windows.test.rs b/crates/ui-egui/src/windows.test.rs index a16a49ae..13469a5b 100644 --- a/crates/ui-egui/src/windows.test.rs +++ b/crates/ui-egui/src/windows.test.rs @@ -8,7 +8,7 @@ mod home_modality_tests { let app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); // The icon font has to be in place for the frame that first draws Home let mut fonts_installed = false; - let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_ui_state( + let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).with_size(egui::vec2(1200.0, 800.0)).build_ui_state( move |ui, app: &mut MaterialCraftApp| { if std::mem::replace(&mut fonts_installed, true) { crate::windows::show(app, ui.ctx()); diff --git a/crates/ui-egui/tests/it/clipboard_shortcuts.rs b/crates/ui-egui/tests/it/clipboard_shortcuts.rs index 1519dad0..e0eff27c 100644 --- a/crates/ui-egui/tests/it/clipboard_shortcuts.rs +++ b/crates/ui-egui/tests/it/clipboard_shortcuts.rs @@ -13,7 +13,7 @@ fn harness(render: bool) -> Harness<'static, MaterialCraftApp> { let levels = app.run("graph.node.add", json!({"def": "levels", "connectFrom": {"node": source}})).unwrap()["id"].as_u64().unwrap(); app.run("graph.select", json!({"ids": [source, levels]})).unwrap(); - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)); let builder = if render { builder.wgpu() } else { builder }; let mut harness = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/dialogs.rs b/crates/ui-egui/tests/it/dialogs.rs index 2957e820..502eea7d 100644 --- a/crates/ui-egui/tests/it/dialogs.rs +++ b/crates/ui-egui/tests/it/dialogs.rs @@ -10,7 +10,7 @@ fn harness(id: &'static str, render: bool) -> Harness<'static, State> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = id == "home"; app.ui.windows.export = id == "export"; - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( move |ui, (app, rect): &mut State| { diff --git a/crates/ui-egui/tests/it/export_window.rs b/crates/ui-egui/tests/it/export_window.rs index 530eb053..858759ee 100644 --- a/crates/ui-egui/tests/it/export_window.rs +++ b/crates/ui-egui/tests/it/export_window.rs @@ -10,7 +10,7 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.dock.close(materialcraft_ui_egui::docking::Panel::Library); - let mut harness = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( + let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/it/graph_properties.rs b/crates/ui-egui/tests/it/graph_properties.rs index 61903aaf..3852174f 100644 --- a/crates/ui-egui/tests/it/graph_properties.rs +++ b/crates/ui-egui/tests/it/graph_properties.rs @@ -25,7 +25,7 @@ fn harness(render: bool) -> Harness<'static, MaterialCraftApp> { } fn app_harness(app: MaterialCraftApp, render: bool) -> Harness<'static, MaterialCraftApp> { - let builder = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut harness = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { @@ -153,7 +153,9 @@ fn close_with_focused_graph_text(native_close: bool) { if native_close { let mut input = egui::RawInput::default(); input.viewports.get_mut(&egui::ViewportId::ROOT).unwrap().events.push(egui::ViewportEvent::Close); - let mut output = egui::Context::default().run_ui(input, |ui| materialcraft_ui_egui::unsaved::handle_close(harness.state_mut(), ui.ctx())); + let ctx = egui::Context::default(); + materialcraft_ui_egui::framework::install_headless(&ctx); + let mut output = ctx.run_ui(input, |ui| harness.state_mut().close_path(ui.ctx())); // This close-event frame has no renderer to consume texture updates output.textures_delta.clear(); diff --git a/crates/ui-egui/tests/it/interface_scale.rs b/crates/ui-egui/tests/it/interface_scale.rs index 90d22e03..1385e329 100644 --- a/crates/ui-egui/tests/it/interface_scale.rs +++ b/crates/ui-egui/tests/it/interface_scale.rs @@ -10,7 +10,7 @@ fn harness(scale: f32, render: bool) -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::new_session(), UiState::default()); app.ui.windows.preferences = true; app.ui.prefs.ui_scale = scale; - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/menu_bar.rs b/crates/ui-egui/tests/it/menu_bar.rs index 51dcd57a..aa71a814 100644 --- a/crates/ui-egui/tests/it/menu_bar.rs +++ b/crates/ui-egui/tests/it/menu_bar.rs @@ -9,7 +9,7 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState, menus}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = false; - let mut harness = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( + let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/it/new_graph_dialog.rs b/crates/ui-egui/tests/it/new_graph_dialog.rs index 0d2a3a66..55c6559b 100644 --- a/crates/ui-egui/tests/it/new_graph_dialog.rs +++ b/crates/ui-egui/tests/it/new_graph_dialog.rs @@ -9,7 +9,7 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState, menus}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = false; - let mut harness = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( + let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/it/node_look.rs b/crates/ui-egui/tests/it/node_look.rs index 2dab4a67..ead588a4 100644 --- a/crates/ui-egui/tests/it/node_look.rs +++ b/crates/ui-egui/tests/it/node_look.rs @@ -9,7 +9,7 @@ use serde_json::json; fn harness(app: MaterialCraftApp) -> Harness<'static, MaterialCraftApp> { // Short steps keep two clicks within the double-click delay - let mut harness = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).with_step_dt(0.05).build_ui_state( + let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).with_step_dt(0.05).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/it/normal_maps.rs b/crates/ui-egui/tests/it/normal_maps.rs index 59d6cdf3..1e9d2987 100644 --- a/crates/ui-egui/tests/it/normal_maps.rs +++ b/crates/ui-egui/tests/it/normal_maps.rs @@ -51,7 +51,7 @@ fn toggle(h: &mut Harness<'static, MaterialCraftApp>) { #[test] fn display_toggle_updates_the_session_and_rerenders_the_normal_map() { - let mut h = Harness::builder().with_size(vec2(1400.0, 860.0)).build_ui_state( + let mut h = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1400.0, 860.0)).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); @@ -78,7 +78,7 @@ fn display_toggle_updates_the_session_and_rerenders_the_normal_map() { #[test] #[ignore = "requires an offscreen GPU; run explicitly with --ignored"] fn normal_convention_snapshot() { - let mut harness = Harness::builder().with_size(vec2(1400.0, 860.0)).wgpu().build_ui_state( + let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1400.0, 860.0)).wgpu().build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/it/numeric_input.rs b/crates/ui-egui/tests/it/numeric_input.rs index fcc7db08..da015e7f 100644 --- a/crates/ui-egui/tests/it/numeric_input.rs +++ b/crates/ui-egui/tests/it/numeric_input.rs @@ -13,7 +13,7 @@ fn harness(render: bool) -> (Harness<'static, MaterialCraftApp>, NodeId) { app.run("file.new", json!({"template":"empty"})).unwrap(); let id = NodeId(app.run("graph.node.add", json!({"def":"transformation"})).unwrap()["id"].as_u64().unwrap()); app.session.reset_history(); - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { @@ -51,7 +51,7 @@ fn graph_name_typed_across_frames_commits_on_focus_loss() { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.run("file.new", json!({"template":"empty"})).unwrap(); app.session.reset_history(); - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); diff --git a/crates/ui-egui/tests/it/preferences_window.rs b/crates/ui-egui/tests/it/preferences_window.rs index 96362811..3aadc7d7 100644 --- a/crates/ui-egui/tests/it/preferences_window.rs +++ b/crates/ui-egui/tests/it/preferences_window.rs @@ -10,7 +10,7 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = false; - let mut harness = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( + let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/it/preview_resolution.rs b/crates/ui-egui/tests/it/preview_resolution.rs index 2513acab..1fa2a201 100644 --- a/crates/ui-egui/tests/it/preview_resolution.rs +++ b/crates/ui-egui/tests/it/preview_resolution.rs @@ -12,7 +12,7 @@ fn harness(preview: u32, render: bool) -> (Harness<'static, MaterialCraftApp>, N let id = NodeId(app.run("graph.node.add", json!({"def":"uniform"})).unwrap()["id"].as_u64().unwrap()); app.apply_prefs(); app.session.cook(); - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/search.rs b/crates/ui-egui/tests/it/search.rs index a4fd4cd2..24fb4621 100644 --- a/crates/ui-egui/tests/it/search.rs +++ b/crates/ui-egui/tests/it/search.rs @@ -6,7 +6,7 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; fn harness() -> Harness<'static, MaterialCraftApp> { let app = MaterialCraftApp::headless(materialcraft_engine::new_session(), UiState::default()); - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let builder = if std::env::var_os("MC_SNAPSHOT_DIR").is_some() { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/slider_round_values.rs b/crates/ui-egui/tests/it/slider_round_values.rs index deb0af40..64c28c22 100644 --- a/crates/ui-egui/tests/it/slider_round_values.rs +++ b/crates/ui-egui/tests/it/slider_round_values.rs @@ -18,7 +18,7 @@ fn harness(ppp: f32, render: bool, definition: &str) -> (Harness<'static, Materi let mut app = MaterialCraftApp::headless(materialcraft_engine::new_session(), UiState::default()); let id = NodeId(app.run("graph.node.add", json!({"def":definition})).unwrap()["id"].as_u64().unwrap()); app.session.reset_history(); - let builder = Harness::builder().with_size(vec2(1600.0, 960.0)).with_pixels_per_point(ppp).with_step_dt(1.0 / 60.0); + let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(ppp).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { @@ -85,7 +85,7 @@ fn fractional_parameter_values_remain_reachable() { #[test] fn bar_slider_drag_reaches_exact_round_values() { - let mut h = Harness::builder().with_size(vec2(800.0, 400.0)).with_pixels_per_point(1.0).build_ui_state( + let mut h = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(800.0, 400.0)).with_pixels_per_point(1.0).build_ui_state( |ui, value: &mut f32| { widgets::bar_slider(ui, "Brightness", value, 0.0..=1.0, 128.0); }, @@ -112,7 +112,7 @@ fn bar_slider_drag_reaches_exact_round_values() { #[test] fn bar_slider_drag_preserves_fractional_values() { - let mut h = Harness::builder().with_size(vec2(800.0, 400.0)).with_pixels_per_point(1.0).build_ui_state( + let mut h = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(800.0, 400.0)).with_pixels_per_point(1.0).build_ui_state( |ui, value: &mut f32| { widgets::bar_slider(ui, "Brightness", value, 0.0..=1.0, 128.0); }, diff --git a/crates/ui-egui/tests/it/unsaved_changes.rs b/crates/ui-egui/tests/it/unsaved_changes.rs index b2d1d00c..a4336ac6 100644 --- a/crates/ui-egui/tests/it/unsaved_changes.rs +++ b/crates/ui-egui/tests/it/unsaved_changes.rs @@ -11,7 +11,7 @@ fn unsaved_dialog_snapshot_and_cancel() { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.session.modified = true; unsaved::guard(&mut app, Guarded::Menu { id: "ui.closeAll".into() }); - let mut h = Harness::builder().with_size(vec2(1600.0, 960.0)).wgpu().build_ui_state( + let mut h = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).wgpu().build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/resize.rs b/crates/ui-egui/tests/resize.rs index 3efbc5c4..1ade2a5b 100644 --- a/crates/ui-egui/tests/resize.rs +++ b/crates/ui-egui/tests/resize.rs @@ -14,7 +14,7 @@ fn harness(w: f32, h: f32) -> Harness<'static, MaterialCraftApp> { app.session.view3d.override_resolution = true; app.session.view3d.viewport_resolution = true; app.session.view3d.render_scale = 25; - Harness::builder().with_size(vec2(w, h)).with_pixels_per_point(1.0).build_ui_state( + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(w, h)).with_pixels_per_point(1.0).build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); diff --git a/crates/ui-egui/tests/snapshot.rs b/crates/ui-egui/tests/snapshot.rs index 85bc50b1..404ef2ed 100644 --- a/crates/ui-egui/tests/snapshot.rs +++ b/crates/ui-egui/tests/snapshot.rs @@ -54,7 +54,7 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; use serde_json::json; fn harness(app: MaterialCraftApp, w: f32, h: f32) -> Harness<'static, MaterialCraftApp> { - Harness::builder().with_size(vec2(w, h)).with_pixels_per_point(1.0).wgpu().build_ui_state( + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(w, h)).with_pixels_per_point(1.0).wgpu().build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); app.draw(ui); From ffbb1b3c5633ace929c3cf159c4d4c867f2a3e79 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 01:39:31 +0000 Subject: [PATCH 04/24] Disk cache recognizes craft-atomic's staging names that keep the file extension; update prompt test reads next's dialog words --- crates/ui-egui/src/preview_disk_cache.rs | 5 ++++- crates/ui-egui/src/updates_ui.test.rs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/preview_disk_cache.rs b/crates/ui-egui/src/preview_disk_cache.rs index e0830aa8..f6a8eeea 100644 --- a/crates/ui-egui/src/preview_disk_cache.rs +++ b/crates/ui-egui/src/preview_disk_cache.rs @@ -238,10 +238,13 @@ fn digest_name(stem: &str) -> bool { stem.len() == 64 && stem.bytes().all(|byte| byte.is_ascii_hexdigit()) } +/// craft-atomic's staging file of a cache file: `.{file}.{pid}-{n}.craft_tmp`, where `file` is the cache file's name or +/// its first part (older craft-atomic cut it to 64 characters). fn staging_name(name: &str) -> bool { - let Some((stem, suffix)) = name.strip_prefix('.').and_then(|name| name.strip_suffix(".craft_tmp")).and_then(|name| name.split_once('.')) else { + let Some((file, suffix)) = name.strip_prefix('.').and_then(|name| name.strip_suffix(".craft_tmp")).and_then(|name| name.rsplit_once('.')) else { return false; }; + let stem = file.split_once('.').map_or(file, |(stem, _)| stem); digest_name(stem) && suffix.split_once('-').is_some_and(|(pid, counter)| pid.parse::().is_ok_and(|pid| pid > 0) && counter.parse::().is_ok()) } diff --git a/crates/ui-egui/src/updates_ui.test.rs b/crates/ui-egui/src/updates_ui.test.rs index 887f0f5c..76b46c22 100644 --- a/crates/ui-egui/src/updates_ui.test.rs +++ b/crates/ui-egui/src/updates_ui.test.rs @@ -178,7 +178,8 @@ fn an_offered_release_opens_the_prompt_over_the_window() { harness.run_steps(3); - let _ = harness.get_by_label("LATER"); + let _ = harness.get_by_label("Update available"); + let _ = harness.get_by_label("Later"); assert!(harness.state().updates_rt.updater.prompt_open()); } From 480b8fe0ad1cf7d009b51c4228a6a30828a20d9c Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 01:56:42 +0000 Subject: [PATCH 05/24] Update prompt test finds the prompt by its Later button; rustfmt the ported files --- crates/ui-egui/src/menus.rs | 8 +++- crates/ui-egui/src/shortcut_dispatch.rs | 3 +- crates/ui-egui/src/theme.rs | 10 +++-- crates/ui-egui/src/updates_ui.test.rs | 1 - crates/ui-egui/src/windows.test.rs | 21 +++++----- crates/ui-egui/tests/it/dialogs.rs | 3 +- crates/ui-egui/tests/it/export_window.rs | 18 +++++---- crates/ui-egui/tests/it/graph_properties.rs | 3 +- crates/ui-egui/tests/it/interface_scale.rs | 6 ++- crates/ui-egui/tests/it/menu_bar.rs | 18 +++++---- crates/ui-egui/tests/it/new_graph_dialog.rs | 18 +++++---- crates/ui-egui/tests/it/node_look.rs | 19 ++++++---- crates/ui-egui/tests/it/normal_maps.rs | 15 ++++---- crates/ui-egui/tests/it/numeric_input.rs | 6 ++- crates/ui-egui/tests/it/preferences_window.rs | 18 +++++---- crates/ui-egui/tests/it/preview_resolution.rs | 3 +- crates/ui-egui/tests/it/search.rs | 3 +- .../ui-egui/tests/it/slider_round_values.rs | 38 ++++++++++++------- crates/ui-egui/tests/snapshot.rs | 19 ++++++---- 19 files changed, 144 insertions(+), 86 deletions(-) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 167a3d96..bf26be19 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -790,7 +790,9 @@ mod tests { let mut app = app(); app.ui.recent.push("recent.sbs".into()); - let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); + let mut harness = egui_kittest::Harness::builder() + .with_context_setup(crate::framework::install_headless) + .build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); harness.run_steps(2); harness.get_by_label("File").click(); harness.run_steps(3); @@ -810,7 +812,9 @@ mod tests { let mut app = app(); app.dialogs.ask(craft_dialogs::FileDialog::open(), crate::native_dialogs::Then::OpenPackage); - let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); + let mut harness = egui_kittest::Harness::builder() + .with_context_setup(crate::framework::install_headless) + .build_ui_state(|ui, app: &mut MaterialCraftApp| menu_bar(app, ui), app); harness.run_steps(2); harness.get_by_label("File").click(); harness.run_steps(3); diff --git a/crates/ui-egui/src/shortcut_dispatch.rs b/crates/ui-egui/src/shortcut_dispatch.rs index ec8dfdfb..0706e4bc 100644 --- a/crates/ui-egui/src/shortcut_dispatch.rs +++ b/crates/ui-egui/src/shortcut_dispatch.rs @@ -227,7 +227,8 @@ mod tests { #[test] fn a_bound_press_and_its_text_leave_the_input() { let mut input = InputState::default(); - input.events = vec![press(EguiKey::M, egui::Modifiers::NONE), Event::Text("m".into()), press(EguiKey::Q, egui::Modifiers::NONE), Event::Text("q".into())]; + input.events = + vec![press(EguiKey::M, egui::Modifiers::NONE), Event::Text("m".into()), press(EguiKey::Q, egui::Modifiers::NONE), Event::Text("q".into())]; let hits = Dispatcher::default().dispatch_filtered(&mut input, &keymap(), |_| true); assert_eq!(hits.iter().map(|hit| hit.command.id.as_str()).collect::>(), ["tool.marquee"]); assert_eq!(input.events, [press(EguiKey::Q, egui::Modifiers::NONE), Event::Text("q".into())]); diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index 6150efdb..468d2653 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -344,9 +344,13 @@ pub fn apply(ctx: &egui::Context, b: Brightness, accent: Accent) { v.selection.stroke = Stroke::new(1.0, t.accent); v.hyperlink_color = t.accent; let w = &mut v.widgets; - for (widget, fill) in - [(&mut w.noninteractive, t.panel), (&mut w.inactive, t.button), (&mut w.hovered, t.row_hover), (&mut w.active, t.tool_active), (&mut w.open, t.row_hover)] - { + for (widget, fill) in [ + (&mut w.noninteractive, t.panel), + (&mut w.inactive, t.button), + (&mut w.hovered, t.row_hover), + (&mut w.active, t.tool_active), + (&mut w.open, t.row_hover), + ] { widget.bg_fill = fill; widget.weak_bg_fill = fill; widget.corner_radius = t.cr(); diff --git a/crates/ui-egui/src/updates_ui.test.rs b/crates/ui-egui/src/updates_ui.test.rs index 76b46c22..0c9b7db4 100644 --- a/crates/ui-egui/src/updates_ui.test.rs +++ b/crates/ui-egui/src/updates_ui.test.rs @@ -178,7 +178,6 @@ fn an_offered_release_opens_the_prompt_over_the_window() { harness.run_steps(3); - let _ = harness.get_by_label("Update available"); let _ = harness.get_by_label("Later"); assert!(harness.state().updates_rt.updater.prompt_open()); } diff --git a/crates/ui-egui/src/windows.test.rs b/crates/ui-egui/src/windows.test.rs index 13469a5b..cd2167d1 100644 --- a/crates/ui-egui/src/windows.test.rs +++ b/crates/ui-egui/src/windows.test.rs @@ -8,16 +8,17 @@ mod home_modality_tests { let app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); // The icon font has to be in place for the frame that first draws Home let mut fonts_installed = false; - let mut harness = egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).with_size(egui::vec2(1200.0, 800.0)).build_ui_state( - move |ui, app: &mut MaterialCraftApp| { - if std::mem::replace(&mut fonts_installed, true) { - crate::windows::show(app, ui.ctx()); - } else { - crate::theme::install(ui.ctx()); - } - }, - app, - ); + let mut harness = + egui_kittest::Harness::builder().with_context_setup(crate::framework::install_headless).with_size(egui::vec2(1200.0, 800.0)).build_ui_state( + move |ui, app: &mut MaterialCraftApp| { + if std::mem::replace(&mut fonts_installed, true) { + crate::windows::show(app, ui.ctx()); + } else { + crate::theme::install(ui.ctx()); + } + }, + app, + ); let app = harness.state_mut(); app.ui.windows.home = true; app.ui.recent.push("recent.sbs".into()); diff --git a/crates/ui-egui/tests/it/dialogs.rs b/crates/ui-egui/tests/it/dialogs.rs index 502eea7d..67bf414d 100644 --- a/crates/ui-egui/tests/it/dialogs.rs +++ b/crates/ui-egui/tests/it/dialogs.rs @@ -10,7 +10,8 @@ fn harness(id: &'static str, render: bool) -> Harness<'static, State> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = id == "home"; app.ui.windows.export = id == "export"; - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0); + let builder = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( move |ui, (app, rect): &mut State| { diff --git a/crates/ui-egui/tests/it/export_window.rs b/crates/ui-egui/tests/it/export_window.rs index 858759ee..9647dcfd 100644 --- a/crates/ui-egui/tests/it/export_window.rs +++ b/crates/ui-egui/tests/it/export_window.rs @@ -10,13 +10,17 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.dock.close(materialcraft_ui_egui::docking::Panel::Library); - let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app, - ); + let mut harness = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(1.0) + .build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app, + ); harness.run_steps(6); harness } diff --git a/crates/ui-egui/tests/it/graph_properties.rs b/crates/ui-egui/tests/it/graph_properties.rs index 3852174f..fa640e32 100644 --- a/crates/ui-egui/tests/it/graph_properties.rs +++ b/crates/ui-egui/tests/it/graph_properties.rs @@ -25,7 +25,8 @@ fn harness(render: bool) -> Harness<'static, MaterialCraftApp> { } fn app_harness(app: MaterialCraftApp, render: bool) -> Harness<'static, MaterialCraftApp> { - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0); + let builder = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut harness = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/interface_scale.rs b/crates/ui-egui/tests/it/interface_scale.rs index 1385e329..b1b68f46 100644 --- a/crates/ui-egui/tests/it/interface_scale.rs +++ b/crates/ui-egui/tests/it/interface_scale.rs @@ -10,7 +10,11 @@ fn harness(scale: f32, render: bool) -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::new_session(), UiState::default()); app.ui.windows.preferences = true; app.ui.prefs.ui_scale = scale; - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).with_step_dt(1.0 / 60.0); + let builder = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(1.0) + .with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/menu_bar.rs b/crates/ui-egui/tests/it/menu_bar.rs index aa71a814..c733785f 100644 --- a/crates/ui-egui/tests/it/menu_bar.rs +++ b/crates/ui-egui/tests/it/menu_bar.rs @@ -9,13 +9,17 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState, menus}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = false; - let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app, - ); + let mut harness = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(1.0) + .build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app, + ); harness.run_steps(6); harness } diff --git a/crates/ui-egui/tests/it/new_graph_dialog.rs b/crates/ui-egui/tests/it/new_graph_dialog.rs index 55c6559b..660a7ccd 100644 --- a/crates/ui-egui/tests/it/new_graph_dialog.rs +++ b/crates/ui-egui/tests/it/new_graph_dialog.rs @@ -9,13 +9,17 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState, menus}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = false; - let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app, - ); + let mut harness = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(1.0) + .build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app, + ); harness.run_steps(6); harness } diff --git a/crates/ui-egui/tests/it/node_look.rs b/crates/ui-egui/tests/it/node_look.rs index ead588a4..b7cad214 100644 --- a/crates/ui-egui/tests/it/node_look.rs +++ b/crates/ui-egui/tests/it/node_look.rs @@ -9,13 +9,18 @@ use serde_json::json; fn harness(app: MaterialCraftApp) -> Harness<'static, MaterialCraftApp> { // Short steps keep two clicks within the double-click delay - let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).with_step_dt(0.05).build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app, - ); + let mut harness = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(1.0) + .with_step_dt(0.05) + .build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app, + ); harness.run_steps(6); harness } diff --git a/crates/ui-egui/tests/it/normal_maps.rs b/crates/ui-egui/tests/it/normal_maps.rs index 1e9d2987..7f48a988 100644 --- a/crates/ui-egui/tests/it/normal_maps.rs +++ b/crates/ui-egui/tests/it/normal_maps.rs @@ -78,13 +78,14 @@ fn display_toggle_updates_the_session_and_rerenders_the_normal_map() { #[test] #[ignore = "requires an offscreen GPU; run explicitly with --ignored"] fn normal_convention_snapshot() { - let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1400.0, 860.0)).wgpu().build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app(), - ); + let mut harness = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1400.0, 860.0)).wgpu().build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app(), + ); settle(&mut harness, 0); let rendered = harness.state().view3d.renders; open_material_properties(&mut harness); diff --git a/crates/ui-egui/tests/it/numeric_input.rs b/crates/ui-egui/tests/it/numeric_input.rs index da015e7f..ecd06e8b 100644 --- a/crates/ui-egui/tests/it/numeric_input.rs +++ b/crates/ui-egui/tests/it/numeric_input.rs @@ -13,7 +13,8 @@ fn harness(render: bool) -> (Harness<'static, MaterialCraftApp>, NodeId) { app.run("file.new", json!({"template":"empty"})).unwrap(); let id = NodeId(app.run("graph.node.add", json!({"def":"transformation"})).unwrap()["id"].as_u64().unwrap()); app.session.reset_history(); - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { @@ -51,7 +52,8 @@ fn graph_name_typed_across_frames_commits_on_focus_loss() { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.run("file.new", json!({"template":"empty"})).unwrap(); app.session.reset_history(); - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { app.step(&ui.ctx().clone()); diff --git a/crates/ui-egui/tests/it/preferences_window.rs b/crates/ui-egui/tests/it/preferences_window.rs index 3aadc7d7..e3f2bfc4 100644 --- a/crates/ui-egui/tests/it/preferences_window.rs +++ b/crates/ui-egui/tests/it/preferences_window.rs @@ -10,13 +10,17 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; fn harness() -> Harness<'static, MaterialCraftApp> { let mut app = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); app.ui.windows.home = false; - let mut harness = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(1.0).build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app, - ); + let mut harness = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(1.0) + .build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app, + ); harness.run_steps(6); harness } diff --git a/crates/ui-egui/tests/it/preview_resolution.rs b/crates/ui-egui/tests/it/preview_resolution.rs index 1fa2a201..f06b8423 100644 --- a/crates/ui-egui/tests/it/preview_resolution.rs +++ b/crates/ui-egui/tests/it/preview_resolution.rs @@ -12,7 +12,8 @@ fn harness(preview: u32, render: bool) -> (Harness<'static, MaterialCraftApp>, N let id = NodeId(app.run("graph.node.add", json!({"def":"uniform"})).unwrap()["id"].as_u64().unwrap()); app.apply_prefs(); app.session.cook(); - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/search.rs b/crates/ui-egui/tests/it/search.rs index 24fb4621..eae1947b 100644 --- a/crates/ui-egui/tests/it/search.rs +++ b/crates/ui-egui/tests/it/search.rs @@ -6,7 +6,8 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; fn harness() -> Harness<'static, MaterialCraftApp> { let app = MaterialCraftApp::headless(materialcraft_engine::new_session(), UiState::default()); - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); + let builder = + Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_step_dt(1.0 / 60.0); let builder = if std::env::var_os("MC_SNAPSHOT_DIR").is_some() { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { diff --git a/crates/ui-egui/tests/it/slider_round_values.rs b/crates/ui-egui/tests/it/slider_round_values.rs index 64c28c22..9d3c0f73 100644 --- a/crates/ui-egui/tests/it/slider_round_values.rs +++ b/crates/ui-egui/tests/it/slider_round_values.rs @@ -18,7 +18,11 @@ fn harness(ppp: f32, render: bool, definition: &str) -> (Harness<'static, Materi let mut app = MaterialCraftApp::headless(materialcraft_engine::new_session(), UiState::default()); let id = NodeId(app.run("graph.node.add", json!({"def":definition})).unwrap()["id"].as_u64().unwrap()); app.session.reset_history(); - let builder = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(1600.0, 960.0)).with_pixels_per_point(ppp).with_step_dt(1.0 / 60.0); + let builder = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(1600.0, 960.0)) + .with_pixels_per_point(ppp) + .with_step_dt(1.0 / 60.0); let builder = if render { builder.wgpu() } else { builder }; let mut h = builder.build_ui_state( |ui, app: &mut MaterialCraftApp| { @@ -85,12 +89,16 @@ fn fractional_parameter_values_remain_reachable() { #[test] fn bar_slider_drag_reaches_exact_round_values() { - let mut h = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(800.0, 400.0)).with_pixels_per_point(1.0).build_ui_state( - |ui, value: &mut f32| { - widgets::bar_slider(ui, "Brightness", value, 0.0..=1.0, 128.0); - }, - 0.0f32, - ); + let mut h = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(800.0, 400.0)) + .with_pixels_per_point(1.0) + .build_ui_state( + |ui, value: &mut f32| { + widgets::bar_slider(ui, "Brightness", value, 0.0..=1.0, 128.0); + }, + 0.0f32, + ); h.run_steps(3); let rect = h.get(By::new().role(egui::accesskit::Role::Slider).label("Brightness")).rect(); let start = pos2(rect.left() + rect.width() * 0.2, rect.center().y); @@ -112,12 +120,16 @@ fn bar_slider_drag_reaches_exact_round_values() { #[test] fn bar_slider_drag_preserves_fractional_values() { - let mut h = Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(800.0, 400.0)).with_pixels_per_point(1.0).build_ui_state( - |ui, value: &mut f32| { - widgets::bar_slider(ui, "Brightness", value, 0.0..=1.0, 128.0); - }, - 0.0f32, - ); + let mut h = Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(800.0, 400.0)) + .with_pixels_per_point(1.0) + .build_ui_state( + |ui, value: &mut f32| { + widgets::bar_slider(ui, "Brightness", value, 0.0..=1.0, 128.0); + }, + 0.0f32, + ); h.run_steps(3); let rect = h.get(By::new().role(egui::accesskit::Role::Slider).label("Brightness")).rect(); let start = pos2(rect.left() + rect.width() * 0.2, rect.center().y); diff --git a/crates/ui-egui/tests/snapshot.rs b/crates/ui-egui/tests/snapshot.rs index 404ef2ed..0d24a9b0 100644 --- a/crates/ui-egui/tests/snapshot.rs +++ b/crates/ui-egui/tests/snapshot.rs @@ -54,13 +54,18 @@ use materialcraft_ui_egui::{MaterialCraftApp, UiState}; use serde_json::json; fn harness(app: MaterialCraftApp, w: f32, h: f32) -> Harness<'static, MaterialCraftApp> { - Harness::builder().with_context_setup(materialcraft_ui_egui::framework::install_headless).with_size(vec2(w, h)).with_pixels_per_point(1.0).wgpu().build_ui_state( - |ui, app: &mut MaterialCraftApp| { - app.step(&ui.ctx().clone()); - app.draw(ui); - }, - app, - ) + Harness::builder() + .with_context_setup(materialcraft_ui_egui::framework::install_headless) + .with_size(vec2(w, h)) + .with_pixels_per_point(1.0) + .wgpu() + .build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + app, + ) } /// Run frames until background work (cooks, previews) settles From 768dc9461376bb9a33f817b36996188cdcd9a250 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 02:25:19 +0000 Subject: [PATCH 06/24] Repin craft-libs to 5d9f4b62cb; pass FrameInput::app_modal for MaterialCraft's own modals and restore the floating-panels test on it --- Cargo.lock | 112 ++++++++++++++++---------------- Cargo.toml | 48 +++++++------- crates/ui-egui/src/docking.rs | 14 ++++ crates/ui-egui/src/framework.rs | 12 ++-- 4 files changed, 102 insertions(+), 84 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ae22ac1..f9054f1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,7 +249,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.52.0", + "windows-sys 0.61.2", "wl-clipboard-rs", "x11rb", ] @@ -681,7 +681,7 @@ dependencies = [ "maybe-owned", "rustix 1.1.6", "rustix-linux-procfs", - "windows-sys 0.60.2", + "windows-sys 0.61.2", "winx", ] @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "rustix 1.1.6", ] @@ -980,7 +980,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -998,7 +998,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "egui", ] @@ -1006,12 +1006,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "rayon", ] @@ -1019,7 +1019,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "serde", ] @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1061,12 +1061,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1079,7 +1079,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "chrono", "fixed_decimal", @@ -1107,7 +1107,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-dds", "craft-jpeg", @@ -1134,7 +1134,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "thiserror 2.0.21", ] @@ -1142,7 +1142,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-host", "craft-i18n", @@ -1157,7 +1157,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1166,7 +1166,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-zip", "serde", @@ -1177,7 +1177,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-behavior", "craft-host", @@ -1195,7 +1195,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "serde_json", ] @@ -1203,7 +1203,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "brotli-decompressor", "chrono", @@ -1215,7 +1215,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "chrono", "craft-codepage", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "serde", ] @@ -1233,7 +1233,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "async-channel", "async-io", @@ -1264,7 +1264,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "dispatch2", "egui", @@ -1277,7 +1277,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-atomic", "craft-host", @@ -1307,7 +1307,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1328,7 +1328,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "bytemuck", "dds", @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1354,7 +1354,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "serde", "thiserror 2.0.21", @@ -1364,12 +1364,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-behavior", "craft-i18n", @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "accesskit", "craft-behavior", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1448,7 +1448,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-behavior", "craft-host", @@ -1466,7 +1466,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-behavior", "craft-host", @@ -1487,7 +1487,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-behavior", "craft-host", @@ -1507,7 +1507,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "chrono", "craft-host", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "winsafe", ] @@ -1563,7 +1563,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "craft-atomic", "craft-behavior", @@ -1585,7 +1585,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1595,7 +1595,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=22e82c930ec7062fba45757a8cac8ba5e3cb94bc#22e82c930ec7062fba45757a8cac8ba5e3cb94bc" +source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1778,7 +1778,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2181,7 +2181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3900,7 +3900,7 @@ dependencies = [ "objc2-foundation 0.3.2", "png", "thiserror 2.0.21", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4602,7 +4602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5398,7 +5398,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5465,7 +5465,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5821,7 +5821,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -5957,10 +5957,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix 1.1.6", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6281,7 +6281,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -6952,7 +6952,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index dd3c697a..3273aa0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", version = "0.1.0" } +craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,32 +91,32 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } -craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } -craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["egui"] } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } -craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["ui"] } -craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["ui"] } +craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["ui"] } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc" } +craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "22e82c930ec7062fba45757a8cac8ba5e3cb94bc", features = ["parallel"] } +craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs index 77d99b7d..9ae34b27 100644 --- a/crates/ui-egui/src/docking.rs +++ b/crates/ui-egui/src/docking.rs @@ -396,6 +396,20 @@ mod tests { } } + #[test] + fn floating_panels_stop_while_a_dialog_is_open() { + let mut app = crate::MaterialCraftApp::headless(materialcraft_engine::sample_session(), crate::UiState::default()); + let ctx = egui::Context::default(); + let modal = |app: &mut crate::MaterialCraftApp| app.frame_input(&ctx, Default::default(), 1.0).app_modal; + + assert_eq!(modal(&mut app), None); + app.ui.windows.unsaved = Some(crate::unsaved::Guarded::Quit); + assert_eq!(modal(&mut app), Some(egui::ViewportId::ROOT), "the panels stop on the frame the prompt opens"); + app.ui.windows.unsaved = None; + app.ui.windows.shortcuts = true; + assert_eq!(modal(&mut app), None, "the Shortcuts list does not block"); + } + #[test] fn default_dock_round_trips() { let dock = Dock::default(); diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 4b2258fb..84394ac6 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -23,6 +23,8 @@ use craft_window::policy::Decision; use craft_window::system::WindowSystem; use crate::MaterialCraftApp; +use crate::shell::modality::Modality; +use egui::ViewportId; /// Each pass of the root window, first in `App::ui`: hands the runtime the native window it answers the hit test of /// (Windows) and fits the window to its monitor once. @@ -90,12 +92,13 @@ impl MaterialCraftApp { pub fn before_input(&mut self, ctx: &egui::Context) { // MaterialCraft applies the interface scale itself (`step`), so the runtime keeps the zoom it applied last. let scale = ctx.zoom_factor(); - embed::before_input(ctx, |output| self.frame_input(output, scale)); + embed::before_input(ctx, |output| self.frame_input(ctx, output, scale)); } /// The root values of this frame. MaterialCraft registers no commands with the runtime and lets it toggle no - /// chrome, so the output carries nothing it acts on. - fn frame_input(&mut self, _output: FrameOutput, scale: f32) -> FrameInput { + /// chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the + /// root window, the runtime blocks the panels floated into windows of their own. + pub(crate) fn frame_input(&mut self, ctx: &egui::Context, _output: FrameOutput, scale: f32) -> FrameInput { use crate::theme::Brightness; let mode = match self.ui.prefs.brightness { Brightness::Light | Brightness::MediumLight => craft_theme::Mode::Light, @@ -103,7 +106,8 @@ impl MaterialCraftApp { }; let direction = if crate::i18n::is_rtl() { craft_i18n::Direction::Rtl } else { craft_i18n::Direction::Ltr }; let root = RootEnv::new().mode(mode).scale(Scale::new(scale)).direction(direction); - FrameInput::new(root).host(Arc::clone(&self.framework_host)) + let app_modal = Modality::capture(self, ctx).is_blocked().then_some(ViewportId::ROOT); + FrameInput::new(root).host(Arc::clone(&self.framework_host)).app_modal(app_modal) } /// The framework's part of `App::logic`, after MaterialCraft's own: the root window's close path. Unsaved work From e59c49a7c5127a07ebc5030152860f4300e5038d Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 03:37:20 +0000 Subject: [PATCH 07/24] Repin craft-libs to cd87dc61f7; pass the app icon to the host - Every aiongg/craft-libs dependency moves to cd87dc61f7 (QuitCommand::Quit and HostBuilder::icon_png). - The host carries MaterialCraft's 128 px app icon, which the update dialogs show. - MaterialCraft keeps its own ui.quit (File > Exit, Ctrl+Q), so the framework's window.quit is unbound in the command overrides. --- Cargo.lock | 86 ++++++++++++++++----------------- Cargo.toml | 48 +++++++++--------- crates/ui-egui/src/framework.rs | 31 +++++++++--- 3 files changed, 92 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9054f1c..9b99f0e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "rustix 1.1.6", ] @@ -980,7 +980,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -998,7 +998,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "egui", ] @@ -1006,12 +1006,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "rayon", ] @@ -1019,7 +1019,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "serde", ] @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1061,12 +1061,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1079,7 +1079,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "chrono", "fixed_decimal", @@ -1107,7 +1107,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-dds", "craft-jpeg", @@ -1134,7 +1134,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "thiserror 2.0.21", ] @@ -1142,7 +1142,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-host", "craft-i18n", @@ -1157,7 +1157,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1166,7 +1166,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-zip", "serde", @@ -1177,7 +1177,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-behavior", "craft-host", @@ -1195,7 +1195,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "serde_json", ] @@ -1203,7 +1203,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "brotli-decompressor", "chrono", @@ -1215,7 +1215,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "chrono", "craft-codepage", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "serde", ] @@ -1233,7 +1233,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "async-channel", "async-io", @@ -1264,7 +1264,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "dispatch2", "egui", @@ -1277,7 +1277,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-atomic", "craft-host", @@ -1307,7 +1307,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1328,7 +1328,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "bytemuck", "dds", @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1354,7 +1354,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "serde", "thiserror 2.0.21", @@ -1364,12 +1364,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-behavior", "craft-i18n", @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "accesskit", "craft-behavior", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1448,7 +1448,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-behavior", "craft-host", @@ -1466,7 +1466,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-behavior", "craft-host", @@ -1487,7 +1487,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-behavior", "craft-host", @@ -1507,7 +1507,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "chrono", "craft-host", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "winsafe", ] @@ -1563,7 +1563,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "craft-atomic", "craft-behavior", @@ -1585,7 +1585,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1595,7 +1595,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=5d9f4b62cb7d62817cfa799e9451222bde7d6591#5d9f4b62cb7d62817cfa799e9451222bde7d6591" +source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" dependencies = [ "flate2", "thiserror 2.0.21", diff --git a/Cargo.toml b/Cargo.toml index 3273aa0d..eed24250 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", version = "0.1.0" } +craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,32 +91,32 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } -craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } -craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["egui"] } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } -craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["ui"] } -craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["ui"] } +craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["ui"] } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591" } +craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "5d9f4b62cb7d62817cfa799e9451222bde7d6591", features = ["parallel"] } +craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 84394ac6..dcf06089 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -9,11 +9,13 @@ //! [`take_window_cancel`]; the graph editor is declared to the runtime with [`host_canvas`], which keeps Tab, the edit //! chords and the clipboard events in egui's input for MaterialCraft's shortcuts. -use std::sync::Arc; +use std::sync::{Arc, OnceLock}; use craft_host::target::ShellInfo; use craft_host::{AppInfo, Host}; +use craft_keymap::Overrides; use craft_ui::fonts::{I18nScripts, SystemFonts, UiFonts}; +use craft_ui::runtime::commands::{CommandInput, CommandSet as _, QuitCommand}; use craft_ui::runtime::env::{RootEnv, Scale}; use craft_ui::runtime::focus::{EditSet, KeepKeys, KeyUse}; use craft_ui::runtime::frame::{FrameInput, FrameOutput}; @@ -80,9 +82,26 @@ pub fn install_headless(ctx: &egui::Context) { } } -/// Who MaterialCraft is to the framework's dialogs (the update dialogs show its name). +/// Who MaterialCraft is to the framework's dialogs (the update dialogs show its name and icon). pub(crate) fn host() -> Arc { - Arc::new(Host::builder(AppInfo { id: "materialcraft", name: "MaterialCraft", version: materialcraft_engine::VERSION }).build()) + Arc::new( + Host::builder(AppInfo { id: "materialcraft", name: "MaterialCraft", version: materialcraft_engine::VERSION }) + .icon_png(include_bytes!("../../../assets/app-icon/hicolor/128x128/apps/ai.storyteller.materialcraft.png")) + .build(), + ) +} + +/// MaterialCraft quits with its own `ui.quit` (File > Exit, Ctrl+Q), which its shortcuts read from egui, so the +/// framework's `window.quit` is unbound. Overrides are keyed by command id, which the command set gives. +fn command_overrides() -> Arc { + static OVERRIDES: OnceLock> = OnceLock::new(); + OVERRIDES + .get_or_init(|| { + let mut overrides = Overrides::new(); + overrides.insert(QuitCommand::Quit.id(), Vec::new()); + Arc::new(overrides) + }) + .clone() } impl MaterialCraftApp { @@ -95,8 +114,8 @@ impl MaterialCraftApp { embed::before_input(ctx, |output| self.frame_input(ctx, output, scale)); } - /// The root values of this frame. MaterialCraft registers no commands with the runtime and lets it toggle no - /// chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the + /// The root values of this frame. MaterialCraft registers no commands with the runtime (it unbinds the framework's + /// quit, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the /// root window, the runtime blocks the panels floated into windows of their own. pub(crate) fn frame_input(&mut self, ctx: &egui::Context, _output: FrameOutput, scale: f32) -> FrameInput { use crate::theme::Brightness; @@ -107,7 +126,7 @@ impl MaterialCraftApp { let direction = if crate::i18n::is_rtl() { craft_i18n::Direction::Rtl } else { craft_i18n::Direction::Ltr }; let root = RootEnv::new().mode(mode).scale(Scale::new(scale)).direction(direction); let app_modal = Modality::capture(self, ctx).is_blocked().then_some(ViewportId::ROOT); - FrameInput::new(root).host(Arc::clone(&self.framework_host)).app_modal(app_modal) + FrameInput::new(root).commands(CommandInput::new().overrides(command_overrides())).host(Arc::clone(&self.framework_host)).app_modal(app_modal) } /// The framework's part of `App::logic`, after MaterialCraft's own: the root window's close path. Unsaved work From b812cd928347fc694c9655627499bb3dcdfe3475 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:05:46 +0000 Subject: [PATCH 08/24] Take a Save panel's answer (craft-dialogs Answer::Saved on next) --- crates/ui-egui/src/native_dialogs.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ui-egui/src/native_dialogs.rs b/crates/ui-egui/src/native_dialogs.rs index e4921467..6b12ee5b 100644 --- a/crates/ui-egui/src/native_dialogs.rs +++ b/crates/ui-egui/src/native_dialogs.rs @@ -141,6 +141,7 @@ pub(crate) fn poll(app: &mut MaterialCraftApp) { Some(path) => chosen(app, then, &path), None => cancelled(app, then), }, + Answer::Saved { path, .. } => chosen(app, then, &path), Answer::Cancelled | Answer::Message(_) => cancelled(app, then), Answer::Unavailable(why) => { app.toast(format!("{}: {why}", tr("The file dialog could not be shown")), true); From ab78435d5f8659c442b8ce6a612203a8298455a1 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 13:42:11 +0000 Subject: [PATCH 09/24] Repin craft-libs to storytold next 980669cdce and egui to storytold b15ffe9bfc --- Cargo.lock | 110 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 70 +++++++++++++++++----------------- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5881c61..64f438b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "rustix 1.1.6", ] @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "egui", ] @@ -1016,12 +1016,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "rayon", ] @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "serde", ] @@ -1057,7 +1057,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1071,12 +1071,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "chrono", "fixed_decimal", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-dds", "craft-jpeg", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "thiserror 2.0.21", ] @@ -1152,7 +1152,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-host", "craft-i18n", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1176,7 +1176,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-zip", "serde", @@ -1187,7 +1187,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-behavior", "craft-host", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "serde_json", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "brotli-decompressor", "chrono", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "chrono", "craft-codepage", @@ -1235,7 +1235,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "serde", ] @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "async-channel", "async-io", @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "craft-png" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "png", "thiserror 2.0.21", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "dispatch2", "egui", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1309,7 +1309,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-atomic", "craft-host", @@ -1326,7 +1326,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "bytemuck", "dds", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "serde", "thiserror 2.0.21", @@ -1383,12 +1383,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-behavior", "craft-i18n", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "accesskit", "craft-behavior", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1467,7 +1467,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-behavior", "craft-host", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-behavior", "craft-host", @@ -1506,7 +1506,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-behavior", "craft-host", @@ -1545,7 +1545,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "chrono", "craft-host", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "winsafe", ] @@ -1582,7 +1582,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "craft-appkit", "craft-atomic", @@ -1606,7 +1606,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1931,7 +1931,7 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "emath", @@ -1941,7 +1941,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -1978,7 +1978,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "accesskit", "ahash", @@ -2006,7 +2006,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -2025,7 +2025,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "accesskit_winit", "arboard", @@ -2048,7 +2048,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "egui", @@ -2061,7 +2061,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "dify", "eframe", @@ -2087,7 +2087,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "serde", @@ -2160,7 +2160,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -2187,7 +2187,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" [[package]] name = "equivalent" diff --git a/Cargo.toml b/Cargo.toml index 9305eeb2..7271a824 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", version = "0.1.0" } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,47 +91,47 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-host = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["egui"] } +craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["ui"] } -craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["ui"] } +craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["ui"] } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } -craft-png = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["parallel"] } +craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] -ecolor = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -emath = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -epaint = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui-winit = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_glow = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +ecolor = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +emath = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +epaint = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui-winit = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_glow = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } # egui-phosphor has no release for egui 0.37 (vendor/egui-phosphor/VENDORED.md). egui-phosphor = { path = "vendor/egui-phosphor" } From bfa1042c2d0a2daef792f895f062dfd457ea8154 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 13:43:14 +0000 Subject: [PATCH 10/24] Repin craft-libs to craft-libs#3505 head d1bdf8e5da (storytold) --- Cargo.lock | 90 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 50 +++++++++++++++--------------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64f438b0..4d8a7fc7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "rustix 1.1.6", ] @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "egui", ] @@ -1016,12 +1016,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "rayon", ] @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", ] @@ -1057,7 +1057,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1071,12 +1071,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "fixed_decimal", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-dds", "craft-jpeg", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "thiserror 2.0.21", ] @@ -1152,7 +1152,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-host", "craft-i18n", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1176,7 +1176,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-zip", "serde", @@ -1187,7 +1187,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde_json", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "brotli-decompressor", "chrono", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "craft-codepage", @@ -1235,7 +1235,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", ] @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "async-channel", "async-io", @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "craft-png" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "png", "thiserror 2.0.21", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "dispatch2", "egui", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1309,7 +1309,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-atomic", "craft-host", @@ -1326,7 +1326,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "bytemuck", "dds", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", "thiserror 2.0.21", @@ -1383,12 +1383,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-i18n", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "accesskit", "craft-behavior", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1467,7 +1467,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1506,7 +1506,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1545,7 +1545,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "craft-host", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "winsafe", ] @@ -1582,7 +1582,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-appkit", "craft-atomic", @@ -1606,7 +1606,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=980669cdce03ef0d14afb92660dc978d6a62c270#980669cdce03ef0d14afb92660dc978d6a62c270" +source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "flate2", "thiserror 2.0.21", diff --git a/Cargo.toml b/Cargo.toml index 7271a824..33431d36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", version = "0.1.0" } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,33 +91,33 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-host = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-host = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["egui"] } +craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["ui"] } -craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } +craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["ui"] } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } -craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "980669cdce03ef0d14afb92660dc978d6a62c270", features = ["parallel"] } +craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] From 252d671c2b45cf42bce256bcce523ac9bb543ed4 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 13:58:02 +0000 Subject: [PATCH 11/24] The canvas is one real Tab stop and takes the keyboard when pressed --- crates/ui-egui/src/docking.rs | 8 +- crates/ui-egui/src/explorer/actions.rs | 2 +- crates/ui-egui/src/framework.rs | 54 +++++++-- crates/ui-egui/src/function/canvas.rs | 2 + crates/ui-egui/src/function/input.rs | 5 +- crates/ui-egui/src/function/render.rs | 3 +- crates/ui-egui/src/function/search.rs | 12 +- crates/ui-egui/src/graph/canvas.rs | 5 +- crates/ui-egui/src/graph/canvas_focus.rs | 64 ++++++++++ .../src/graph/function_search_tests.rs | 15 +++ crates/ui-egui/src/graph/graph_camera.rs | 2 +- crates/ui-egui/src/graph/graph_view.rs | 6 + crates/ui-egui/src/graph/input.rs | 2 +- crates/ui-egui/src/graph/mod.rs | 1 + crates/ui-egui/src/graph/search.rs | 13 +- crates/ui-egui/src/material_craft_app.rs | 4 +- crates/ui-egui/src/menus.rs | 4 +- crates/ui-egui/src/pattern/canvas.rs | 4 +- crates/ui-egui/src/pattern/input.rs | 2 +- crates/ui-egui/src/view2d/viewport.rs | 2 +- crates/ui-egui/src/view3d/navigation.rs | 2 +- crates/ui-egui/tests/it/canvas_focus.rs | 113 ++++++++++++++++++ crates/ui-egui/tests/it/main.rs | 1 + 23 files changed, 290 insertions(+), 36 deletions(-) create mode 100644 crates/ui-egui/src/graph/canvas_focus.rs create mode 100644 crates/ui-egui/tests/it/canvas_focus.rs diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs index 9ae34b27..5534aa41 100644 --- a/crates/ui-egui/src/docking.rs +++ b/crates/ui-egui/src/docking.rs @@ -312,11 +312,6 @@ fn refresh_specs(app: &mut MaterialCraftApp) { // --------------------------------------------------------------------------------------------- // Drawing -/// The graph editor's id as the window's document canvas. -fn graph_canvas_id() -> egui::Id { - egui::Id::unique("materialcraft-graph-canvas") -} - /// Draw the dock (graph and panels) into `ui`. pub fn show(app: &mut MaterialCraftApp, ui: &mut Ui) { let ctx = ui.ctx().clone(); @@ -371,13 +366,12 @@ impl DockPanels for Panels<'_> { } } - /// The graph editor, edge to edge in its group, as the window's document canvas. + /// The graph editor, edge to edge in its group. fn group_view(&mut self, panels: &[Panel], _: usize, ui: &mut Ui, at: GroupAt, _: &mut BodyCx<'_>) -> Option { let GroupAt::Show(rect) = at else { return None }; if !panels.contains(&Panel::Graph) { return None; } - crate::framework::host_canvas(ui.ctx(), graph_canvas_id()); crate::graph::show(self.app, ui); Some(rect.height()) } diff --git a/crates/ui-egui/src/explorer/actions.rs b/crates/ui-egui/src/explorer/actions.rs index bec17d4a..72eecb0b 100644 --- a/crates/ui-egui/src/explorer/actions.rs +++ b/crates/ui-egui/src/explorer/actions.rs @@ -158,7 +158,7 @@ pub(super) fn rename_dialog(app: &mut MaterialCraftApp, ctx: &egui::Context) { .show(ctx, |ui| { let response = ui.text_edit_singleline(&mut name); crate::widgets::name(&response, egui::Role::TextInput, "Name"); - if !ctx.memory(|memory| memory.has_focus(response.id)) && !ctx.egui_wants_keyboard_input() { + if !ctx.memory(|memory| memory.has_focus(response.id)) && !crate::framework::widget_has_keyboard(ctx) { response.request_focus(); } accept |= response.lost_focus() && ui.input(|input| input.key_pressed(egui::Key::Enter)); diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 9b621b8b..aeac0848 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -6,20 +6,22 @@ //! //! The runtime takes Escape, Tab and the clipboard events for the whole window unless one of MaterialCraft's own egui //! widgets has the keyboard. The window's Escape is read with [`escape_pressed`] and taken with -//! [`take_window_cancel`]; the graph editor is declared to the runtime with [`host_canvas`], which keeps Tab, the edit -//! chords and the clipboard events in egui's input for MaterialCraft's shortcuts. +//! [`take_window_cancel`]; the graph editor's canvas is declared to the runtime with [`host_canvas`], which keeps the edit +//! chords and the clipboard events in egui's input for MaterialCraft's shortcuts, and Tab while it opens the node search. +//! The focused canvas leaves the keyboard to the shortcuts ([`widget_has_keyboard`]). use std::sync::{Arc, OnceLock}; use craft_host::target::ShellInfo; use craft_host::{AppInfo, Host}; -use craft_keymap::Overrides; +use craft_keymap::{Chord, Key, Overrides}; use craft_ui::fonts::{I18nScripts, SystemFonts, UiFonts}; use craft_ui::runtime::commands::{CommandInput, CommandSet as _, QuitCommand}; use craft_ui::runtime::env::{RootEnv, Scale}; -use craft_ui::runtime::focus::{EditSet, KeepKeys, KeyUse}; +use craft_ui::runtime::focus::{self, EditSet, FocusTarget, KeyUse}; use craft_ui::runtime::frame::{FrameInput, FrameOutput}; use craft_ui::runtime::keys::{Intent, with_window_intents}; +use craft_ui::runtime::overlay::{self, OpenFilter}; use craft_ui::shell::embed::{self, CloseDecision}; use craft_window::policy::Decision; use craft_window::system::WindowSystem; @@ -134,12 +136,44 @@ impl MaterialCraftApp { } } -/// Declares the graph editor `id`, drawn in this pass, as the window's document canvas. With nothing focused it is the -/// window's key target: Tab (node search), the edit chords and the clipboard events stay in egui's input for -/// MaterialCraft's shortcuts. -pub(crate) fn host_canvas(ctx: &egui::Context, id: egui::Id) { - const KEYS: KeyUse = KeyUse::CANVAS.with_keep(KeepKeys::Tab).with_edits(EditSet::ALL); - craft_ui::runtime::focus::host_canvas(ctx, id, KEYS); +/// The graph editor's canvas widget, the window's document canvas. The material, function and FX-Map editors share it, +/// so it keeps the focus when one replaces another. +pub fn canvas_id() -> egui::Id { + egui::Id::unique("materialcraft-graph-canvas") +} + +/// Declares the graph editor's canvas, drawn in this pass, as the window's document canvas. With nothing or the canvas +/// focused, the edit chords and the clipboard events stay in egui's input for MaterialCraft's shortcuts. With +/// `opens_search` the focused canvas claims a bare Tab, which opens its node search; Shift+Tab and F6 always move on from +/// it, and Tab does otherwise. +pub(crate) fn host_canvas(ctx: &egui::Context, opens_search: bool) { + const KEYS: KeyUse = KeyUse::CANVAS.with_edits(EditSet::ALL); + const TAB: [Chord; 1] = [Chord::plain(Key::Tab)]; + const SEARCH_KEYS: KeyUse = KEYS.with_claims(&TAB); + // The claim would hold with nothing focused too, where a bare Tab moves the focus into the window + let claims_tab = opens_search && ctx.memory(|memory| memory.has_focus(canvas_id())); + focus::host_canvas(ctx, canvas_id(), if claims_tab { SEARCH_KEYS } else { KEYS }); +} + +/// Gives the canvas the keyboard focus, with the arrows and Escape its own. +pub(crate) fn focus_canvas(ctx: &egui::Context) { + focus::request(ctx, FocusTarget::Id(canvas_id())); +} + +/// The widget that has the keyboard, the canvas left out: the focused canvas leaves the keyboard to MaterialCraft's +/// shortcuts, as with nothing focused. +pub(crate) fn focused_widget(ctx: &egui::Context) -> Option { + ctx.memory(|memory| memory.focused()).filter(|focused| *focused != canvas_id()) +} + +/// Whether a widget other than the canvas has the keyboard. +pub(crate) fn widget_has_keyboard(ctx: &egui::Context) -> bool { + focused_widget(ctx).is_some() +} + +/// Whether a dialog, MaterialCraft's, egui's or the framework's, the home screen, or an egui menu or popup is up. +pub(crate) fn overlay_open(app: &MaterialCraftApp, ctx: &egui::Context) -> bool { + app.ui.windows.home || Modality::capture(app, ctx).is_blocked() || egui::Popup::is_any_open(ctx) || overlay::any_open(ctx, OpenFilter::Modal) } /// Whether Escape was pressed in this pass: from egui while one of MaterialCraft's own widgets or popups has the diff --git a/crates/ui-egui/src/function/canvas.rs b/crates/ui-egui/src/function/canvas.rs index c64739d3..37d0dd45 100644 --- a/crates/ui-egui/src/function/canvas.rs +++ b/crates/ui-egui/src/function/canvas.rs @@ -39,6 +39,8 @@ pub(super) fn canvas(app: &mut MaterialCraftApp, editor: &mut FunctionEditor, ui super::input::handle(app, editor, ui, &frame.response, &frame.ports, &frame.geometry, on_annotation); let camera = GraphCamera { origin: frame.response.rect.min, pan: editor.pan, zoom: editor.zoom }; super::search::show(app, editor, ui, &camera); + let over_canvas = crate::graph::canvas_focus::under_pointer(ui, &frame.response, frame.response.hovered(), super::search::area()); + crate::graph::canvas_focus::settle(app, ui, over_canvas && editor.search.is_none()); frame.geometry.publish(&mut app.graph, frame.response.rect); if editor.drag.is_none() { let camera = GraphCamera { origin: frame.response.rect.min, pan: editor.pan, zoom: editor.zoom }; diff --git a/crates/ui-egui/src/function/input.rs b/crates/ui-egui/src/function/input.rs index 56fc4361..7c86d13b 100644 --- a/crates/ui-egui/src/function/input.rs +++ b/crates/ui-egui/src/function/input.rs @@ -137,7 +137,8 @@ pub(super) fn handle( } } - if response.clicked() && !on_wire && !ui.input(|input| input.modifiers.alt) { + // A click of the pointer: Enter and Space on the focused canvas make it `clicked` too + if response.clicked_by(egui::PointerButton::Primary) && !on_wire && !ui.input(|input| input.modifiers.alt) { crate::graph::node_selection::select(&mut editor.selection, None, ui.input(|input| input.modifiers)); crate::graph::node_selection::select(&mut editor.selected_wires, None, ui.input(|input| input.modifiers)); } @@ -189,7 +190,7 @@ pub(super) fn handle( // Space or Tab over the canvas, or a double-click on empty canvas, searches for a node to add // Tab moves focus between widgets, so it waits only for text fields and focus held before this frame - let space = !ui.ctx().egui_wants_keyboard_input() && ui.input(|input| input.key_pressed(egui::Key::Space)); + let space = !crate::framework::widget_has_keyboard(ui.ctx()) && ui.input(|input| input.key_pressed(egui::Key::Space)); let tab = app.ui.prefs.tab_opens_node_search && !app.graph.keyboard_was_focused && !ui.ctx().text_edit_focused() diff --git a/crates/ui-egui/src/function/render.rs b/crates/ui-egui/src/function/render.rs index d30c3e77..636360ef 100644 --- a/crates/ui-egui/src/function/render.rs +++ b/crates/ui-egui/src/function/render.rs @@ -7,7 +7,8 @@ use egui::{Align2, Color32, Rect, Sense, Stroke, Ui, Vec2, pos2, vec2}; use std::collections::{BTreeMap, BTreeSet}; pub(super) fn paint(app: &mut MaterialCraftApp, editor: &mut FunctionEditor, ui: &mut Ui) -> Option { - let (canvas_bounds, response) = ui.allocate_exact_size(ui.available_size().max(vec2(200.0, 200.0)), Sense::click_and_drag()); + let size = ui.available_size().max(vec2(200.0, 200.0)); + let (canvas_bounds, response) = crate::graph::canvas_focus::allocate(app, ui, size); app.graph.view = canvas_bounds; let graph = editor.current(app)?; let snap = app.ui.prefs.snap_to_grid; diff --git a/crates/ui-egui/src/function/search.rs b/crates/ui-egui/src/function/search.rs index 95c9de89..035de780 100644 --- a/crates/ui-egui/src/function/search.rs +++ b/crates/ui-egui/src/function/search.rs @@ -85,12 +85,17 @@ pub(crate) fn pick(app: &mut MaterialCraftApp, editor: &mut FunctionEditor, sear editor.inspected_node = Some(id); } +/// The search popup's area +pub(super) fn area() -> egui::Id { + egui::Id::unique("function-node-search") +} + pub(super) fn show(app: &mut MaterialCraftApp, editor: &mut FunctionEditor, ui: &mut Ui, camera: &GraphCamera) { let blocked = crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked(); let Some(mut search) = editor.search.take() else { return }; let tokens = Tokens::get(ui.ctx()); - let area = egui::Id::unique("function-node-search"); + let area = area(); let mut close = false; let mut chosen = None; egui::Area::new(area).fixed_pos(camera.to_screen(search.at)).order(egui::Order::Foreground).show(ui.ctx(), |ui| { @@ -155,7 +160,10 @@ pub(super) fn show(app: &mut MaterialCraftApp, editor: &mut FunctionEditor, ui: && ui.ctx().pointer_interact_pos().is_some_and(|pointer| !ui.ctx().layer_id_at(pointer).is_some_and(|layer| layer.id == area)); if let Some(candidate) = chosen.filter(|_| !blocked) { pick(app, editor, &search, &candidate); - } else if !close && !clicked_outside { + crate::framework::focus_canvas(ui.ctx()); + } else if close { + crate::framework::focus_canvas(ui.ctx()); + } else if !clicked_outside { editor.search = Some(search); } } diff --git a/crates/ui-egui/src/graph/canvas.rs b/crates/ui-egui/src/graph/canvas.rs index 86543d58..3f069458 100644 --- a/crates/ui-egui/src/graph/canvas.rs +++ b/crates/ui-egui/src/graph/canvas.rs @@ -51,7 +51,8 @@ pub fn show(app: &mut MaterialCraftApp, ui: &mut Ui) { fn canvas(app: &mut MaterialCraftApp, ui: &mut Ui) { let theme = Tokens::get(ui.ctx()); let context = ui.ctx().clone(); - let (rect, response) = ui.allocate_exact_size(ui.available_size(), Sense::click_and_drag()); + let size = ui.available_size(); + let (rect, response) = super::canvas_focus::allocate(app, ui, size); crate::widgets::name(&response, egui::Role::Canvas, "Node graph"); app.graph.view = rect; if app.ui.frame_all || app.graph.framed_graph != Some(app.session.graph) { @@ -350,6 +351,8 @@ fn canvas(app: &mut MaterialCraftApp, ui: &mut Ui) { } super::search::show(app, ui, &camera); + let over_canvas = super::canvas_focus::under_pointer(ui, &response, ui.rect_contains_pointer(rect), super::search::area()); + super::canvas_focus::settle(app, ui, over_canvas && app.graph.search.is_none()); let (failed, placeholders) = app.session.cook_failures(); let mut at = rect.right_bottom() - vec2(8.0, 8.0); if !failed.is_empty() { diff --git a/crates/ui-egui/src/graph/canvas_focus.rs b/crates/ui-egui/src/graph/canvas_focus.rs new file mode 100644 index 00000000..454ca3ce --- /dev/null +++ b/crates/ui-egui/src/graph/canvas_focus.rs @@ -0,0 +1,64 @@ +//! The graph editor's canvas widget and its keyboard focus + +use crate::MaterialCraftApp; +use crate::framework::{canvas_id, focus_canvas, focused_widget, host_canvas, overlay_open}; +use crate::shell::modality::Modality; +use egui::{Id, Rect, Response, Sense, Ui, Vec2}; + +/// Allocate and draw the canvas widget: every editor (material, function, FX-Map) draws the one that has the focus +pub(crate) fn allocate(app: &MaterialCraftApp, ui: &mut Ui, size: Vec2) -> (Rect, Response) { + let (_, rect) = ui.allocate_space(size); + let response = ui.interact(rect, canvas_id(), Sense::click_and_drag()); + // Declared before the widgets on the canvas, for its place in Tab order + host_canvas(ui.ctx(), false); + focus_on_press(app, ui, &response); + (rect, response) +} + +/// A press anywhere on the canvas gives it the keyboard focus. Real presses only: with the canvas focused, egui makes +/// Enter and Space clicks of it. +fn focus_on_press(app: &MaterialCraftApp, ui: &Ui, canvas: &Response) { + let ctx = ui.ctx(); + if !ui.input(|input| input.pointer.any_pressed()) || !ui.rect_contains_pointer(canvas.rect) || Modality::capture(app, ctx).is_blocked() { + return; + } + + // A press in the value being edited on a node stays there + let in_editor = ctx.text_edit_focused() && focused_widget(ctx).and_then(|id| ctx.read_response(id)).is_some_and(|field| field.is_pointer_button_down_on()); + if !in_editor { + focus_canvas(ctx); + } +} + +/// Whether the pointer is over the canvas: `hovered`, or over the node search `search`, which still covers the canvas in +/// the passes after it closes +pub(crate) fn under_pointer(ui: &Ui, canvas: &Response, hovered: bool, search: Id) -> bool { + let ctx = ui.ctx(); + hovered + || ctx.pointer_interact_pos().is_some_and(|pointer| canvas.rect.contains(pointer) && ctx.layer_id_at(pointer).is_some_and(|layer| layer.id == search)) +} + +/// Settle the focus and Tab once the canvas has handled its input. A graph that opens or becomes active asks for the +/// focus, and so does the canvas while nothing is focused and Tab opens its node search (`opens_search`): a click on a +/// panel leaves the focus nowhere. It waits for a dialog, menu or popup to close, and leaves the focus with a text field +/// and with a widget of another window. +pub(crate) fn settle(app: &mut MaterialCraftApp, ui: &Ui, opens_search: bool) { + let ctx = ui.ctx(); + let opens_search = opens_search && app.ui.prefs.tab_opens_node_search && !Modality::capture(app, ctx).is_blocked(); + let shown = Some((app.session.document_id, app.session.graph, app.graph.annotation_target.clone())); + if app.graph.shown != shown { + app.graph.shown = shown; + app.graph.wants_focus = true; + } + + let focused = ctx.memory(|memory| memory.focused()); + let unfocused = opens_search && focused.is_none() && !ui.input(|input| input.pointer.any_down()); + if (app.graph.wants_focus || unfocused) && !overlay_open(app, ctx) { + app.graph.wants_focus = false; + let same_window = focused.is_none_or(|id| ctx.read_response(id).is_some_and(|widget| widget.layer_id == ui.layer_id())); + if same_window && !ctx.text_edit_focused() { + focus_canvas(ctx); + } + } + host_canvas(ctx, opens_search); +} diff --git a/crates/ui-egui/src/graph/function_search_tests.rs b/crates/ui-egui/src/graph/function_search_tests.rs index 4648308d..77d30415 100644 --- a/crates/ui-egui/src/graph/function_search_tests.rs +++ b/crates/ui-egui/src/graph/function_search_tests.rs @@ -103,6 +103,21 @@ fn space_tab_and_double_click_open_the_search_and_enter_adds() { assert!(nodes.iter().any(|(_, op, _)| op == "add")); } +#[test] +fn space_on_the_focused_canvas_keeps_the_selection() { + let (mut frames, constant) = function_canvas(); + let at = empty(&frames); + frames.click(at, Modifiers::NONE); + let selection = vec![materialcraft_engine::core::NodeId(u64::from(constant))]; + frames.app.session.selection = selection.clone(); + frames.run(Vec::new(), Modifiers::NONE); + assert_eq!(frames.ctx.memory(|memory| memory.focused()), Some(crate::framework::canvas_id())); + + frames.run(vec![press(Key::Space)], Modifiers::NONE); + assert!(search(&frames).is_some()); + assert_eq!(frames.app.session.selection, selection, "egui's click for Space selects nothing"); +} + #[test] fn wires_dropped_on_empty_canvas_search_and_connect_the_new_node() { let (mut frames, constant) = function_canvas(); diff --git a/crates/ui-egui/src/graph/graph_camera.rs b/crates/ui-egui/src/graph/graph_camera.rs index 36caaa62..220b13a0 100644 --- a/crates/ui-egui/src/graph/graph_camera.rs +++ b/crates/ui-egui/src/graph/graph_camera.rs @@ -58,7 +58,7 @@ impl GraphCamera { pub(crate) fn frame_key(ui: &Ui, view: Rect) -> bool { ui.rect_contains_pointer(view) - && !ui.ctx().egui_wants_keyboard_input() + && !crate::framework::widget_has_keyboard(ui.ctx()) && ui.input(|input| input.key_pressed(egui::Key::F) && input.modifiers.is_none()) } } diff --git a/crates/ui-egui/src/graph/graph_view.rs b/crates/ui-egui/src/graph/graph_view.rs index e390694b..d73aede7 100644 --- a/crates/ui-egui/src/graph/graph_view.rs +++ b/crates/ui-egui/src/graph/graph_view.rs @@ -5,6 +5,10 @@ use materialcraft_engine::core::NodeId; pub struct GraphView { pub(crate) inspected_node: Option, pub(crate) keyboard_was_focused: bool, + /// The document, graph and nested editor shown last frame + pub(super) shown: Option<(u64, usize, materialcraft_engine::AnnotationTarget)>, + /// What is shown changed, and the canvas has yet to ask for the keyboard focus + pub(super) wants_focus: bool, pub(super) thumbnails_cleared: bool, pub(super) drag: Option, pub(super) search: Option, @@ -56,6 +60,8 @@ impl Default for GraphView { GraphView { inspected_node: None, keyboard_was_focused: false, + shown: None, + wants_focus: false, thumbnails_cleared: false, drag: None, search: None, diff --git a/crates/ui-egui/src/graph/input.rs b/crates/ui-egui/src/graph/input.rs index 6c077ae8..f85539c8 100644 --- a/crates/ui-egui/src/graph/input.rs +++ b/crates/ui-egui/src/graph/input.rs @@ -277,7 +277,7 @@ pub(super) fn handle( && app.graph.search.is_none() && !crate::shell::modality::Modality::capture(app, &context).is_blocked() { - let typing = context.egui_wants_keyboard_input(); + let typing = crate::framework::widget_has_keyboard(&context); let platform = craft_keymap::egui::platform(&context); if !typing && let Some(entry) = context.input(|input| crate::node_shortcuts::pressed(&app.ui.prefs.node_shortcuts, input, platform)) { let under_pointer = camera.to_graph(position); diff --git a/crates/ui-egui/src/graph/mod.rs b/crates/ui-egui/src/graph/mod.rs index be1bed30..210631d8 100644 --- a/crates/ui-egui/src/graph/mod.rs +++ b/crates/ui-egui/src/graph/mod.rs @@ -3,6 +3,7 @@ pub(crate) mod add_node_menu; pub(crate) mod annotation_canvas; pub(crate) mod annotation_input; pub(crate) mod canvas; +pub(crate) mod canvas_focus; mod context_menu; pub(crate) mod frame_hit; #[cfg(test)] diff --git a/crates/ui-egui/src/graph/search.rs b/crates/ui-egui/src/graph/search.rs index 4b910140..518bd402 100644 --- a/crates/ui-egui/src/graph/search.rs +++ b/crates/ui-egui/src/graph/search.rs @@ -5,6 +5,11 @@ use egui_phosphor::regular as icon; use materialcraft_engine::core::NodeId; use serde_json::json; +/// The search popup's area +pub(super) fn area() -> egui::Id { + egui::Id::unique("node-search") +} + pub(super) fn open_search(app: &mut MaterialCraftApp, ctx: &egui::Context, at: Pos2, connect: Option<(NodeId, String)>) { if crate::shell::modality::Modality::capture(app, ctx).is_blocked() { return; @@ -45,7 +50,7 @@ pub(super) fn show(app: &mut MaterialCraftApp, ui: &mut Ui, cam: &GraphCamera) { let screen = cam.to_screen(s.at); let mut close = false; let mut pick: Option<&'static str> = None; - egui::Area::new(egui::Id::unique("node-search")).fixed_pos(screen).order(egui::Order::Foreground).show(ui.ctx(), |ui| { + egui::Area::new(area()).fixed_pos(screen).order(egui::Order::Foreground).show(ui.ctx(), |ui| { egui::Frame::popup(ui.style()).show(ui, |ui| { ui.set_width(260.0); if blocked { @@ -110,7 +115,7 @@ pub(super) fn show(app: &mut MaterialCraftApp, ui: &mut Ui, cam: &GraphCamera) { }); let clicked_out = !blocked && ui.input(|i| i.pointer.any_pressed()) - && ui.ctx().pointer_interact_pos().is_some_and(|p| !ui.ctx().layer_id_at(p).is_some_and(|l| l.id == egui::Id::unique("node-search"))); + && ui.ctx().pointer_interact_pos().is_some_and(|p| !ui.ctx().layer_id_at(p).is_some_and(|l| l.id == area())); if let Some(def) = pick.filter(|_| !crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked()) { let s = app.graph.search.take(); if let Some(s) = s { @@ -125,7 +130,11 @@ pub(super) fn show(app: &mut MaterialCraftApp, ui: &mut Ui, cam: &GraphCamera) { app.run("graph.connect", json!({"from": id.0, "fromPort": output, "to": to.0, "toPort": port})); } } + crate::framework::focus_canvas(ui.ctx()); } else if close || clicked_out { app.graph.search = None; + if close { + crate::framework::focus_canvas(ui.ctx()); + } } } diff --git a/crates/ui-egui/src/material_craft_app.rs b/crates/ui-egui/src/material_craft_app.rs index 92058f7f..86727f3d 100644 --- a/crates/ui-egui/src/material_craft_app.rs +++ b/crates/ui-egui/src/material_craft_app.rs @@ -570,7 +570,7 @@ impl MaterialCraftApp { let t0 = now_ms(); // Tab can focus a menu or toolbar button while drawing; preserve keyboard ownership - self.graph.keyboard_was_focused = ctx.egui_wants_keyboard_input(); + self.graph.keyboard_was_focused = crate::framework::widget_has_keyboard(&ctx); menus::menu_bar(self, ui); if self.ui.prefs.show_toolbar { toolbar::main_toolbar(self, ui); @@ -585,7 +585,7 @@ impl MaterialCraftApp { crate::window_controls::resize_zones(ui); } - let gesture_active = ctx.input(|input| input.pointer.any_down()) || ctx.egui_wants_keyboard_input(); + let gesture_active = ctx.input(|input| input.pointer.any_down()) || crate::framework::widget_has_keyboard(&ctx); if !gesture_active && (self.ui_gesture_active || ctx.input(|input| input.pointer.any_released())) { self.session.finish_edit(); } diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index bf26be19..b5a69f8e 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -454,9 +454,9 @@ fn menu_item(app: &mut MaterialCraftApp, context: &egui::Context, ui: &mut egui: } } -/// Dispatch shortcuts unless a widget, popup or dialog owns the keyboard +/// Dispatch shortcuts unless a widget other than the canvas, a popup or a dialog owns the keyboard pub fn shortcuts(app: &mut MaterialCraftApp, ctx: &egui::Context) { - if ctx.egui_wants_keyboard_input() || egui::Popup::is_any_open(ctx) { + if crate::framework::widget_has_keyboard(ctx) || egui::Popup::is_any_open(ctx) { return; } diff --git a/crates/ui-egui/src/pattern/canvas.rs b/crates/ui-egui/src/pattern/canvas.rs index e08af383..25885634 100644 --- a/crates/ui-egui/src/pattern/canvas.rs +++ b/crates/ui-egui/src/pattern/canvas.rs @@ -51,12 +51,14 @@ pub(crate) fn show(app: &mut MaterialCraftApp, ui: &mut Ui) { ui.painter_at(response.rect).add(egui::epaint::CubicBezierShape::from_points_stroke(points, false, Color32::TRANSPARENT, Stroke::new(2.0, PORT_COLOR))); } response.context_menu(|ui| super::context_menu::show(app, &mut editor, ui)); + crate::graph::canvas_focus::settle(app, ui, false); editor.inspected_node = crate::graph::node_selection::inspected(&editor.selection, editor.inspected_node); app.pattern_editor = Some(editor); } fn paint(app: &mut MaterialCraftApp, editor: &mut PatternEditor, ui: &mut Ui) -> Option { - let (bounds, response) = ui.allocate_exact_size(ui.available_size().max(vec2(100.0, 100.0)), Sense::click_and_drag()); + let size = ui.available_size().max(vec2(100.0, 100.0)); + let (bounds, response) = crate::graph::canvas_focus::allocate(app, ui, size); app.graph.view = bounds; let graph = editor.current(app)?; let selected: std::collections::BTreeSet<_> = editor.selection.iter().copied().collect(); diff --git a/crates/ui-egui/src/pattern/input.rs b/crates/ui-egui/src/pattern/input.rs index e78598b8..c06e93e5 100644 --- a/crates/ui-egui/src/pattern/input.rs +++ b/crates/ui-egui/src/pattern/input.rs @@ -118,7 +118,7 @@ pub(super) fn handle(app: &mut MaterialCraftApp, editor: &mut PatternEditor, ui: } } if response.hovered() - && !ui.ctx().egui_wants_keyboard_input() + && !crate::framework::widget_has_keyboard(ui.ctx()) && ui.input(|input| input.key_pressed(egui::Key::Space)) && !crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked() { diff --git a/crates/ui-egui/src/view2d/viewport.rs b/crates/ui-egui/src/view2d/viewport.rs index 3c4079a2..c188ab78 100644 --- a/crates/ui-egui/src/view2d/viewport.rs +++ b/crates/ui-egui/src/view2d/viewport.rs @@ -199,7 +199,7 @@ fn stretch_for(physical: [f32; 3], pixels: [u32; 2]) -> f32 { /// Space toggles tiling, F fits the image and C, R, G, B and A pick the channels, while the pointer is over the image fn keys(app: &mut MaterialCraftApp, ui: &Ui, response: &Response) { - if !response.hovered() || ui.ctx().egui_wants_keyboard_input() || crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked() { + if !response.hovered() || crate::framework::widget_has_keyboard(ui.ctx()) || crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked() { return; } diff --git a/crates/ui-egui/src/view3d/navigation.rs b/crates/ui-egui/src/view3d/navigation.rs index bf142cc6..c7ac5261 100644 --- a/crates/ui-egui/src/view3d/navigation.rs +++ b/crates/ui-egui/src/view3d/navigation.rs @@ -130,7 +130,7 @@ pub(super) fn reset_selected(app: &mut MaterialCraftApp) { /// The keys of the view, while the pointer is over it and nothing else has the keyboard fn keys(app: &mut MaterialCraftApp, ui: &Ui, response: &Response) { - if !response.hovered() || ui.ctx().egui_wants_keyboard_input() || crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked() { + if !response.hovered() || crate::framework::widget_has_keyboard(ui.ctx()) || crate::shell::modality::Modality::capture(app, ui.ctx()).is_blocked() { return; } diff --git a/crates/ui-egui/tests/it/canvas_focus.rs b/crates/ui-egui/tests/it/canvas_focus.rs new file mode 100644 index 00000000..92579ba0 --- /dev/null +++ b/crates/ui-egui/tests/it/canvas_focus.rs @@ -0,0 +1,113 @@ +//! The graph canvas as a Tab stop: it keeps the focus Tab gives it, a press and an opening graph give it the focus, Tab +//! over it opens the node search, and its keys work as with nothing focused + +use egui::{Event, Id, Key, Modifiers, PointerButton, vec2}; +use egui_kittest::{Harness, kittest::Queryable}; +use materialcraft_ui_egui::framework::{canvas_id, install_headless}; +use materialcraft_ui_egui::{MaterialCraftApp, UiState}; + +type AppHarness = Harness<'static, MaterialCraftApp>; + +fn harness(session: materialcraft_engine::Session) -> AppHarness { + let mut h = Harness::builder().with_context_setup(install_headless).with_size(vec2(1600.0, 960.0)).build_ui_state( + |ui, app: &mut MaterialCraftApp| { + app.step(&ui.ctx().clone()); + app.draw(ui); + }, + MaterialCraftApp::headless(session, UiState::default()), + ); + h.run_steps(8); + h +} + +fn focused(h: &AppHarness) -> Option { + h.ctx.memory(|memory| memory.focused()) +} + +fn press(h: &mut AppHarness, modifiers: Modifiers, key: Key) -> Option { + h.key_press_modifiers(modifiers, key); + h.run_steps(3); + focused(h) +} + +fn search_open(h: &AppHarness) -> bool { + h.query_by_label("Search nodes").is_some() +} + +fn hover_canvas(h: &mut AppHarness) { + h.hover_at(h.state().graph.view.center()); + h.run_steps(2); +} + +#[test] +fn tab_walks_over_the_canvas_to_the_stops_after_it_and_back() { + let mut h = harness(materialcraft_engine::new_session()); + let canvas = Some(canvas_id()); + assert_eq!(focused(&h), canvas, "an opened graph has the keyboard"); + + let after = press(&mut h, Modifiers::NONE, Key::Tab); + assert!(after.is_some() && after != canvas, "Tab moves on from the canvas"); + assert_eq!(press(&mut h, Modifiers::SHIFT, Key::Tab), canvas); + let before = press(&mut h, Modifiers::SHIFT, Key::Tab); + assert!(before.is_some() && before != canvas && before != after, "Shift+Tab leaves it backward"); + assert_eq!(press(&mut h, Modifiers::NONE, Key::Tab), canvas, "Tab from the stop before it stops at it"); + assert_eq!(press(&mut h, Modifiers::NONE, Key::Tab), after, "and reaches the stop after it"); + assert!(!search_open(&h)); +} + +#[test] +fn tab_with_the_pointer_over_the_canvas_opens_the_search_and_shift_tab_and_f6_leave_it() { + let mut h = harness(materialcraft_engine::new_session()); + let canvas = Some(canvas_id()); + hover_canvas(&mut h); + for (modifiers, key) in [(Modifiers::SHIFT, Key::Tab), (Modifiers::NONE, Key::F6)] { + let left = press(&mut h, modifiers, key); + assert!(left.is_some() && left != canvas, "{key:?} leaves the canvas"); + assert!(!search_open(&h)); + h.ctx.memory_mut(|memory| memory.surrender_focus(left.unwrap())); + h.run_steps(2); + assert_eq!(focused(&h), canvas, "with nothing focused, the canvas under the pointer takes the keyboard"); + } + + press(&mut h, Modifiers::NONE, Key::Tab); + assert!(search_open(&h), "Tab opens the search"); + assert_eq!(press(&mut h, Modifiers::NONE, Key::Escape), canvas, "closing it gives the keyboard back"); + assert!(!search_open(&h)); +} + +#[test] +fn a_press_in_the_canvas_takes_the_keyboard_from_a_toolbar_button() { + let mut h = harness(materialcraft_engine::new_session()); + h.get_by_label("Open package... (Ctrl+O)").focus(); + h.run_steps(2); + press(&mut h, Modifiers::SHIFT, Key::Tab); + assert!(h.get_by_label("New graph... (Ctrl+N)").is_focused()); + + hover_canvas(&mut h); + assert!(h.get_by_label("New graph... (Ctrl+N)").is_focused(), "the pointer alone takes no focus from a widget"); + let pos = h.state().graph.view.center(); + for pressed in [true, false] { + h.event(Event::PointerButton { pos, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }); + h.run_steps(2); + assert_eq!(focused(&h), Some(canvas_id())); + } + press(&mut h, Modifiers::NONE, Key::Space); + assert!(search_open(&h), "Space goes to the canvas"); + assert!(!h.state().ui.windows.new_graph, "and not to the button"); +} + +#[test] +fn shortcuts_run_with_the_canvas_focused() { + let mut h = harness(materialcraft_engine::sample_session()); + assert_eq!(focused(&h), Some(canvas_id())); + let nodes = |h: &AppHarness| h.state().session.graph().unwrap().nodes.len(); + let before = nodes(&h); + + press(&mut h, Modifiers::COMMAND, Key::A); + assert_eq!(h.state().session.selection.len(), before, "Ctrl+A selects every node"); + press(&mut h, Modifiers::NONE, Key::Delete); + assert_eq!(nodes(&h), 0, "Delete deletes them"); + press(&mut h, Modifiers::COMMAND, Key::Z); + assert_eq!(nodes(&h), before, "Ctrl+Z brings them back"); + assert_eq!(focused(&h), Some(canvas_id())); +} diff --git a/crates/ui-egui/tests/it/main.rs b/crates/ui-egui/tests/it/main.rs index 24b52ae8..755ca4cd 100644 --- a/crates/ui-egui/tests/it/main.rs +++ b/crates/ui-egui/tests/it/main.rs @@ -2,6 +2,7 @@ //! Keep snapshot.rs standalone; language_switching.rs needs process isolation for global locale state. //! resize.rs isolates its bounded render wait from unrelated tests sharing the global Rayon pool. +mod canvas_focus; mod clipboard_shortcuts; mod dialogs; mod export_window; From 96850c2d874d831eb0f22f9d102628e8de5fd417 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 14:10:42 +0000 Subject: [PATCH 12/24] The canvas menus take real clicks; the canvas gets focus after a dialog opens a graph --- crates/ui-egui/src/framework.rs | 2 +- crates/ui-egui/src/function/input.rs | 2 +- crates/ui-egui/src/graph/canvas_focus.rs | 34 +++++++++-- crates/ui-egui/src/graph/graph_view.rs | 6 +- crates/ui-egui/src/graph/input.rs | 2 +- crates/ui-egui/src/pattern/canvas.rs | 2 +- crates/ui-egui/tests/it/canvas_focus.rs | 60 ++++++++++++++++---- crates/ui-egui/tests/snapshot/graph_items.rs | 2 +- 8 files changed, 85 insertions(+), 25 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index aeac0848..7a9592cd 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -144,7 +144,7 @@ pub fn canvas_id() -> egui::Id { /// Declares the graph editor's canvas, drawn in this pass, as the window's document canvas. With nothing or the canvas /// focused, the edit chords and the clipboard events stay in egui's input for MaterialCraft's shortcuts. With -/// `opens_search` the focused canvas claims a bare Tab, which opens its node search; Shift+Tab and F6 always move on from +/// `opens_search` the focused canvas claims a bare Tab, which opens its node search; Shift+Tab always moves on from /// it, and Tab does otherwise. pub(crate) fn host_canvas(ctx: &egui::Context, opens_search: bool) { const KEYS: KeyUse = KeyUse::CANVAS.with_edits(EditSet::ALL); diff --git a/crates/ui-egui/src/function/input.rs b/crates/ui-egui/src/function/input.rs index 7c86d13b..65675879 100644 --- a/crates/ui-egui/src/function/input.rs +++ b/crates/ui-egui/src/function/input.rs @@ -206,7 +206,7 @@ pub(super) fn handle( editor.menu_at = camera.to_graph(pointer_position); editor.search = Some(FunctionSearch::at(editor.menu_at, None)); } - response.context_menu(|ui| { + crate::graph::canvas_focus::context_menu(response, |ui| { super::context_menu::show(app, editor, ui, None); }); } diff --git a/crates/ui-egui/src/graph/canvas_focus.rs b/crates/ui-egui/src/graph/canvas_focus.rs index 454ca3ce..cd2b51fb 100644 --- a/crates/ui-egui/src/graph/canvas_focus.rs +++ b/crates/ui-egui/src/graph/canvas_focus.rs @@ -3,7 +3,11 @@ use crate::MaterialCraftApp; use crate::framework::{canvas_id, focus_canvas, focused_widget, host_canvas, overlay_open}; use crate::shell::modality::Modality; -use egui::{Id, Rect, Response, Sense, Ui, Vec2}; +use egui::{Id, PointerButton, Popup, Rect, Response, Sense, SetOpenCommand, Ui, Vec2}; + +/// The passes a graph that opens asks for the focus in: the widget that opened it keeps egui's focus for up to two +/// passes, the one it was last drawn in and the one after it went away. +const FOCUS_PASSES: u8 = 3; /// Allocate and draw the canvas widget: every editor (material, function, FX-Map) draws the one that has the focus pub(crate) fn allocate(app: &MaterialCraftApp, ui: &mut Ui, size: Vec2) -> (Rect, Response) { @@ -30,6 +34,19 @@ fn focus_on_press(app: &MaterialCraftApp, ui: &Ui, canvas: &Response) { } } +/// The canvas's context menu. Real clicks only, as for [`focus_on_press`]: Enter picks in the Add node menu and must not +/// close it. +pub(crate) fn context_menu(canvas: &Response, contents: impl FnOnce(&mut Ui)) { + let open = if canvas.secondary_clicked() { + Some(SetOpenCommand::Bool(true)) + } else if canvas.clicked_by(PointerButton::Primary) { + Some(SetOpenCommand::Bool(false)) + } else { + None + }; + Popup::context_menu(canvas).open_memory(open).show(contents); +} + /// Whether the pointer is over the canvas: `hovered`, or over the node search `search`, which still covers the canvas in /// the passes after it closes pub(crate) fn under_pointer(ui: &Ui, canvas: &Response, hovered: bool, search: Id) -> bool { @@ -41,23 +58,28 @@ pub(crate) fn under_pointer(ui: &Ui, canvas: &Response, hovered: bool, search: I /// Settle the focus and Tab once the canvas has handled its input. A graph that opens or becomes active asks for the /// focus, and so does the canvas while nothing is focused and Tab opens its node search (`opens_search`): a click on a /// panel leaves the focus nowhere. It waits for a dialog, menu or popup to close, and leaves the focus with a text field -/// and with a widget of another window. +/// and, after [`FOCUS_PASSES`], with a widget of another window. pub(crate) fn settle(app: &mut MaterialCraftApp, ui: &Ui, opens_search: bool) { let ctx = ui.ctx(); let opens_search = opens_search && app.ui.prefs.tab_opens_node_search && !Modality::capture(app, ctx).is_blocked(); let shown = Some((app.session.document_id, app.session.graph, app.graph.annotation_target.clone())); if app.graph.shown != shown { app.graph.shown = shown; - app.graph.wants_focus = true; + app.graph.focus_passes = FOCUS_PASSES; } let focused = ctx.memory(|memory| memory.focused()); let unfocused = opens_search && focused.is_none() && !ui.input(|input| input.pointer.any_down()); - if (app.graph.wants_focus || unfocused) && !overlay_open(app, ctx) { - app.graph.wants_focus = false; + if (app.graph.focus_passes > 0 || unfocused) && !overlay_open(app, ctx) { let same_window = focused.is_none_or(|id| ctx.read_response(id).is_some_and(|widget| widget.layer_id == ui.layer_id())); - if same_window && !ctx.text_edit_focused() { + if ctx.text_edit_focused() { + app.graph.focus_passes = 0; + } else if same_window { + app.graph.focus_passes = 0; focus_canvas(ctx); + } else { + app.graph.focus_passes = app.graph.focus_passes.saturating_sub(1); + ctx.request_repaint(); } } host_canvas(ctx, opens_search); diff --git a/crates/ui-egui/src/graph/graph_view.rs b/crates/ui-egui/src/graph/graph_view.rs index d73aede7..28061ea2 100644 --- a/crates/ui-egui/src/graph/graph_view.rs +++ b/crates/ui-egui/src/graph/graph_view.rs @@ -7,8 +7,8 @@ pub struct GraphView { pub(crate) keyboard_was_focused: bool, /// The document, graph and nested editor shown last frame pub(super) shown: Option<(u64, usize, materialcraft_engine::AnnotationTarget)>, - /// What is shown changed, and the canvas has yet to ask for the keyboard focus - pub(super) wants_focus: bool, + /// The passes left in which the canvas asks for the keyboard focus, after what is shown changed + pub(super) focus_passes: u8, pub(super) thumbnails_cleared: bool, pub(super) drag: Option, pub(super) search: Option, @@ -61,7 +61,7 @@ impl Default for GraphView { inspected_node: None, keyboard_was_focused: false, shown: None, - wants_focus: false, + focus_passes: 0, thumbnails_cleared: false, drag: None, search: None, diff --git a/crates/ui-egui/src/graph/input.rs b/crates/ui-egui/src/graph/input.rs index f85539c8..d4e420ab 100644 --- a/crates/ui-egui/src/graph/input.rs +++ b/crates/ui-egui/src/graph/input.rs @@ -239,7 +239,7 @@ pub(super) fn handle( } let at = app.graph.menu_at; - canvas.context_menu(|ui| match app.graph.menu_wire.clone() { + super::canvas_focus::context_menu(canvas, |ui| match app.graph.menu_wire.clone() { Some(wire) => wire_menu(app, ui, wire, at), None => super::context_menu::show(app, ui, at, None), }); diff --git a/crates/ui-egui/src/pattern/canvas.rs b/crates/ui-egui/src/pattern/canvas.rs index 25885634..f1d3168c 100644 --- a/crates/ui-egui/src/pattern/canvas.rs +++ b/crates/ui-egui/src/pattern/canvas.rs @@ -50,7 +50,7 @@ pub(crate) fn show(app: &mut MaterialCraftApp, ui: &mut Ui) { let points = if slot.is_some() { geometry::wire(source.pos, pointer) } else { geometry::wire(pointer, source.pos) }; ui.painter_at(response.rect).add(egui::epaint::CubicBezierShape::from_points_stroke(points, false, Color32::TRANSPARENT, Stroke::new(2.0, PORT_COLOR))); } - response.context_menu(|ui| super::context_menu::show(app, &mut editor, ui)); + crate::graph::canvas_focus::context_menu(&response, |ui| super::context_menu::show(app, &mut editor, ui)); crate::graph::canvas_focus::settle(app, ui, false); editor.inspected_node = crate::graph::node_selection::inspected(&editor.selection, editor.inspected_node); app.pattern_editor = Some(editor); diff --git a/crates/ui-egui/tests/it/canvas_focus.rs b/crates/ui-egui/tests/it/canvas_focus.rs index 92579ba0..a5a1fee8 100644 --- a/crates/ui-egui/tests/it/canvas_focus.rs +++ b/crates/ui-egui/tests/it/canvas_focus.rs @@ -1,10 +1,14 @@ //! The graph canvas as a Tab stop: it keeps the focus Tab gives it, a press and an opening graph give it the focus, Tab //! over it opens the node search, and its keys work as with nothing focused +use egui::accesskit::Role; use egui::{Event, Id, Key, Modifiers, PointerButton, vec2}; -use egui_kittest::{Harness, kittest::Queryable}; +use egui_kittest::{ + Harness, + kittest::{By, Queryable}, +}; use materialcraft_ui_egui::framework::{canvas_id, install_headless}; -use materialcraft_ui_egui::{MaterialCraftApp, UiState}; +use materialcraft_ui_egui::{MaterialCraftApp, UiState, menus}; type AppHarness = Harness<'static, MaterialCraftApp>; @@ -56,18 +60,16 @@ fn tab_walks_over_the_canvas_to_the_stops_after_it_and_back() { } #[test] -fn tab_with_the_pointer_over_the_canvas_opens_the_search_and_shift_tab_and_f6_leave_it() { +fn tab_with_the_pointer_over_the_canvas_opens_the_search_and_shift_tab_leaves_it() { let mut h = harness(materialcraft_engine::new_session()); let canvas = Some(canvas_id()); hover_canvas(&mut h); - for (modifiers, key) in [(Modifiers::SHIFT, Key::Tab), (Modifiers::NONE, Key::F6)] { - let left = press(&mut h, modifiers, key); - assert!(left.is_some() && left != canvas, "{key:?} leaves the canvas"); - assert!(!search_open(&h)); - h.ctx.memory_mut(|memory| memory.surrender_focus(left.unwrap())); - h.run_steps(2); - assert_eq!(focused(&h), canvas, "with nothing focused, the canvas under the pointer takes the keyboard"); - } + let left = press(&mut h, Modifiers::SHIFT, Key::Tab); + assert!(left.is_some() && left != canvas, "Shift+Tab leaves the canvas"); + assert!(!search_open(&h)); + h.ctx.memory_mut(|memory| memory.surrender_focus(left.unwrap())); + h.run_steps(2); + assert_eq!(focused(&h), canvas, "with nothing focused, the canvas under the pointer takes the keyboard"); press(&mut h, Modifiers::NONE, Key::Tab); assert!(search_open(&h), "Tab opens the search"); @@ -96,6 +98,42 @@ fn a_press_in_the_canvas_takes_the_keyboard_from_a_toolbar_button() { assert!(!h.state().ui.windows.new_graph, "and not to the button"); } +#[test] +fn enter_in_the_canvas_menu_adds_the_node_its_letter_filters() { + let mut h = harness(materialcraft_engine::new_session()); + hover_canvas(&mut h); + let pos = h.state().graph.view.center(); + for pressed in [true, false] { + h.event(Event::PointerButton { pos, button: PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }); + } + h.run_steps(3); + h.get_by_label("Add node").hover(); + h.run_steps(3); + assert_eq!(focused(&h), Some(canvas_id())); + + press(&mut h, Modifiers::NONE, Key::L); + press(&mut h, Modifiers::NONE, Key::Enter); + assert_eq!(h.state().session.graph().unwrap().nodes.len(), 1); + assert!(h.query_by_label("Add node").is_none(), "and the menu closes"); +} + +#[test] +fn a_graph_created_by_keyboard_in_a_dialog_gets_the_focus() { + let mut h = harness(materialcraft_engine::sample_session()); + let ctx = h.ctx.clone(); + menus::invoke(h.state_mut(), &ctx, "ui.newFunctionGraph"); + h.run_steps(4); + h.state_mut().ui.new_graph_package = None; + h.get(By::new().role(Role::Button).label("Create")).focus(); + h.run_steps(2); + assert!(h.get(By::new().role(Role::Button).label("Create")).is_focused()); + + press(&mut h, Modifiers::NONE, Key::Enter); + h.run_steps(4); + assert!(h.state().session.graph().unwrap().function.is_some()); + assert_eq!(focused(&h), Some(canvas_id())); +} + #[test] fn shortcuts_run_with_the_canvas_focused() { let mut h = harness(materialcraft_engine::sample_session()); diff --git a/crates/ui-egui/tests/snapshot/graph_items.rs b/crates/ui-egui/tests/snapshot/graph_items.rs index 852ebe61..a4005524 100644 --- a/crates/ui-egui/tests/snapshot/graph_items.rs +++ b/crates/ui-egui/tests/snapshot/graph_items.rs @@ -39,7 +39,7 @@ fn navigation_pin_library_drop_and_properties_in_every_canvas() { assert_eq!(target.items(&harness.state().session).unwrap().pins.len(), 1, "{kind}"); let input = By::new().role(Role::TextInput).label("Navigation Pin description"); assert!(harness.query(input.clone()).is_some(), "{kind}"); - assert!(harness.ctx.egui_wants_keyboard_input(), "new pin description must receive focus: {kind}"); + assert!(harness.ctx.text_edit_focused(), "new pin description must receive focus: {kind}"); harness.event(Event::ModifiersChanged(Modifiers::COMMAND)); harness.event(Event::Key { key: Key::A, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::COMMAND }); harness.step(); From 650ab975181b2bc2d773e03ab34857e8883f37aa Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 15:11:22 +0000 Subject: [PATCH 13/24] The frame that installs the fonts draws nothing when egui runs it again --- crates/ui-egui/src/material_craft_app.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/material_craft_app.rs b/crates/ui-egui/src/material_craft_app.rs index 86727f3d..018d5912 100644 --- a/crates/ui-egui/src/material_craft_app.rs +++ b/crates/ui-egui/src/material_craft_app.rs @@ -73,6 +73,8 @@ pub struct MaterialCraftApp { pub fonts: fonts::UiFonts, /// The icon font is installed (it takes effect on the frame after `set_fonts`) fonts_ready: bool, + /// The frame that only installed the fonts: egui runs it again once they are loaded. + fonts_frame: Option, ui_gesture_active: bool, /// The version this build names itself with: the Launcher's feed identity for a Nightly. pub build_version: String, @@ -154,6 +156,7 @@ impl MaterialCraftApp { system_clipboard: None, fonts: fonts::UiFonts::default(), fonts_ready: false, + fonts_frame: None, ui_gesture_active: false, build_version: materialcraft_engine::VERSION.to_owned(), build_commit: String::new(), @@ -499,6 +502,10 @@ impl MaterialCraftApp { ctx.request_repaint(); return; } + if self.reruns_fonts_frame(ctx) { + ctx.request_repaint(); + return; + } i18n::set_language(&self.ui.prefs.language); self.fonts.update(ctx, &self.ui.prefs.language, self.ui.windows.preferences); @@ -558,15 +565,25 @@ impl MaterialCraftApp { } } + /// Whether this pass is egui's rerun of the frame that only installed the fonts + fn reruns_fonts_frame(&mut self, ctx: &egui::Context) -> bool { + self.fonts_frame = self.fonts_frame.filter(|frame| *frame == ctx.cumulative_frame_nr()); + self.fonts_frame.is_some() + } + /// Draw the whole window into `ui` pub fn draw(&mut self, ui: &mut egui::Ui) { crate::annotation::activate(self, crate::annotation::target(self)); + let ctx = ui.ctx().clone(); if !self.fonts_ready { self.fonts_ready = true; + self.fonts_frame = Some(ctx.cumulative_frame_nr()); + return; + } + if self.reruns_fonts_frame(&ctx) { return; } - let ctx = ui.ctx().clone(); let t0 = now_ms(); // Tab can focus a menu or toolbar button while drawing; preserve keyboard ownership From 5a480d1bd1dd60de9f2855dfabab172ff7bab442 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 15:43:23 +0000 Subject: [PATCH 14/24] Escape releases the keyboard from a dock control --- crates/ui-egui/src/framework.rs | 13 +++++++++++++ crates/ui-egui/src/material_craft_app.rs | 1 + crates/ui-egui/tests/it/canvas_focus.rs | 15 +++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 7a9592cd..ce8ea171 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -187,6 +187,19 @@ pub(crate) fn take_window_cancel(ctx: &egui::Context) -> bool { window_cancel(ctx, true) } +/// Releases the keyboard from a framework widget (a dock tab row, a panel's drag band) when nothing took the Escape +/// pressed on it, as egui does for MaterialCraft's own widgets. Called last in the UI: what is drawn before it takes its +/// Escape first. A framework modal keeps the focus in it, and a text field its own. +pub(crate) fn release_keyboard(ctx: &egui::Context) { + if let Some(focused) = focused_widget(ctx) + && !ctx.text_edit_focused() + && !overlay::any_open(ctx, OpenFilter::Modal) + && take_window_cancel(ctx) + { + ctx.memory_mut(|memory| memory.surrender_focus(focused)); + } +} + /// Whether the window's cancel is there and untaken; `take` takes it. fn window_cancel(ctx: &egui::Context, take: bool) -> bool { let mut pending = false; diff --git a/crates/ui-egui/src/material_craft_app.rs b/crates/ui-egui/src/material_craft_app.rs index 018d5912..93ddcf7d 100644 --- a/crates/ui-egui/src/material_craft_app.rs +++ b/crates/ui-egui/src/material_craft_app.rs @@ -597,6 +597,7 @@ impl MaterialCraftApp { egui::CentralPanel::default().frame(egui::Frame::NONE.fill(theme::Tokens::get(&ctx).chrome)).show(ui, |ui| docking::show(self, ui)); windows::show(self, &ctx); self.framework_dialogs.run(ui); + crate::framework::release_keyboard(&ctx); #[cfg(not(target_arch = "wasm32"))] if crate::window_controls::app_draws_frame(&ctx) { crate::window_controls::resize_zones(ui); diff --git a/crates/ui-egui/tests/it/canvas_focus.rs b/crates/ui-egui/tests/it/canvas_focus.rs index a5a1fee8..0efc5370 100644 --- a/crates/ui-egui/tests/it/canvas_focus.rs +++ b/crates/ui-egui/tests/it/canvas_focus.rs @@ -77,6 +77,21 @@ fn tab_with_the_pointer_over_the_canvas_opens_the_search_and_shift_tab_leaves_it assert!(!search_open(&h)); } +#[test] +fn escape_releases_the_keyboard_from_the_dock_controls_after_the_canvas() { + let mut h = harness(materialcraft_engine::new_session()); + // The 3D view's tab row and its drag band + for stop in 1..=2 { + h.ctx.memory_mut(|memory| memory.request_focus(canvas_id())); + h.run_steps(2); + for _ in 0..stop { + press(&mut h, Modifiers::NONE, Key::Tab); + } + assert!(focused(&h).is_some_and(|id| id != canvas_id()), "Tab reaches stop {stop} after the canvas"); + assert_eq!(press(&mut h, Modifiers::NONE, Key::Escape), None, "Escape releases stop {stop}"); + } +} + #[test] fn a_press_in_the_canvas_takes_the_keyboard_from_a_toolbar_button() { let mut h = harness(materialcraft_engine::new_session()); From 09529001b0380dd2932879cc3eda272e1f71e3ce Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 15:51:45 +0000 Subject: [PATCH 15/24] Repin craft-libs to storytold next aa401985d --- Cargo.lock | 90 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 50 +++++++++++++++--------------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d8a7fc7..6e5ba3e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "rustix 1.1.6", ] @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "egui", ] @@ -1016,12 +1016,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "rayon", ] @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", ] @@ -1057,7 +1057,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1071,12 +1071,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "fixed_decimal", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-dds", "craft-jpeg", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "thiserror 2.0.21", ] @@ -1152,7 +1152,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-host", "craft-i18n", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1176,7 +1176,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-zip", "serde", @@ -1187,7 +1187,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde_json", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "brotli-decompressor", "chrono", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "craft-codepage", @@ -1235,7 +1235,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", ] @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "async-channel", "async-io", @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "craft-png" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "png", "thiserror 2.0.21", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "dispatch2", "egui", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1309,7 +1309,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-atomic", "craft-host", @@ -1326,7 +1326,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "bytemuck", "dds", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", "thiserror 2.0.21", @@ -1383,12 +1383,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-i18n", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "accesskit", "craft-behavior", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1467,7 +1467,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1506,7 +1506,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1545,7 +1545,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "craft-host", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "winsafe", ] @@ -1582,7 +1582,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-appkit", "craft-atomic", @@ -1606,7 +1606,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "flate2", "thiserror 2.0.21", diff --git a/Cargo.toml b/Cargo.toml index 33431d36..04c0d07c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "0.1.0" } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,33 +91,33 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-host = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-host = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["egui"] } +craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } -craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } +craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["parallel"] } +craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] From ea9590b75af680888e36ea7f0cbe43b05fc76b25 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 15:51:49 +0000 Subject: [PATCH 16/24] Canvas focus comment: a click on a panel leaves the canvas focused --- crates/ui-egui/src/graph/canvas_focus.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/graph/canvas_focus.rs b/crates/ui-egui/src/graph/canvas_focus.rs index cd2b51fb..90adeb52 100644 --- a/crates/ui-egui/src/graph/canvas_focus.rs +++ b/crates/ui-egui/src/graph/canvas_focus.rs @@ -56,9 +56,9 @@ pub(crate) fn under_pointer(ui: &Ui, canvas: &Response, hovered: bool, search: I } /// Settle the focus and Tab once the canvas has handled its input. A graph that opens or becomes active asks for the -/// focus, and so does the canvas while nothing is focused and Tab opens its node search (`opens_search`): a click on a -/// panel leaves the focus nowhere. It waits for a dialog, menu or popup to close, and leaves the focus with a text field -/// and, after [`FOCUS_PASSES`], with a widget of another window. +/// focus, and so does the canvas while nothing is focused and Tab opens its node search (`opens_search`). It waits for a +/// dialog, menu or popup to close, and leaves the focus with a text field and, after [`FOCUS_PASSES`], with a widget +/// of another window. pub(crate) fn settle(app: &mut MaterialCraftApp, ui: &Ui, opens_search: bool) { let ctx = ui.ctx(); let opens_search = opens_search && app.ui.prefs.tab_opens_node_search && !Modality::capture(app, ctx).is_blocked(); From d50e985a6ef2d2477d4c85d5b6ee019a77a1f5b6 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:24:57 +0000 Subject: [PATCH 17/24] F6 and Shift+F6 node shortcuts run and record again As before the move to the craft-ui runtime, F6 and Shift+F6 reach MaterialCraft's node shortcuts and the shortcut recorder. The runtime's pane moves, which took both chords out of egui's input, are unbound. --- crates/ui-egui/src/framework.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index ce8ea171..7d7e999e 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -16,7 +16,7 @@ use craft_host::target::ShellInfo; use craft_host::{AppInfo, Host}; use craft_keymap::{Chord, Key, Overrides}; use craft_ui::fonts::{I18nScripts, SystemFonts, UiFonts}; -use craft_ui::runtime::commands::{CommandInput, CommandSet as _, QuitCommand}; +use craft_ui::runtime::commands::{CommandInput, CommandSet as _, NavCommand, QuitCommand}; use craft_ui::runtime::env::{RootEnv, Scale}; use craft_ui::runtime::focus::{self, EditSet, FocusTarget, KeyUse}; use craft_ui::runtime::frame::{FrameInput, FrameOutput}; @@ -91,13 +91,16 @@ pub(crate) fn host() -> Arc { } /// MaterialCraft quits with its own `ui.quit` (File > Exit, Ctrl+Q), which its shortcuts read from egui, so the -/// framework's `window.quit` is unbound. Overrides are keyed by command id, which the command set gives. +/// framework's `window.quit` is unbound. So are its F6 and Shift+F6 pane moves: Preferences > Shortcuts assigns any +/// chord to a node. Overrides are keyed by command id, which the command set gives. fn command_overrides() -> Arc { static OVERRIDES: OnceLock> = OnceLock::new(); OVERRIDES .get_or_init(|| { let mut overrides = Overrides::new(); - overrides.insert(QuitCommand::Quit.id(), Vec::new()); + for id in [QuitCommand::Quit.id(), NavCommand::NextPane.id(), NavCommand::PreviousPane.id()] { + overrides.insert(id, Vec::new()); + } Arc::new(overrides) }) .clone() @@ -114,7 +117,7 @@ impl MaterialCraftApp { } /// The root values of this frame. MaterialCraft registers no commands with the runtime (it unbinds the framework's - /// quit, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the + /// quit and pane moves, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the /// root window, the runtime blocks the panels floated into windows of their own. pub(crate) fn frame_input(&mut self, ctx: &egui::Context, _output: FrameOutput, scale: f32) -> FrameInput { use crate::theme::Brightness; From 54053124b726b6158128d923f9270b59cb7ecb51 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:24:57 +0000 Subject: [PATCH 18/24] A command's floating panel comes in front of the other windows again As before the move to the craft-ui dock, showing a panel from the Windows menu, the explorer, the graph or the library raises the floating window that holds it, once. Docked panels only become the front tab. --- crates/ui-egui/src/docking.rs | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs index 5534aa41..5d8a1613 100644 --- a/crates/ui-egui/src/docking.rs +++ b/crates/ui-egui/src/docking.rs @@ -158,11 +158,13 @@ pub fn validate(workspace: &Workspace) -> Result<(), String> { #[derive(Clone, Debug)] pub struct Dock { workspace: Workspace, + /// A panel to bring in front of the other floating windows on the next frame. + raise: Option, } impl Default for Dock { fn default() -> Self { - Dock { workspace: default_workspace() } + Dock { workspace: default_workspace(), raise: None } } } @@ -195,7 +197,7 @@ impl Dock { if validate(&workspace).is_err() { return Dock::default(); } - Dock { workspace } + Dock { workspace, raise: None } } pub fn workspace(&self) -> &Workspace { @@ -227,7 +229,10 @@ impl Dock { pub fn focus(&mut self, p: Panel) { let mut next = self.workspace.clone(); match next.set_visible(p, true, None, false, permissions) { - Ok(()) if validate(&next).is_ok() => self.workspace = next, + Ok(()) if validate(&next).is_ok() => { + self.workspace = next; + self.raise = Some(p); + } Ok(()) => log::warn!("panel {p:?} was not opened: it would break the graph's rules"), Err(error) => log::warn!("panel {p:?} was not opened: {error}"), } @@ -319,11 +324,16 @@ pub fn show(app: &mut MaterialCraftApp, ui: &mut Ui) { let shown = app.docks.shown(&app.ui.dock.workspace); // The specs leave the app while its panels borrow it, and come back with their revision. let specs = std::mem::take(&mut app.docks.specs); + let raise = app.ui.dock.raise.take(); // Panels arrange in a split tree around the graph; floating title bars only move windows. let config = DockConfig::default().new_dock_zones(false).title_bar_docks(false); let output = { let mut panels = Panels { app: &mut *app }; - DockArea::new("Panels", Bind::given(Arc::clone(&shown)), &specs, &mut panels, config).show(ui) + let mut area = DockArea::new("Panels", Bind::given(Arc::clone(&shown)), &specs, &mut panels, config); + if let Some(panel) = raise { + area = area.raise(panel); + } + area.show(ui) }; app.docks.specs = specs; if let Some(error) = &output.error { @@ -404,6 +414,22 @@ mod tests { assert_eq!(modal(&mut app), None, "the Shortcuts list does not block"); } + #[test] + fn a_focused_panel_is_raised_for_one_frame() { + let mut app = crate::MaterialCraftApp::headless(materialcraft_engine::sample_session(), crate::UiState::default()); + let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); + app.ui.dock.focus(Panel::Properties); + assert_eq!(app.ui.dock.raise, Some(Panel::Properties)); + + // The first frame only installs the fonts + for _ in 0..2 { + ctx.run_ui(egui::RawInput::default(), |ui| app.draw(ui)).textures_delta.clear(); + } + + assert_eq!(app.ui.dock.raise, None); + } + #[test] fn default_dock_round_trips() { let dock = Dock::default(); From 266a94ea865ef6105e935d92fd5700a49b50108e Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:24:58 +0000 Subject: [PATCH 19/24] Resetting the layout cancels a panel drag in progress again As before the move to the craft-ui dock, a tab held while the layout resets is not dropped into the reset layout. The reset replaces the workspace, so its generation changes; ordinary edits keep theirs. --- crates/ui-egui/src/docking.rs | 18 ++++++++++++++++++ crates/ui-egui/src/menus.rs | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs index 5d8a1613..0e2fe4e1 100644 --- a/crates/ui-egui/src/docking.rs +++ b/crates/ui-egui/src/docking.rs @@ -213,6 +213,12 @@ impl Dock { self.workspace.layout().panel_state(&p) == PanelState::Front } + /// Puts the default layout back. It replaces the workspace instead of editing it, which ends a drag in progress. + pub fn reset(&mut self) { + self.workspace.replace(default_workspace()); + self.raise = None; + } + /// Hide a visible panel, otherwise bring it up. pub fn toggle(&mut self, p: Panel) { if self.is_visible(p) { self.close(p) } else { self.focus(p) } @@ -438,6 +444,18 @@ mod tests { assert_eq!(back, dock); } + #[test] + fn only_a_reset_replaces_the_workspace() { + let mut dock = Dock::default(); + let start = dock.workspace().generation(); + dock.focus(Panel::Console); + dock.close(Panel::Library); + assert_eq!(dock.workspace().generation(), start); + dock.reset(); + assert_ne!(dock.workspace().generation(), start); + assert_eq!(dock, Dock::default()); + } + #[test] fn the_graph_stays_put_and_panels_come_back() { let mut dock = Dock::default(); diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index b5a69f8e..4668e04e 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -251,7 +251,7 @@ pub fn invoke(app: &mut MaterialCraftApp, ctx: &egui::Context, id: &str) { "ui.quit" => ctx.send_viewport_cmd(egui::ViewportCommand::Close), "ui.preferences" => app.ui.windows.preferences = true, "ui.view.graph" => {} - "ui.resetLayout" => app.ui.dock = crate::docking::Dock::default(), + "ui.resetLayout" => app.ui.dock.reset(), "ui.closeAll" => crate::unsaved::guard(app, crate::unsaved::Guarded::Menu { id: id.to_string() }), "file.newPackage" => { app.run("file.newPackage", serde_json::json!({})); From 8b2dafdffedfd5835d7680f9a46e22706ff22342 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:24:58 +0000 Subject: [PATCH 20/24] Close test: a clean window's close is checked without quitting The test asserts MaterialCraft's own close decision for a clean package, as it did with an injected quit, so it passes on macOS, where the platform's quit cancels the window close. Unsaved work still runs the whole close frame. --- crates/ui-egui/src/material_craft_app.test.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/material_craft_app.test.rs b/crates/ui-egui/src/material_craft_app.test.rs index 30e34881..1634b5f4 100644 --- a/crates/ui-egui/src/material_craft_app.test.rs +++ b/crates/ui-egui/src/material_craft_app.test.rs @@ -104,7 +104,8 @@ mod close_order_tests { let mut clean = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default()); clean.fonts_ready = true; clean.session.modified = false; - assert!(!close_frame(&mut clean), "nothing to hold: the hook sees a close to take over"); + // Only the app's decision: a close that goes ahead ends in the platform's quit, which macOS answers by canceling it. + assert!(!crate::unsaved::close_requested(&mut clean), "nothing to hold: the hook sees a close to take over"); } } From 736e86a9616613d69abb0586e1b87eedf85649f5 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:28:00 +0000 Subject: [PATCH 21/24] Shift+Escape stays Shift+Escape when Shift is let go at once As before the move to the craft-ui runtime, an Escape shortcut matches the modifiers of its own press, not the ones held when the frame runs. --- crates/ui-egui/src/menus.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 4668e04e..7c5a0ea7 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -462,8 +462,9 @@ pub fn shortcuts(app: &mut MaterialCraftApp, ctx: &egui::Context) { // A plain Escape no widget of MaterialCraft's took is the window's cancel: it runs the Escape shortcuts if crate::framework::take_window_cancel(ctx) { + let held = craft_ui::runtime::keys::escape_mods(ctx).unwrap_or_default(); + let modifiers = egui::Modifiers { shift: held.shift, alt: held.alt, ..Default::default() }; ctx.input_mut(|i| { - let modifiers = i.modifiers; i.events.insert(0, egui::Event::Key { key: egui::Key::Escape, physical_key: Some(egui::Key::Escape), pressed: true, repeat: false, modifiers }); }); } From da7c19d803a1eb918fba3fa4e1ec9d973dca5567 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:53:01 +0000 Subject: [PATCH 22/24] Ctrl+Q quits from a text field, a dialog and a floating panel's window As before the move to the craft-ui runtime, Ctrl+Q asks the main window to close whatever has the keyboard there, so unsaved work is asked about. In a floating panel's own window, where the key closed only that window, it asks in the same way. The runtime's Quit command runs the key. --- crates/ui-egui/src/framework.rs | 11 +++++------ crates/ui-egui/src/menus.rs | 8 +++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 7d7e999e..a7f69aeb 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -16,7 +16,7 @@ use craft_host::target::ShellInfo; use craft_host::{AppInfo, Host}; use craft_keymap::{Chord, Key, Overrides}; use craft_ui::fonts::{I18nScripts, SystemFonts, UiFonts}; -use craft_ui::runtime::commands::{CommandInput, CommandSet as _, NavCommand, QuitCommand}; +use craft_ui::runtime::commands::{CommandInput, CommandSet as _, NavCommand}; use craft_ui::runtime::env::{RootEnv, Scale}; use craft_ui::runtime::focus::{self, EditSet, FocusTarget, KeyUse}; use craft_ui::runtime::frame::{FrameInput, FrameOutput}; @@ -90,15 +90,14 @@ pub(crate) fn host() -> Arc { ) } -/// MaterialCraft quits with its own `ui.quit` (File > Exit, Ctrl+Q), which its shortcuts read from egui, so the -/// framework's `window.quit` is unbound. So are its F6 and Shift+F6 pane moves: Preferences > Shortcuts assigns any -/// chord to a node. Overrides are keyed by command id, which the command set gives. +/// Preferences > Shortcuts assigns any chord to a node, so the runtime's F6 and Shift+F6 pane moves are unbound. +/// Overrides are keyed by command id, which the command set gives. fn command_overrides() -> Arc { static OVERRIDES: OnceLock> = OnceLock::new(); OVERRIDES .get_or_init(|| { let mut overrides = Overrides::new(); - for id in [QuitCommand::Quit.id(), NavCommand::NextPane.id(), NavCommand::PreviousPane.id()] { + for id in [NavCommand::NextPane.id(), NavCommand::PreviousPane.id()] { overrides.insert(id, Vec::new()); } Arc::new(overrides) @@ -117,7 +116,7 @@ impl MaterialCraftApp { } /// The root values of this frame. MaterialCraft registers no commands with the runtime (it unbinds the framework's - /// quit and pane moves, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the + /// pane moves, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. While one of MaterialCraft's own egui modals shows in the /// root window, the runtime blocks the panels floated into windows of their own. pub(crate) fn frame_input(&mut self, ctx: &egui::Context, _output: FrameOutput, scale: f32) -> FrameInput { use crate::theme::Brightness; diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 7c5a0ea7..2fa9f8a9 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -503,7 +503,13 @@ pub fn shortcuts(app: &mut MaterialCraftApp, ctx: &egui::Context) { app.dispatcher.dispatch_filtered(i, &app.keymap, |hit| { let id = hit.command.id.as_str(); let keeps_escape = id == "ui.cook.cancel" && (!app.cooker.busy() || gesture_in_progress || node_search_open || label_selected); - modality.allows(id) && !(label_selected && matches!(id, "edit.copy" | "edit.cut")) && !unavailable_clipboard_commands.contains(&id) && !keeps_escape + // The runtime's Quit runs Ctrl+Q, in the panels' own windows and from text fields too + let runtime_quits = id == "ui.quit"; + modality.allows(id) + && !runtime_quits + && !(label_selected && matches!(id, "edit.copy" | "edit.cut")) + && !unavailable_clipboard_commands.contains(&id) + && !keeps_escape }) }); for hit in hits { From e3ca10ce1c21f813f67fcd605f2a4a81254be584 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 19:15:21 +0000 Subject: [PATCH 23/24] Repin craft-libs to storytold next 8fa4db64a9 and egui to b9770908e --- Cargo.lock | 110 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 70 +++++++++++++++++----------------- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e5ba3e1..c2322100 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "rustix 1.1.6", ] @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "egui", ] @@ -1016,12 +1016,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "rayon", ] @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde", ] @@ -1057,7 +1057,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1071,12 +1071,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "fixed_decimal", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-dds", "craft-jpeg", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "thiserror 2.0.21", ] @@ -1152,7 +1152,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-host", "craft-i18n", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1176,7 +1176,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-zip", "serde", @@ -1187,7 +1187,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde_json", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "brotli-decompressor", "chrono", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "craft-codepage", @@ -1235,7 +1235,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde", ] @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "async-channel", "async-io", @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "craft-png" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "png", "thiserror 2.0.21", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "dispatch2", "egui", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1309,7 +1309,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-atomic", "craft-host", @@ -1326,7 +1326,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bytemuck", "dds", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde", "thiserror 2.0.21", @@ -1383,12 +1383,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-i18n", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "accesskit", "craft-behavior", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1467,7 +1467,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1506,7 +1506,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1545,7 +1545,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "craft-host", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "winsafe", ] @@ -1582,7 +1582,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-appkit", "craft-atomic", @@ -1606,7 +1606,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1931,7 +1931,7 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "bytemuck", "emath", @@ -1941,7 +1941,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "ahash", "bytemuck", @@ -1978,7 +1978,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "accesskit", "ahash", @@ -2006,7 +2006,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "ahash", "bytemuck", @@ -2025,7 +2025,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "accesskit_winit", "arboard", @@ -2048,7 +2048,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "bytemuck", "egui", @@ -2061,7 +2061,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "dify", "eframe", @@ -2087,7 +2087,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "bytemuck", "serde", @@ -2160,7 +2160,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "ahash", "bytemuck", @@ -2187,7 +2187,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" [[package]] name = "equivalent" diff --git a/Cargo.toml b/Cargo.toml index 04c0d07c..a0533486 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "0.1.0" } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,47 +91,47 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-host = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-host = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["egui"] } +craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } -craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } +craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["parallel"] } +craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] -ecolor = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -emath = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -epaint = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -egui = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -egui-winit = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -egui_glow = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +ecolor = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +emath = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +epaint = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +egui = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +egui-winit = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +egui_glow = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } # egui-phosphor has no release for egui 0.37 (vendor/egui-phosphor/VENDORED.md). egui-phosphor = { path = "vendor/egui-phosphor" } From ec3b368c9f45327b36bdf2ef7b22a76f6dff66fd Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 26 Nov 2026 00:45:07 +0000 Subject: [PATCH 24/24] Repin craft-libs to storytold main d701080517; a hidden update result shows again after the prompt craft-libs main carries the Dock Panel placement fix (storytold/craft-libs#3601): a panel docked back from a float, or reopened after it was closed while floating, returns to its place beside its old neighbour. --- Cargo.lock | 94 ++++++++++++++++---------------- Cargo.toml | 50 ++++++++--------- crates/ui-egui/src/updates_ui.rs | 2 + 3 files changed, 74 insertions(+), 72 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2322100..5499d91b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -972,7 +972,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "rustix 1.1.6", ] @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "egui", ] @@ -1016,12 +1016,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "rayon", ] @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "serde", ] @@ -1057,7 +1057,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1071,12 +1071,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "chrono", "fixed_decimal", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-dds", "craft-jpeg", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "thiserror 2.0.21", ] @@ -1152,7 +1152,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-host", "craft-i18n", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1176,7 +1176,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-zip", "serde", @@ -1187,7 +1187,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-behavior", "craft-host", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "serde_json", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "brotli-decompressor", "chrono", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "chrono", "craft-codepage", @@ -1235,7 +1235,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "serde", ] @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "async-channel", "async-io", @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "craft-png" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "png", "thiserror 2.0.21", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "dispatch2", "egui", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1309,7 +1309,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-atomic", "craft-host", @@ -1326,7 +1326,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "bytemuck", "dds", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "serde", "thiserror 2.0.21", @@ -1383,12 +1383,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-behavior", "craft-i18n", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "accesskit", "craft-behavior", @@ -1456,7 +1456,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1467,7 +1467,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-behavior", "craft-host", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-behavior", "craft-host", @@ -1506,7 +1506,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-behavior", "craft-host", @@ -1545,7 +1545,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "chrono", "craft-host", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "winsafe", ] @@ -1582,7 +1582,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "craft-appkit", "craft-atomic", @@ -1606,7 +1606,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" +source = "git+https://github.com/storytold/craft-libs?rev=d7010805175ba1190d521b2565852bdda39e632c#d7010805175ba1190d521b2565852bdda39e632c" dependencies = [ "flate2", "thiserror 2.0.21", @@ -3392,9 +3392,9 @@ dependencies = [ [[package]] name = "jpeg-encoder" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b454d911ac55068f53495488d8ccd0646eaa540c033a28ee15b07838afafb01f" +checksum = "a0370574b86f7eca156b9f298392b5e69a23f8c86f3f865add60bbc2e79467a6" [[package]] name = "js-sys" diff --git a/Cargo.toml b/Cargo.toml index a0533486..ee18d334 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "0.1.0" } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-xml = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-sbs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-zip = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,33 +91,33 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-host = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-behavior = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-host = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["egui"] } +craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-dialogs = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-platform = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } -craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-quit = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", features = ["ui"] } +craft-menu = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } -craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-atomic = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } +craft-png = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["parallel"] } +craft-texture = { git = "https://github.com/storytold/craft-libs", rev = "d7010805175ba1190d521b2565852bdda39e632c", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index 483d0e9a..a8fe0e3a 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -119,6 +119,8 @@ pub(crate) fn show(app: &mut MaterialCraftApp, ctx: &egui::Context) { dialogs.open(UpdateCheckDialog::new(materialcraft_engine::VERSION)); } else if !shows && dialogs.is_open::() { dialogs.cancel::(ctx); + // Hidden for the prompt, not dismissed: the outcome shows again after it + let _ = dialogs.take::(); } if let Some(dialog) = dialogs.get_mut::() { dialog.set_status(status);