From 88abc334d207c97e46ab526d35d265f0f870031d Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:45:28 +0000 Subject: [PATCH 01/39] minimal-port repin: 49 edits (revs 45, features 4) --- Cargo.toml | 86 +++++++++++++++++++-------------------- crates/effects/Cargo.toml | 2 +- crates/media/Cargo.toml | 2 +- crates/ui-egui/Cargo.toml | 4 +- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8a9a9d097..c1f909485 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,29 +11,29 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/storytold/craft-libs", rev = "0d6dd8bed815b8366869a800d2bf22588ca62dcb", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "068e079c7be4b100a8a6b305b31ac881e069727e", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "bc186ca719958fcce3b6ee24794277eabed14609" } -craft-quit = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-dpx = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-ps = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "068e079c7be4b100a8a6b305b31ac881e069727e", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "3b8e426a260695af840a2cd79a064d40778f939e" } -craft-gif = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "ba25ccd233934d1b2f74e3c0f235168bf5f13ef3" } -craft-tga = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } -craft-psd = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "53198114310dbc2b41e18e4eaf2fd83e69964189" } -craft-codepage = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "3dff4793f1a5bd1f99a4fe3280d48f515158dff3" } -craft-webp = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-lottie = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-doc = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-quit = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87", features = ["egui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -98,13 +98,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } -craft-frame = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } -craft-color = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } -craft-time = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } -craft-audio = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -127,7 +127,7 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87", features = ["serde"] } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -232,19 +232,19 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "068e079c7be4b100a8a6b305b31ac881e069727e", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "068e079c7be4b100a8a6b305b31ac881e069727e", version = "=0.3.0" } -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" } -egui_extras = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.3.0" } +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" } +egui_extras = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index f3b85c98a..1c4ea0b7a 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "58964adec11197594d9b6b79a94ae6232221211a" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/crates/media/Cargo.toml b/crates/media/Cargo.toml index c23ceeb05..6d8c08790 100644 --- a/crates/media/Cargo.toml +++ b/crates/media/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-audio-markers = { package = "craft-audio", version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "30596f73c5ef851ba3dad9cf145669f391e2eb0d", default-features = false } +craft-audio-markers = { package = "craft-audio", version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false } craft-docpath = { workspace = true } effectcraft-time = { workspace = true } effectcraft-color = { workspace = true } diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 81f2023c4..028344276 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -12,7 +12,7 @@ workspace = true [dependencies] craft-mime = { workspace = true } craft-ui = { workspace = true } -craft-quit = { workspace = true, features = ["egui"] } +craft-quit = { workspace = true, features = ["ui"] } effectcraft-time = { workspace = true } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } @@ -40,7 +40,7 @@ bytemuck = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # Floating panels open in OS windows of their own on desktop; the web keeps them in the page. -craft-ui = { workspace = true, features = ["native-windows"] } +craft-ui = { workspace = true } craft-update = { workspace = true } # Waits for the display pass's error scopes (immediately ready on native wgpu). pollster = { workspace = true } From fd665b636071ce0e8a4f510e3b2b9975c01a927e Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:46:22 +0000 Subject: [PATCH 02/39] minimal-port rewrite: 102 edits (dock 50, combo 31, dock rename 9, split rename 7, split 3, deps 2) --- Cargo.toml | 1 + crates/ui-egui/Cargo.toml | 1 + crates/ui-egui/src/app/window.rs | 8 +++--- crates/ui-egui/src/credits.rs | 2 +- crates/ui-egui/src/dock.rs | 28 ++++++++++--------- crates/ui-egui/src/dock_ui.rs | 7 ++--- crates/ui-egui/src/menus/invoke.rs | 6 ++-- crates/ui-egui/src/menus/tests.rs | 12 ++++---- crates/ui-egui/src/panels.rs | 4 +-- crates/ui-egui/src/panels/comp_settings.rs | 10 +++---- crates/ui-egui/src/panels/dialogs.rs | 2 +- crates/ui-egui/src/panels/dialogs_3d.rs | 8 +++--- crates/ui-egui/src/panels/essential.rs | 10 +++---- crates/ui-egui/src/panels/forms.rs | 2 +- crates/ui-egui/src/panels/key_dialogs.rs | 2 +- .../ui-egui/src/panels/layer_styles_dialog.rs | 2 +- crates/ui-egui/src/panels/markers_ui.rs | 2 +- crates/ui-egui/src/panels/primitive_dialog.rs | 2 +- crates/ui-egui/src/panels/rq_templates.rs | 4 +-- crates/ui-egui/src/panels/scriptui_view.rs | 2 +- crates/ui-egui/src/panels/settings.rs | 6 ++-- crates/ui-egui/src/panels/shortcut_editor.rs | 2 +- crates/ui-egui/src/panels/tracker.rs | 6 ++-- .../ui-egui/src/panels/viewer_text/tests.rs | 8 +++--- crates/ui-egui/src/panels/viewers.rs | 2 +- crates/ui-egui/src/workspace_state/legacy.rs | 13 +++++---- .../src/workspace_state/legacy/tests.rs | 2 +- crates/ui-egui/src/workspace_state/tests.rs | 11 ++++---- crates/ui-egui/tests/it/shared_docking_ui.rs | 13 +++++---- crates/ui-egui/tests/it/ui_effect_controls.rs | 8 +++--- crates/ui-egui/tests/it/ui_panel_windows.rs | 4 +-- crates/ui-egui/tests/it/ui_scrolling.rs | 2 +- crates/ui-egui/tests/it/ui_viewers.rs | 12 ++++---- crates/ui-egui/tests/it/ui_workspace_focus.rs | 2 +- 34 files changed, 106 insertions(+), 100 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c1f909485..ff30114bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -128,6 +128,7 @@ half = "2.7" # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 028344276..c7957f79a 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -12,6 +12,7 @@ workspace = true [dependencies] craft-mime = { workspace = true } craft-ui = { workspace = true } +craft-behavior = { workspace = true } craft-quit = { workspace = true, features = ["ui"] } effectcraft-time = { workspace = true } effectcraft-geom = { workspace = true } diff --git a/crates/ui-egui/src/app/window.rs b/crates/ui-egui/src/app/window.rs index 7326b9f32..e741932f4 100644 --- a/crates/ui-egui/src/app/window.rs +++ b/crates/ui-egui/src/app/window.rs @@ -105,10 +105,10 @@ impl EffectcraftApp { let opened = if p == PanelKind::Composition && near.is_none() && !known && self.ui.dock.is_docked(PanelKind::Timeline) { workspace .apply( - craft_ui::docking::Action::OpenAt { + craft_behavior::dock::Action::OpenAt { panel: p, anchor: PanelKind::Timeline, - placement: craft_ui::docking::Placement::Split(craft_ui::docking::Zone::Top), + placement: craft_behavior::dock::DockPlacement::Split(craft_ui::docking::Zone::Top), }, dock::permissions, ) @@ -116,7 +116,7 @@ impl EffectcraftApp { } else if known { workspace.set_visible(p, true, near, dock::permissions) } else { - workspace.apply(craft_ui::docking::Action::Open { panel: p, anchor: near }, dock::permissions).map(|_| ()) + workspace.apply(craft_behavior::dock::Action::Open { panel: p, anchor: near }, dock::permissions).map(|_| ()) }; match opened { Ok(()) => self.ui.dock = workspace, @@ -126,7 +126,7 @@ impl EffectcraftApp { } } } - let _ = self.ui.dock.apply(craft_ui::docking::Action::Activate { panel: p }, dock::permissions); + let _ = self.ui.dock.apply(craft_behavior::dock::Action::Activate { panel: p }, dock::permissions); if self.ui.dock.is_floating(p) { self.pending_panel_raise = Some(p); } diff --git a/crates/ui-egui/src/credits.rs b/crates/ui-egui/src/credits.rs index 381131fc5..213a08740 100644 --- a/crates/ui-egui/src/credits.rs +++ b/crates/ui-egui/src/credits.rs @@ -253,7 +253,7 @@ pub fn contributors_ui(ui: &mut egui::Ui, auto: &mut Registry) { } ui.separator(); ui.label(tr("Sort")); - let combo = craft_ui::ComboBox::from_id_salt("credits_sort").selected_text(tr(v.key.label().0)).show_ui(ui, |ui| { + let combo = egui::ComboBox::from_id_salt("credits_sort").selected_text(tr(v.key.label().0)).show_ui(ui, |ui| { for k in SortKey::ALL { let r = ui.selectable_label(v.key == k, tr(k.label().0)); auto.add(&format!("about.credits.sort.{}", k.id()), r.rect, k.label().0); diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index e19763f90..b08d06349 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -7,8 +7,9 @@ use egui::{Align2, Rect, Sense, Stroke, pos2, vec2}; use serde::{Deserialize, Serialize}; -pub use craft_ui::docking::{Floating, Node, PanelState, Permissions, StackEntry}; -pub use craft_ui::layout::{SplitAxis, SplitSize}; +pub use craft_behavior::dock::{Floating, Node, PanelState, Permissions, StackEntry}; +pub use craft_behavior::flow::Axis; +pub use craft_behavior::dock::SplitSize; use crate::icons::{self, Icon}; use crate::theme::Tokens; @@ -172,9 +173,9 @@ impl PanelKind { } /// The docked tree plus floating windows. -pub type Layout = craft_ui::docking::Layout; +pub type Layout = craft_behavior::dock::Layout; /// What a workspace saves: the layout, closed panels with where each goes back, and the lock. -pub type Workspace = craft_ui::docking::Workspace; +pub type Workspace = craft_behavior::dock::Workspace; /// What may happen to a panel. Every panel moves, floats and closes, as in After Effects /// (the Composition panel too: Window ▸ Composition reopens it); the last docked group staying @@ -194,11 +195,11 @@ pub fn stack(e: &[(PanelKind, bool, Option)]) -> Node { } /// Two frames side by side. pub fn hsplit(size: SplitSize, a: Node, b: Node) -> Node { - Node::Split { axis: SplitAxis::Horizontal, size, first: Box::new(a), second: Box::new(b) } + Node::Split { axis: Axis::X, size, first: Box::new(a), second: Box::new(b) } } /// Two frames one above the other. pub fn vsplit(size: SplitSize, a: Node, b: Node) -> Node { - Node::Split { axis: SplitAxis::Vertical, size, first: Box::new(a), second: Box::new(b) } + Node::Split { axis: Axis::Y, size, first: Box::new(a), second: Box::new(b) } } /// A workspace of just `root`, with no floating windows. @@ -491,7 +492,7 @@ pub fn referenced_panels(workspace: &Workspace) -> Vec { /// stack's split path (`a`/`b` per level) and the entry's index. pub fn stack_gutter_id(layout: &Layout, p: PanelKind) -> Option { fn rec(node: &Node, p: PanelKind, path: &mut String, depth: usize) -> Option { - if depth > craft_ui::docking::MAX_DEPTH { + if depth > craft_behavior::dock::MAX_DEPTH { return None; } match node { @@ -703,7 +704,8 @@ pub fn placeholder(ui: &mut egui::Ui, rect: Rect, t: &Tokens, text: &str) { mod tests { use super::*; use PanelKind::*; - use craft_ui::docking::{Action, Placement, Zone}; + use craft_behavior::dock::{Action, DockPlacement}; + use craft_ui::docking::Zone; fn apply(w: &mut Workspace, action: Action) { w.apply(action, permissions).unwrap(); @@ -751,7 +753,7 @@ mod tests { fn default_right_column_is_a_short_preview_frame_over_the_properties_frame() { let default = workspace("Default"); let Some(Node::Split { second, size: SplitSize::FixedSecond(300.0), .. }) = &default.root else { panic!("{default:?}") }; - let Node::Split { axis: SplitAxis::Vertical, size: SplitSize::FixedFirst(PREVIEW_FRAME), first, second } = second.as_ref() else { + let Node::Split { axis: Axis::Y, size: SplitSize::FixedFirst(PREVIEW_FRAME), first, second } = second.as_ref() else { panic!("{second:?}") }; assert_eq!(**first, tabs(&[Preview], 0)); @@ -759,7 +761,7 @@ mod tests { let mut w = Workspace::new(default); assert!(w.is_visible(Preview) && w.is_visible(Properties) && !w.is_visible(Align)); // The Properties frame takes tabs; the Preview frame stays a frame of its own. - apply(&mut w, Action::Move { panel: Project, anchor: Properties, placement: Placement::Tab { before: None } }); + apply(&mut w, Action::Move { panel: Project, anchor: Properties, placement: DockPlacement::Tab { before: None } }); assert_eq!(w.group_of(Project), vec![Properties, Align, Audio, EffectsPresets, Project]); assert_eq!(w.group_of(Preview), vec![Preview]); } @@ -767,15 +769,15 @@ mod tests { #[test] fn panels_split_off_and_join_tab_groups() { let mut w = docked(hsplit(SplitSize::FixedFirst(300.0), tabs(&[Project, EffectControls], 0), tabs(&[Composition, Layer], 0))); - apply(&mut w, Action::Move { panel: EffectControls, anchor: Composition, placement: Placement::Split(Zone::Right) }); + apply(&mut w, Action::Move { panel: EffectControls, anchor: Composition, placement: DockPlacement::Split(Zone::Right) }); assert_eq!(w.group_of(EffectControls), vec![EffectControls]); assert_eq!(w.group_of(Project), vec![Project]); - apply(&mut w, Action::Move { panel: EffectControls, anchor: Composition, placement: Placement::Tab { before: Some(Layer) } }); + apply(&mut w, Action::Move { panel: EffectControls, anchor: Composition, placement: DockPlacement::Tab { before: Some(Layer) } }); assert_eq!(w.group_of(Composition), vec![Composition, EffectControls, Layer]); assert!(w.is_visible(EffectControls)); // A rejected move (onto itself, onto a closed panel) changes nothing. let before = w.clone(); - assert!(w.apply(Action::Move { panel: Project, anchor: Info, placement: Placement::Split(Zone::Left) }, permissions).is_err()); + assert!(w.apply(Action::Move { panel: Project, anchor: Info, placement: DockPlacement::Split(Zone::Left) }, permissions).is_err()); assert_eq!(w, before); } diff --git a/crates/ui-egui/src/dock_ui.rs b/crates/ui-egui/src/dock_ui.rs index 1fbaa6f83..6e98e11ee 100644 --- a/crates/ui-egui/src/dock_ui.rs +++ b/crates/ui-egui/src/dock_ui.rs @@ -7,9 +7,8 @@ //! share one route. use crate::state::UiState; -use craft_ui::docking::{ - Action, Divider, DockArea, DockCommand, DockContent, DockError, DockEvent, DockStyle, FloatSpace, Floating, Hit, Node, ResizeEdge, UiDock, -}; +use craft_behavior::dock::{Action, DockError, Floating, Node}; +use craft_ui::docking::{Divider, DockArea, DockCommand, DockContent, DockEvent, DockStyle, FloatSpace, Hit, ResizeEdge, UiDock}; use egui::{Rect, Sense, Stroke, StrokeKind, pos2, vec2}; use serde_json::{Value, json}; @@ -286,7 +285,7 @@ impl EffectcraftApp { panels.into_iter().find(|panel| *panel != p) }); let actions = match anchor { - Some(anchor) => vec![Action::Move { panel: p, anchor, placement: craft_ui::docking::Placement::Tab { before: None } }], + Some(anchor) => vec![Action::Move { panel: p, anchor, placement: craft_behavior::dock::DockPlacement::Tab { before: None } }], // Nothing is docked: the panel becomes the docked layout. None => vec![Action::Close { panel: p }, Action::Open { panel: p, anchor: None }], }; diff --git a/crates/ui-egui/src/menus/invoke.rs b/crates/ui-egui/src/menus/invoke.rs index bdd614e74..4bb7fae7c 100644 --- a/crates/ui-egui/src/menus/invoke.rs +++ b/crates/ui-egui/src/menus/invoke.rs @@ -243,7 +243,7 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V // Close follows panel focus too: with the Render Queue active, Cmd+W closes that panel and // leaves the active composition open (it used to close the composition next to it). if id == "file.close" && no_params(¶ms) && app.ui.focused == PanelKind::RenderQueue { - app.apply_dock(craft_ui::docking::Action::Close { panel: PanelKind::RenderQueue })?; + app.apply_dock(craft_behavior::dock::Action::Close { panel: PanelKind::RenderQueue })?; // The focus goes to a panel that is still there, so the next Close acts on the composition // instead of on the queue that is gone. let next = [PanelKind::Timeline, PanelKind::Composition, PanelKind::Project].into_iter().find(|p| panel_shown(app, *p)).unwrap_or(PanelKind::Project); @@ -443,7 +443,7 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V "closePanel" => { let p = panel_of("panel").ok_or("closePanel: need `panel`")??; if app.ui.dock.is_open(p) { - app.apply_dock(craft_ui::docking::Action::Close { panel: p })?; + app.apply_dock(craft_behavior::dock::Action::Close { panel: p })?; } return Ok(Value::Null); } @@ -453,7 +453,7 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V Some(value) => serde_json::from_value::<[f32; 4]>(value.clone()).map_err(|_| "rect must contain four finite numbers")?, None => crate::dock_ui::default_float_rect(ctx.content_rect()), }; - app.apply_dock(craft_ui::docking::Action::Float { panel: p, rect: r }).map_err(|e| format!("can't undock {}: {e}", p.title()))?; + app.apply_dock(craft_behavior::dock::Action::Float { panel: p, rect: r }).map_err(|e| format!("can't undock {}: {e}", p.title()))?; return Ok(Value::Null); } _ => { diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index f261d1057..101c23956 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -680,7 +680,7 @@ fn closing_the_render_queue_reveals_the_panel_receiving_focus() { assert!(!app.ui.dock.is_visible(PanelKind::Project)); app.show_panel(PanelKind::RenderQueue); if maximized { - app.apply_dock(craft_ui::docking::Action::Float { panel: PanelKind::RenderQueue, rect: [50.0, 60.0, 400.0, 200.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::RenderQueue, rect: [50.0, 60.0, 400.0, 200.0] }).unwrap(); app.toggle_maximize(PanelKind::EffectControls); app.ui.focused = PanelKind::RenderQueue; assert!(app.ui.dock.is_floating(PanelKind::RenderQueue)); @@ -703,7 +703,7 @@ fn closing_a_floating_queue_preserves_the_maximized_composition() { let app = h.state_mut(); app.show_panel(PanelKind::Composition); app.show_panel(PanelKind::RenderQueue); - app.apply_dock(craft_ui::docking::Action::Float { panel: PanelKind::RenderQueue, rect: [50.0, 60.0, 400.0, 200.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::RenderQueue, rect: [50.0, 60.0, 400.0, 200.0] }).unwrap(); app.toggle_maximize(PanelKind::Composition); app.ui.focused = PanelKind::RenderQueue; assert!(app.ui.dock.is_visible(PanelKind::Timeline), "the hidden underlying tab triggers the regression"); @@ -747,10 +747,10 @@ fn queue_close_preserves_viewer_command_target() { app.ui.viewers.insert(0, Some(a)); app.ui.viewers.insert(1, Some(b)); app.ui.active_viewer = 1; - app.apply_dock(craft_ui::docking::Action::Move { + app.apply_dock(craft_behavior::dock::Action::Move { panel: PanelKind::Timeline, anchor: PanelKind::Composition, - placement: craft_ui::docking::Placement::Tab { before: None }, + placement: craft_behavior::dock::DockPlacement::Tab { before: None }, }) .unwrap(); app.close_panel(PanelKind::Timeline); @@ -779,10 +779,10 @@ fn queue_close_keeps_passive_viewer_focus_across_frames() { app.ui.viewers.insert(0, Some(a)); app.ui.viewers.insert(1, Some(b)); app.ui.active_viewer = 1; - app.apply_dock(craft_ui::docking::Action::Move { + app.apply_dock(craft_behavior::dock::Action::Move { panel: PanelKind::Timeline, anchor: PanelKind::Composition, - placement: craft_ui::docking::Placement::Tab { before: None }, + placement: craft_behavior::dock::DockPlacement::Tab { before: None }, }) .unwrap(); app.close_panel(PanelKind::Timeline); diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs index 8feb8c8c5..e0be9a80d 100644 --- a/crates/ui-egui/src/panels.rs +++ b/crates/ui-egui/src/panels.rs @@ -344,13 +344,13 @@ pub(crate) fn panel_menu_area(app: &mut EffectcraftApp, ui: &mut egui::Ui) { // only ever narrows what the area measured: the separator fills whatever width it is given ui.set_max_width(ui.max_rect().width().min(width)); if ui.button(tr("Close Panel")).clicked() { - let _ = app.dock_command(ui.ctx(), craft_ui::docking::Action::Close { panel }); + let _ = app.dock_command(ui.ctx(), craft_behavior::dock::Action::Close { panel }); close = true; } let floating = crate::dock::WorkspaceExt::is_floating(&app.ui.dock, panel); if !floating && ui.button(tr("Undock Panel")).clicked() { let r = crate::dock_ui::default_float_rect(ui.ctx().content_rect()); - let _ = app.dock_command(ui.ctx(), craft_ui::docking::Action::Float { panel, rect: r }); + let _ = app.dock_command(ui.ctx(), craft_behavior::dock::Action::Float { panel, rect: r }); close = true; } // Multiple monitors: an OS window of its own, which can go on another screen. Where diff --git a/crates/ui-egui/src/panels/comp_settings.rs b/crates/ui-egui/src/panels/comp_settings.rs index b778a3999..e1c160975 100644 --- a/crates/ui-egui/src/panels/comp_settings.rs +++ b/crates/ui-egui/src/panels/comp_settings.rs @@ -268,7 +268,7 @@ fn tab_body( .or_else(|| PRESETS.iter().find(|(_, w, h, par, f)| matches(d, *w, *h, *par, *f)).map(|p| p.0)) .unwrap_or("Custom"); ui.horizontal(|ui| { - let r = craft_ui::ComboBox::from_id_salt("comp-preset").width(300.0).selected_text(current).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("comp-preset").width(300.0).selected_text(current).show_ui(ui, |ui| { // Your own presets first, then the built-in ones. for q in custom { if ui.selectable_label(q.name == current, &q.name).clicked() { @@ -332,7 +332,7 @@ fn tab_body( .find(|(_, v)| (v - d.pixel_aspect).abs() < 1e-3) .map(|p| tr(p.0).to_string()) .unwrap_or_else(|| format!("{:.2}", d.pixel_aspect)); - let r = craft_ui::ComboBox::from_id_salt("comp-par").width(220.0).selected_text(cur).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("comp-par").width(220.0).selected_text(cur).show_ui(ui, |ui| { for (name, v) in PIXEL_ASPECTS { if ui.selectable_label((v - d.pixel_aspect).abs() < 1e-3, tr(name)).clicked() { d.pixel_aspect = *v; @@ -351,7 +351,7 @@ fn tab_body( // Any rate can be typed; the list holds the common ones. let r = ui.add(crate::widgets::drag_value(egui::DragValue::new(&mut d.fps).range(1.0..=999.0).speed(0.01).max_decimals(3))); auto.add("dialog.comp.frameRate", r.rect, "Frame Rate"); - let r = craft_ui::ComboBox::from_id_salt("comp-fps").width(18.0).selected_text("").show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("comp-fps").width(18.0).selected_text("").show_ui(ui, |ui| { for f in FRAME_RATES { if ui.selectable_label((d.fps - f).abs() < 1e-3, format!("{f}")).clicked() { d.fps = *f; @@ -369,7 +369,7 @@ fn tab_body( // the frame it renders beside it. ui.label(tr("Resolution:")); ui.horizontal(|ui| { - let r = craft_ui::ComboBox::from_id_salt("comp-resolution").width(90.0).selected_text(tr(d.resolution.label())).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("comp-resolution").width(90.0).selected_text(tr(d.resolution.label())).show_ui(ui, |ui| { for res in Resolution::ALL { ui.selectable_value(&mut d.resolution, res, tr(res.label())); } @@ -456,7 +456,7 @@ fn tab_body( Tab::Renderer => { ui.horizontal(|ui| { ui.label(tr("Renderer:")); - let r = craft_ui::ComboBox::from_id_salt("comp-renderer").selected_text(tr(if d.advanced_3d { "Advanced 3D" } else { "Classic 3D" })).show_ui( + let r = egui::ComboBox::from_id_salt("comp-renderer").selected_text(tr(if d.advanced_3d { "Advanced 3D" } else { "Classic 3D" })).show_ui( ui, |ui| { ui.selectable_value(&mut d.advanced_3d, false, tr("Classic 3D")); diff --git a/crates/ui-egui/src/panels/dialogs.rs b/crates/ui-egui/src/panels/dialogs.rs index 458ce60a9..f4033808b 100644 --- a/crates/ui-egui/src/panels/dialogs.rs +++ b/crates/ui-egui/src/panels/dialogs.rs @@ -623,7 +623,7 @@ fn solid(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { .find(|(_, v)| (v - par).abs() < 1e-3) .map(|p| p.0.to_string()) .unwrap_or_else(|| format!("{par:.2}")); - let r = craft_ui::ComboBox::from_id_salt("solid-par").width(240.0).selected_text(cur).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("solid-par").width(240.0).selected_text(cur).show_ui(ui, |ui| { for (label, v) in super::comp_settings::PIXEL_ASPECTS { if ui.selectable_label((v - par).abs() < 1e-3, *label).clicked() { par = *v; diff --git a/crates/ui-egui/src/panels/dialogs_3d.rs b/crates/ui-egui/src/panels/dialogs_3d.rs index 16137b599..6a77af92b 100644 --- a/crates/ui-egui/src/panels/dialogs_3d.rs +++ b/crates/ui-egui/src/panels/dialogs_3d.rs @@ -197,7 +197,7 @@ pub fn camera(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { super::dialogs::modal_placed(ctx, "Camera Settings", vec2(520.0, 420.0), t, place, |ui| { egui::Grid::new("cam-grid").num_columns(2).spacing([14.0, 9.0]).show(ui, |ui| { ui.label(tr("Type")); - craft_ui::ComboBox::from_id_salt("cam-type").selected_text(if d.two_node { "Two-Node Camera" } else { "One-Node Camera" }).show_ui(ui, |ui| { + egui::ComboBox::from_id_salt("cam-type").selected_text(if d.two_node { "Two-Node Camera" } else { "One-Node Camera" }).show_ui(ui, |ui| { ui.selectable_value(&mut d.two_node, true, tr("Two-Node Camera")); ui.selectable_value(&mut d.two_node, false, tr("One-Node Camera")); }); @@ -209,7 +209,7 @@ pub fn camera(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { ui.label(tr("Preset")); let focal = focal_for_zoom(w, d.zoom); let cur = PRESETS.iter().find(|(_, f)| (f - focal).abs() < 1e-6).map(|(n, _)| *n).unwrap_or("Custom"); - craft_ui::ComboBox::from_id_salt("cam-preset").selected_text(cur).show_ui(ui, |ui| { + egui::ComboBox::from_id_salt("cam-preset").selected_text(cur).show_ui(ui, |ui| { for (n, f) in PRESETS { if ui.selectable_label(cur == n, n).clicked() { d.zoom = zoom_for_focal(w, f); @@ -313,7 +313,7 @@ pub fn light(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { crate::widgets::focus_on_open(ui.ctx(), &r, &d.name); ui.end_row(); ui.label(tr("Light Type")); - let combo = craft_ui::ComboBox::from_id_salt("light-type").selected_text(tr(d.kind.label())).show_ui(ui, |ui| { + let combo = egui::ComboBox::from_id_salt("light-type").selected_text(tr(d.kind.label())).show_ui(ui, |ui| { for (i, k) in LightKind::ALL.into_iter().enumerate() { let item = ui.selectable_value(&mut d.kind, k, tr(k.label())); app.auto.add(&format!("dialog.light.typeItem.{i}"), item.rect, k.label()); @@ -337,7 +337,7 @@ pub fn light(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { } if falls_off(d.kind) { ui.label(tr("Falloff")); - craft_ui::ComboBox::from_id_salt("light-falloff").selected_text(FALLOFFS[d.falloff.min(2)]).show_ui(ui, |ui| { + egui::ComboBox::from_id_salt("light-falloff").selected_text(FALLOFFS[d.falloff.min(2)]).show_ui(ui, |ui| { for (i, f) in FALLOFFS.iter().enumerate() { ui.selectable_value(&mut d.falloff, i, *f); } diff --git a/crates/ui-egui/src/panels/essential.rs b/crates/ui-egui/src/panels/essential.rs index 5df6f6b8c..a95d0f4b5 100644 --- a/crates/ui-egui/src/panels/essential.rs +++ b/crates/ui-egui/src/panels/essential.rs @@ -76,7 +76,7 @@ fn body(app: &mut EffectcraftApp, ui: &mut egui::Ui) -> (Actions, Actions) { // ---- Primary + Solo. ui.horizontal(|ui| { ui.label(RichText::new(tr("Primary:")).color(t.text_dim)); - let r = craft_ui::ComboBox::from_id_salt("eg-primary").selected_text(&comp_name).width(150.0).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("eg-primary").selected_text(&comp_name).width(150.0).show_ui(ui, |ui| { for (id, _) in project.comps() { let name = project.item(*id).map(|i| i.name.clone()).unwrap_or_default(); if ui.selectable_label(*id == cid, name).clicked() { @@ -374,7 +374,7 @@ fn value_widget(app: &mut EffectcraftApp, ui: &mut egui::Ui, auto: &str, ty: Opt _ => vec![], }; let cur = v.as_enum() as usize; - let r = craft_ui::ComboBox::from_id_salt(("eg-dd", auto)).selected_text(opts.get(cur).cloned().unwrap_or_default()).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt(("eg-dd", auto)).selected_text(opts.get(cur).cloned().unwrap_or_default()).show_ui(ui, |ui| { for (i, o) in opts.iter().enumerate() { if ui.selectable_label(i == cur, o).clicked() { out = Some(json!(i)); @@ -443,7 +443,7 @@ fn value_widget(app: &mut EffectcraftApp, ui: &mut egui::Ui, auto: &str, ty: Opt let fams = effectcraft_engine::text::fonts::families(); let mut d = (**doc).clone(); let mut changed = false; - let r1 = craft_ui::ComboBox::from_id_salt(("eg-font", auto)).selected_text(&d.font).width(110.0).show_ui(ui, |ui| { + let r1 = egui::ComboBox::from_id_salt(("eg-font", auto)).selected_text(&d.font).width(110.0).show_ui(ui, |ui| { for (f, _) in &fams { if ui.selectable_label(*f == d.font, f).clicked() { d.font = f.clone(); @@ -452,7 +452,7 @@ fn value_widget(app: &mut EffectcraftApp, ui: &mut egui::Ui, auto: &str, ty: Opt } }); let styles: Vec = fams.iter().find(|(f, _)| *f == d.font).map(|(_, st)| st.clone()).unwrap_or_default(); - let r2 = craft_ui::ComboBox::from_id_salt(("eg-style", auto)).selected_text(&d.style).width(70.0).show_ui(ui, |ui| { + let r2 = egui::ComboBox::from_id_salt(("eg-style", auto)).selected_text(&d.style).width(70.0).show_ui(ui, |ui| { for st in &styles { if ui.selectable_label(*st == d.style, st).clicked() { d.style = st.clone(); @@ -538,7 +538,7 @@ fn instance(app: &mut EffectcraftApp, ui: &mut egui::Ui, actions: &mut Actions) .filter(|i| matches!(&i.kind, ItemKind::Footage(f) if f.has_video)) .map(|i| (i.id, i.name.clone())) .collect(); - let r = craft_ui::ComboBox::from_id_salt(("eg-media", layer.id.0, c.id)).selected_text(cur_name).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt(("eg-media", layer.id.0, c.id)).selected_text(cur_name).show_ui(ui, |ui| { for (id, name) in &items { if ui.selectable_label(*id == cur, name).clicked() { actions.push(("essential.set".into(), json!({"layer": layer.id.0, "control": c.id, "item": id.0}))); diff --git a/crates/ui-egui/src/panels/forms.rs b/crates/ui-egui/src/panels/forms.rs index 08aa9337b..4fa92bab6 100644 --- a/crates/ui-egui/src/panels/forms.rs +++ b/crates/ui-egui/src/panels/forms.rs @@ -905,7 +905,7 @@ fn form_grid(ui: &mut egui::Ui, f: &mut Form, regs: &mut Vec<(String, egui::Rect let cur = options.get(*sel).map(|o| o.0.clone()).unwrap_or_default(); // The column keeps its width: a long choice (a GPU adapter's name) ends in an // ellipsis instead of widening the form past the dialog (#978). - craft_ui::ComboBox::from_id_salt(("form", fl.key.as_str())) + egui::ComboBox::from_id_salt(("form", fl.key.as_str())) .selected_text(tr(&cur)) .width(240.0) .truncate() diff --git a/crates/ui-egui/src/panels/key_dialogs.rs b/crates/ui-egui/src/panels/key_dialogs.rs index db3144ffd..f264cd1b0 100644 --- a/crates/ui-egui/src/panels/key_dialogs.rs +++ b/crates/ui-egui/src/panels/key_dialogs.rs @@ -199,7 +199,7 @@ pub fn velocity(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { fn combo(ui: &mut egui::Ui, app: &mut EffectcraftApp, id: &str, sel: &mut usize, opts: &[&str], enabled: bool) { ui.add_enabled_ui(enabled, |ui| { // The options are the English source strings; the automation id and label stay English. - let r = craft_ui::ComboBox::from_id_salt(id).width(200.0).selected_text(tr(opts[*sel])).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt(id).width(200.0).selected_text(tr(opts[*sel])).show_ui(ui, |ui| { for (i, o) in opts.iter().enumerate() { ui.selectable_value(sel, i, tr(o)); } diff --git a/crates/ui-egui/src/panels/layer_styles_dialog.rs b/crates/ui-egui/src/panels/layer_styles_dialog.rs index 09b775e30..6afe614b5 100644 --- a/crates/ui-egui/src/panels/layer_styles_dialog.rs +++ b/crates/ui-egui/src/panels/layer_styles_dialog.rs @@ -96,7 +96,7 @@ fn control(ui: &mut egui::Ui, p: &Property, v: &KV) -> Option { } (KV::Enum(i), ParamUi::Popup { options }) => { let mut sel = *i as usize; - craft_ui::ComboBox::from_id_salt(("ls-popup", p.uid)).selected_text(options.get(sel).cloned().unwrap_or_default()).show_ui(ui, |ui| { + egui::ComboBox::from_id_salt(("ls-popup", p.uid)).selected_text(options.get(sel).cloned().unwrap_or_default()).show_ui(ui, |ui| { for (k, o) in options.iter().enumerate() { ui.selectable_value(&mut sel, k, o); } diff --git a/crates/ui-egui/src/panels/markers_ui.rs b/crates/ui-egui/src/panels/markers_ui.rs index ee33fc9de..26cfffc33 100644 --- a/crates/ui-egui/src/panels/markers_ui.rs +++ b/crates/ui-egui/src/panels/markers_ui.rs @@ -197,7 +197,7 @@ pub fn dialog(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { ui.label(tr("Label:")); let labels = effectcraft_engine::color::Label::ALL; let cur = labels.get(d.label).copied().unwrap_or_default(); - let r = craft_ui::ComboBox::from_id_salt("dialog.marker.label").selected_text(app.session.prefs.label_name(cur)).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("dialog.marker.label").selected_text(app.session.prefs.label_name(cur)).show_ui(ui, |ui| { for (i, l) in labels.into_iter().enumerate() { if crate::widgets::label_entry(ui, l, &app.session.prefs.label_name(l), d.label == i, &app.tokens).clicked() { d.label = i; diff --git a/crates/ui-egui/src/panels/primitive_dialog.rs b/crates/ui-egui/src/panels/primitive_dialog.rs index 3711c6a80..a3483a976 100644 --- a/crates/ui-egui/src/panels/primitive_dialog.rs +++ b/crates/ui-egui/src/panels/primitive_dialog.rs @@ -58,7 +58,7 @@ pub fn dialog(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { super::dialogs::modal(ctx, "New 3D Primitive", vec2(420.0, 300.0), t, |ui| { egui::Grid::new("primitive-grid").num_columns(2).spacing([14.0, 9.0]).show(ui, |ui| { ui.label(tr("Type")); - let combo = craft_ui::ComboBox::from_id_salt("primitive-type").selected_text(tr(d.kind.label())).show_ui(ui, |ui| { + let combo = egui::ComboBox::from_id_salt("primitive-type").selected_text(tr(d.kind.label())).show_ui(ui, |ui| { for (i, k) in PrimitiveKind::ALL.into_iter().enumerate() { let item = ui.selectable_value(&mut d.kind, k, tr(k.label())); app.auto.add(&format!("dialog.primitive.typeItem.{i}"), item.rect, k.label()); diff --git a/crates/ui-egui/src/panels/rq_templates.rs b/crates/ui-egui/src/panels/rq_templates.rs index 93a458aae..31f221c8c 100644 --- a/crates/ui-egui/src/panels/rq_templates.rs +++ b/crates/ui-egui/src/panels/rq_templates.rs @@ -61,7 +61,7 @@ pub fn show(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { ui.label(slot.label()); let cur = templates.default_name(k, slot); let mut pick = cur.clone(); - let r = craft_ui::ComboBox::from_id_salt(("tpl-def", slot.label())).selected_text(&cur).width(300.0).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt(("tpl-def", slot.label())).selected_text(&cur).width(300.0).show_ui(ui, |ui| { for n in &list { ui.selectable_value(&mut pick, n.clone(), n); } @@ -79,7 +79,7 @@ pub fn show(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { ui.label(egui::RichText::new(tr("Settings")).font(Tokens::semibold(12.5)).color(t.text)); ui.horizontal(|ui| { ui.label(tr("Settings Name:")); - let r = craft_ui::ComboBox::from_id_salt("tpl-select").selected_text(&st.selected).width(300.0).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("tpl-select").selected_text(&st.selected).width(300.0).show_ui(ui, |ui| { for n in &list { ui.selectable_value(&mut st.selected, n.clone(), n); } diff --git a/crates/ui-egui/src/panels/scriptui_view.rs b/crates/ui-egui/src/panels/scriptui_view.rs index 4b365afdf..8b056d81e 100644 --- a/crates/ui-egui/src/panels/scriptui_view.rs +++ b/crates/ui-egui/src/panels/scriptui_view.rs @@ -216,7 +216,7 @@ fn draw_widget(app: &mut EffectcraftApp, ui: &mut egui::Ui, origin: egui::Pos2, let mut pick: Option = None; ui.add_enabled_ui(w.enabled, |ui| { ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| { - craft_ui::ComboBox::from_id_salt(id).selected_text(cur).width(rect.width() - 8.0).show_ui(ui, |ui| { + egui::ComboBox::from_id_salt(id).selected_text(cur).width(rect.width() - 8.0).show_ui(ui, |ui| { for (i, it) in w.items.iter().enumerate() { if it == "-" { ui.separator(); diff --git a/crates/ui-egui/src/panels/settings.rs b/crates/ui-egui/src/panels/settings.rs index ba9af77f1..56f6dc394 100644 --- a/crates/ui-egui/src/panels/settings.rs +++ b/crates/ui-egui/src/panels/settings.rs @@ -83,7 +83,7 @@ fn page_ui(app: &mut EffectcraftApp, ui: &mut egui::Ui, page: &Page, cur: &Value ui.add_sized(vec2(label_w, 18.0), egui::Label::new(tr("Default Output:"))); let shown = if sel.is_empty() { tr("System Default").to_string() } else { sel.clone() }; let shown_name = shown.clone(); - let r = craft_ui::ComboBox::from_id_salt(("settings", key)).selected_text(shown).width(260.0).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt(("settings", key)).selected_text(shown).width(260.0).show_ui(ui, |ui| { if ui.selectable_label(sel.is_empty(), tr("System Default")).clicked() { acts.push(Act::Set(key.into(), json!(""))); } @@ -173,7 +173,7 @@ fn page_ui(app: &mut EffectcraftApp, ui: &mut egui::Ui, page: &Page, cur: &Value let curv = v.as_str().map_or_else(|| v.to_string(), str::to_string); let shown = opts.iter().find(|o| o.1 == curv).map(|o| o.0).unwrap_or(curv.as_str()).to_string(); value_text = tr(&shown).to_string(); - craft_ui::ComboBox::from_id_salt(("settings", key)) + egui::ComboBox::from_id_salt(("settings", key)) .selected_text(tr(&shown)) .width(220.0) .show_ui(ui, |ui| { @@ -529,7 +529,7 @@ fn appearance_ui(app: &mut EffectcraftApp, ui: &mut egui::Ui, cur: &Value, t: &T ui.horizontal(|ui| { ui.add_sized(vec2(250.0, 18.0), egui::Label::new(format!("{}:", tr("Appearance Mode"))).truncate()); let shown = APPEARANCE_MODES.iter().find(|(_, v)| *v == mode).map_or(mode.as_str(), |(l, _)| *l); - let r = craft_ui::ComboBox::from_id_salt(("settings", "appearance.appearanceMode")) + let r = egui::ComboBox::from_id_salt(("settings", "appearance.appearanceMode")) .selected_text(tr(shown)) .width(220.0) .show_ui(ui, |ui| { diff --git a/crates/ui-egui/src/panels/shortcut_editor.rs b/crates/ui-egui/src/panels/shortcut_editor.rs index 80011613d..4a1e3c05e 100644 --- a/crates/ui-egui/src/panels/shortcut_editor.rs +++ b/crates/ui-egui/src/panels/shortcut_editor.rs @@ -268,7 +268,7 @@ pub fn show(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { // ---- preset bar ui.horizontal(|ui| { ui.label(tr("Preset:")); - let r = craft_ui::ComboBox::from_id_salt("sc-preset").selected_text(&active).width(220.0).show_ui(ui, |ui| { + let r = egui::ComboBox::from_id_salt("sc-preset").selected_text(&active).width(220.0).show_ui(ui, |ui| { for n in &presets { if ui.selectable_label(*n == active, n).clicked() { run.push(("shortcuts.preset".into(), json!({"op": "select", "name": n}))); diff --git a/crates/ui-egui/src/panels/tracker.rs b/crates/ui-egui/src/panels/tracker.rs index 8d50b4860..90b72f83e 100644 --- a/crates/ui-egui/src/panels/tracker.rs +++ b/crates/ui-egui/src/panels/tracker.rs @@ -541,7 +541,7 @@ pub fn options_dialog(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) (LowConfidence::Adapt, "Adapt Feature"), ]; let cur = actions.iter().find(|(a, _)| *a == d.opts.action).map(|(_, l)| *l).unwrap_or("Adapt Feature"); - let r = craft_ui::ComboBox::from_id_salt("track-action") + let r = egui::ComboBox::from_id_salt("track-action") .selected_text(cur) .show_ui(ui, |ui| { for (a, l) in actions { @@ -594,7 +594,7 @@ pub fn target_dialog(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) ui.horizontal(|ui| { ui.label(crate::i18n::tr("Layer:")); let cur = d.target.and_then(|id| layers.iter().find(|(l, _)| *l == id)).map(|(_, n)| n.clone()).unwrap_or_else(|| "None".into()); - let r = craft_ui::ComboBox::from_id_salt("track-target") + let r = egui::ComboBox::from_id_salt("track-target") .selected_text(cur) .width(240.0) .show_ui(ui, |ui| { @@ -627,7 +627,7 @@ pub fn apply_dialog(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) { ui.horizontal(|ui| { ui.label(crate::i18n::tr("Apply Dimensions:")); let labels = [crate::i18n::tr("X and Y"), crate::i18n::tr("X only"), crate::i18n::tr("Y only")]; - let r = craft_ui::ComboBox::from_id_salt("track-apply-dims") + let r = egui::ComboBox::from_id_salt("track-apply-dims") .selected_text(labels[d.dims.min(2)]) .show_ui(ui, |ui| { for (i, l) in labels.iter().enumerate() { diff --git a/crates/ui-egui/src/panels/viewer_text/tests.rs b/crates/ui-egui/src/panels/viewer_text/tests.rs index be3e84b2c..ed813d4dd 100644 --- a/crates/ui-egui/src/panels/viewer_text/tests.rs +++ b/crates/ui-egui/src/panels/viewer_text/tests.rs @@ -143,9 +143,9 @@ impl ImePass { } /// One native floating window holding the Timeline's group and then the Viewer's. -fn two_group_window() -> craft_ui::docking::Floating { - let groups = vec![craft_ui::docking::Group::new(vec![PanelKind::Timeline], 0), craft_ui::docking::Group::new(vec![PanelKind::Viewer(1)], 0)]; - craft_ui::docking::Floating::stack(groups, [0.0, 0.0, 320.0, 360.0]).expect("two groups make a window") +fn two_group_window() -> craft_behavior::dock::Floating { + let groups = vec![craft_behavior::dock::Group::new(vec![PanelKind::Timeline], 0), craft_behavior::dock::Group::new(vec![PanelKind::Viewer(1)], 0)]; + craft_behavior::dock::Floating::stack(groups, [0.0, 0.0, 320.0, 360.0]).expect("two groups make a window") } impl ImePass { @@ -155,7 +155,7 @@ impl ImePass { fn window( &mut self, app: &mut EffectcraftApp, - window: &craft_ui::docking::Floating, + window: &craft_behavior::dock::Floating, events: Vec, viewer_first: bool, every: bool, diff --git a/crates/ui-egui/src/panels/viewers.rs b/crates/ui-egui/src/panels/viewers.rs index fabfe586f..2959cded0 100644 --- a/crates/ui-egui/src/panels/viewers.rs +++ b/crates/ui-egui/src/panels/viewers.rs @@ -327,7 +327,7 @@ fn add_viewer(app: &mut EffectcraftApp, near: u32) -> u32 { app.ui.viewers.insert(id, None); let p = panel(id); let anchor = [panel(near), PanelKind::Composition].into_iter().find(|q| app.ui.dock.is_open(*q)); - let _ = app.ui.dock.apply(craft_ui::docking::Action::Open { panel: p, anchor }, crate::dock::permissions); + let _ = app.ui.dock.apply(craft_behavior::dock::Action::Open { panel: p, anchor }, crate::dock::permissions); id } diff --git a/crates/ui-egui/src/workspace_state/legacy.rs b/crates/ui-egui/src/workspace_state/legacy.rs index bcb5a9691..73b30bbf5 100644 --- a/crates/ui-egui/src/workspace_state/legacy.rs +++ b/crates/ui-egui/src/workspace_state/legacy.rs @@ -17,8 +17,9 @@ use std::collections::BTreeMap; -use craft_ui::docking::{Floating, Node}; -use craft_ui::layout::{SplitAxis, SplitSize}; +use craft_behavior::dock::{Floating, Node}; +use craft_behavior::flow::Axis; +use craft_behavior::dock::SplitSize; use serde::Deserialize; use super::{Snapshot, VERSION}; @@ -154,13 +155,13 @@ fn workspace(root: OldNode, floating: Vec, windows: &[OldPanelWindo } fn node(old: OldNode, depth: usize) -> Result, String> { - if depth > craft_ui::docking::MAX_DEPTH { + if depth > craft_behavior::dock::MAX_DEPTH { return Err("workspace dock tree exceeds supported limits".into()); } Ok(match old { OldNode::Tabs { panels, active } => Node::Tabs { panels, active }, OldNode::Split { vertical, size, a, b } => Node::Split { - axis: if vertical { SplitAxis::Vertical } else { SplitAxis::Horizontal }, + axis: if vertical { Axis::Y } else { Axis::X }, size: match size { OldSplitSize::Ratio(value) => SplitSize::Ratio(value), OldSplitSize::FixedA(value) => SplitSize::FixedFirst(value), @@ -202,7 +203,7 @@ fn column(entries: Vec, depth: usize) -> Result, } let active = entry.active.min(panels.len().saturating_sub(1)); if entry.open { - if depth.saturating_add(frames.len()) > craft_ui::docking::MAX_DEPTH { + if depth.saturating_add(frames.len()) > craft_behavior::dock::MAX_DEPTH { return Err("workspace dock tree exceeds supported limits".into()); } let height = entry.height.filter(|h| h.is_finite() && *h > 0.0).map(|h| h.min(MAX_FRAME)); @@ -236,7 +237,7 @@ fn column(entries: Vec, depth: usize) -> Result, // Shares the rest with the flexible frames below. (None, None) => SplitSize::Ratio(1.0 / (below_flexible as f32 + 1.0)), }; - Node::Split { axis: SplitAxis::Vertical, size, first: Box::new(tabs), second: Box::new(rest) } + Node::Split { axis: Axis::Y, size, first: Box::new(tabs), second: Box::new(rest) } } }); below_fixed = match (own, below_fixed) { diff --git a/crates/ui-egui/src/workspace_state/legacy/tests.rs b/crates/ui-egui/src/workspace_state/legacy/tests.rs index a3d182f4f..8896d05a0 100644 --- a/crates/ui-egui/src/workspace_state/legacy/tests.rs +++ b/crates/ui-egui/src/workspace_state/legacy/tests.rs @@ -8,7 +8,7 @@ fn stack(count: usize) -> OldNode { #[test] fn stacked_frames_respect_the_remaining_tree_depth() { - let limit = craft_ui::docking::MAX_DEPTH; + let limit = craft_behavior::dock::MAX_DEPTH; assert!(node(stack(limit + 1), 0).is_ok()); assert!(node(stack(limit + 2), 0).is_err()); assert!(node(stack(1), limit).is_ok()); diff --git a/crates/ui-egui/src/workspace_state/tests.rs b/crates/ui-egui/src/workspace_state/tests.rs index aab2814ba..98a42fa65 100644 --- a/crates/ui-egui/src/workspace_state/tests.rs +++ b/crates/ui-egui/src/workspace_state/tests.rs @@ -1,7 +1,8 @@ use super::*; use crate::dock::{Floating, Layout, Node, StackEntry, WorkspaceExt as _}; -use craft_ui::docking::Action; -use craft_ui::layout::{SplitAxis, SplitSize}; +use craft_behavior::dock::Action; +use craft_behavior::flow::Axis; +use craft_behavior::dock::SplitSize; use effectcraft_engine::config::MemoryConfig; fn minimal() -> Workspace { @@ -23,7 +24,7 @@ fn corrupt_future_or_unknown_workspace_keeps_defaults_and_original_file() { ) }; let mut deep = r#"{"Tabs":{"panels":["Composition"],"active":0}}"#.to_string(); - for _ in 0..=craft_ui::docking::MAX_DEPTH { + for _ in 0..=craft_behavior::dock::MAX_DEPTH { deep = format!(r#"{{"Split":{{"vertical":true,"size":{{"Ratio":0.5}},"a":{deep},"b":{{"Tabs":{{"panels":[],"active":0}}}}}}}}"#); } let twice = @@ -215,14 +216,14 @@ fn invalid_tabs_split_and_deep_tree_are_rejected() { let mut snapshot = Snapshot::capture(&UiState::default()); snapshot.dock = Workspace::new(Layout { root: Some(Node::Tabs { panels: vec![PanelKind::Project], active: usize::MAX }), floating: vec![] }); assert!(snapshot.validate().is_err()); - let split = |size, first, second| Node::Split { axis: SplitAxis::Horizontal, size, first: Box::new(first), second: Box::new(second) }; + let split = |size, first, second| Node::Split { axis: Axis::X, size, first: Box::new(first), second: Box::new(second) }; snapshot.dock = Workspace::new(Layout { root: Some(split(SplitSize::FixedFirst(f32::NAN), tabs(&[PanelKind::Project]), tabs(&[PanelKind::Timeline]))), floating: vec![], }); assert!(snapshot.validate().is_err()); let mut root = tabs(&[PanelKind::Composition]); - for _ in 0..=craft_ui::docking::MAX_DEPTH { + for _ in 0..=craft_behavior::dock::MAX_DEPTH { root = split(SplitSize::Ratio(0.5), root, tabs(&[])); } snapshot.dock = Workspace::new(Layout { root: Some(root), floating: vec![] }); diff --git a/crates/ui-egui/tests/it/shared_docking_ui.rs b/crates/ui-egui/tests/it/shared_docking_ui.rs index 48e8b8283..f25b1c92c 100644 --- a/crates/ui-egui/tests/it/shared_docking_ui.rs +++ b/crates/ui-egui/tests/it/shared_docking_ui.rs @@ -1,6 +1,7 @@ //! EffectCraft's workspaces in craft-ui's shared docking: transactions, the command path, pointer //! gestures and persistence. -use craft_ui::docking::{Action, Node, Placement, StackEntry, Zone}; +use craft_behavior::dock::{Action, DockPlacement, Node, StackEntry}; +use craft_ui::docking::Zone; use effectcraft_engine::Session; use effectcraft_ui_egui::{ EffectcraftApp, @@ -29,7 +30,7 @@ fn shared_move_preserves_accordion_metadata_and_unrelated_active_tabs() { workspace.apply(Action::Close { panel: PanelKind::Project }, dock::permissions).unwrap(); assert!(workspace.is_visible(PanelKind::Composition)); workspace - .apply(Action::Move { panel: PanelKind::Preview, anchor: PanelKind::Layer, placement: Placement::Tab { before: None } }, dock::permissions) + .apply(Action::Move { panel: PanelKind::Preview, anchor: PanelKind::Layer, placement: DockPlacement::Tab { before: None } }, dock::permissions) .unwrap(); let Some(Node::Split { second, size, .. }) = &workspace.layout.root else { panic!("split was lost") }; assert_eq!(*size, SplitSize::FixedSecond(300.0)); @@ -44,7 +45,7 @@ fn shared_move_preserves_accordion_metadata_and_unrelated_active_tabs() { let before = workspace.clone(); assert!( workspace - .apply(Action::Move { panel: PanelKind::Preview, anchor: PanelKind::Audio, placement: Placement::Split(Zone::Left) }, dock::permissions) + .apply(Action::Move { panel: PanelKind::Preview, anchor: PanelKind::Audio, placement: DockPlacement::Split(Zone::Left) }, dock::permissions) .is_err() ); assert!(workspace.apply(Action::Float { panel: PanelKind::Preview, rect: [0.0, 0.0, f32::INFINITY, 200.0] }, dock::permissions).is_err()); @@ -70,7 +71,7 @@ fn every_builtin_workspace_validates_and_roundtrips_with_dynamic_identities() { assert!(text.contains("\"ScriptPanel\":77") && text.contains("\"Viewer\":42"), "{text}"); assert_eq!(serde_json::from_str::(&text).unwrap(), workspace); workspace - .apply(Action::Move { panel: PanelKind::ScriptPanel(77), anchor: PanelKind::Viewer(42), placement: Placement::Tab { before: None } }, dock::permissions) + .apply(Action::Move { panel: PanelKind::ScriptPanel(77), anchor: PanelKind::Viewer(42), placement: DockPlacement::Tab { before: None } }, dock::permissions) .unwrap(); assert!(workspace.layout.floating.is_empty()); assert!(workspace.is_visible(PanelKind::ScriptPanel(77))); @@ -221,7 +222,7 @@ fn catalog_docking_action_supports_resize_reorder_and_floating_geometry() { )); for action in [ Action::ResizeSplit { path: vec![], size: SplitSize::FixedFirst(360.0) }, - Action::Move { panel: PanelKind::Info, anchor: PanelKind::Project, placement: Placement::Tab { before: Some(PanelKind::Project) } }, + Action::Move { panel: PanelKind::Info, anchor: PanelKind::Project, placement: DockPlacement::Tab { before: Some(PanelKind::Project) } }, Action::Float { panel: PanelKind::Info, rect: [20.0, 40.0, 300.0, 200.0] }, Action::MoveFloating { panel: PanelKind::Info, rect: [45.0, 65.0, 330.0, 240.0] }, ] { @@ -285,7 +286,7 @@ fn raw_open_actions_are_rejected_through_every_docking_route() { for panel in [PanelKind::ScriptPanel(77), PanelKind::Viewer(42)] { for action in [ Action::Open { panel, anchor: Some(PanelKind::Project) }, - Action::OpenAt { panel, anchor: PanelKind::Project, placement: Placement::Tab { before: None } }, + Action::OpenAt { panel, anchor: PanelKind::Project, placement: DockPlacement::Tab { before: None } }, ] { for id in ["ui.dock", "window.panel.layout", "window.dockAction"] { let error = invoke(&mut app, id, json!({"action": action})).unwrap_err(); diff --git a/crates/ui-egui/tests/it/ui_effect_controls.rs b/crates/ui-egui/tests/it/ui_effect_controls.rs index 49de1f24c..ce8275dde 100644 --- a/crates/ui-egui/tests/it/ui_effect_controls.rs +++ b/crates/ui-egui/tests/it/ui_effect_controls.rs @@ -165,7 +165,7 @@ fn effect_header_arrows_ignore_hidden_panels_with_stale_focus() { "closed" => h.state_mut().close_panel(PanelKind::EffectControls), "maximized" => h.state_mut().toggle_maximize(PanelKind::Composition), "floating under maximized" => { - h.state_mut().apply_dock(craft_ui::docking::Action::Float { panel: PanelKind::EffectControls, rect: [40.0, 40.0, 600.0, 400.0] }).unwrap(); + h.state_mut().apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::EffectControls, rect: [40.0, 40.0, 600.0, 400.0] }).unwrap(); h.state_mut().toggle_maximize(PanelKind::Composition); } _ => h.state_mut().ui.start_screen = true, @@ -187,10 +187,10 @@ fn effect_header_arrows_work_wherever_effect_controls_is_on_screen() { let (mut h, lid, [(fx, prop), _, _]) = header_arrow_harness(); h.state_mut().toggle_maximize(PanelKind::EffectControls); if place == "floating" { - h.state_mut().apply_dock(craft_ui::docking::Action::Float { panel: PanelKind::EffectControls, rect: [40.0, 40.0, 600.0, 400.0] }).unwrap(); + h.state_mut().apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::EffectControls, rect: [40.0, 40.0, 600.0, 400.0] }).unwrap(); } else { - let placement = craft_ui::docking::Placement::Tab { before: None }; - h.state_mut().apply_dock(craft_ui::docking::Action::Move { panel: PanelKind::EffectControls, anchor: PanelKind::Composition, placement }).unwrap(); + let placement = craft_behavior::dock::DockPlacement::Tab { before: None }; + h.state_mut().apply_dock(craft_behavior::dock::Action::Move { panel: PanelKind::EffectControls, anchor: PanelKind::Composition, placement }).unwrap(); h.state_mut().toggle_maximize(PanelKind::Composition); assert_eq!(h.state().ui.maximized, Some(PanelKind::Composition), "the frame was maximized from its Composition tab"); } diff --git a/crates/ui-egui/tests/it/ui_panel_windows.rs b/crates/ui-egui/tests/it/ui_panel_windows.rs index d2750bb05..72b8bfff6 100644 --- a/crates/ui-egui/tests/it/ui_panel_windows.rs +++ b/crates/ui-egui/tests/it/ui_panel_windows.rs @@ -58,7 +58,7 @@ fn panel_windows_survive_restart_with_hostile_places_made_safe() { let ctx = egui::Context::default(); invoke(&mut app, &ctx, json!({"panel": "Project", "window": true})).unwrap(); let hostile = [90_000.0, -99_000.0, 99_000.0, 0.5]; - app.apply_dock(craft_ui::docking::Action::SetNative { panel: PanelKind::Project, rect: Some(hostile) }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::SetNative { panel: PanelKind::Project, rect: Some(hostile) }).unwrap(); eframe::App::on_exit(&mut app); let restarted = EffectcraftApp::new(Session { config: Some(store), ..Default::default() }); assert_eq!(native(&restarted, PanelKind::Project), Some(sanitized_window_rect(hostile))); @@ -73,7 +73,7 @@ fn a_click_on_a_floating_panel_does_nothing_while_a_dialog_is_open() { use egui_kittest::Harness; let mut app = EffectcraftApp::new(Session::default()); app.ui.start_screen = false; - app.apply_dock(craft_ui::docking::Action::Float { panel: PanelKind::Project, rect: [80.0, 120.0, 320.0, 240.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::Project, rect: [80.0, 120.0, 320.0, 240.0] }).unwrap(); let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).build_eframe(move |_| app); h.run_steps(3); let close = |h: &Harness<'_, EffectcraftApp>| { diff --git a/crates/ui-egui/tests/it/ui_scrolling.rs b/crates/ui-egui/tests/it/ui_scrolling.rs index 2913a6770..738878d82 100644 --- a/crates/ui-egui/tests/it/ui_scrolling.rs +++ b/crates/ui-egui/tests/it/ui_scrolling.rs @@ -462,7 +462,7 @@ fn effect_values_stay_clear_of_the_keyframe_navigator() { app.session.execute("prop.toggleAnimation", json!({"layer": lid, "path": path})).unwrap(); app.session.execute("prop.set", json!({"layer": lid, "path": path, "value": [123456.7, 123456.7]})).unwrap(); let uid = app.session.active_comp().unwrap().layer(effectcraft_engine::project::LayerId(lid)).unwrap().props.prop(path).unwrap().uid; - app.apply_dock(craft_ui::docking::Action::Float { panel: PanelKind::EffectControls, rect: [300.0, 150.0, 330.0, 500.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::EffectControls, rect: [300.0, 150.0, 330.0, 500.0] }).unwrap(); h.run_steps(3); let value = rect(&h, &format!("effectControls.prop.{uid}.value.1")); let nav = rect(&h, &format!("effectControls.prop.{uid}.prevKey")); diff --git a/crates/ui-egui/tests/it/ui_viewers.rs b/crates/ui-egui/tests/it/ui_viewers.rs index bfbcad51e..fc8857198 100644 --- a/crates/ui-egui/tests/it/ui_viewers.rs +++ b/crates/ui-egui/tests/it/ui_viewers.rs @@ -74,13 +74,13 @@ fn new_viewers_lock_route_comps_and_activate_on_click() { assert_eq!((h.state().ui.active_viewer, shows(&h, 0), shows(&h, 1)), (1, Some(a), Some(a))); // Side by side, so both draw. h.state_mut() - .apply_dock(craft_ui::docking::Action::Move { + .apply_dock(craft_behavior::dock::Action::Move { panel: PanelKind::Viewer(1), anchor: PanelKind::Composition, - placement: craft_ui::docking::Placement::Split(craft_ui::docking::Zone::Right), + placement: craft_behavior::dock::DockPlacement::Split(craft_ui::docking::Zone::Right), }) .unwrap(); - h.state_mut().apply_dock(craft_ui::docking::Action::Activate { panel: PanelKind::Composition }).unwrap(); + h.state_mut().apply_dock(craft_behavior::dock::Action::Activate { panel: PanelKind::Composition }).unwrap(); h.run_steps(3); // Opening B shows it in the active (unlocked) viewer; the locked one keeps A. invoke(&mut h, "comp.open", json!({"comp": b})); @@ -154,13 +154,13 @@ fn viewers_snapshot() { h.run_steps(3); invoke(&mut h, "view.newViewer", json!({})); h.state_mut() - .apply_dock(craft_ui::docking::Action::Move { + .apply_dock(craft_behavior::dock::Action::Move { panel: PanelKind::Viewer(1), anchor: PanelKind::Composition, - placement: craft_ui::docking::Placement::Split(craft_ui::docking::Zone::Right), + placement: craft_behavior::dock::DockPlacement::Split(craft_ui::docking::Zone::Right), }) .unwrap(); - h.state_mut().apply_dock(craft_ui::docking::Action::Activate { panel: PanelKind::Composition }).unwrap(); + h.state_mut().apply_dock(craft_behavior::dock::Action::Activate { panel: PanelKind::Composition }).unwrap(); invoke(&mut h, "comp.open", json!({"comp": other.0})); for _ in 0..300 { h.step(); diff --git a/crates/ui-egui/tests/it/ui_workspace_focus.rs b/crates/ui-egui/tests/it/ui_workspace_focus.rs index af8ecd9ad..338c8c2b7 100644 --- a/crates/ui-egui/tests/it/ui_workspace_focus.rs +++ b/crates/ui-egui/tests/it/ui_workspace_focus.rs @@ -229,7 +229,7 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { ); key(&mut h, Key::Space, Modifiers::NONE); let mut activated = before; - activated.apply(craft_ui::docking::Action::Activate { panel: PanelKind::EffectControls }, dock::permissions).unwrap(); + activated.apply(craft_behavior::dock::Action::Activate { panel: PanelKind::EffectControls }, dock::permissions).unwrap(); assert_eq!(h.state().ui.dock, activated); assert_eq!(h.state().ui.focused, PanelKind::EffectControls); assert!(!h.state().playback.playing); From d7470ccc3b61ebb8c46153e61ccbe4defe2b6bf9 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:47:46 +0000 Subject: [PATCH 03/39] media: one craft-audio dependency; the wav markers come from the same pin --- Cargo.lock | 1527 ++++++++++++++++++++++++++++--- crates/media/Cargo.toml | 1 - crates/media/src/wav_markers.rs | 2 +- 3 files changed, 1399 insertions(+), 131 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b967eb41d..ed23309d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -129,6 +129,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 = "aligned" version = "0.4.3" @@ -209,6 +218,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" @@ -343,7 +368,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.5", + "rustix 1.1.6", "slab", "windows-sys 0.61.2", ] @@ -374,7 +399,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -400,7 +425,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.5", + "rustix 1.1.6", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -501,7 +526,7 @@ dependencies = [ "anyhow", "arrayvec", "log", - "nom", + "nom 8.0.0", "num-rational", "v_frame", ] @@ -512,6 +537,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" @@ -573,6 +617,12 @@ dependencies = [ "no_std_io2", ] +[[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" @@ -831,6 +881,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" @@ -853,7 +913,7 @@ checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ "bitflags 2.13.2", "polling", - "rustix 1.1.5", + "rustix 1.1.6", "slab", "tracing", ] @@ -877,7 +937,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" dependencies = [ "calloop 0.14.4", - "rustix 1.1.5", + "rustix 1.1.6", "wayland-backend", "wayland-client", ] @@ -936,7 +996,7 @@ dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex", + "shlex 2.0.1", ] [[package]] @@ -945,6 +1005,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[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]] name = "cfg-if" version = "1.0.5" @@ -983,7 +1062,22 @@ version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ + "iana-time-zone", + "js-sys", "num-traits", + "wasm-bindgen", + "windows-link 0.2.1", +] + +[[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]] @@ -1049,6 +1143,12 @@ dependencies = [ "crossbeam-utils", ] +[[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" @@ -1099,12 +1199,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 = "coreaudio-rs" version = "0.13.0" @@ -1193,15 +1315,24 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" [[package]] -name = "craft-audio" +name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=30596f73c5ef851ba3dad9cf145669f391e2eb0d#30596f73c5ef851ba3dad9cf145669f391e2eb0d" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=30596f73c5ef851ba3dad9cf145669f391e2eb0d)", - "thiserror 2.0.21", + "block2 0.6.2", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "craft-atomic" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "rustix 1.1.6", ] [[package]] @@ -1217,15 +1348,52 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-audio" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "log", + "thiserror 2.0.21", +] + +[[package]] +name = "craft-behavior" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "accesskit", + "bitflags 2.13.2", + "craft-host", + "craft-keymap", + "craft-theme", + "craft-tracked", + "craft-ui-macros", + "emath", + "kurbo", + "serde", + "smallvec", +] + [[package]] name = "craft-cfb" version = "0.1.0" source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +[[package]] +name = "craft-cloud-ui" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "egui", +] + [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=58964adec11197594d9b6b79a94ae6232221211a#58964adec11197594d9b6b79a94ae6232221211a" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "md-5", "rayon", @@ -1234,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" [[package]] name = "craft-color" @@ -1244,10 +1412,18 @@ dependencies = [ "serde", ] +[[package]] +name = "craft-color" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "serde", +] + [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1261,7 +1437,10 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "serde", +] [[package]] name = "craft-dpx" @@ -1274,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "thiserror 2.0.21", ] @@ -1282,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "serde", "serde_json", @@ -1292,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=068e079c7be4b100a8a6b305b31ac881e069727e#068e079c7be4b100a8a6b305b31ac881e069727e" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" [[package]] name = "craft-exr" @@ -1306,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=3b8e426a260695af840a2cd79a064d40778f939e#3b8e426a260695af840a2cd79a064d40778f939e" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "exr", "flate2", @@ -1315,26 +1494,51 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-font-catalog" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" [[package]] name = "craft-frame" version = "0.1.0" source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ - "craft-color", + "craft-color 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "rayon", "serde", ] +[[package]] +name = "craft-frame" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "rayon", + "serde", +] + [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=ba25ccd233934d1b2f74e3c0f235168bf5f13ef3#ba25ccd233934d1b2f74e3c0f235168bf5f13ef3" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "gif", "image", @@ -1348,12 +1552,29 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-host" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ + "chrono", "fixed_decimal", + "icu_calendar", + "icu_collator", + "icu_datetime", "icu_decimal", "icu_locale_core", "icu_locale_fallback", @@ -1363,6 +1584,7 @@ dependencies = [ "icu_provider", "icu_provider_adapters", "icu_provider_blob", + "icu_time", "log", "objc2-foundation 0.3.2", "sys-locale", @@ -1382,15 +1604,30 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=bc186ca719958fcce3b6ee24794277eabed14609#bc186ca719958fcce3b6ee24794277eabed14609" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "serde_json", ] +[[package]] +name = "craft-keymap" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-host", + "craft-i18n", + "craft-tracked", + "craft-ui-macros", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "egui", + "serde", + "serde_json", +] + [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "craft-zip", "serde_json", @@ -1400,12 +1637,16 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=30596f73c5ef851ba3dad9cf145669f391e2eb0d#30596f73c5ef851ba3dad9cf145669f391e2eb0d" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +dependencies = [ + "chrono", + "thiserror 2.0.21", +] [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1417,11 +1658,25 @@ version = "0.1.0" source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-color", - "craft-frame", + "craft-color 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-frame 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-y4m", + "serde", + "thiserror 2.0.21", +] + +[[package]] +name = "craft-media-source" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "serde", "thiserror 2.0.21", ] @@ -1429,8 +1684,9 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ + "craft-zip", "miniz_oxide 0.9.1", "serde_json", ] @@ -1438,7 +1694,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "chrono", "craft-codepage", @@ -1448,7 +1704,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "flate2", "serde", @@ -1459,16 +1715,48 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=068e079c7be4b100a8a6b305b31ac881e069727e#068e079c7be4b100a8a6b305b31ac881e069727e" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "hayro-syntax", + "serde", "thiserror 2.0.21", ] +[[package]] +name = "craft-platform" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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 0.62.2", + "x11rb", + "xcap", + "zbus", +] + [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=068e079c7be4b100a8a6b305b31ac881e069727e#068e079c7be4b100a8a6b305b31ac881e069727e" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "craft-eps", "kurbo", @@ -1492,7 +1780,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=53198114310dbc2b41e18e4eaf2fd83e69964189#53198114310dbc2b41e18e4eaf2fd83e69964189" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "encoding_rs", "flate2", @@ -1503,12 +1791,14 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "dispatch2", "egui", "objc2 0.6.5", "objc2-app-kit 0.3.2", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -1525,6 +1815,23 @@ dependencies = [ "zune-jpeg", ] +[[package]] +name = "craft-settings" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-atomic", + "craft-host", + "dirs", + "log", + "serde", + "serde_json", + "toml", + "toml_edit", + "web-sys", + "web-time", +] + [[package]] name = "craft-sniff" version = "0.1.0" @@ -1533,14 +1840,16 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=3dff4793f1a5bd1f99a4fe3280d48f515158dff3#3dff4793f1a5bd1f99a4fe3280d48f515158dff3" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=3dff4793f1a5bd1f99a4fe3280d48f515158dff3)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "flate2", "kurbo", "quick-xml 0.41.0", + "resvg", "roxmltree", "thiserror 2.0.21", + "usvg", "vectorcraft-geom", "vectorcraft-pathops", ] @@ -1553,6 +1862,29 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-tga" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "craft-theme" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "bitflags 2.13.2", + "craft-tracked", + "craft-ui-macros", + "ecolor", + "log", + "serde", + "serde_json", + "smallvec", +] + [[package]] name = "craft-tiff" version = "0.1.0" @@ -1565,7 +1897,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0d6dd8bed815b8366869a800d2bf22588ca62dcb#0d6dd8bed815b8366869a800d2bf22588ca62dcb" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "serde", "thiserror 2.0.21", @@ -1574,20 +1906,12 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "serde", "thiserror 2.0.21", ] -[[package]] -name = "craft-timeline" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=0d6dd8bed815b8366869a800d2bf22588ca62dcb#0d6dd8bed815b8366869a800d2bf22588ca62dcb" -dependencies = [ - "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=0d6dd8bed815b8366869a800d2bf22588ca62dcb)", -] - [[package]] name = "craft-timeline" version = "0.1.0" @@ -1599,41 +1923,194 @@ dependencies = [ "serde_json", ] +[[package]] +name = "craft-timeline" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "serde", + "web-time", +] + +[[package]] +name = "craft-tracked" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" + [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" 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=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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", + "serde_json", +] + +[[package]] +name = "craft-ui-contract" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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", - "wasm-bindgen", + "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=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +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=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "chrono", + "craft-host", + "craft-theme", + "craft-ui", "dunce", "egui", "flate2", - "getrandom 0.3.4", "image", "log", "plist", - "rustix 1.1.5", + "rustix 1.1.6", "semver", "serde", "serde_json", @@ -1650,7 +2127,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "flate2", "serde", @@ -1669,15 +2146,58 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-video" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "rav1e", + "rayon", + "thiserror 2.0.21", +] + [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "image", "thiserror 2.0.21", ] +[[package]] +name = "craft-win32" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "winsafe", +] + +[[package]] +name = "craft-window" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "craft-appkit", + "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", + "x11rb", +] + [[package]] name = "craft-xml" version = "0.1.0" @@ -1691,7 +2211,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=3dff4793f1a5bd1f99a4fe3280d48f515158dff3#3dff4793f1a5bd1f99a4fe3280d48f515158dff3" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1706,10 +2226,18 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-y4m" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +dependencies = [ + "thiserror 2.0.21", +] + [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87#5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1801,6 +2329,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" +[[package]] +name = "data-url" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" + [[package]] name = "deranged" version = "0.5.8" @@ -1817,6 +2351,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" @@ -1876,6 +2431,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" @@ -1921,7 +2531,7 @@ dependencies = [ [[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", @@ -2079,12 +2689,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=3b8e426a260695af840a2cd79a064d40778f939e)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-tga", - "craft-video", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2194,7 +2804,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/storytold/craft-libs?rev=0d6dd8bed815b8366869a800d2bf22588ca62dcb)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2245,18 +2855,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=30596f73c5ef851ba3dad9cf145669f391e2eb0d)", - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-color", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5a7a63a21dd03dd1a2bc6c308a3a6ce818caae87)", - "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=3b8e426a260695af840a2cd79a064d40778f939e)", - "craft-frame", + "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-media-source", - "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-video", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2361,7 +2970,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=53198114310dbc2b41e18e4eaf2fd83e69964189)", + "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "miniz_oxide 0.9.1", ] @@ -2369,7 +2978,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=3b8e426a260695af840a2cd79a064d40778f939e)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -2461,7 +3070,7 @@ name = "effectcraft-text" version = "0.25.1" dependencies = [ "effectcraft-keyframe", - "harfrust", + "harfrust 0.12.0", "kurbo", "skrifa 0.44.0", "unicode-bidi", @@ -2495,6 +3104,7 @@ version = "0.25.1" dependencies = [ "bytemuck", "chrono", + "craft-behavior", "craft-mime", "craft-quit", "craft-ui", @@ -2558,7 +3168,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", @@ -2593,7 +3203,7 @@ 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", @@ -2612,7 +3222,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", @@ -2631,7 +3241,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", @@ -2657,7 +3267,7 @@ dependencies = [ [[package]] name = "egui_extras" 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", "egui", @@ -2670,7 +3280,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", @@ -2683,7 +3293,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 = [ "eframe", "egui", @@ -2706,11 +3316,23 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[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", ] +[[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.42" @@ -2787,7 +3409,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", @@ -2795,7 +3417,7 @@ dependencies = [ "emath", "epaint_default_fonts", "font-types", - "harfrust", + "harfrust 0.12.0", "log", "nohash-hasher", "parking_lot", @@ -2813,7 +3435,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 = "equator" @@ -2848,7 +3470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2976,8 +3598,8 @@ dependencies = [ "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-jpeg", "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-video", - "craft-y4m", + "craft-video 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-y4m 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "filmcraft-bitstream", "filmcraft-color", "filmcraft-frame", @@ -3077,10 +3699,10 @@ dependencies = [ "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-hdr", "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-media-source", + "craft-media-source 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-sniff", - "craft-tga", + "craft-tga 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-tiff", "filmcraft-color", "filmcraft-dng", @@ -3149,6 +3771,12 @@ dependencies = [ "zlib-rs", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + [[package]] name = "float8" version = "0.6.1" @@ -3303,6 +3931,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 = "gemm" version = "0.19.0" @@ -3438,7 +4090,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.5", + "rustix 1.1.6", "windows-link 0.2.1", ] @@ -3489,6 +4141,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" @@ -3516,6 +4177,12 @@ dependencies = [ "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" @@ -3644,6 +4311,19 @@ dependencies = [ "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", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -3692,7 +4372,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=068e079c7be4b100a8a6b305b31ac881e069727e#068e079c7be4b100a8a6b305b31ac881e069727e" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "hayro-ccitt", ] @@ -3706,7 +4386,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=068e079c7be4b100a8a6b305b31ac881e069727e#068e079c7be4b100a8a6b305b31ac881e069727e" +source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", @@ -3750,6 +4430,63 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.61.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +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" @@ -3758,12 +4495,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" @@ -3825,6 +4587,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", + "serde", "smallvec", "utf16_iter", "utf8_iter", @@ -3875,6 +4638,7 @@ dependencies = [ "icu_locale_core", "icu_properties_data", "icu_provider", + "serde", "zerotrie", "zerovec", ] @@ -3927,6 +4691,22 @@ 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 = "idna" version = "1.1.0" @@ -3978,6 +4758,12 @@ dependencies = [ "quick-error 2.0.1", ] +[[package]] +name = "imagesize" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b27460c2c92b037f3f94c538ed9a3342f3fdf923606781629ccb35f82d042a" + [[package]] name = "indexmap" version = "2.14.2" @@ -4005,6 +4791,24 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4275b20e6057cd7733fd8df8a5a31701e4fe44497dad0f3fa0e1c4fb971506be" +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + +[[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.14.0" @@ -4236,6 +5040,54 @@ dependencies = [ "redox_syscall 0.9.4", ] +[[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" @@ -4261,6 +5113,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" @@ -4387,6 +5245,12 @@ dependencies = [ "walkdir", ] +[[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" @@ -4557,6 +5421,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" @@ -4587,7 +5461,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4744,8 +5618,8 @@ dependencies = [ "block2 0.5.1", "libc", "objc2 0.5.2", - "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", ] @@ -4758,10 +5632,17 @@ 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]] @@ -4779,6 +5660,38 @@ dependencies = [ "objc2-foundation 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", +] + [[package]] name = "objc2-cloud-kit" version = "0.2.2" @@ -4792,6 +5705,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" @@ -4837,6 +5761,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" @@ -4844,7 +5779,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", ] @@ -4855,10 +5792,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]] @@ -4873,6 +5813,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" @@ -4885,6 +5835,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" @@ -4912,10 +5905,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-kit" version = "0.3.2" @@ -4949,6 +5954,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" @@ -5019,9 +6036,9 @@ dependencies = [ "bitflags 2.13.2", "block2 0.5.1", "objc2 0.5.2", - "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", @@ -5091,6 +6108,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +[[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" @@ -5127,7 +6150,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.45.0", ] [[package]] @@ -5262,6 +6285,12 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project" version = "1.1.13" @@ -5299,6 +6328,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" @@ -5347,7 +6401,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.5", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -5394,6 +6448,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", ] @@ -5735,6 +6791,17 @@ 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" @@ -5779,6 +6846,39 @@ 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 = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + [[package]] name = "regex-lite" version = "0.1.9" @@ -5806,6 +6906,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" +[[package]] +name = "resvg" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e3803f97b999e80cbf7c6ecdd07a8102204d92e1633cf48783720c521196bd" +dependencies = [ + "bytemuck", + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia 0.12.0", + "usvg", +] + [[package]] name = "rfd" version = "0.17.2" @@ -5833,6 +6948,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" +dependencies = [ + "bytemuck", +] + [[package]] name = "ring" version = "0.17.14" @@ -5892,15 +7016,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags 2.13.2", "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5957,7 +7081,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6184,6 +7308,12 @@ dependencies = [ "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" @@ -6231,6 +7361,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" +[[package]] +name = "simplecss" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" +dependencies = [ + "log", +] + [[package]] name = "siphasher" version = "1.0.4" @@ -6328,7 +7467,7 @@ dependencies = [ "libc", "log", "memmap2", - "rustix 1.1.5", + "rustix 1.1.6", "thiserror 2.0.21", "wayland-backend", "wayland-client", @@ -6404,6 +7543,9 @@ name = "strict-num" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp", +] [[package]] name = "string-interner" @@ -6453,6 +7595,16 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "svgtypes" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f12b12995e3638c70618c1facb1ce65302f6a6f706b675f07c58a5d7391120e" +dependencies = [ + "kurbo", + "siphasher", +] + [[package]] name = "symphonia" version = "0.5.5" @@ -6881,6 +8033,19 @@ dependencies = [ "windows 0.61.3", ] +[[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 = "tag_ptr" version = "0.1.0" @@ -6903,6 +8068,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" @@ -6912,8 +8083,8 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix 1.1.5", - "windows-sys 0.61.2", + "rustix 1.1.6", + "windows-sys 0.52.0", ] [[package]] @@ -7043,6 +8214,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", + "png", "tiny-skia-path 0.12.0", ] @@ -7125,8 +8297,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ "indexmap", + "serde_core", + "serde_spanned", "toml_datetime", "toml_parser", + "toml_writer", "winnow", ] @@ -7184,7 +8359,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" dependencies = [ "memchr", - "nom", + "nom 8.0.0", "petgraph", ] @@ -7209,6 +8384,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e" +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" version = "1.20.1" @@ -7330,6 +8511,25 @@ dependencies = [ "serde", ] +[[package]] +name = "usvg" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "977d0a4abdef933f424a99fe09f95576e089b90aebc6f016a3bc813762493e91" +dependencies = [ + "data-url", + "imagesize", + "kurbo", + "log", + "pico-args", + "roxmltree", + "simplecss", + "siphasher", + "strict-num", + "svgtypes", + "tiny-skia-path 0.12.0", +] + [[package]] name = "utf16_iter" version = "1.0.5" @@ -7428,6 +8628,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" @@ -7664,7 +8870,7 @@ checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" dependencies = [ "cc", "downcast-rs", - "rustix 1.1.5", + "rustix 1.1.6", "scoped-tls", "smallvec", "wayland-sys", @@ -7677,7 +8883,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ "bitflags 2.13.2", - "rustix 1.1.5", + "rustix 1.1.6", "wayland-backend", "wayland-scanner", ] @@ -7699,7 +8905,7 @@ version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" dependencies = [ - "rustix 1.1.5", + "rustix 1.1.6", "wayland-client", "xcursor", ] @@ -7779,6 +8985,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" @@ -7786,7 +9005,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" dependencies = [ "dlib", + "libc", "log", + "memoffset", "once_cell", "pkg-config", ] @@ -8025,6 +9246,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" version = "0.3.9" @@ -8047,7 +9274,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -8553,7 +9780,7 @@ dependencies = [ "libc", "log", "os_pipe", - "rustix 1.1.5", + "rustix 1.1.6", "thiserror 2.0.21", "tree_magic_mini", "wayland-backend", @@ -8599,7 +9826,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 1.1.5", + "rustix 1.1.6", "x11rb-protocol", ] @@ -8609,6 +9836,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 0.10.3", + "scopeguard", + "serde", + "thiserror 2.0.21", + "url", + "widestring", + "windows 0.62.2", + "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" @@ -8702,7 +9971,7 @@ dependencies = [ "hex", "libc", "ordered-stream", - "rustix 1.1.5", + "rustix 1.1.6", "serde", "serde_repr", "tracing", diff --git a/crates/media/Cargo.toml b/crates/media/Cargo.toml index 6d8c08790..26c6801e0 100644 --- a/crates/media/Cargo.toml +++ b/crates/media/Cargo.toml @@ -10,7 +10,6 @@ rust-version.workspace = true workspace = true [dependencies] -craft-audio-markers = { package = "craft-audio", version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false } craft-docpath = { workspace = true } effectcraft-time = { workspace = true } effectcraft-color = { workspace = true } diff --git a/crates/media/src/wav_markers.rs b/crates/media/src/wav_markers.rs index bc198d1b7..83f7e8a69 100644 --- a/crates/media/src/wav_markers.rs +++ b/crates/media/src/wav_markers.rs @@ -1,5 +1,5 @@ //! WAV cue/adtl/RF64/XMP metadata is parsed by craft-audio; timeline policy remains here. -use craft_audio_markers::wav_markers as shared; +use craft_audio::wav_markers as shared; use effectcraft_color::Label; use effectcraft_project::Marker; use effectcraft_time::Tick; From b119944dc970d48baef6cd66ad8bc978bf4a698b Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:54:17 +0000 Subject: [PATCH 04/39] Host the craft-ui runtime: install, frame input, close path, update dialogs on a DialogHost, fonts through craft_ui::fonts::load, app-local capture slot and font menu --- Cargo.toml | 5 +- apps/effectcraft-web/src/app.rs | 6 +- apps/effectcraft/src/main.rs | 5 +- crates/model/src/scene.rs | 2 +- crates/ui-egui/Cargo.toml | 5 +- crates/ui-egui/src/app.rs | 18 +- crates/ui-egui/src/app/frame.rs | 14 +- crates/ui-egui/src/app/prefs.rs | 7 +- crates/ui-egui/src/app/screenshot.rs | 6 +- crates/ui-egui/src/capture.rs | 211 +++++++++++++++++++++++ crates/ui-egui/src/framework.rs | 153 ++++++++++++++++ crates/ui-egui/src/lib.rs | 8 +- crates/ui-egui/src/panels/text_panels.rs | 34 +++- crates/ui-egui/src/panels/unsaved.rs | 62 +++---- crates/ui-egui/src/panels/viewer.rs | 1 + crates/ui-egui/src/theme.rs | 2 +- crates/ui-egui/src/updates_ui.rs | 57 ++++-- 17 files changed, 503 insertions(+), 93 deletions(-) create mode 100644 crates/ui-egui/src/capture.rs create mode 100644 crates/ui-egui/src/framework.rs diff --git a/Cargo.toml b/Cargo.toml index ff30114bb..a3a717b1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.1.0", default-features = false, features = ["read"] } craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-quit = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["read"] } @@ -129,6 +128,10 @@ half = "2.7" # Shared UI and the complete egui family select reviewed immutable commits below. craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } diff --git a/apps/effectcraft-web/src/app.rs b/apps/effectcraft-web/src/app.rs index 99e71117f..444b8c0cd 100644 --- a/apps/effectcraft-web/src/app.rs +++ b/apps/effectcraft-web/src/app.rs @@ -113,8 +113,8 @@ impl eframe::App for WebApp { } /// The browser host's logic tick: run queued UI actions, tick the shared app, poll API replies, flush Render - /// Queue downloads, persist the session snapshot when enabled, publish GPU/frame-worker/disk-cache info and close - /// the IME pass. + /// Queue downloads, persist the session snapshot when enabled, publish GPU/frame-worker/disk-cache info, close + /// the IME pass and run the root window's close path. fn logic(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { let actions = ACTIONS.with(|a| std::mem::take(&mut *a.borrow_mut())); for f in actions { @@ -146,6 +146,7 @@ impl eframe::App for WebApp { diskcache::configure(d.disk_cache_enabled, d.disk_cache_max_gb, storage::quota()); api::set_info("diskCache", diskcache::stats()); self.app.finish_ime_logic(ctx); + self.app.close_path(ctx); } fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) { @@ -277,6 +278,7 @@ pub async fn start(canvas_id: String) -> Result<(), JsValue> { canvas, eframe::WebOptions::default(), Box::new(move |cc| { + effectcraft_ui_egui::framework::install_headless(&cc.egui_ctx); EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); CTX.with(|c| *c.borrow_mut() = Some(cc.egui_ctx.clone())); // The page owns this shared presentation device; worker devices retain their diff --git a/apps/effectcraft/src/main.rs b/apps/effectcraft/src/main.rs index a008a7b7a..74f1eaf4d 100644 --- a/apps/effectcraft/src/main.rs +++ b/apps/effectcraft/src/main.rs @@ -299,6 +299,7 @@ fn run_desktop(reporter: &crash_report::Shutdown) -> eframe::Result { "EffectCraft", options, Box::new(move |cc| { + effectcraft_ui_egui::framework::install(&cc.egui_ctx)?; EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); match &cc.wgpu_render_state { Some(rs) => { @@ -548,7 +549,7 @@ struct Desktop { impl eframe::App for Desktop { /// The desktop host's logic tick: update the macOS menu bar, run the shared app tick, close the IME pass, show the - /// file dialogs asked for and, last, hand a close to the platform quit. + /// file dialogs asked for and, last, the root window's close path. fn logic(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { #[cfg(target_os = "macos")] self.menu_sync.before(&mut self.app, |app| self.menu.update(app, ctx)); @@ -560,7 +561,7 @@ impl eframe::App for Desktop { if let Some(asked) = &self.file_dialogs { file_dialogs::show_asked(asked, frame, ctx); } - effectcraft_ui_egui::panels::unsaved::quit_on_close(ctx); + self.app.close_path(ctx); } fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) { diff --git a/crates/model/src/scene.rs b/crates/model/src/scene.rs index 07fee0397..a8ea124b6 100644 --- a/crates/model/src/scene.rs +++ b/crates/model/src/scene.rs @@ -440,7 +440,7 @@ mod tests { // The decoded image has already taken four pixels from this budget. let mut pixels_left = 4; let mut warnings = vec![]; - let clamped = cm::TextureRef { image: 0, uv_set: 0, wrap: [cm::Wrap::Clamp; 2] }; + let clamped = cm::TextureRef { image: 0, uv_set: 0, wrap: [cm::Wrap::Clamp; 2], transform: None }; let first = ensure_texture(&scene, &decoded, clamped, &mut textures, &mut texture_of, &mut pixels_left, &mut warnings).unwrap(); let shared = ensure_texture(&scene, &decoded, clamped, &mut textures, &mut texture_of, &mut pixels_left, &mut warnings).unwrap(); diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index c7957f79a..2f3d940b0 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -13,7 +13,10 @@ workspace = true craft-mime = { workspace = true } craft-ui = { workspace = true } craft-behavior = { workspace = true } -craft-quit = { workspace = true, features = ["ui"] } +craft-host = { workspace = true } +craft-keymap = { workspace = true } +craft-theme = { workspace = true } +craft-window = { workspace = true } effectcraft-time = { workspace = true } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index ae0fbf38d..3fc3803ad 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -128,6 +128,8 @@ impl EffectcraftApp { template_thumbs: Default::default(), template_list: None, updates_rt: updates_ui::Runtime::default(), + framework_dialogs: craft_ui::dialog::DialogHost::new(), + framework_host: crate::framework::host(), } .with_ui_commands() } @@ -158,10 +160,12 @@ impl eframe::App for EffectcraftApp { } } - /// Feed pending synthetic input into `raw_input` only once fonts are ready (so a non-drawing pass never consumes + /// Hand the runtime this frame's root values (`before_input`), then feed pending synthetic input into `raw_input` + /// only once fonts are ready (so a non-drawing pass never consumes /// a batch), then prepare pointer wrapping; ending a numeric scrub clears the history merge key so the next edit /// starts a new undo step. fn raw_input_hook(&mut self, ctx: &egui::Context, raw_input: &mut egui::RawInput) { + self.before_input(ctx); raw_input.events.append(&mut self.forwarded.events); raw_input.dropped_files.append(&mut self.forwarded.files); let injected = self.synthetic_in_flight || !self.synthetic.is_empty(); @@ -177,19 +181,23 @@ impl eframe::App for EffectcraftApp { } } - /// The logic-only tick: run `tick`, close the IME pass with `finish_ime_logic` and, last, hand a close to the - /// platform quit (`panels::unsaved::quit_on_close`). It does not read pass-time - /// input state (events, pointer and time are stale here), only the viewport information eframe refreshed. + /// The logic-only tick: run `tick`, close the IME pass with `finish_ime_logic` and, last, the root window's close + /// path (`close_path`, which asks about unsaved changes, and on macOS quits through the platform). It does not + /// read pass-time input state (events, pointer and time are stale here), only the viewport information eframe + /// refreshed. A close request must be answered while hidden too; an answered file dialog can change the project, + /// so the tick's dialog answers run first. fn logic(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { // Never `ctx.input(|i| i.time)` here: `Context::run_logic` leaves events, pointer state and // time at the previous full pass's values (only the viewport information is refreshed). self.tick(ctx, frame); self.finish_ime_logic(ctx); - crate::panels::unsaved::quit_on_close(ctx); + self.close_path(ctx); } /// Draw one UI pass through `draw`. 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, frame); } } diff --git a/crates/ui-egui/src/app/frame.rs b/crates/ui-egui/src/app/frame.rs index 59c12267c..9d8cf2743 100644 --- a/crates/ui-egui/src/app/frame.rs +++ b/crates/ui-egui/src/app/frame.rs @@ -122,11 +122,6 @@ impl EffectcraftApp { } }); } - // Do not interpret a close as permission to abandon the still-running script. Once - // Stop finishes it, the normal unsaved-changes prompt can handle a new close request. - if ctx.input(|i| i.viewport().close_requested()) { - ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose); - } self.drain_control(ctx, self.now); ctx.request_repaint_after(std::time::Duration::from_millis(50)); } @@ -187,9 +182,6 @@ impl EffectcraftApp { self.apply_gpu_failure(ctx); if self.gpu_failure_applied == Some(true) { self.close_after_device_loss(ctx); - // On macOS the app quits through `-[NSApplication terminate:]` instead of closing the - // window while AppKit's run loop is running (#341). - craft_quit::on_close_request(ctx); return; } if self.session.script_ui.render_host.is_some() { @@ -281,10 +273,6 @@ impl EffectcraftApp { self.tick_script_render(ctx); return; } - // A close request (the window's button, Quit, `app.quit`) must be answered while hidden. - // An answered file dialog can change the project, so the answers above run first. The host - // calls `panels::unsaved::quit_on_close` last in its `logic`. - panels::unsaved::on_close_requested(self, ctx); let title = panels::unsaved::window_title(self); if title != self.window_title { ctx.send_viewport_cmd(egui::ViewportCommand::Title(title.clone())); @@ -494,6 +482,7 @@ impl EffectcraftApp { if let Some(rect) = crate::color_picker::take_automation(&ctx) { self.auto.add("colorPicker.eyedropper", rect, "Eyedropper"); } + crate::framework::return_window_keys(&ctx); let tab_had_widget_focus = ctx.egui_wants_keyboard_input(); menus::handle_shortcuts(self, &ctx); if !ctx.input(|i| i.pointer.primary_down()) { @@ -544,6 +533,7 @@ impl EffectcraftApp { panels::learn::coach(self, &ctx); let lift = panels::media_panels::import_card(self, ui, full); self.draw_toast(ui, full, lift); + self.framework_dialogs.run(ui); } /// Workspace-layout auto-save: a background write that also runs while hidden, once the diff --git a/crates/ui-egui/src/app/prefs.rs b/crates/ui-egui/src/app/prefs.rs index 218760337..5b7a13d6f 100644 --- a/crates/ui-egui/src/app/prefs.rs +++ b/crates/ui-egui/src/app/prefs.rs @@ -17,10 +17,9 @@ impl EffectcraftApp { ctx.set_theme(theme::theme_preference(&p.appearance.appearance_mode, self.ui.theme.is_light())); let tips = p.general.show_tool_tips; ctx.all_styles_mut(|s| s.interaction.tooltip_delay = if tips { 0.5 } else { f32::INFINITY }); - // Settings ▸ Appearance ▸ UI Scale (#284). egui's own Ctrl+= / Ctrl+- / Ctrl+0 zoom stays - // off: Ctrl+0 is Window ▸ Project, and the scale is a setting. - ctx.options_mut(|o| o.zoom_with_keyboard = false); - ctx.set_zoom_factor(p.appearance.ui_scale as f32 / 100.0); + // Settings ▸ Appearance ▸ UI Scale (#284) is the runtime's root scale (`frame_input`), which + // writes the zoom factor; egui's own Ctrl+= / Ctrl+- / Ctrl+0 zoom is off under the runtime + // (Ctrl+0 is Window ▸ Project). self.ui.cache_when_idle = p.previews.cache_frames_when_idle; self.ui.viewer.fast_preview = p.previews.fast_previews; // No limit of its own below the common budget on the desktop, the browser's cap there: diff --git a/crates/ui-egui/src/app/screenshot.rs b/crates/ui-egui/src/app/screenshot.rs index bf7dace0d..7d95b4472 100644 --- a/crates/ui-egui/src/app/screenshot.rs +++ b/crates/ui-egui/src/app/screenshot.rs @@ -206,7 +206,7 @@ impl EffectcraftApp { fn drain_completed_screenshots(&mut self, geom: DrawGeometry) { let mut i = 0; while i < self.pending_screenshots.len() { - let taken = self.pending_screenshots.get(i).and_then(|s| s.slot.as_ref()).and_then(craft_ui::capture::CaptureSlot::take); + let taken = self.pending_screenshots.get(i).and_then(|s| s.slot.as_ref()).and_then(crate::capture::CaptureSlot::take); let Some(result) = taken else { i += 1; continue; @@ -324,7 +324,7 @@ impl EffectcraftApp { continue; } }; - let (slot, callback) = craft_ui::capture::CaptureSlot::new(ctx, egui::ViewportId::ROOT, MAX_SHOT_BYTES); + let (slot, callback) = crate::capture::CaptureSlot::new(ctx, egui::ViewportId::ROOT, MAX_SHOT_BYTES); ctx.send_viewport_cmd(egui::ViewportCommand::Screenshot(callback)); let s = &mut self.pending_screenshots[i]; s.slot = Some(slot); @@ -356,7 +356,7 @@ mod tests { assert!(app.session.refuse_export(&text).is_ok()); let (tx, rx) = std::sync::mpsc::channel(); app.admit_screenshot(&ctx, Some(text.clone()), ShotTarget::Window, tx); - let (slot, callback) = craft_ui::capture::CaptureSlot::new(&ctx, egui::ViewportId::ROOT, MAX_SHOT_BYTES); + let (slot, callback) = crate::capture::CaptureSlot::new(&ctx, egui::ViewportId::ROOT, MAX_SHOT_BYTES); let shot = app.pending_screenshots.last_mut().unwrap(); shot.issued = Some(geom); shot.slot = Some(slot); diff --git a/crates/ui-egui/src/capture.rs b/crates/ui-egui/src/capture.rs new file mode 100644 index 000000000..7e58c204f --- /dev/null +++ b/crates/ui-egui/src/capture.rs @@ -0,0 +1,211 @@ +//! One-shot completion slots for `ui.screenshot` captures. +//! +//! The app keeps request ids, paths, deadlines, settling and budgets in its request record +//! (`control::PendingShot`). A slot only correlates one capture with one record, checks the image against +//! a per-image byte bound, and wakes the owning viewport. +//! +//! [`CaptureSlot::new`] sends nothing: send its callback with [`egui::ViewportCommand::Screenshot`] +//! when the capture is due. The callback holds only a weak reference to the slot, so dropping the +//! slot releases its image and makes a late result inert. Every retry needs a +//! fresh slot and callback. +//! +//! The slot holds a strong [`egui::Context`]: keep it in the app's request record, never in +//! `Context`-owned data, which would form a cycle. + +use std::mem::size_of; +use std::sync::{Arc, Mutex, MutexGuard, PoisonError, Weak}; + +use egui::{Color32, ColorImage, Context, ScreenshotCallback, ViewportId}; + +/// Why a completed screenshot was rejected and released. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) enum CaptureError { + /// The checked pixel count, or its byte count, overflowed `usize`. + DimensionsOverflow { width: usize, height: usize }, + /// The pixel buffer does not match the dimensions, or the image has no area. + MalformedImage { width: usize, height: usize, pixels: usize }, + /// The image is larger than the slot's per-image byte bound. + ImageTooLarge { bytes: usize, max_bytes: usize }, +} + +impl core::fmt::Display for CaptureError { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + Self::DimensionsOverflow { width, height } => { + write!(f, "screenshot dimensions {width}×{height} overflow the checked pixel or byte count") + } + Self::MalformedImage { width, height, pixels } => write!(f, "screenshot has {pixels} pixels for its {width}×{height} dimensions"), + Self::ImageTooLarge { bytes, max_bytes } => write!(f, "screenshot uses {bytes} bytes, over the {max_bytes}-byte per-image limit"), + } + } +} + +impl std::error::Error for CaptureError {} + +enum SlotState { + Pending, + Ready(Result, CaptureError>), + Taken, + Cancelled, +} + +struct Shared { + state: Mutex, + /// The live request owns the strong context; the callback only upgrades it briefly to wake. + context: Context, + viewport: ViewportId, + max_image_bytes: usize, +} + +/// The live request side of a capture. Dropping it cancels the completion and releases any +/// retained image. +#[must_use = "the slot must be kept alive to receive and take the screenshot"] +pub(crate) struct CaptureSlot { + shared: Arc, +} + +impl CaptureSlot { + /// A completion slot for a capture of `viewport` and its one-shot callback. `max_image_bytes` + /// bounds this one image; the app reserves its aggregate budget itself. + pub(crate) fn new(context: &Context, viewport: ViewportId, max_image_bytes: usize) -> (Self, ScreenshotCallback) { + let shared = Arc::new(Shared { state: Mutex::new(SlotState::Pending), context: context.clone(), viewport, max_image_bytes }); + let weak = Arc::downgrade(&shared); + let callback = ScreenshotCallback::new(move |image| complete(&weak, image)); + (Self { shared }, callback) + } + + /// The completed result, at most once; `None` while pending and after an + /// earlier take. The request record knows which. + pub(crate) fn take(&self) -> Option, CaptureError>> { + let mut state = lock(&self.shared.state); + if !matches!(&*state, SlotState::Ready(_)) { + return None; + } + match core::mem::replace(&mut *state, SlotState::Taken) { + SlotState::Ready(result) => Some(result), + _ => None, + } + } +} + +impl Drop for CaptureSlot { + fn drop(&mut self) { + close(&self.shared); + } +} + +impl core::fmt::Debug for CaptureSlot { + /// The viewport only: logging never holds or dumps screenshot contents. + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_struct("CaptureSlot").field("viewport", &self.shared.viewport).finish_non_exhaustive() + } +} + +/// Locks the slot state, recovering from poisoning. Release the guard before calling into the +/// context: a repaint observer may take or cancel re-entrantly. +fn lock(state: &Mutex) -> MutexGuard<'_, SlotState> { + state.lock().unwrap_or_else(PoisonError::into_inner) +} + +/// Marks the slot closed; the retained image drops after the mutex is released. +fn close(shared: &Shared) { + let previous = { + let mut state = lock(&shared.state); + core::mem::replace(&mut *state, SlotState::Cancelled) + }; + drop(previous); +} + +/// Checks and stores a completed image, then wakes the owning viewport, with the slot lock +/// released. A cancelled, taken or dropped slot stores nothing and does not wake. +fn complete(weak: &Weak, image: Arc) { + let Some(shared) = weak.upgrade() else { return }; + let result = checked_image(image, shared.max_image_bytes); + let wake = { + let mut state = lock(&shared.state); + if matches!(&*state, SlotState::Pending) { + *state = SlotState::Ready(result); + true + } else { + false + } + }; + if wake { + shared.context.request_repaint_of(shared.viewport); + } +} + +/// `image` when it has area, its buffer matches its size, and its byte count (checked) is within +/// `max_image_bytes`. +fn checked_image(image: Arc, max_image_bytes: usize) -> Result, CaptureError> { + let [width, height] = image.size; + if width == 0 || height == 0 { + return Err(CaptureError::MalformedImage { width, height, pixels: image.pixels.len() }); + } + let pixels = width.checked_mul(height).ok_or(CaptureError::DimensionsOverflow { width, height })?; + let bytes = pixels.checked_mul(size_of::()).ok_or(CaptureError::DimensionsOverflow { width, height })?; + if image.pixels.len() != pixels { + return Err(CaptureError::MalformedImage { width, height, pixels: image.pixels.len() }); + } + if bytes > max_image_bytes { + return Err(CaptureError::ImageTooLarge { bytes, max_bytes: max_image_bytes }); + } + Ok(image) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn image(size: [usize; 2]) -> Arc { + Arc::new(ColorImage::filled(size, Color32::RED)) + } + + fn observe_repaints(ctx: &Context) -> Arc>> { + let requests = Arc::new(Mutex::new(Vec::new())); + let observed = requests.clone(); + ctx.set_repaint_observer(move |info| observed.lock().unwrap().push(info.viewport_id)); + requests + } + + #[test] + fn a_completion_wakes_its_viewport_and_is_taken_once() { + let ctx = Context::default(); + let requests = observe_repaints(&ctx); + let viewport = ViewportId::from_hash_of("window"); + let (slot, callback) = CaptureSlot::new(&ctx, viewport, 1024); + assert!(slot.take().is_none(), "pending"); + let shot = image([2, 1]); + callback.complete(shot.clone()); + assert!(Arc::ptr_eq(&slot.take().unwrap().unwrap(), &shot)); + assert!(slot.take().is_none(), "taken once"); + assert_eq!(*requests.lock().unwrap(), [viewport]); + } + + #[test] + fn a_dropped_slot_releases_a_late_image_without_waking() { + let ctx = Context::default(); + let requests = observe_repaints(&ctx); + let (slot, callback) = CaptureSlot::new(&ctx, ViewportId::ROOT, 1024); + drop(slot); + let late = image([2, 2]); + let weak = Arc::downgrade(&late); + callback.complete(late); + assert!(weak.upgrade().is_none()); + assert!(requests.lock().unwrap().is_empty()); + } + + #[test] + fn oversized_malformed_and_overflowing_images_are_errors() { + let ctx = Context::default(); + let (slot, callback) = CaptureSlot::new(&ctx, ViewportId::ROOT, 16); + callback.complete(image([3, 3])); + assert!(matches!(slot.take(), Some(Err(CaptureError::ImageTooLarge { bytes: 36, max_bytes: 16 })))); + let (slot, callback) = CaptureSlot::new(&ctx, ViewportId::ROOT, 1024); + callback.complete(Arc::new(ColorImage { size: [2, 2], source_size: egui::Vec2::ZERO, pixels: vec![Color32::RED; 3] })); + assert!(matches!(slot.take(), Some(Err(CaptureError::MalformedImage { width: 2, height: 2, pixels: 3 })))); + let (slot, callback) = CaptureSlot::new(&ctx, ViewportId::ROOT, 1024); + callback.complete(Arc::new(ColorImage { size: [usize::MAX, 2], source_size: egui::Vec2::ZERO, pixels: Vec::new() })); + assert!(matches!(slot.take(), Some(Err(CaptureError::DimensionsOverflow { .. })))); + } +} diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs new file mode 100644 index 000000000..fc2976792 --- /dev/null +++ b/crates/ui-egui/src/framework.rs @@ -0,0 +1,153 @@ +//! The craft-ui runtime, hosted from EffectCraft's own eframe `App` (craft-libs docs/craft-framework.md, section 2.2). +//! The desktop app calls [`install`] once, [`EffectcraftApp::before_input`] in `raw_input_hook`, +//! [`EffectcraftApp::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 [`EffectcraftApp::framework_dialogs`] after +//! EffectCraft's own UI. +//! +//! The runtime takes Escape, Tab and the clipboard events for the whole window unless one of EffectCraft's own egui +//! widgets has the keyboard. [`return_window_keys`] puts the window's Escape and plain Enter back into egui's input +//! for EffectCraft's own handlers; the Composition viewer is declared to the runtime with [`host_canvas`], which keeps +//! Tab, the edit chords and the clipboard events in egui's input for EffectCraft's shortcuts. + +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 _, NavCommand, QuitCommand}; +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::system::WindowSystem; +use egui::ViewportId; + +use crate::EffectcraftApp; + +/// 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.effectcraft"; + +/// 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. EffectCraft'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) -> Result<(), String> { + let spec = craft_ui::InstallSpec::new(shell, windows).app_id(APP_ID); + embed::install(ctx, spec, &ui_fonts()).map(drop).map_err(|error| format!("the UI runtime could not be installed: {error}")) +} + +/// Installs the runtime on the desktop window's context, once, before the first pass. EffectCraft keeps the system +/// title bar, so the window gets no frame decision. +#[cfg(not(target_arch = "wasm32"))] +pub fn install(ctx: &egui::Context) -> Result<(), String> { + let shell = ShellInfo::default().backend(craft_host::target::Backend::from_env()); + install_with(ctx, shell, Arc::new(craft_window::system::SystemWindows)) +} + +/// 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)) { + log::warn!("{error}"); + } +} + +/// Who EffectCraft 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: "effectcraft", name: "EffectCraft", version: env!("CARGO_PKG_VERSION") }) + .icon_png(include_bytes!("../../../assets/app-icon/hicolor/128x128/apps/ai.storyteller.effectcraft.png")) + .build(), + ) +} + +/// EffectCraft's own shortcut table keeps the keys the framework binds by default: Cmd+Q is `app.quit`, and F6 is +/// free for the user to bind there, so the framework's quit and pane moves are unbound. Overrides are keyed by command +/// id, which the command sets give. +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()] { + overrides.insert(id, Vec::new()); + } + Arc::new(overrides) + }) + .clone() +} + +impl EffectcraftApp { + /// 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 and interface scale). + pub fn before_input(&mut self, ctx: &egui::Context) { + embed::before_input(ctx, |output| self.frame_input(ctx, output)); + } + + /// The root values of this frame. EffectCraft registers no commands with the runtime (its own shortcut table runs + /// every key, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. The + /// interface scale is Settings > Appearance > UI Scale; the runtime writes it to the context. While one of + /// EffectCraft's own dialogs or a command's file dialog is up, the runtime blocks the panels floated into windows + /// of their own. + pub(crate) fn frame_input(&mut self, ctx: &egui::Context, _output: FrameOutput) -> FrameInput { + let mode = if self.tokens.kind.is_light() { craft_theme::Mode::Light } else { craft_theme::Mode::Dark }; + let scale = self.session.prefs.appearance.ui_scale as f32 / 100.0; + let root = RootEnv::new().mode(mode).scale(Scale::new(scale)); + let app_modal = self.floats_blocked(ctx).then_some(ViewportId::ROOT); + 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 EffectCraft's own: the root window's close path + /// ([`crate::panels::unsaved::close_decision`]). + pub fn close_path(&mut self, ctx: &egui::Context) { + embed::logic(ctx, || crate::panels::unsaved::close_decision(self)); + } +} + +/// Declares the Composition viewer `id`, drawn in this pass, as the window's document canvas. With nothing focused it +/// is the window's key target: Tab (the Composition Mini-Flowchart), the edit chords and the clipboard events stay in +/// egui's input for EffectCraft'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); +} + +/// Puts the window's Escape and plain Enter (the keys the runtime routes to no component while nothing has framework +/// focus) back into egui's input as key presses, first in the pass, so EffectCraft's dialogs, popups, tools and +/// shortcuts read them from egui as they read every other key. +pub(crate) fn return_window_keys(ctx: &egui::Context) { + for (key, intent) in [(egui::Key::Escape, Intent::Cancel), (egui::Key::Enter, Intent::Submit)] { + if take_window_intent(ctx, intent) { + ctx.input_mut(|i| { + let modifiers = i.modifiers; + i.events.insert(0, egui::Event::Key { key, physical_key: Some(key), pressed: true, repeat: false, modifiers }); + }); + } + } +} + +/// Takes the window's `intent` when it is there: no later reader sees it. +fn take_window_intent(ctx: &egui::Context, intent: Intent) -> bool { + let mut taken = false; + with_window_intents(ctx, false, |intents| { + taken = intents.take(intent.clone()); + taken + }); + taken +} + +/// Whether the close decision is `Close`. +pub(crate) fn decide(close: bool) -> CloseDecision { + if close { CloseDecision::Close } else { CloseDecision::Hold } +} diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 1d39857df..8f5030fcb 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -21,6 +21,7 @@ pub const UPDATE_APP: craft_update::app::App = craft_update::app::App { pub mod audio; pub mod automation; pub mod bench; +pub(crate) mod capture; pub mod color_picker; pub mod control; pub mod credits; @@ -28,6 +29,7 @@ pub mod display_gpu; pub mod dock; pub mod dock_ui; mod expression_diagnostics; +pub mod framework; pub mod frames; pub mod gpu_failure; pub mod header; @@ -103,7 +105,7 @@ struct PendingShot { /// The geometry epoch bound to the issued capture command, if it was issued. issued: Option, /// The shared completion slot; dropping it cancels a late callback. - slot: Option, + slot: Option, /// Bytes reserved against [`EffectcraftApp::shot_bytes`]. reserved_bytes: usize, /// Geometry retries used. @@ -472,6 +474,10 @@ pub struct EffectcraftApp { /// Audio scrubbing's open output (Ctrl/Cmd-drag the current time, `playback.scrubAudio`). pub scrub: Option, pub(crate) updates_rt: updates_ui::Runtime, + /// The framework dialogs (the update dialogs), run once per pass after EffectCraft's own UI. + pub framework_dialogs: craft_ui::dialog::DialogHost, + /// Who EffectCraft is to the framework's dialogs. + pub(crate) framework_host: std::sync::Arc, /// Audio panel VU meters. pub meter: audio::Meter, /// Waveform peak summaries per footage item (see `panels::waveform`). diff --git a/crates/ui-egui/src/panels/text_panels.rs b/crates/ui-egui/src/panels/text_panels.rs index f22d775a3..e4be44d3f 100644 --- a/crates/ui-egui/src/panels/text_panels.rs +++ b/crates/ui-egui/src/panels/text_panels.rs @@ -795,11 +795,6 @@ pub(super) fn font_picker(app: &mut EffectcraftApp, ui: &mut egui::Ui, id: egui: let changed = search.changed(); let mut open = true; // The search lives in the field; the menu's header is the filter row, its list the fonts. - let menu = craft_ui::combo::Menu::new(ui, &search) - .open(&mut open) - .height(380.0) - .close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside) - .style(egui::style::StyleModifier::default()); let app_ref = &mut *app; let header = |ui: &mut egui::Ui| { ui.set_width(rect.width().max(180.0)); @@ -922,7 +917,7 @@ pub(super) fn font_picker(app: &mut EffectcraftApp, ui: &mut egui::Ui, id: egui: } chosen }; - let chosen = menu.show_ui_with_header(header, list).flatten(); + let chosen = header_menu(&search, &mut open, FONT_MENU_HEIGHT, header, list).flatten(); if chosen.is_some() || !open || escape { ui.data_mut(|d| { d.insert_temp(id.with("open"), false); @@ -1095,6 +1090,33 @@ fn fit_preview(lines: &[Vec<[f32; 2]>], room: Rect, baseline: f32) -> Option<(f3 Some((k, o)) } + +/// The tallest the font menu gets, its header included. +const FONT_MENU_HEIGHT: f32 = 380.0; + +/// A menu under `field` while `open` is true: `header` stays at the top and the list it hands its result to scrolls +/// under it, the whole menu up to `height` tall and at least as wide as the field. A click outside closes it (`open` +/// turns false). Returns what `list` returned, or `None` while the menu is closed. +fn header_menu( + field: &egui::Response, + open: &mut bool, + height: f32, + header: impl FnOnce(&mut egui::Ui) -> H, + list: impl FnOnce(&mut egui::Ui, H) -> R, +) -> Option { + egui::Popup::from_response(field) + .open_bool(open) + .width(field.rect.width()) + .close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside) + .show(|ui| { + ui.set_min_width(ui.available_width()); + ui.set_max_height(height); + let header = header(ui); + egui::ScrollArea::vertical().max_height(ui.available_height().max(0.0)).show(ui, |ui| list(ui, header)).inner + }) + .map(|shown| shown.inner) +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/ui-egui/src/panels/unsaved.rs b/crates/ui-egui/src/panels/unsaved.rs index be12668da..016bc60d4 100644 --- a/crates/ui-egui/src/panels/unsaved.rs +++ b/crates/ui-egui/src/panels/unsaved.rs @@ -55,25 +55,24 @@ fn ask(app: &mut EffectcraftApp, id: &str, params: &Value) -> bool { true } -/// The window's close button (and Quit, which closes it): keep the window open and ask. -pub fn on_close_requested(app: &mut EffectcraftApp, ctx: &egui::Context) { - if !ctx.input(|i| i.viewport().close_requested()) || app.dialog_state.unsaved.quitting { - return; +/// The root window's close decision, which the runtime's close path (`crate::framework`, `close_path`) asks when the +/// window's close button, Quit or `app.quit` closes the window. A lost graphics device and an answered Quit prompt +/// close; a running script render holds the window (a close is no permission to abandon the script, and once Stop +/// finishes it a new close is asked about as usual); a modified project holds it while the Unsaved Changes prompt +/// asks. On macOS a close that nothing holds quits through the platform (the runtime's close path). +pub fn close_decision(app: &mut EffectcraftApp) -> craft_ui::shell::embed::CloseDecision { + if app.device_lost_close.is_some() { + return crate::framework::decide(true); + } + if app.session.script_ui.render_host.is_some() { + return crate::framework::decide(false); + } + if app.dialog_state.unsaved.quitting { + return crate::framework::decide(true); } // Logged, so a window that closes on its own shows it (#234). log::info!("the window was asked to close"); - if ask(app, "app.quit", &json!({})) { - ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose); - } -} - -/// On macOS a close that nothing held open quits through `-[NSApplication terminate:]` instead: -/// closing the window while AppKit's run loop is running crashes on a Mac with a Touch Bar -/// (#341). `on_exit` still runs. A desktop host calls it last in `logic`, after -/// `EffectcraftApp::tick` (which runs [`on_close_requested`]) and its own work. Returns whether -/// that quit was scheduled; other platforms close the window as before. -pub fn quit_on_close(ctx: &egui::Context) -> bool { - craft_quit::on_close_request(ctx) + crate::framework::decide(!ask(app, "app.quit", &json!({}))) } /// The project's display name: its file name, or `Untitled Project.ecproj`. @@ -204,6 +203,7 @@ mod tests { fn app() -> (EffectcraftApp, egui::Context) { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let app = EffectcraftApp::new(effectcraft_engine::Session::default()); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); (app, ctx) @@ -218,29 +218,17 @@ mod tests { } let mut out = ctx.run_ui(raw, |ui| { app.auto.begin_frame(); - on_close_requested(app, ui.ctx()); + app.close_path(ui.ctx()); crate::panels::dialogs::show(app, ui.ctx()); }); out.textures_delta.clear(); out.viewport_output.get(&egui::ViewportId::ROOT).is_some_and(|v| v.commands.contains(&egui::ViewportCommand::CancelClose)) } - /// One frame of the dialogs with the window's close button pressed, through - /// [`on_close_requested`] and then [`quit_on_close`] as the app runs them; returns whether the - /// close was canceled and whether the platform quit was scheduled. - fn close_frame(app: &mut EffectcraftApp, ctx: &egui::Context) -> (bool, bool) { - let mut raw = egui::RawInput::default(); - raw.viewports.entry(egui::ViewportId::ROOT).or_default().events.push(egui::ViewportEvent::Close); - let mut quits = false; - let mut out = ctx.run_ui(raw, |ui| { - app.auto.begin_frame(); - on_close_requested(app, ui.ctx()); - quits = quit_on_close(ui.ctx()); - crate::panels::dialogs::show(app, ui.ctx()); - }); - out.textures_delta.clear(); - let canceled = out.viewport_output.get(&egui::ViewportId::ROOT).is_some_and(|v| v.commands.contains(&egui::ViewportCommand::CancelClose)); - (canceled, quits) + /// One frame of the dialogs with the window's close button pressed, through the runtime's close path as the app + /// runs it; returns whether the close was canceled (held, or taken by the platform quit on macOS). + fn close_frame(app: &mut EffectcraftApp, ctx: &egui::Context) -> bool { + frame(app, ctx, true) } fn modified(app: &mut EffectcraftApp) { @@ -401,7 +389,7 @@ mod tests { fn closing_a_saved_project_quits_through_the_platform_on_macos() { let (mut app, ctx) = app(); let macos = cfg!(target_os = "macos"); - assert_eq!(close_frame(&mut app, &ctx), (macos, macos)); + assert_eq!(close_frame(&mut app, &ctx), macos); assert!(app.dialog.is_none(), "nothing to ask"); } @@ -409,14 +397,14 @@ mod tests { fn closing_a_modified_project_asks_before_the_platform_quit() { let (mut app, ctx) = app(); modified(&mut app); - assert_eq!(close_frame(&mut app, &ctx), (true, false), "the prompt holds the window and nothing quits"); + assert!(close_frame(&mut app, &ctx), "the prompt holds the window"); assert_eq!(app.dialog, Some(Dialog::UnsavedChanges)); answer_with(&mut app, &ctx, Answer::Cancel); assert!(app.session.is_dirty() && !app.dialog_state.unsaved.quitting); - assert_eq!(close_frame(&mut app, &ctx), (true, false), "asked again after Cancel"); + assert!(close_frame(&mut app, &ctx), "asked again after Cancel"); answer_with(&mut app, &ctx, Answer::Discard); let macos = cfg!(target_os = "macos"); - assert_eq!(close_frame(&mut app, &ctx), (macos, macos), "Don't Save quits"); + assert_eq!(close_frame(&mut app, &ctx), macos, "Don't Save closes"); } /// While the window is minimized or hidden, eframe runs `App::logic` without `App::ui` and diff --git a/crates/ui-egui/src/panels/viewer.rs b/crates/ui-egui/src/panels/viewer.rs index 1fa58e635..41c2f2ab1 100644 --- a/crates/ui-egui/src/panels/viewer.rs +++ b/crates/ui-egui/src/panels/viewer.rs @@ -885,6 +885,7 @@ fn phase_menu(app: &mut EffectcraftApp, ui: &mut egui::Ui, ectx: &EvalCtx, v: &m // Interaction. let resp = ui.interact(area, egui::Id::unique("viewer-interact"), Sense::click_and_drag()); + crate::framework::host_canvas(ui.ctx(), resp.id); let menu_hits_id = egui::Id::unique(("viewer-menu-hits", cid.0)); // A right-click an overlay took (the Cryptomatte eyedropper's) opens the menu too. let forwarded = ui.data_mut(|d| d.remove_temp::(egui::Id::unique(FORWARDED_SECONDARY))); diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index e18d834ee..0126fd8cc 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -393,7 +393,7 @@ pub fn install(ctx: &egui::Context, t: &Tokens, language: &str) { stack.push("noto-symbols2".into()); } install_script_fallbacks(&mut fonts, language); - ctx.set_fonts(fonts); + craft_ui::fonts::load(ctx, fonts); apply_visuals(ctx, t); } diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index 1b2ce3347..ab7dcdc11 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -1,9 +1,12 @@ -//! Software updates, background check at startup, and startup prompt modal. +//! Software updates, background check at startup, and startup prompt modal, as craft-update's +//! dialogs on the app's [`DialogHost`](craft_ui::dialog::DialogHost). use crate::EffectcraftApp; #[cfg(not(target_arch = "wasm32"))] -use craft_update::dialog::{CheckResultDialog, CheckResultResponse}; +use craft_ui::dialog::DialogResult; +#[cfg(not(target_arch = "wasm32"))] +use craft_update::stack_dialogs::{CheckChoice, UpdateCheckDialog}; #[cfg(not(target_arch = "wasm32"))] use craft_update::updater::{Action, Status, Updater}; @@ -60,7 +63,7 @@ pub(crate) fn restart_to_update(rt: &mut Runtime, ctx: &egui::Context, clean: bo } // Without a prompt this only takes the close a finished installation queued, so a save after // Cancel does not close the app. - let _ = rt.updater.show_if(ctx, true); + let _ = rt.updater.take_close(true); ctx.send_viewport_cmd(egui::ViewportCommand::Close); } @@ -82,9 +85,9 @@ pub(crate) fn tick(app: &mut EffectcraftApp, ctx: &egui::Context) { { let rt = &mut app.updates_rt; 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); } @@ -101,28 +104,48 @@ pub(crate) fn result_window_open(open: bool, status: &Status, check_requested: b !matches!(status, Status::Idle) || (open && check_requested) } +/// One pass of the update flow, before the dialog host runs: answers the result dialog closed in +/// the last pass, drives the update prompt, and keeps the result dialog open and current while it +/// answers Help ▸ Check for Updates or the updater has something to report. pub(crate) fn show(app: &mut EffectcraftApp, ctx: &egui::Context) { #[cfg(not(target_arch = "wasm32"))] { // The restart helper is scheduled before the app closes, so no update starts over unsaved work. let clean = !app.session.is_dirty(); - 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.updater.check_now(), + Some(DialogResult::Ok(CheckChoice::RestartToUpdate)) => restart_to_update(&mut app.updates_rt, ctx, clean), + 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.manual_window_open = false; + 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 => {} + _ => {} } let rt = &mut app.updates_rt; rt.manual_window_open = result_window_open(rt.manual_window_open, rt.updater.status(), rt.check_requested); - if rt.manual_window_open { - match CheckResultDialog::new(&crate::UPDATE_APP, env!("CARGO_PKG_VERSION")).show(ctx, rt.updater.status()) { - CheckResultResponse::None => {} - CheckResultResponse::Close => { - rt.manual_window_open = false; - rt.updater.dismiss_status(); - } - CheckResultResponse::CheckAgain => rt.updater.check_now(ctx), - CheckResultResponse::RestartToUpdate => restart_to_update(rt, ctx, clean), - } + let shows = rt.manual_window_open; + let (status, installing, message) = (rt.updater.status().clone(), rt.updater.is_installing(), rt.updater.status_message()); + let dialogs = &mut app.framework_dialogs; + if shows && !dialogs.is_open::() { + dialogs.open(UpdateCheckDialog::new(env!("CARGO_PKG_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); } } From e34fc9ecaa3998a5d0e4939ab5f969c7162b42df Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:55:12 +0000 Subject: [PATCH 05/39] Tests: the runtime installed in every harness and bare context that runs the app's UI --- crates/ui-egui/src/app/clipboard.rs | 2 + crates/ui-egui/src/app/frame.rs | 11 ++++ crates/ui-egui/src/app/prefs.rs | 1 + crates/ui-egui/src/app/viewer_frames.rs | 4 +- crates/ui-egui/src/color_picker.rs | 5 +- crates/ui-egui/src/i18n.rs | 1 + crates/ui-egui/src/lifecycle_tests.rs | 1 + crates/ui-egui/src/menus/tests.rs | 9 ++- crates/ui-egui/src/native_menu.rs | 3 + crates/ui-egui/src/num_math.rs | 1 + crates/ui-egui/src/panels/effects_presets.rs | 1 + crates/ui-egui/src/panels/forms.rs | 3 + crates/ui-egui/src/panels/home.rs | 2 + crates/ui-egui/src/panels/markers_ui.rs | 1 + crates/ui-egui/src/panels/project.rs | 1 + crates/ui-egui/src/panels/scriptui_view.rs | 1 + crates/ui-egui/src/panels/settings.rs | 3 + crates/ui-egui/src/panels/shortcut_editor.rs | 1 + crates/ui-egui/src/panels/text_panels.rs | 1 + crates/ui-egui/src/panels/timeline/tests.rs | 1 + .../ui-egui/src/panels/viewer_text/tests.rs | 3 + crates/ui-egui/src/pointer_wrap/tests.rs | 1 + crates/ui-egui/src/theme.rs | 5 ++ crates/ui-egui/src/widgets.rs | 2 + .../ui-egui/tests/it/native_menu_text_keys.rs | 4 +- .../ui-egui/tests/it/render_queue_snapshot.rs | 4 +- crates/ui-egui/tests/it/shared_docking_ui.rs | 6 +- crates/ui-egui/tests/it/ui_3d.rs | 16 ++--- crates/ui-egui/tests/it/ui_accessibility.rs | 2 +- .../tests/it/ui_accessibility_audit.rs | 2 +- crates/ui-egui/tests/it/ui_agent_audit.rs | 2 +- .../ui-egui/tests/it/ui_alt_drag_duplicate.rs | 4 +- crates/ui-egui/tests/it/ui_angles.rs | 2 +- .../ui-egui/tests/it/ui_audio_panel_levels.rs | 2 +- crates/ui-egui/tests/it/ui_audio_scrub.rs | 30 ++++----- .../ui-egui/tests/it/ui_azerty_shortcuts.rs | 6 +- crates/ui-egui/tests/it/ui_batch_links.rs | 2 +- crates/ui-egui/tests/it/ui_batch_switches.rs | 4 +- .../tests/it/ui_blank_context_menus.rs | 2 +- crates/ui-egui/tests/it/ui_camera_tracker.rs | 12 ++-- .../tests/it/ui_character_eyedropper.rs | 4 +- .../tests/it/ui_character_stroke_order.rs | 2 +- crates/ui-egui/tests/it/ui_checkbox_drag.rs | 2 +- crates/ui-egui/tests/it/ui_color_hex.rs | 2 +- crates/ui-egui/tests/it/ui_comp_presets.rs | 10 +-- crates/ui-egui/tests/it/ui_crypto_pick.rs | 4 +- .../ui-egui/tests/it/ui_crypto_pick_undo.rs | 2 +- crates/ui-egui/tests/it/ui_crypto_select.rs | 2 +- crates/ui-egui/tests/it/ui_dialog_preview.rs | 2 +- crates/ui-egui/tests/it/ui_dock_resize.rs | 2 +- crates/ui-egui/tests/it/ui_drag_drop.rs | 14 ++-- crates/ui-egui/tests/it/ui_effect_controls.rs | 64 +++++++++---------- .../tests/it/ui_effect_drop_highlight.rs | 2 +- crates/ui-egui/tests/it/ui_effect_names.rs | 2 +- .../tests/it/ui_effects_presets_keyboard.rs | 2 +- crates/ui-egui/tests/it/ui_env_light_gpu.rs | 2 +- .../ui-egui/tests/it/ui_export_overwrite.rs | 2 +- .../ui-egui/tests/it/ui_expression_values.rs | 2 +- .../ui-egui/tests/it/ui_flowchart_keyboard.rs | 4 +- crates/ui-egui/tests/it/ui_font_search.rs | 14 ++-- crates/ui-egui/tests/it/ui_form_fit.rs | 2 +- crates/ui-egui/tests/it/ui_frame_step.rs | 8 +-- crates/ui-egui/tests/it/ui_fx_editors.rs | 4 +- crates/ui-egui/tests/it/ui_gpu.rs | 10 +-- crates/ui-egui/tests/it/ui_gradient_editor.rs | 2 +- .../ui-egui/tests/it/ui_gradient_handles.rs | 2 +- crates/ui-egui/tests/it/ui_gradient_value.rs | 2 +- crates/ui-egui/tests/it/ui_graph_fit.rs | 2 +- crates/ui-egui/tests/it/ui_graph_theme.rs | 2 +- crates/ui-egui/tests/it/ui_group_rename.rs | 2 +- crates/ui-egui/tests/it/ui_guide_layers.rs | 2 +- .../ui-egui/tests/it/ui_info_tracker_a11y.rs | 2 +- crates/ui-egui/tests/it/ui_inline_edit.rs | 2 +- crates/ui-egui/tests/it/ui_keyframes.rs | 6 +- crates/ui-egui/tests/it/ui_large_project.rs | 2 +- .../ui-egui/tests/it/ui_layer_panel_zoom.rs | 2 +- .../tests/it/ui_layer_source_picker.rs | 6 +- crates/ui-egui/tests/it/ui_light_settings.rs | 2 +- crates/ui-egui/tests/it/ui_live_preview.rs | 6 +- crates/ui-egui/tests/it/ui_locked_color.rs | 2 +- crates/ui-egui/tests/it/ui_marker_names.rs | 6 +- .../tests/it/ui_media_browser_cache.rs | 2 +- .../tests/it/ui_media_browser_copy_path.rs | 3 +- crates/ui-egui/tests/it/ui_menus.rs | 4 +- crates/ui-egui/tests/it/ui_new_primitive.rs | 2 +- crates/ui-egui/tests/it/ui_object_matte.rs | 2 +- crates/ui-egui/tests/it/ui_panel_focus.rs | 2 +- crates/ui-egui/tests/it/ui_panel_windows.rs | 2 +- crates/ui-egui/tests/it/ui_panels.rs | 10 +-- .../ui-egui/tests/it/ui_parameter_spacing.rs | 4 +- crates/ui-egui/tests/it/ui_presets_folder.rs | 5 +- crates/ui-egui/tests/it/ui_preview_align.rs | 2 +- crates/ui-egui/tests/it/ui_project_delete.rs | 2 +- .../ui-egui/tests/it/ui_project_duplicate.rs | 2 +- .../ui-egui/tests/it/ui_project_keyboard.rs | 2 +- .../ui-egui/tests/it/ui_project_new_folder.rs | 2 +- crates/ui-egui/tests/it/ui_project_rows.rs | 4 +- crates/ui-egui/tests/it/ui_quick_offset.rs | 4 +- crates/ui-egui/tests/it/ui_ram_preview.rs | 8 +-- crates/ui-egui/tests/it/ui_render_queue.rs | 4 +- .../tests/it/ui_render_queue_keyboard.rs | 2 +- crates/ui-egui/tests/it/ui_roto_objects.rs | 2 +- .../tests/it/ui_roto_span_confidence.rs | 2 +- crates/ui-egui/tests/it/ui_script_console.rs | 4 +- .../tests/it/ui_script_console_keyboard.rs | 2 +- crates/ui-egui/tests/it/ui_script_render.rs | 2 +- crates/ui-egui/tests/it/ui_scriptui.rs | 12 ++-- crates/ui-egui/tests/it/ui_scrolling.rs | 4 +- crates/ui-egui/tests/it/ui_self_drop.rs | 2 +- crates/ui-egui/tests/it/ui_settings_info.rs | 8 +-- .../ui-egui/tests/it/ui_settings_keyboard.rs | 2 +- crates/ui-egui/tests/it/ui_shortcut_scopes.rs | 1 + crates/ui-egui/tests/it/ui_tabs.rs | 4 +- crates/ui-egui/tests/it/ui_tail.rs | 2 +- crates/ui-egui/tests/it/ui_text_edit.rs | 26 ++++---- .../ui-egui/tests/it/ui_text_range_handles.rs | 2 +- crates/ui-egui/tests/it/ui_theme_favorites.rs | 2 +- .../ui-egui/tests/it/ui_time_zoom_controls.rs | 2 +- .../tests/it/ui_timeline_audio_levels.rs | 6 +- .../tests/it/ui_timeline_effect_label.rs | 2 +- .../tests/it/ui_timeline_group_select.rs | 2 +- .../tests/it/ui_timeline_interacting.rs | 2 +- .../ui-egui/tests/it/ui_timeline_marquee.rs | 6 +- crates/ui-egui/tests/it/ui_timeline_pan.rs | 2 +- crates/ui-egui/tests/it/ui_timeline_shapes.rs | 2 +- .../ui-egui/tests/it/ui_timeline_switches.rs | 4 +- crates/ui-egui/tests/it/ui_timeline_trim.rs | 2 +- crates/ui-egui/tests/it/ui_timeline_zoom.rs | 4 +- .../ui-egui/tests/it/ui_toolbar_gradient.rs | 2 +- crates/ui-egui/tests/it/ui_tracker.rs | 4 +- .../ui-egui/tests/it/ui_unreadable_footage.rs | 2 +- .../ui-egui/tests/it/ui_video_preview_off.rs | 2 +- crates/ui-egui/tests/it/ui_view_layout.rs | 2 +- crates/ui-egui/tests/it/ui_viewer.rs | 16 ++--- crates/ui-egui/tests/it/ui_viewer_trackpad.rs | 2 +- crates/ui-egui/tests/it/ui_viewers.rs | 6 +- crates/ui-egui/tests/it/ui_visual_review.rs | 2 +- crates/ui-egui/tests/it/ui_web_gpu_storage.rs | 4 +- crates/ui-egui/tests/it/ui_web_offload.rs | 2 +- crates/ui-egui/tests/it/ui_window_title.rs | 2 +- .../ui-egui/tests/it/ui_workflow_selection.rs | 8 +-- crates/ui-egui/tests/it/ui_workspace_focus.rs | 7 +- crates/ui-egui/tests/it/viewer_geometry.rs | 5 +- 143 files changed, 341 insertions(+), 282 deletions(-) diff --git a/crates/ui-egui/src/app/clipboard.rs b/crates/ui-egui/src/app/clipboard.rs index 23b5080e0..f06d6f22d 100644 --- a/crates/ui-egui/src/app/clipboard.rs +++ b/crates/ui-egui/src/app/clipboard.rs @@ -37,6 +37,7 @@ mod copy_frame_tests { session.execute("layer.newSolid", json!({"color": "#ff0000"})).unwrap(); let mut app = EffectcraftApp::new(session); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut output = ctx.run_ui(egui::RawInput::default(), |ui| { crate::menus::invoke(&mut app, ui.ctx(), "comp.copyFrame", json!({})).unwrap(); app.handle_events(ui.ctx()); @@ -52,6 +53,7 @@ mod copy_frame_tests { #[test] fn a_malformed_image_is_an_error_not_a_crash() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut output = ctx.run_ui(egui::RawInput::default(), |ui| { assert!(copy_image(ui.ctx(), 4, 4, &[0; 10]).is_err()); assert!(copy_image(ui.ctx(), 0, 4, &[]).is_err()); diff --git a/crates/ui-egui/src/app/frame.rs b/crates/ui-egui/src/app/frame.rs index 9d8cf2743..cca733c7c 100644 --- a/crates/ui-egui/src/app/frame.rs +++ b/crates/ui-egui/src/app/frame.rs @@ -753,6 +753,7 @@ mod tests { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); app.session.events.push(effectcraft_engine::Event::Toast { message: "Earlier background error".into(), error: true }); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); app.report_import_errors("file.import", &json!({"errors":["Later import error"]})); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); @@ -783,6 +784,7 @@ mod tests { app.report_import_errors("file.import", &json!({"errors":[first, "Earlier details"]})); app.report_import_errors("file.import", &json!({"errors":[first, "Later details"]})); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); let r = app.auto.elements.iter().find(|e| e.id == "toast").unwrap().rect; let pos = egui::pos2(r[0] + 4.0, r[1] + 4.0); @@ -806,6 +808,7 @@ mod tests { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); app.session.events.extend((0..40).map(|i| effectcraft_engine::Event::Toast { message: format!("Error {i}"), error: true })); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); assert!(app.error_toasts.len() <= 32); assert_eq!(app.error_toasts.front().unwrap().message, "Error 0"); @@ -833,6 +836,7 @@ mod tests { effectcraft_engine::Event::Toast { message: "Second.vectorcraft failed".into(), error: true }, ]); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); assert!(app.auto.elements.iter().any(|e| e.id == "toast" && e.label.contains("First.vectorcraft"))); @@ -868,6 +872,7 @@ mod tests { app.ui.status = "First foreground status".into(); app.session.events.push(effectcraft_engine::Event::Toast { message: "An unseen import error".into(), error: true }); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); app.ui.status = "Another foreground status".into(); @@ -885,6 +890,7 @@ mod tests { app.ui.status = "A local drop failed".into(); app.session.events.push(effectcraft_engine::Event::Toast { message: "A later background import failed".into(), error: true }); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); let click = |app: &mut EffectcraftApp| { @@ -919,6 +925,7 @@ mod tests { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); app.session.events.push(effectcraft_engine::Event::Toast { message: "An earlier error".into(), error: true }); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); app.ui.status = "An unrelated later status".into(); @@ -936,6 +943,7 @@ mod tests { app.report_import_errors("file.import", &json!({"errors": ["first failed file", "second failed file"]})); app.session.events.push(effectcraft_engine::Event::Toast { message: "Sequence has missing frames".into(), error: false }); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); assert!(app.auto.elements.iter().any(|e| e.id == "toast" && e.label.contains("second failed file"))); @@ -948,6 +956,7 @@ mod tests { app.ui.status = "A foreground status".into(); app.toast = Some(("Saved".into(), 0.0)); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); for now in [0.0, 3.0, 6.0, 6.1] { app.now = now; app.auto.elements.clear(); @@ -963,6 +972,7 @@ mod tests { app.toast = Some(("An old toast".into(), 0.0)); app.now = 8.0; let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); ctx.run_ui(egui::RawInput::default(), |ui| app.draw_toast(ui, ui.max_rect(), 0.0)).textures_delta.clear(); assert!(app.auto.elements.iter().all(|e| !e.label.contains("old toast"))); app.ui.status.clear(); @@ -978,6 +988,7 @@ mod tests { app.ui.status = "A local drop failed".into(); app.session.events.push(effectcraft_engine::Event::Toast { message: "Imported 1 item. Failed first file\nFailed second file".into(), error: true }); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.handle_events(&ctx); for now in [0.0, 3.0, 6.0] { app.now = now; diff --git a/crates/ui-egui/src/app/prefs.rs b/crates/ui-egui/src/app/prefs.rs index 5b7a13d6f..284558250 100644 --- a/crates/ui-egui/src/app/prefs.rs +++ b/crates/ui-egui/src/app/prefs.rs @@ -128,6 +128,7 @@ mod appearance_tests { #[test] fn auto_mode_leaves_the_native_window_following_the_system() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut app = app(); app.hooks.system_theme = Some(Box::new(|_| Some(egui::Theme::Light))); app.set_pref("appearance.appearanceMode", json!("auto")).unwrap(); diff --git a/crates/ui-egui/src/app/viewer_frames.rs b/crates/ui-egui/src/app/viewer_frames.rs index d9e6e84f2..80eb84af6 100644 --- a/crates/ui-egui/src/app/viewer_frames.rs +++ b/crates/ui-egui/src/app/viewer_frames.rs @@ -273,7 +273,7 @@ mod tests { session.execute("layer.newSolid", serde_json::json!({"color": "#808080"})).unwrap(); session.execute("effect.apply", serde_json::json!({"layer": 1, "effect": "Apply Color LUT"})).unwrap(); session.execute("prop.set", serde_json::json!({"layer": 1, "path": "effects/#1/lut", "value": lut.to_string_lossy()})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_eframe(|_| crate::EffectcraftApp::new(session)); + let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(session)); let centre = |h: &egui_kittest::Harness<'_, crate::EffectcraftApp>| { h.state().viewer_image.as_ref().map(|img| img.pixels[img.pixels.len() / 2 + img.size[0] / 2].r()) }; @@ -308,7 +308,7 @@ mod tests { let cid = session.active_comp_id().unwrap(); let item = session.execute("file.import", serde_json::json!({"paths": [png.to_string_lossy()]})).unwrap()["items"][0].clone(); session.execute("layer.addItem", serde_json::json!({"item": item})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_eframe(|_| crate::EffectcraftApp::new(session)); + let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(session)); let centre = |h: &egui_kittest::Harness<'_, crate::EffectcraftApp>| { h.state().viewer_image.as_ref().map(|img| img.pixels[img.pixels.len() / 2 + img.size[0] / 2].r()) }; diff --git a/crates/ui-egui/src/color_picker.rs b/crates/ui-egui/src/color_picker.rs index 2b9982cec..7c8812957 100644 --- a/crates/ui-egui/src/color_picker.rs +++ b/crates/ui-egui/src/color_picker.rs @@ -674,7 +674,7 @@ mod tests { let mut session = effectcraft_engine::Session::default(); session.execute("comp.new", serde_json::json!({"width": 320, "height": 180, "duration": 2})).unwrap(); session.execute("layer.newSolid", serde_json::json!({"color": "#204060"})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(vec2(1200.0, 800.0)).build_eframe(|_| crate::EffectcraftApp::new(session)); + let mut harness = egui_kittest::Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(session)); settle_sampling_viewer(&mut harness); harness } @@ -751,7 +751,7 @@ mod tests { let lid = s.execute("layer.newSolid", serde_json::json!({"color": "#ffffff"})).unwrap()["layer"].as_u64().unwrap(); s.execute("effect.apply", serde_json::json!({"layers": [lid], "effect": "Exposure"})).unwrap(); s.execute("prop.set", serde_json::json!({"layer": lid, "path": "effects/#1/master/exposure", "value": 2.0})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(vec2(1200.0, 800.0)).build_eframe(|_| crate::EffectcraftApp::new(s)); + let mut harness = egui_kittest::Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(s)); for _ in 0..400 { harness.step(); if harness.state().frames.inflight() == 0 && harness.state().viewer_f16.is_some() { @@ -840,6 +840,7 @@ mod tests { #[test] fn a_picker_can_sample_behind_its_own_dialog_but_not_a_new_modal() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let point = pos2(20.0, 20.0); let mut output = ctx.run_ui(egui::RawInput { events: vec![egui::Event::PointerMoved(point)], ..Default::default() }, |ui| { let ctx = ui.ctx(); diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index f10cff01b..b9b3cf3bc 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -9347,6 +9347,7 @@ mod tests { fn general_settings_exposes_the_language_automation_id() { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let tokens = crate::theme::Tokens::for_kind(crate::theme::ThemeKind::Dark); crate::theme::install(&ctx, &tokens, language(&app)); crate::panels::settings::open(&mut app, "general"); diff --git a/crates/ui-egui/src/lifecycle_tests.rs b/crates/ui-egui/src/lifecycle_tests.rs index fe9041987..ab02aff37 100644 --- a/crates/ui-egui/src/lifecycle_tests.rs +++ b/crates/ui-egui/src/lifecycle_tests.rs @@ -82,6 +82,7 @@ fn a_control_command_that_needs_no_ui_completes_without_a_pass() { #[test] fn a_pass_that_cannot_draw_receives_no_synthetic_input() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); assert!(!app.is_ready(), "a fresh app installs its fonts in its first pass"); diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index 101c23956..97b678c61 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -16,6 +16,7 @@ fn zoom_steps_land_on_whole_screen_magnifications() { #[test] fn shortcut_passes_share_frame_start_modifiers() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut starts = Vec::new(); let mut output = ctx.run_ui(egui::RawInput { events: vec![egui::Event::ModifiersChanged(egui::Modifiers::SHIFT)], ..Default::default() }, |ui| { let ctx = ui.ctx(); @@ -84,6 +85,7 @@ fn ctrl_backslash_maximizes_or_restores_the_window() { assert!(m.command && k == egui::Key::Backslash, "{m:?} {k:?}"); assert!(bindings(&app.session).iter().any(|b| (b.0, b.1) == (m, k) && b.2 == "window.maximizeApp")); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let run = |app: &mut EffectcraftApp, maximized: bool| { let input = egui::RawInput { viewports: std::iter::once((egui::ViewportId::ROOT, egui::ViewportInfo { maximized: Some(maximized), ..Default::default() })).collect(), @@ -408,6 +410,7 @@ fn file_dialogs_block_floating_windows_only_while_up() { use std::sync::{Arc, Mutex}; let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let pending: Arc>> = Arc::default(); let queue = pending.clone(); app.hooks.file_dialog_async = Some(Box::new(move |_dialog, done| queue.lock().unwrap().push(done))); @@ -491,6 +494,7 @@ fn a_dialog_that_cannot_open_reports_an_error() { use std::sync::{Arc, Mutex}; let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let pending: Arc>> = Arc::default(); let queue = pending.clone(); app.hooks.file_dialog_async = Some(Box::new(move |_dialog, done| queue.lock().unwrap().push(done))); @@ -588,6 +592,7 @@ fn dropped_files_keep_import_errors_alongside_local_drop_errors() { let mut app = EffectcraftApp::new(effectcraft_host::session()); app.session.prefs.import.drag_import_as = "comp".into(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut dropped_files: Vec = vec![std::sync::Arc::new(Drop("no-local-path".into()))]; if bad_import { dropped_files.push(std::sync::Arc::new(Drop(path.clone()))); @@ -697,7 +702,7 @@ fn closing_the_render_queue_reveals_the_panel_receiving_focus() { fn closing_a_floating_queue_preserves_the_maximized_composition() { let mut session = effectcraft_engine::Session::default(); session.execute("comp.new", json!({"name": "A", "width": 32, "height": 32, "duration": 2})).unwrap(); - let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); let ctx = h.ctx.clone(); let app = h.state_mut(); @@ -771,7 +776,7 @@ fn queue_close_keeps_passive_viewer_focus_across_frames() { let mut session = effectcraft_engine::Session::default(); let a = session.execute("comp.new", json!({"name": "A", "width": 32, "height": 32, "duration": 2})).unwrap()["comp"].as_u64().unwrap(); let b = session.execute("comp.new", json!({"name": "B", "width": 32, "height": 32, "duration": 2})).unwrap()["comp"].as_u64().unwrap(); - let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); let ctx = h.ctx.clone(); let app = h.state_mut(); diff --git a/crates/ui-egui/src/native_menu.rs b/crates/ui-egui/src/native_menu.rs index f856db01d..a905fc7a0 100644 --- a/crates/ui-egui/src/native_menu.rs +++ b/crates/ui-egui/src/native_menu.rs @@ -768,6 +768,7 @@ mod tests { let spec = build(&app); let dup = spec.items().into_iter().find(|i| i.command == "edit.duplicate").map(|i| i.id.clone()).unwrap(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); app.dialog_state.delete_items.command = Some((json!({"items": []}), json!({"items": 1, "layers": 1, "comps": 1}))); app.dialog = Some(crate::Dialog::DeleteItems); // Chosen with the mouse, Duplicate still runs. @@ -915,6 +916,7 @@ mod tests { fn a_file_dialog_takes_the_edit_keys_from_a_focused_text_field() { let mut app = app(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut text = String::new(); for _ in 0..2 { let mut out = ctx.run_ui(egui::RawInput::default(), |ui| ui.text_edit_singleline(&mut text).request_focus()); @@ -996,6 +998,7 @@ mod tests { app.session.execute("layer.newNull", json!({})).unwrap(); app.session.execute("edit.undo", json!({})).unwrap(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let history = label(&build_now(&app, &ctx), "edit.undo"); let redo_history = label(&build_now(&app, &ctx), "edit.redo"); assert!(history.starts_with(undo) && history != undo, "{history}"); diff --git a/crates/ui-egui/src/num_math.rs b/crates/ui-egui/src/num_math.rs index 68225511c..111d92dff 100644 --- a/crates/ui-egui/src/num_math.rs +++ b/crates/ui-egui/src/num_math.rs @@ -368,6 +368,7 @@ mod tests { fn a_drag_value_reads_typed_arithmetic() { use egui::{Context, Event, Key, Modifiers, PointerButton, Pos2, RawInput, Rect, pos2, vec2}; let ctx = Context::default(); + crate::framework::install_headless(&ctx); let mut value = 10.0_f64; let mut time = 0.0; let field = Rect::from_min_size(pos2(100.0, 100.0), vec2(80.0, 20.0)); diff --git a/crates/ui-egui/src/panels/effects_presets.rs b/crates/ui-egui/src/panels/effects_presets.rs index db42e8992..39f9fdade 100644 --- a/crates/ui-egui/src/panels/effects_presets.rs +++ b/crates/ui-egui/src/panels/effects_presets.rs @@ -870,6 +870,7 @@ mod tests { assert_eq!(v.iter().map(|p| p.name.as_str()).collect::>(), vec!["bounce", "Zoom In"]); assert!(scan_presets(&d.join("missing")).is_empty()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let set_time = |time| { let mut output = ctx.run_ui(egui::RawInput { time: Some(time), ..Default::default() }, |_| {}); output.textures_delta.clear(); diff --git a/crates/ui-egui/src/panels/forms.rs b/crates/ui-egui/src/panels/forms.rs index 4fa92bab6..ff93c9e6c 100644 --- a/crates/ui-egui/src/panels/forms.rs +++ b/crates/ui-egui/src/panels/forms.rs @@ -1090,6 +1090,7 @@ mod tests { for (import_as, background) in [("footage", false), ("composition", true), ("compositionLayerSizes", true)] { let mut app = EffectcraftApp::new(effectcraft_host::session()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); app.dialog_state.form = Form { title: "Import".into(), @@ -1118,6 +1119,7 @@ mod tests { fn a_numeric_form_opens_with_its_first_number_selected() { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); app.dialog_state.form = Form { title: "Position".into(), @@ -1185,6 +1187,7 @@ mod tests { fn premiere_export_dialog() { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); app.session.execute("comp.new", json!({"name": "Spot", "width": 64, "height": 36, "frameRate": 25, "duration": 1})).unwrap(); app.session.execute("layer.newSolid", json!({"color": "#ff0000"})).unwrap(); diff --git a/crates/ui-egui/src/panels/home.rs b/crates/ui-egui/src/panels/home.rs index 601f4f1ef..968206d66 100644 --- a/crates/ui-egui/src/panels/home.rs +++ b/crates/ui-egui/src/panels/home.rs @@ -583,6 +583,7 @@ mod tests { s.prefs.push_recent("/projects/Alpha.ecproj"); let mut app = EffectcraftApp::new(s); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); ctx.run_ui(Default::default(), |_| {}).textures_delta.clear(); ctx.run_ui(Default::default(), |ui| { @@ -616,6 +617,7 @@ mod tests { app.ui.start_screen = true; app.ui.home_learn = true; let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); let frame = |app: &mut EffectcraftApp| { ctx.run_ui(Default::default(), |ui| { diff --git a/crates/ui-egui/src/panels/markers_ui.rs b/crates/ui-egui/src/panels/markers_ui.rs index 26cfffc33..88f692964 100644 --- a/crates/ui-egui/src/panels/markers_ui.rs +++ b/crates/ui-egui/src/panels/markers_ui.rs @@ -629,6 +629,7 @@ mod tests { assert_eq!(app.session.execute("markers.list", json!({})).unwrap()[0]["chapter"], ""); // Enter is OK and Cmd+Backspace is Delete. let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); // The dialog opens with Comment focused (#922), a multi-line field where Enter types a // new line; with the focus elsewhere, Enter is OK. diff --git a/crates/ui-egui/src/panels/project.rs b/crates/ui-egui/src/panels/project.rs index 57d2c60fa..3567e2dcc 100644 --- a/crates/ui-egui/src/panels/project.rs +++ b/crates/ui-egui/src/panels/project.rs @@ -1657,6 +1657,7 @@ mod tests { let long = p.add_item("A rather long composition name for the list", Label::Aqua, Some(folder), ItemKind::Folder); let app = EffectcraftApp::new(s); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut fit = (0.0, 0.0); ctx.run_ui(Default::default(), |ui| { let painter = ui.painter(); diff --git a/crates/ui-egui/src/panels/scriptui_view.rs b/crates/ui-egui/src/panels/scriptui_view.rs index 8b056d81e..81f038138 100644 --- a/crates/ui-egui/src/panels/scriptui_view.rs +++ b/crates/ui-egui/src/panels/scriptui_view.rs @@ -785,6 +785,7 @@ mod tests { /// frame's scroll output (viewport and content size). fn panel_frames(dock: egui::Vec2, first: egui::Vec2, then: egui::Vec2) -> (Rect, egui::Vec2) { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); ctx.all_styles_mut(|s| s.spacing.scroll = egui::style::ScrollStyle::solid()); let screen = Rect::from_min_size(egui::Pos2::ZERO, vec2(800.0, 600.0)); let mut last = (Rect::NOTHING, egui::Vec2::ZERO); diff --git a/crates/ui-egui/src/panels/settings.rs b/crates/ui-egui/src/panels/settings.rs index 56f6dc394..5984450be 100644 --- a/crates/ui-egui/src/panels/settings.rs +++ b/crates/ui-egui/src/panels/settings.rs @@ -1331,6 +1331,7 @@ mod tests { fn sam2_settings_offer_file_installation_without_downloads() { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let tokens = app.tokens; let mut actions = vec![]; let mut output = ctx @@ -1356,6 +1357,7 @@ mod tests { app.session.sys_memory = Some(effectcraft_engine::sysinfo::SysMemory { total: 64 << 30, available: 60 << 30 }); let page = pages().into_iter().find(|p| p.id == "memory").unwrap(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let tokens = app.tokens; let cur = serde_json::to_value(&app.session.prefs).unwrap(); let mut actions = vec![]; @@ -1385,6 +1387,7 @@ mod tests { // (one frame's elements: `find` returns the first match) app.auto = Default::default(); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let (tokens, cur) = (app.tokens, serde_json::to_value(&app.session.prefs).unwrap()); let mut actions = vec![]; let mut output = ctx diff --git a/crates/ui-egui/src/panels/shortcut_editor.rs b/crates/ui-egui/src/panels/shortcut_editor.rs index 4a1e3c05e..847acd818 100644 --- a/crates/ui-egui/src/panels/shortcut_editor.rs +++ b/crates/ui-egui/src/panels/shortcut_editor.rs @@ -676,6 +676,7 @@ mod tests { fn the_ok_button_stays_inside_the_dialog_in_a_small_window() { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &app.tokens, crate::i18n::language(&app)); open(&mut app); for size in [vec2(1680.0, 1020.0), vec2(1280.0, 720.0)] { diff --git a/crates/ui-egui/src/panels/text_panels.rs b/crates/ui-egui/src/panels/text_panels.rs index e4be44d3f..b206acf54 100644 --- a/crates/ui-egui/src/panels/text_panels.rs +++ b/crates/ui-egui/src/panels/text_panels.rs @@ -1157,6 +1157,7 @@ mod tests { #[test] fn font_menu_rows_draw_a_name_the_interface_fonts_have() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); crate::theme::install(&ctx, &Tokens::for_kind(Default::default()), "en"); ctx.run_ui(Default::default(), |_| {}).textures_delta.clear(); let row = |display: &str| effectcraft_engine::FontRow { family: "Menu Name Test".into(), display: display.into(), recent: false, variable: false }; diff --git a/crates/ui-egui/src/panels/timeline/tests.rs b/crates/ui-egui/src/panels/timeline/tests.rs index 1cd5e3423..6acaf5692 100644 --- a/crates/ui-egui/src/panels/timeline/tests.rs +++ b/crates/ui-egui/src/panels/timeline/tests.rs @@ -472,6 +472,7 @@ fn drawn_text(mut draw: impl FnMut(&mut egui::Ui)) -> Vec { } } let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); ctx.run_ui(Default::default(), |ui| draw(ui)).textures_delta.clear(); let mut frame = ctx.run_ui(Default::default(), |ui| draw(ui)); frame.textures_delta.clear(); diff --git a/crates/ui-egui/src/panels/viewer_text/tests.rs b/crates/ui-egui/src/panels/viewer_text/tests.rs index ed813d4dd..3017fb632 100644 --- a/crates/ui-egui/src/panels/viewer_text/tests.rs +++ b/crates/ui-egui/src/panels/viewer_text/tests.rs @@ -22,6 +22,7 @@ fn doc_text(app: &EffectcraftApp, lid: LayerId) -> String { fn feed(app: &mut EffectcraftApp, events: Vec) { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let raw = egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(320.0, 180.0))), events, ..Default::default() }; let mut out = ctx.run_ui(raw, |ui| keyboard(app, ui, egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(320.0, 180.0)))); out.textures_delta.clear(); @@ -44,6 +45,7 @@ fn ending_an_edit_from_another_panel_clears_the_preedit() { let (mut app, lid) = editor("abc", 0, 0); let session = app.session.state.text_edit.as_ref().map_or(1, |e| e.session); let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut out = ctx.run_ui(egui::RawInput::default(), |ui| { let viewport = ui.ctx().viewport_id(); let preedit = Preedit { owner: ImeOwner { layer: lid, session }, text: "x".into() }; @@ -243,6 +245,7 @@ fn discarded_custom_request_then_home_rearms_the_identical_caret() { app.ui.tool = Tool::Type; app.ui.focused = PanelKind::Composition; let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); install_hooks(&ctx); let mut frame = eframe::Frame::_new_kittest(); let raw = || egui::RawInput { screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(1200.0, 800.0))), ..Default::default() }; diff --git a/crates/ui-egui/src/pointer_wrap/tests.rs b/crates/ui-egui/src/pointer_wrap/tests.rs index 314f7ad3d..dedeac5cb 100644 --- a/crates/ui-egui/src/pointer_wrap/tests.rs +++ b/crates/ui-egui/src/pointer_wrap/tests.rs @@ -288,6 +288,7 @@ fn real_properties_and_angle_drags_keep_each_gesture_in_one_undo_step() { app.show_panel(panel); app.toggle_maximize(panel); let ctx = Context::default(); + crate::framework::install_headless(&ctx); let bounds = Rect::from_min_size(Pos2::ZERO, vec2(1600.0, 1000.0)); let mut frame = eframe::Frame::_new_kittest(); let mut time = 0.0; diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index 0126fd8cc..bc5f71200 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -682,6 +682,7 @@ mod script_font_tests { /// interface's fonts installed. fn assert_drawn(language: &str, text: &str) { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); super::install(&ctx, &super::Tokens::for_kind(super::ThemeKind::Dark), language); let mut out = ctx.run_ui(egui::RawInput::default(), |_| {}); // No renderer here: drop the frame's texture uploads (egui asserts on unhandled ones in debug). @@ -767,6 +768,7 @@ mod script_font_tests { #[test] fn simplified_chinese_interface_draws_simplified_hanzi_after_another_language() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let tokens = super::Tokens::for_kind(super::ThemeKind::Dark); super::install(&ctx, &tokens, "en"); super::install(&ctx, &tokens, "zh-hans"); @@ -798,6 +800,7 @@ mod script_font_tests { return; } let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); super::install(&ctx, &super::Tokens::for_kind(super::ThemeKind::Dark), "en"); let mut out = ctx.run_ui(egui::RawInput::default(), |_| {}); out.textures_delta.clear(); @@ -839,6 +842,7 @@ mod script_font_tests { return; } let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); ctx.set_pixels_per_point(2.0); super::install(&ctx, &super::Tokens::for_kind(super::ThemeKind::Dark), "ja"); let mut out = ctx.run_ui(egui::RawInput::default(), |_| {}); @@ -923,6 +927,7 @@ mod tests { #[test] fn every_family_reaches_the_symbol_fallback() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); install(&ctx, &Tokens::for_kind(Default::default()), "en"); ctx.run_ui(Default::default(), |_| {}).textures_delta.clear(); for family in [FontFamily::Proportional, FontFamily::Monospace, FontFamily::Name("medium".into()), FontFamily::Name("semibold".into())] { diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs index 87a6d217e..fb4902a75 100644 --- a/crates/ui-egui/src/widgets.rs +++ b/crates/ui-egui/src/widgets.rs @@ -1399,6 +1399,7 @@ mod tests { #[test] fn inline_editors_select_all_only_as_they_open() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let mut text = String::from("Comp 1"); let mut id = egui::Id::NULL; let frame = |ctx: &egui::Context, text: &mut String, id: &mut egui::Id| { @@ -1438,6 +1439,7 @@ mod tests { #[test] fn field_text_is_vertically_centred() { let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); let t = Tokens::for_kind(Default::default()); for h in [22.0, 26.0, 30.0] { let field = Rect::from_min_size(pos2(20.0, 40.0), vec2(220.0, h)); diff --git a/crates/ui-egui/tests/it/native_menu_text_keys.rs b/crates/ui-egui/tests/it/native_menu_text_keys.rs index d740c6b46..b00583f5e 100644 --- a/crates/ui-egui/tests/it/native_menu_text_keys.rs +++ b/crates/ui-egui/tests/it/native_menu_text_keys.rs @@ -136,7 +136,7 @@ fn native_windows(h: &mut Harness<'_, EffectcraftApp>) -> Host { fn edit_menu_keys_edit_a_text_field_in_a_panel_window() { let mut app = app(); menus::invoke(&mut app, &egui::Context::default(), "window.panelWindow", json!({"panel": "Project", "window": true})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.ctx.set_os(egui::os::OperatingSystem::Mac); let host = native_windows(&mut h); let at = center(&h, "project.search"); @@ -163,7 +163,7 @@ fn edit_menu_keys_edit_a_text_field_in_a_panel_window() { #[test] fn edit_menu_keys_edit_a_docked_text_field() { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.ctx.set_os(egui::os::OperatingSystem::Mac); h.run_steps(3); let at = center(&h, "project.search"); diff --git a/crates/ui-egui/tests/it/render_queue_snapshot.rs b/crates/ui-egui/tests/it/render_queue_snapshot.rs index 27054119d..164a4daf0 100644 --- a/crates/ui-egui/tests/it/render_queue_snapshot.rs +++ b/crates/ui-egui/tests/it/render_queue_snapshot.rs @@ -31,7 +31,7 @@ fn render_queue_panel_snapshot() { } let ids: Vec = s.project.render_queue.iter().take(3).map(|i| i.id).collect(); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique("rq-ui"), (ids, None::))); h.state_mut().show_panel(effectcraft_ui_egui::dock::PanelKind::RenderQueue); h.run_steps(4); @@ -55,7 +55,7 @@ fn templates_dialog_snapshot() { let kind = std::env::var("RQ_TEMPLATES_KIND").unwrap_or_else(|_| "outputModule".into()); s.execute("app.templates", json!({"kind": kind})).unwrap(); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); h.run_steps(4); assert!(h.state().dialog.is_some(), "the Templates dialog is open"); let img = h.render_serialized().expect("render"); diff --git a/crates/ui-egui/tests/it/shared_docking_ui.rs b/crates/ui-egui/tests/it/shared_docking_ui.rs index f25b1c92c..12e598a19 100644 --- a/crates/ui-egui/tests/it/shared_docking_ui.rs +++ b/crates/ui-egui/tests/it/shared_docking_ui.rs @@ -114,7 +114,7 @@ fn pointer_drop_merges_floats_and_redocks_without_project_changes() { ), dock::tabs(&[PanelKind::Timeline], 0), )); - let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).build_eframe(move |_| app); + let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(4); let project = h.state().session.project.clone(); let times = h.state().session.state.times.clone(); @@ -193,7 +193,7 @@ fn float_command_rejects_malformed_rectangles_and_keeps_one_docked_panel() { /// still moves it from there. #[test] fn floating_panel_dragged_towards_the_window_edge_keeps_moving() { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| { + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { let mut app = EffectcraftApp::new(Session::default()); app.ui.start_screen = false; app @@ -326,7 +326,7 @@ fn stacked_panels_resize_by_pointer_without_changing_closed_entries() { session.execute("comp.new", json!({"width": 160, "height": 90, "duration": 1})).unwrap(); let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; - let mut h = Harness::builder().with_size(vec2(1000.0, 720.0)).build_eframe(move |_| app); + let mut h = Harness::builder().with_size(vec2(1000.0, 720.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(4); h.state_mut().ui.dock = dock::docked(dock::stack(&[(PanelKind::Preview, true, Some(100.0)), (PanelKind::Properties, true, None), (PanelKind::Align, false, Some(77.0))])); diff --git a/crates/ui-egui/tests/it/ui_3d.rs b/crates/ui-egui/tests/it/ui_3d.rs index 0f7a10b7e..f2c61a64b 100644 --- a/crates/ui-egui/tests/it/ui_3d.rs +++ b/crates/ui-egui/tests/it/ui_3d.rs @@ -33,7 +33,7 @@ fn settle(h: &mut Harness<'_, EffectcraftApp>) { #[test] fn viewer_registers_3d_controls() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); settle(&mut h); h.step(); let ids: Vec = h.state().auto.previous.iter().chain(h.state().auto.elements.iter()).map(|e| e.id.clone()).collect(); @@ -64,7 +64,7 @@ fn click_id(h: &mut Harness<'_, EffectcraftApp>, id: &str) { /// and switches it, as After Effects' Composition panel does. #[test] fn renderer_menu_shows_and_switches_the_comp_renderer() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().session.execute("comp.settings", json!({"renderer": "classic3D"})).unwrap(); h.run_steps(3); let label = |h: &Harness<'_, EffectcraftApp>| h.state().auto.find("viewer.renderer3d").map(|e| e.label.clone()); @@ -82,7 +82,7 @@ fn renderer_menu_shows_and_switches_the_comp_renderer() { #[test] fn camera_and_light_dialogs_create_layers() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.step(); let ctx = h.ctx.clone(); let n0 = h.state().session.active_comp().unwrap().layers.len(); @@ -112,7 +112,7 @@ fn camera_and_light_dialogs_create_layers() { fn snapshot() { let _device = crate::gpu_test::lock(); let dir = std::env::var("EC_SNAPSHOT_DIR").ok(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(1.0).wgpu().build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(1.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); let shots: [(&str, Option<&str>); 4] = [("active", None), ("custom1", Some("view.3d.custom1")), ("top", Some("view.3d.top")), ("left", Some("view.3d.left"))]; for (name, cmd) in shots { @@ -155,7 +155,7 @@ fn snapshot() { /// frame, and 3D layers reaching past the frame draw pixels there. #[test] fn extended_viewer_renders_past_the_comp_frame() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().session.execute("view.3d.custom1", json!({})).unwrap(); // Zoom out so the viewer shows plenty of pasteboard. h.state_mut().ui.viewer.zoom = Some(0.15); @@ -209,7 +209,7 @@ fn layout_views_draw_the_camera_and_follow_its_position() { s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); let cam = s.execute("layer.newCamera", json!({"position": [320, 180, -300], "poi": [320, 180, 0]})).unwrap()["layer"].as_u64().unwrap(); s.execute("view.layout", json!({"views": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); let centre = |h: &Harness<'_, EffectcraftApp>, view: &str| { let id = format!("viewer.view.{view}.camera.{cam}"); @@ -235,7 +235,7 @@ fn four_views() -> Harness<'static, EffectcraftApp> { s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); s.execute("layer.newCamera", json!({"position": [320, 180, -300], "poi": [320, 180, 0]})).unwrap(); s.execute("view.layout", json!({"views": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); h } @@ -288,7 +288,7 @@ fn gizmo_harness(w: u32, h: u32) -> (Harness<'static, EffectcraftApp>, u64) { let solid = s.execute("layer.newSolid", json!({"color": "#ff0000", "width": w, "height": h})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); s.execute("layer.select", json!({"layers": [solid]})).unwrap(); - let mut harness = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut harness = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); settle(&mut harness); (harness, solid) } diff --git a/crates/ui-egui/tests/it/ui_accessibility.rs b/crates/ui-egui/tests/it/ui_accessibility.rs index df283b0f9..12803dd00 100644 --- a/crates/ui-egui/tests/it/ui_accessibility.rs +++ b/crates/ui-egui/tests/it/ui_accessibility.rs @@ -22,7 +22,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("file.openDemoProject", json!({})).unwrap(); // A text layer under edit gives the Character / Paragraph panels their controls. let _ = s.execute("layer.select", json!({"layers": ["EFFECTCRAFT"]})); - Harness::builder().with_size(egui::vec2(1680.0, 1020.0)).build_eframe(|_| EffectcraftApp::new(s)) + Harness::builder().with_size(egui::vec2(1680.0, 1020.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)) } #[test] diff --git a/crates/ui-egui/tests/it/ui_accessibility_audit.rs b/crates/ui-egui/tests/it/ui_accessibility_audit.rs index fecf2b4ca..0ef4f0872 100644 --- a/crates/ui-egui/tests/it/ui_accessibility_audit.rs +++ b/crates/ui-egui/tests/it/ui_accessibility_audit.rs @@ -142,7 +142,7 @@ fn app_session() -> Session { } fn harness() -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(app_session())); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(app_session())); // The default workspace gives Preview a short frame at the top of the right column; its // controls below that frame stay in the tree and would be counted against the panel under it. // The per-panel pass opens Preview again for its own scenario. diff --git a/crates/ui-egui/tests/it/ui_agent_audit.rs b/crates/ui-egui/tests/it/ui_agent_audit.rs index c3f556457..59e4bd0a8 100644 --- a/crates/ui-egui/tests/it/ui_agent_audit.rs +++ b/crates/ui-egui/tests/it/ui_agent_audit.rs @@ -21,7 +21,7 @@ fn session() -> Session { } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1680.0, 1020.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1680.0, 1020.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs b/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs index b7fa93301..f9ec80d92 100644 --- a/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs +++ b/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs @@ -18,7 +18,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("prop.set", json!({"layer": a, "path": "transform/position", "value": [150.0, 180.0]})).unwrap(); s.execute("prop.set", json!({"layer": b, "path": "transform/position", "value": [450.0, 180.0]})).unwrap(); s.execute("layer.select", json!({"layers": [a, b]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); (h, a, b) } @@ -139,7 +139,7 @@ fn alt_dragging_a_gizmo_arrow_moves_a_copy() { let solid = s.execute("layer.newSolid", json!({"color": "#ff0000", "width": 200, "height": 200})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); s.execute("layer.select", json!({"layers": [solid]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(6); let p0 = pos(&h, LayerId(solid)); let [x, y, w, hh] = h.state().auto.find(&format!("viewer.gizmo.{solid}.x")).expect("x arrow registered").rect; diff --git a/crates/ui-egui/tests/it/ui_angles.rs b/crates/ui-egui/tests/it/ui_angles.rs index 1f9845151..522599e3c 100644 --- a/crates/ui-egui/tests/it/ui_angles.rs +++ b/crates/ui-egui/tests/it/ui_angles.rs @@ -49,7 +49,7 @@ fn harness(panel: Panel, angle: f64) -> (Harness<'static, EffectcraftApp>, u64, app.toggle_maximize(panel.kind()); app.ui.timeline.layer_reveal.insert(layer, vec!["rotation".into()]); app.ui.timeline.open_layers.insert(layer); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, layer, uid) } diff --git a/crates/ui-egui/tests/it/ui_audio_panel_levels.rs b/crates/ui-egui/tests/it/ui_audio_panel_levels.rs index 9f7121c0b..fd58cf514 100644 --- a/crates/ui-egui/tests/it/ui_audio_panel_levels.rs +++ b/crates/ui-egui/tests/it/ui_audio_panel_levels.rs @@ -54,7 +54,7 @@ fn sound_layer(s: &mut Session, levels: [f64; 2]) -> u64 { /// The harness with layer `l` selected and the Audio panel up. fn harness(mut s: Session, l: u64) -> Harness<'static, EffectcraftApp> { s.execute("layer.select", json!({"layers": [l]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Audio); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_audio_scrub.rs b/crates/ui-egui/tests/it/ui_audio_scrub.rs index ff5f124e8..c14476d0f 100644 --- a/crates/ui-egui/tests/it/ui_audio_scrub.rs +++ b/crates/ui-egui/tests/it/ui_audio_scrub.rs @@ -135,7 +135,7 @@ fn scrubbing_plays_one_frame_per_new_frame() { fn cmd_dragging_the_current_time_scrubs_and_an_idle_scrub_closes() { let fake = Fake::default(); let (app, _) = setup(true, &fake); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); let cti = h.state().auto.find("timeline.cti").expect("current time indicator").clone(); let from = pos2(cti.rect[0] + cti.rect[2] / 2.0, cti.rect[1] + cti.rect[3] / 2.0); @@ -217,7 +217,7 @@ fn preview_with_audio_holds_the_first_frame_and_sounds_from_it() { app.frames.set_remote(Some(renderer)); let ahead = (app.frames.lanes() * 2).max(4) as i64; app.session.execute("comp.settings", json!({"comp": cid.0, "duration": (4 * ahead) as f64 / 30.0})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); @@ -254,7 +254,7 @@ fn preview_with_audio_sounds_without_caching_the_work_area() { let gate = GatedFrames::default(); let renderer: Arc = Arc::new(gate.clone()); app.frames.set_remote(Some(renderer)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); @@ -281,7 +281,7 @@ fn a_preview_behind_its_sound_drops_frames_and_keeps_the_sound() { let gate = GatedFrames::default(); let renderer: Arc = Arc::new(gate.clone()); app.frames.set_remote(Some(renderer)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); @@ -346,7 +346,7 @@ fn a_sound_in_the_first_100_ms_is_heard() { app.session.execute("layer.timing", json!({"layers": [l], "in": start, "out": start + 0.1})).unwrap(); app.session.execute("time.set", json!({"time": start})).unwrap(); let first = (start * 30.0) as i64; - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let now = h.state().now(); @@ -366,7 +366,7 @@ fn a_sound_in_the_first_100_ms_is_heard() { fn audio_only_previews_start_at_once() { let fake = Fake::default(); let (app, cid) = setup(true, &fake); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let now = h.state().now(); @@ -382,7 +382,7 @@ fn no_device_plays_the_picture_and_stop_ends_the_wait() { let fake = Fake::default(); let (mut app, cid) = setup_long(true, &fake, 10.0); app.hooks.audio_device = Some(Box::new(|_| None)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let now = h.state().now(); @@ -451,7 +451,7 @@ fn startup_finishes_at_any_ram_preview_budget() { if !device { app.hooks.audio_device = Some(Box::new(|_| None)); } - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let budget = ((fit as f64 + 0.5) * 9216.0 / 0.9) as usize; @@ -482,7 +482,7 @@ fn extended_viewer(fake: &Fake) -> (Harness<'static, EffectcraftApp>, ItemId, [u let mut app = EffectcraftApp::new(s); let f = fake.clone(); app.hooks.audio_device = Some(Box::new(move |_| Some(Box::new(f.clone()) as Box))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); // The viewer shows the pasteboard: frames render the extended region. let deadline = std::time::Instant::now() + std::time::Duration::from_secs(30); @@ -591,7 +591,7 @@ fn a_device_that_fails_to_start_plays_the_picture() { let fake = Fake::default(); let (mut app, cid) = setup_long(true, &fake, 8.0); app.hooks.audio_device = Some(Box::new(|_| Some(Box::new(Broken) as Box))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); assert!(until_started(&mut h), "it left its startup"); @@ -644,7 +644,7 @@ fn a_started_preview_follows_its_sound() { let device = Playing::default(); let d = device.clone(); app.hooks.audio_device = Some(Box::new(move |_| Some(Box::new(d.clone()) as Box))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); assert!(until_started(&mut h) && h.state().audio.is_some(), "the sound started"); @@ -671,7 +671,7 @@ fn startup_does_not_wait_when_the_ram_preview_holds_no_frame() { for budget in [0, 9216 / 2] { let fake = Fake::default(); let (app, _) = setup_long(true, &fake, 8.0); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); h.state().frames.set_budget(budget); @@ -720,7 +720,7 @@ fn adding_markers_does_not_stop_the_sound() { let fake = Fake::default(); let (app, cid) = setup(true, &fake); // Everything is cached before the preview starts, so the sound starts at once. - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 31.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 31.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(2); let deadline = std::time::Instant::now() + std::time::Duration::from_secs(60); let now = h.ctx.input(|i| i.time); @@ -751,7 +751,7 @@ fn unmuting_a_silent_preview_starts_audio_at_its_current_frame() { app.session.execute("layer.setSwitch", json!({"layers": [layer], "switch": "audio", "value": false})).unwrap(); let gate = GatedFrames::default(); app.frames.set_remote(Some(Arc::new(gate.clone()))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.render(&mut h, cid, &(0..60).collect::>()); @@ -871,7 +871,7 @@ fn preview_rate_audio_drives_video_at_half_speed_and_loops() { let gate = GatedFrames::default(); app.frames.set_remote(Some(Arc::new(gate.clone()))); let ahead = (app.frames.parallelism() * 2).max(4) as i64; - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); diff --git a/crates/ui-egui/tests/it/ui_azerty_shortcuts.rs b/crates/ui-egui/tests/it/ui_azerty_shortcuts.rs index dde4b1905..f8f0c74b9 100644 --- a/crates/ui-egui/tests/it/ui_azerty_shortcuts.rs +++ b/crates/ui-egui/tests/it/ui_azerty_shortcuts.rs @@ -14,7 +14,7 @@ fn physical_shortcuts_distinguish_azerty_zoom_keys() { for (command, keys) in [("timeline.zoomIn", "Physical+6"), ("timeline.zoomOut", "Physical+Minus")] { app.session.execute("shortcuts.set", json!({"command": command, "keys": keys})).unwrap(); } - let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); h.state_mut().ui.timeline.pps = Some(100.0); for (physical, expected) in [(Key::Num6, 150.0), (Key::Minus, 100.0)] { @@ -49,7 +49,7 @@ fn shifted_one_toggles_only_selected_video_and_iso_key_maximizes() { let mut app = EffectcraftApp::new(s); app.session.execute("shortcuts.set", json!({"command": "layer.setSwitch", "params": {"switch": "video"}, "keys": "Shift+1"})).unwrap(); app.session.execute("shortcuts.set", json!({"command": "window.maximizePanel", "keys": "IntlBackslash"})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); for visible in [false, true] { h.event(Event::Key { key: Key::Num1, physical_key: Some(Key::Num1), pressed: true, repeat: false, modifiers: Modifiers::SHIFT }); @@ -72,7 +72,7 @@ fn timeline_shift_p_reveals_instead_of_adding_a_text_animator() { s.execute("layer.newSolid", json!({"name": "Box"})).unwrap(); let mut app = EffectcraftApp::new(s); app.session.execute("shortcuts.set", json!({"command": "layer.addTextAnimator", "params": {"properties": ["position"]}, "keys": "Shift+P"})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); h.state_mut().ui.focused = effectcraft_ui_egui::dock::PanelKind::Timeline; h.event(Event::Key { key: Key::P, physical_key: Some(Key::P), pressed: true, repeat: false, modifiers: Modifiers::SHIFT }); diff --git a/crates/ui-egui/tests/it/ui_batch_links.rs b/crates/ui-egui/tests/it/ui_batch_links.rs index 5b2cea090..bbbbf76ee 100644 --- a/crates/ui-egui/tests/it/ui_batch_links.rs +++ b/crates/ui-egui/tests/it/ui_batch_links.rs @@ -20,7 +20,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, [u64; 6]) { s.execute("prop.set", json!({"layer": ids[3], "path": "transform/position", "value": [60, 40]})).unwrap(); s.execute("prop.set", json!({"layer": ids[3], "path": "transform/scale", "value": [50, 50]})).unwrap(); s.history.undo.clear(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.show_modes = true; h.state_mut().ui.timeline.columns_w = 900.0; h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_batch_switches.rs b/crates/ui-egui/tests/it/ui_batch_switches.rs index 407ac194e..da174138b 100644 --- a/crates/ui-egui/tests/it/ui_batch_switches.rs +++ b/crates/ui-egui/tests/it/ui_batch_switches.rs @@ -22,7 +22,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec) { .collect(); ids.reverse(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, ids) } @@ -165,7 +165,7 @@ fn switch_targets_skip_the_layers_the_switch_does_not_apply_to() { let cam = s.execute("layer.newCamera", json!({})).unwrap()["layer"].as_u64().unwrap(); s.execute("effect.apply", json!({"effect": "ec.blur.gaussian", "layers": [solid]})).unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); select(&mut h, &[solid, null, cam]); diff --git a/crates/ui-egui/tests/it/ui_blank_context_menus.rs b/crates/ui-egui/tests/it/ui_blank_context_menus.rs index 31312d5b2..37f96f86e 100644 --- a/crates/ui-egui/tests/it/ui_blank_context_menus.rs +++ b/crates/ui-egui/tests/it/ui_blank_context_menus.rs @@ -12,7 +12,7 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut session = Session::default(); session.execute("comp.new", json!({"name":"Empty", "width":640,"height":360,"duration":4})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); // English whatever the system language: the menu items found below by label are translated. h.state_mut().session.prefs.general.language = "en".into(); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_camera_tracker.rs b/crates/ui-egui/tests/it/ui_camera_tracker.rs index 579e92d07..45e40c446 100644 --- a/crates/ui-egui/tests/it/ui_camera_tracker.rs +++ b/crates/ui-egui/tests/it/ui_camera_tracker.rs @@ -75,7 +75,7 @@ fn click(h: &mut Harness<'_, EffectcraftApp>, at: egui::Pos2, modifiers: egui::M #[test] fn deleting_viewer_track_points_preserves_the_effect_and_layer() { let (a, plate, uid) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| a); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); let point = rect(&h, "viewer.cameraTracker.point.7").center(); @@ -92,7 +92,7 @@ fn deleting_viewer_track_points_preserves_the_effect_and_layer() { #[test] fn viewer_points_selection_and_effect_controls() { let (a, plate, uid) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| a); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); let all = ids(&h); @@ -188,7 +188,7 @@ fn blender_export_button_opens_python_dialog_and_writes_scene() { let builder = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)); let builder = if shot.is_some() { builder.wgpu() } else { builder }; let _device = shot.is_some().then(crate::gpu_test::lock); - let mut h = builder.build_eframe(|_| a); + let mut h = builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::EffectControls); h.run_steps(5); let button = rect(&h, &format!("effectControls.cameraTracker.{uid}.exportBlender")); @@ -207,7 +207,7 @@ fn blender_export_button_opens_python_dialog_and_writes_scene() { #[test] fn effect_controls_show_how_many_frames_a_partial_solve_solved() { let (a, plate, uid) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| a); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::EffectControls); h.run_steps(4); let line = format!("effectControls.cameraTracker.{uid}.partialSolve"); @@ -247,7 +247,7 @@ fn drag_with(h: &mut Harness<'_, EffectcraftApp>, button: egui::PointerButton, f #[test] fn viewer_zooms_and_pans_over_the_track_points() { let (a, ..) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| a); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); // Wheel over a point: zooms. @@ -310,7 +310,7 @@ fn snapshot_showcase_track() { s.execute("layer.select", json!({"layers": ["#1"]})).unwrap(); s.execute("track.camera", json!({"layer": "#1", "wait": true})).unwrap(); s.execute("time.set", json!({"time": 2.0})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(1.0).wgpu().build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(1.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); settle(&mut h); let pts: Vec = ids(&h).into_iter().filter(|i| i.starts_with("viewer.cameraTracker.point.")).collect(); diff --git a/crates/ui-egui/tests/it/ui_character_eyedropper.rs b/crates/ui-egui/tests/it/ui_character_eyedropper.rs index ea4eecd99..205bd9937 100644 --- a/crates/ui-egui/tests/it/ui_character_eyedropper.rs +++ b/crates/ui-egui/tests/it/ui_character_eyedropper.rs @@ -48,7 +48,7 @@ fn character_fill_eyedropper_samples_viewer_and_keeps_text_selection() { let mut app = EffectcraftApp::new(s); app.set_workspace("Text"); let builder = Harness::builder().with_size(vec2(1600.0, 1400.0)); - let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().build_eframe(|_| app) } else { builder.build_eframe(|_| app) }; + let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) } else { builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; h.state_mut().show_panel(PanelKind::Character); settle(&mut h); click_auto(&mut h, "character.fill.eyedropper"); @@ -76,7 +76,7 @@ fn character_stroke_eyedropper_samples_viewer() { app.ui.viewer.show_layer_controls = false; app.ui.dock = dock::docked(dock::hsplit(SplitSize::FixedSecond(360.0), dock::tabs(&[PanelKind::Composition], 0), dock::tabs(&[PanelKind::Character], 0))); let builder = Harness::builder().with_size(vec2(1200.0, 760.0)); - let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().build_eframe(|_| app) } else { builder.build_eframe(|_| app) }; + let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) } else { builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; h.state_mut().show_panel(PanelKind::Character); h.state_mut().show_panel(PanelKind::Composition); settle(&mut h); diff --git a/crates/ui-egui/tests/it/ui_character_stroke_order.rs b/crates/ui-egui/tests/it/ui_character_stroke_order.rs index db89f7c1a..80596a6ea 100644 --- a/crates/ui-egui/tests/it/ui_character_stroke_order.rs +++ b/crates/ui-egui/tests/it/ui_character_stroke_order.rs @@ -49,7 +49,7 @@ fn character_stroke_order_menu_sets_layer_fill_and_stroke() { let mut app = EffectcraftApp::new(s); app.set_workspace("Text"); let builder = Harness::builder().with_size(vec2(1600.0, 1400.0)); - let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().build_eframe(|_| app) } else { builder.build_eframe(|_| app) }; + let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) } else { builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; h.state_mut().show_panel(PanelKind::Character); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_checkbox_drag.rs b/crates/ui-egui/tests/it/ui_checkbox_drag.rs index ba65e54dc..263ace3da 100644 --- a/crates/ui-egui/tests/it/ui_checkbox_drag.rs +++ b/crates/ui-egui/tests/it/ui_checkbox_drag.rs @@ -20,7 +20,7 @@ fn view_options_drag_checks_and_unchecks_neighbours() { let mut session = Session::default(); session.prefs.disk.disk_cache_enabled = false; session.execute("comp.new", json!({"width":32,"height":32,"duration":1})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1200.0, 900.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1200.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.state_mut().ui.viewer.rulers = false; h.state_mut().ui.viewer.guides = true; h.state_mut().ui.viewer.grid = false; diff --git a/crates/ui-egui/tests/it/ui_color_hex.rs b/crates/ui-egui/tests/it/ui_color_hex.rs index 8a5a39b8e..d94fa10bb 100644 --- a/crates/ui-egui/tests/it/ui_color_hex.rs +++ b/crates/ui-egui/tests/it/ui_color_hex.rs @@ -51,7 +51,7 @@ fn hex_code_sets_an_effect_colour() { let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let midtones = |h: &Harness<'_, EffectcraftApp>| { let c = h.state().session.active_comp().unwrap().layer(LayerId(layer)).unwrap().props.find(uid).unwrap().value.as_color(); diff --git a/crates/ui-egui/tests/it/ui_comp_presets.rs b/crates/ui-egui/tests/it/ui_comp_presets.rs index 93cd02030..a9b006df9 100644 --- a/crates/ui-egui/tests/it/ui_comp_presets.rs +++ b/crates/ui-egui/tests/it/ui_comp_presets.rs @@ -9,7 +9,7 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Edit", "width": 2560, "height": 1440, "frameRate": 60, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -115,7 +115,7 @@ fn composition_settings_buttons_fit_every_language() { s.execute("comp.new", json!({"name": "Edit", "width": 2560, "height": 1440, "frameRate": 60, "duration": 4})).unwrap(); s.prefs.general.language = language.into(); let mut h = - Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).allow_missing_glyphs().build_eframe(|_| EffectcraftApp::new(s)); + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); open_settings(&mut h); let mut oks = vec![]; @@ -148,7 +148,7 @@ fn rect_of(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { fn composition_settings_view_stays_put_when_it_scrolls() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Edit", "width": 2560, "height": 1440, "frameRate": 60, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 520.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 520.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); open_settings(&mut h); let (view, ok) = (rect_of(&h, "dialog.comp.view"), rect_of(&h, "dialog.comp.ok")); @@ -183,7 +183,7 @@ fn composition_settings_refits_when_the_language_changes() { .with_max_steps(30) // `run` checks accessibility after settling; that is not what this test is about. .with_accessibility_check(false) - .build_eframe(|_| EffectcraftApp::new(s)); + .with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); open_settings(&mut h); click(&mut h, "dialog.comp.tab.advanced"); @@ -203,7 +203,7 @@ fn composition_settings_refits_when_the_language_changes() { /// leaves the Home screen for the new composition; Cancel keeps it. #[test] fn new_composition_dialog_ok_leaves_the_home_screen() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); h.state_mut().ui.start_screen = true; h.state_mut().dialog = Some(Dialog::NewComp); diff --git a/crates/ui-egui/tests/it/ui_crypto_pick.rs b/crates/ui-egui/tests/it/ui_crypto_pick.rs index 28d1b97c2..6c84a6331 100644 --- a/crates/ui-egui/tests/it/ui_crypto_pick.rs +++ b/crates/ui-egui/tests/it/ui_crypto_pick.rs @@ -92,7 +92,7 @@ fn harness(s: Session, size: egui::Vec2, ppp: f32, ec: f32) -> Harness<'static, /// [`harness`] whose steps advance the clock by `dt` seconds. fn harness_dt(s: Session, size: egui::Vec2, ppp: f32, ec: f32, dt: f32) -> Harness<'static, EffectcraftApp> { let app = app(s, ec); - let mut h = Harness::builder().with_size(size).with_pixels_per_point(ppp).with_step_dt(dt).build_eframe(|_| app); + let mut h = Harness::builder().with_size(size).with_pixels_per_point(ppp).with_step_dt(dt).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h } @@ -651,7 +651,7 @@ fn picks_on_the_gpu_viewer() { } let (s, ids) = crypto_session("gpu", 1919, 1079, false); let app = app(s, 420.0); - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_pixels_per_point(1.0).wgpu_setup(setup).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_pixels_per_point(1.0).wgpu_setup(setup).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); if h.state().gpu_adapter().is_none() { eprintln!("the viewer stayed on the CPU ({adapter}): skipping"); diff --git a/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs b/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs index 7780dac0c..8ed0426d2 100644 --- a/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs +++ b/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs @@ -94,7 +94,7 @@ fn harness(s: Session, size: egui::Vec2) -> Harness<'static, EffectcraftApp> { dock::hsplit(SplitSize::FixedSecond(420.0), dock::tabs(&[PanelKind::Composition], 0), dock::tabs(&[PanelKind::EffectControls], 0)), dock::hsplit(SplitSize::FixedSecond(300.0), dock::tabs(&[PanelKind::Timeline], 0), dock::tabs(&[PanelKind::History], 0)), )); - let mut h = Harness::builder().with_size(size).with_pixels_per_point(1.0).with_step_dt(0.25).build_eframe(|_| app); + let mut h = Harness::builder().with_size(size).with_pixels_per_point(1.0).with_step_dt(0.25).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h } diff --git a/crates/ui-egui/tests/it/ui_crypto_select.rs b/crates/ui-egui/tests/it/ui_crypto_select.rs index 9331913d4..35076cff0 100644 --- a/crates/ui-egui/tests/it/ui_crypto_select.rs +++ b/crates/ui-egui/tests/it/ui_crypto_select.rs @@ -63,7 +63,7 @@ fn harness(s: Session) -> Harness<'static, EffectcraftApp> { dock::hsplit(SplitSize::FixedSecond(420.0), dock::tabs(&[PanelKind::Composition], 0), dock::tabs(&[PanelKind::EffectControls], 0)), dock::tabs(&[PanelKind::Timeline], 0), )); - let mut h = Harness::builder().with_size(vec2(1400.0, 800.0)).with_pixels_per_point(1.0).with_step_dt(0.25).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1400.0, 800.0)).with_pixels_per_point(1.0).with_step_dt(0.25).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h } diff --git a/crates/ui-egui/tests/it/ui_dialog_preview.rs b/crates/ui-egui/tests/it/ui_dialog_preview.rs index ce5f2803e..e18827caa 100644 --- a/crates/ui-egui/tests/it/ui_dialog_preview.rs +++ b/crates/ui-egui/tests/it/ui_dialog_preview.rs @@ -17,7 +17,7 @@ fn harness(setup: impl FnOnce(&mut Session)) -> Harness<'static, EffectcraftApp> let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 10})).unwrap(); setup(&mut s); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_dock_resize.rs b/crates/ui-egui/tests/it/ui_dock_resize.rs index 11ca740cb..29af2cdce 100644 --- a/crates/ui-egui/tests/it/ui_dock_resize.rs +++ b/crates/ui-egui/tests/it/ui_dock_resize.rs @@ -44,7 +44,7 @@ fn focused_dock_resize_owns_arrows_and_keeps_pointer_dragging() { if directory.is_some() { builder = builder.wgpu(); } - let mut h = builder.build_eframe(move |_| app); + let mut h = builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(4); snapshots(&mut h, directory.as_deref(), "workspace"); h.state_mut().ui.focused = PanelKind::Composition; diff --git a/crates/ui-egui/tests/it/ui_drag_drop.rs b/crates/ui-egui/tests/it/ui_drag_drop.rs index d7e99046b..631a9c220 100644 --- a/crates/ui-egui/tests/it/ui_drag_drop.rs +++ b/crates/ui-egui/tests/it/ui_drag_drop.rs @@ -28,7 +28,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64) { s.execute("layer.newSolid", json!({"name": name, "color": "#406080"})).unwrap(); } s.execute("time.set", json!({"time": 1.0})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, clip) } @@ -299,7 +299,7 @@ fn project_footage_dropped_on_empty_timeline_creates_first_comp() { s.execute("file.importPlaceholder", json!({"name": "Landscape.png", "width": 640, "height": 360, "frameRate": 24, "duration": 5})).unwrap()["item"] .as_u64() .unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().session.active_comp().is_none()); let from = rect(&h, &format!("project.item.{footage}.name")).center(); @@ -322,7 +322,7 @@ fn multiple_selected_footage_dropped_on_empty_timeline_asks_how_to_create_comps( let first = s.execute("file.importPlaceholder", json!({"name": "First.png", "width": 160, "height": 90})).unwrap()["item"].as_u64().unwrap(); let second = s.execute("file.importPlaceholder", json!({"name": "Second.png", "width": 300, "height": 200})).unwrap()["item"].as_u64().unwrap(); s.state.project_selection = vec![effectcraft_engine::project::ItemId(first), effectcraft_engine::project::ItemId(second)]; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let from = rect(&h, &format!("project.item.{first}.name")).center(); let to = rect(&h, "panel.Timeline").center(); @@ -341,7 +341,7 @@ fn project_footage_dropped_on_empty_viewer_creates_first_comp() { s.execute("file.importPlaceholder", json!({"name": "Landscape.png", "width": 640, "height": 360, "frameRate": 24, "duration": 5})).unwrap()["item"] .as_u64() .unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().session.active_comp().is_none()); let from = rect(&h, &format!("project.item.{footage}.name")).center(); @@ -364,7 +364,7 @@ fn multiple_selected_footage_dropped_on_empty_viewer_asks_how_to_create_comps() let first = s.execute("file.importPlaceholder", json!({"name": "First.png", "width": 160, "height": 90})).unwrap()["item"].as_u64().unwrap(); let second = s.execute("file.importPlaceholder", json!({"name": "Second.png", "width": 300, "height": 200})).unwrap()["item"].as_u64().unwrap(); s.state.project_selection = vec![effectcraft_engine::project::ItemId(first), effectcraft_engine::project::ItemId(second)]; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let from = rect(&h, &format!("project.item.{first}.name")).center(); let viewer = rect(&h, "panel.Composition"); @@ -650,7 +650,7 @@ fn import_dialog_offers_the_image_sequence_option() { /// of it, as in After Effects. #[test] fn new_composition_from_footage_makes_a_comp_of_the_picked_file() { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); let dir = frames("fromfootage", 2); let pick = dir.join("frame_0002.png").to_string_lossy().to_string(); @@ -702,7 +702,7 @@ fn a_dropped_folder_imports_as_one_sequence_with_sequence_interpretation() { fn illustrator_import_offers_and_applies_retain_layer_sizes() { let path = std::env::temp_dir().join(format!("effectcraft-retain-ui-{}.ai", std::process::id())); std::fs::write(&path, b"%PDF-1.4\n1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj\n2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj\n3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 120 80] /Contents 4 0 R >> endobj\n4 0 obj << >> stream\n1 0 0 rg 20 15 30 20 re f\nendstream endobj\n%%EOF").unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(effectcraft_host::session())); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(effectcraft_host::session())); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "file.import", json!({"paths": [path]})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_effect_controls.rs b/crates/ui-egui/tests/it/ui_effect_controls.rs index ce8275dde..0a8a5095b 100644 --- a/crates/ui-egui/tests/it/ui_effect_controls.rs +++ b/crates/ui-egui/tests/it/ui_effect_controls.rs @@ -104,7 +104,7 @@ fn header_arrow_harness() -> (Harness<'static, EffectcraftApp>, LayerId, [(u64, let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1000.0, 700.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1000.0, 700.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, LayerId(lid), effects) } @@ -439,7 +439,7 @@ fn effect_header_down_and_up_scroll_the_picked_effect_into_view() { app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); app.ui.focused = PanelKind::EffectControls; - let mut h = Harness::builder().with_size(egui::vec2(800.0, 300.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(800.0, 300.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let panel = rect_of(&h, "panel.EffectControls"); let last = fx[fx.len() - 1]; @@ -463,7 +463,7 @@ fn effect_header_down_and_up_scroll_the_picked_effect_into_view() { #[test] fn effect_controls_widgets_register_automation_ids() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let have = ids(&h); let want = [ @@ -515,7 +515,7 @@ fn tint_swap_button_targets_its_instance_and_undoes_both_colors() { let blur = s.execute("effect.apply", json!({"effect": "Gaussian Blur"})).unwrap()["effects"][0].as_u64().unwrap(); let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let id = format!("effectControls.effect.{target}.swapColors"); let rect = h.state().auto.find(&id).unwrap().rect; @@ -542,7 +542,7 @@ fn tint_swap_button_targets_its_instance_and_undoes_both_colors() { #[test] fn crosshair_and_eyedropper_pick_from_the_viewer() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); // Crosshair: a click at comp (330, 190) is layer (105, 55) on the 200%-scaled layer // (anchor (100, 50) at position (320, 180)). @@ -580,7 +580,7 @@ fn the_eyedropper_samples_under_the_pointer_in_a_region_of_interest() { app.session.execute("view.setRegionOfInterest", json!({"rect": [0.0, 0.0, 320.0, 180.0]})).unwrap(); // (Not the red it will pick.) app.session.execute("prop.set", json!({"layer": x.small, "prop": x.color, "value": [0.0, 0.0, 1.0, 1.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h.state_mut().ui.fx_pick = Some(FxPick { kind: "color".into(), layer: x.small, prop: x.color, name: "Color".into() }); h.step(); @@ -611,7 +611,7 @@ fn the_eyedropper_stays_armed_until_the_viewer_has_a_frame() { let KV::Color(c) = v else { panic!("{v:?}") }; c }; - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.fx_pick = Some(FxPick { kind: "color".into(), layer: top, prop, name: "Color".into() }); h.step(); let pos = effectcraft_ui_egui::panels::viewer::comp_to_screen(&h.ctx, [100.0, 100.0]).unwrap(); @@ -642,7 +642,7 @@ fn keyer_eyedropper_picks_the_screen_from_the_effect_input() { s.state.selected_layers = vec![LayerId(screen)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h.state_mut().ui.fx_pick = Some(FxPick { kind: "color".into(), layer: screen, prop, name: "Screen Colour".into() }); h.step(); @@ -664,7 +664,7 @@ fn keyer_eyedropper_picks_the_screen_from_the_effect_input() { #[test] fn command_clicking_an_effect_twirl_closes_and_opens_its_groups() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); let fx = h.state_mut().session.execute("effect.apply", json!({"layers": [x.small], "effect": "Color Grading"})).unwrap()["effects"][0].as_u64().unwrap(); // Only this effect open, so its header is on screen. let l = layer(&h.state().session, x.small); @@ -694,7 +694,7 @@ fn command_clicking_an_effect_twirl_closes_and_opens_its_groups() { #[test] fn shift_click_on_effect_headers_selects_a_range_and_command_toggles() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); let fx: Vec = layer(&h.state().session, x.small).effects().unwrap().groups().map(|g| g.uid).collect(); // All twirled closed, so every header is on screen. h.state_mut().ui.fx_closed.extend(fx.iter().copied()); @@ -756,7 +756,7 @@ fn type_into(h: &mut Harness<'_, EffectcraftApp>, id: &str, text: &str) { #[test] fn angle_revolutions_scrub_and_take_typing() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let angle = |h: &Harness<'_, EffectcraftApp>| layer(&h.state().session, x.small).effects().unwrap().find(x.angle).unwrap().value.as_f64(); h.state_mut().session.execute("prop.set", json!({"layer": x.small, "prop": x.angle, "value": 45.0})).unwrap(); @@ -820,7 +820,7 @@ fn right_click_in_effect_controls_shows_the_effect_menu() { s.state.selected_layers = vec![LayerId(b), LayerId(a)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); let category = " Blur & Sharpen"; // An effect's header: its own menu. @@ -883,7 +883,7 @@ fn extractor_offers_the_exr_layers_and_channels() { s.state.selected_layers = vec![LayerId(l)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let values = |h: &Harness<'_, EffectcraftApp>| -> Vec { let l = layer(&h.state().session, l); @@ -956,7 +956,7 @@ fn cryptomatte_layer_popup_follows_the_footage() { s.state.selected_layers = vec![LayerId(l)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); // The file has only CryptoMaterial, so that is what the closed popup shows, and all it lists. assert!(h.query_by_label("CryptoMaterial").is_some() && h.query_by_label("CryptoObject").is_none()); @@ -996,7 +996,7 @@ fn point_picker_handle_follows_hover_then_commits_once_across_effects() { app.show_panel(PanelKind::EffectControls); app.ui.viewer.zoom = Some(0.85); app.ui.viewer.pan = [25.0, -10.0]; - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let id = format!("viewer.effectPoint.{point}"); let original = rect_of(&h, &id).center(); @@ -1027,7 +1027,7 @@ fn point_picker_handle_follows_hover_then_commits_once_across_effects() { #[test] fn point_picker_preview_cancels_and_works_with_layer_controls_hidden() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let value = layer(&h.state().session, x.small).props.find(x.point).unwrap().value.clone(); let undo = h.state().session.history.undo.len(); @@ -1058,7 +1058,7 @@ fn radial_center_stays_draggable_when_its_property_is_selected() { let effect = l.effects().unwrap().groups().find(|g| g.match_id == "ec.blur.ccradialfast").unwrap(); let point = effect.get("center").unwrap().uid; app.session.state.selected_props = vec![(LayerId(x.small), point)]; - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let id = format!("viewer.effectPoint.{point}"); assert!(ids(&h).contains(&id), "selected point must keep its handle"); @@ -1085,7 +1085,7 @@ fn radial_center_stays_draggable_when_its_property_is_selected() { #[test] fn clicking_an_effect_parameter_activates_its_header_and_handles() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let name = rect_of(&h, &format!("effectControls.prop.{}.name", x.point)).center(); click(&mut h, name); @@ -1111,7 +1111,7 @@ fn non_point_parameters_activate_handles_across_effect_families() { s.state.selected_props.clear(); let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let name = rect_of(&h, &format!("effectControls.prop.{prop}.name")).center(); click(&mut h, name); @@ -1125,7 +1125,7 @@ fn non_point_parameters_activate_handles_across_effect_families() { #[test] fn custom_effect_editors_activate_their_owner() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let graph = rect_of(&h, &format!("effectControls.effect.{}.curves.graph", x.curves)).center(); click(&mut h, graph); @@ -1167,7 +1167,7 @@ fn file_and_text_parameters_have_widgets() { assert_eq!(exts, ["cube"]); vec![pick.lock().unwrap().clone()] })); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let ctx = h.ctx.clone(); let r = effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "effect.apply", json!({"effect": "Apply Color LUT"})).unwrap(); @@ -1217,7 +1217,7 @@ fn file_and_text_parameters_have_widgets() { #[test] fn effect_control_name_can_be_renamed_from_its_header() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let name = format!("effectControls.effect.{}.name", x.point_fx); let point = rect_of(&h, &name).center(); @@ -1242,7 +1242,7 @@ fn effect_control_name_can_be_renamed_from_its_header() { #[test] fn effect_rename_opens_with_the_name_selected() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let edit = format!("effectControls.effect.{}.nameEdit", x.point_fx); let current_name = @@ -1294,7 +1294,7 @@ fn effect_rename_opens_with_the_name_selected() { #[test] fn double_clicking_an_effect_property_name_reveals_it_in_the_timeline() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let row = format!("timeline.prop.{}.name", x.point); assert!(!ids(&h).contains(&row), "the effect's property is not in the Timeline before the double-click"); @@ -1309,7 +1309,7 @@ fn double_clicking_an_effect_property_name_reveals_it_in_the_timeline() { #[test] fn effect_rename_escape_keeps_the_name() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let point = rect_of(&h, &format!("effectControls.effect.{}.name", x.point_fx)).center(); double_click(&mut h, point); @@ -1371,7 +1371,7 @@ fn select_layer(h: &mut Harness<'_, EffectcraftApp>, layer: u64) { #[test] fn locked_effect_controls_keep_their_layer_until_it_is_deleted() { let (app, a, b, fa, fb) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert!(shows_effect(&h, fa) && !shows_effect(&h, fb), "A is shown before locking"); let comp = h.state().session.active_comp_id().unwrap().0; @@ -1424,7 +1424,7 @@ fn locked_effect_controls_keep_their_layer_until_it_is_deleted() { #[test] fn replacing_the_project_unlocks_effect_controls() { let (app, a, b, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let lock = rect_of(&h, "panel.tab.EffectControls.lock").center(); click(&mut h, lock); @@ -1453,7 +1453,7 @@ fn a_lock_request_with_no_layer_shown_fails_and_keeps_the_other_comps_lock() { } } let (app, a, _, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h)["ok"], true); let kept = h.state().ui.effect_controls_lock; @@ -1484,7 +1484,7 @@ fn a_lock_request_while_locked_in_another_comp_fails() { } } let (app, a, _, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h)["ok"], true); let kept = h.state().ui.effect_controls_lock; @@ -1516,7 +1516,7 @@ fn a_lock_request_after_a_project_replacement_does_not_report_the_old_lock() { } } let (app, a, _, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h)["ok"], true); assert_eq!(h.state().ui.effect_controls_lock.map(|l| l.layer), Some(a)); @@ -1532,7 +1532,7 @@ fn a_lock_request_after_a_project_replacement_does_not_report_the_old_lock() { #[test] fn applying_an_effect_while_locked_keeps_the_selection() { let (app, a, b, fa, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let lock = rect_of(&h, "panel.tab.EffectControls.lock").center(); click(&mut h, lock); @@ -1567,7 +1567,7 @@ fn effect_controls_lock_over_the_control_channel() { } } let (app, a, b, fa, fb) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h, json!({"effectControlsLocked": true}))["ok"], true); assert_eq!(h.state().ui.effect_controls_lock.map(|l| l.layer), Some(a)); diff --git a/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs b/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs index ddef6c94b..48ad490d4 100644 --- a/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs +++ b/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs @@ -23,7 +23,7 @@ fn effect_drag_highlights_the_layer_under_the_pointer() { s.execute("comp.new", json!({"name": "Main", "width": 640, "height": 360, "duration": 4})).unwrap(); let a = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); let b = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().auto.find("timeline.dropTarget").is_none(), "nothing is lit without a drag"); let (row_a, row_b) = (rect(&h, &format!("timeline.layer.{a}.row")), rect(&h, &format!("timeline.layer.{b}.row"))); diff --git a/crates/ui-egui/tests/it/ui_effect_names.rs b/crates/ui-egui/tests/it/ui_effect_names.rs index 01b57178b..680b8dd2e 100644 --- a/crates/ui-egui/tests/it/ui_effect_names.rs +++ b/crates/ui-egui/tests/it/ui_effect_names.rs @@ -34,7 +34,7 @@ fn harness(language: &str) -> (Harness<'static, EffectcraftApp>, u64) { app.show_panel(PanelKind::Timeline); // The Chinese/Japanese names under test have no installed face on every host: draw tofu // instead of failing the missing-glyph gate (the glyph coverage test covers the bundled set). - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).allow_missing_glyphs().build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, fx) } diff --git a/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs b/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs index 1dc8341bc..8e30181b9 100644 --- a/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs @@ -16,7 +16,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Red", "color": "#c04040"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::EffectsPresets); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_env_light_gpu.rs b/crates/ui-egui/tests/it/ui_env_light_gpu.rs index 185980fb6..a5b492ca0 100644 --- a/crates/ui-egui/tests/it/ui_env_light_gpu.rs +++ b/crates/ui-egui/tests/it/ui_env_light_gpu.rs @@ -57,7 +57,7 @@ fn environment_light_lights_the_scene_on_the_gpu() { .with_size(egui::vec2(1400.0, 900.0)) .with_pixels_per_point(1.0) .wgpu_setup(same_adapter(adapter)) - .build_eframe(|_| EffectcraftApp::new(Session::default())); + .with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); // The project opens once the compositor (built on a worker thread) is attached, so the // frames compared below are GPU frames, not ones the CPU composited meanwhile (see ui_gpu.rs). wait_for_compositor(&mut h); diff --git a/crates/ui-egui/tests/it/ui_export_overwrite.rs b/crates/ui-egui/tests/it/ui_export_overwrite.rs index 997359479..402a82ae4 100644 --- a/crates/ui-egui/tests/it/ui_export_overwrite.rs +++ b/crates/ui-egui/tests/it/ui_export_overwrite.rs @@ -38,7 +38,7 @@ impl Rig { }; std::sync::Arc::make_mut(&mut s.project).add_item("clip.png", Label::Aqua, None, ItemKind::Footage(clip)); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); h.run_steps(2); Rig { h, dir } } diff --git a/crates/ui-egui/tests/it/ui_expression_values.rs b/crates/ui-egui/tests/it/ui_expression_values.rs index b797e6cf6..2f3173591 100644 --- a/crates/ui-egui/tests/it/ui_expression_values.rs +++ b/crates/ui-egui/tests/it/ui_expression_values.rs @@ -77,7 +77,7 @@ fn setup() -> (Harness<'static, EffectcraftApp>, Ids) { app.show_panel(PanelKind::EffectControls); app.ui.timeline.open_layers.insert(l); app.ui.timeline.open_groups.insert(transform); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, ids) } diff --git a/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs b/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs index 7cdc74f0c..a03eaeafb 100644 --- a/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs @@ -28,7 +28,7 @@ fn sized(w: f32, hh: f32) -> Harness<'static, EffectcraftApp> { id(s.execute("comp.new", json!({"name": "Main", "width": 100, "height": 100, "duration": 2})).unwrap()); s.execute("layer.addItem", json!({"item": mid})).unwrap(); s.execute("layer.addItem", json!({"item": inner})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(w, hh)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(w, hh)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Flowchart); h.state_mut().ui.maximized = Some(PanelKind::Flowchart); h.run_steps(4); @@ -108,7 +108,7 @@ fn the_toolbar_automation_labels_stay_english_in_another_language() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 100, "height": 100, "duration": 2})).unwrap(); s.prefs.general.language = "fr".into(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Flowchart); h.state_mut().ui.maximized = Some(PanelKind::Flowchart); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_font_search.rs b/crates/ui-egui/tests/it/ui_font_search.rs index 44b650be4..d326646bc 100644 --- a/crates/ui-egui/tests/it/ui_font_search.rs +++ b/crates/ui-egui/tests/it/ui_font_search.rs @@ -37,9 +37,9 @@ fn font_search_filters_selects_and_undoes_in_both_panels() { let lid = s.execute("layer.newText", json!({"text": "Keep this text", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); let builder = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)); let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { - builder.wgpu().build_eframe(move |_| EffectcraftApp::new(s)) + builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)) } else { - builder.build_eframe(move |_| EffectcraftApp::new(s)) + builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)) }; h.state_mut().show_panel(panel); h.run_steps(3); @@ -94,7 +94,7 @@ fn font_search_preserves_edited_text_and_applies_only_to_selected_characters() { let lid = s.execute("layer.newText", json!({"text": "First second", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); s.execute("text.edit", json!({"layer": lid})).unwrap(); s.execute("text.setSelection", json!({"start": 0, "end": 5})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); click(&mut h, "character.font"); @@ -143,7 +143,7 @@ fn font_menu_lists_a_name_the_interface_fonts_lack_in_english() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "Native", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); click(&mut h, "character.font"); @@ -192,7 +192,7 @@ fn font_menu_filters_variable_fonts() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "Var", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); let families = |h: &Harness<'_, EffectcraftApp>| -> Vec { @@ -232,7 +232,7 @@ fn font_menu_grows_back_after_an_empty_search() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "Grow", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); let rows = |h: &Harness<'_, EffectcraftApp>| h.state().auto.query("character.font.option.").len(); @@ -266,7 +266,7 @@ fn font_menu_rescan_button_adds_fonts_installed_later() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); s.execute("layer.newText", json!({"text": "Keep this text", "font": "Inter"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); click(&mut h, "character.font"); diff --git a/crates/ui-egui/tests/it/ui_form_fit.rs b/crates/ui-egui/tests/it/ui_form_fit.rs index bdf8f0cb8..fec67e8f7 100644 --- a/crates/ui-egui/tests/it/ui_form_fit.rs +++ b/crates/ui-egui/tests/it/ui_form_fit.rs @@ -14,7 +14,7 @@ fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> Rect { fn project_settings_fits_the_form_width() { let mut session = Session::default(); session.prefs.disk.disk_cache_enabled = false; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "file.projectSettings", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_frame_step.rs b/crates/ui-egui/tests/it/ui_frame_step.rs index a57e35295..75d71887d 100644 --- a/crates/ui-egui/tests/it/ui_frame_step.rs +++ b/crates/ui-egui/tests/it/ui_frame_step.rs @@ -20,7 +20,7 @@ fn cmd_arrows_step_the_current_frame() { let mut session = Session::default(); session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let cid = session.state.active_comp.unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(2); let frame = |h: &Harness<'_, EffectcraftApp>| { let app = h.state(); @@ -53,7 +53,7 @@ fn plain_arrows_nudge_the_selected_layer() { session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let lid = session.execute("layer.newSolid", json!({"name": "Box", "width": 40, "height": 40, "color": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); session.execute("layer.select", json!({"layers": [lid]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(2); let x = |h: &Harness<'_, EffectcraftApp>| { h.state().session.active_comp().unwrap().layer(LayerId(lid)).unwrap().props.prop("transform/position").unwrap().value.as_vec3()[0] @@ -83,7 +83,7 @@ fn clicking_a_timeline_row_then_arrows_nudge_the_layer() { session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let lid = session.execute("layer.newSolid", json!({"name": "Box", "width": 40, "height": 40, "color": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); session.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); let row = { let e = h.state().auto.find(&format!("timeline.layer.{lid}.row")).expect("timeline row"); @@ -114,7 +114,7 @@ fn arrows_nudge_from_any_panel_but_project() { session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let lid = session.execute("layer.newSolid", json!({"name": "Box", "width": 40, "height": 40, "color": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); session.execute("layer.select", json!({"layers": [lid]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(2); let x = |h: &Harness<'_, EffectcraftApp>| { h.state().session.active_comp().unwrap().layer(LayerId(lid)).unwrap().props.prop("transform/position").unwrap().value.as_vec3()[0] diff --git a/crates/ui-egui/tests/it/ui_fx_editors.rs b/crates/ui-egui/tests/it/ui_fx_editors.rs index b4d999311..bf2591541 100644 --- a/crates/ui-egui/tests/it/ui_fx_editors.rs +++ b/crates/ui-egui/tests/it/ui_fx_editors.rs @@ -17,7 +17,7 @@ fn harness(s: Session) -> Harness<'static, EffectcraftApp> { let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1400.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1400.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); h } @@ -287,7 +287,7 @@ fn mesh_warp_vertices_drag_on_the_viewer() { fn composition_tabs_and_scrolling_preview() { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); rect(&h, "panel.tab.Timeline.close"); rect(&h, "preview.scroll"); diff --git a/crates/ui-egui/tests/it/ui_gpu.rs b/crates/ui-egui/tests/it/ui_gpu.rs index 28edac27d..24addb35a 100644 --- a/crates/ui-egui/tests/it/ui_gpu.rs +++ b/crates/ui-egui/tests/it/ui_gpu.rs @@ -60,7 +60,7 @@ fn the_interface_draws_and_composites_on_the_cpu_while_the_gpu_compositor_is_bui } let (release, gate) = std::sync::mpsc::channel::<()>(); let s = small_session(); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().build_eframe(move |_| { + let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| { let mut app = EffectcraftApp::new(s); // The status line's 5 s expiry reads the app clock: a manual one makes the steps below // stand for a known span of time. @@ -118,7 +118,7 @@ fn a_compositor_build_that_panics_leaves_the_viewer_on_the_cpu() { return; } let s = small_session(); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().build_eframe(move |_| { + let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| { let mut app = EffectcraftApp::new(s); app.hooks.before_gpu_build = Some(Box::new(|| panic!("synthetic shader compiler panic"))); app @@ -169,7 +169,7 @@ fn viewer_draws_gpu_frames_that_match_the_cpu() { .with_size(egui::vec2(1400.0, 900.0)) .with_pixels_per_point(1.0) .wgpu_setup(same_adapter(adapter)) - .build_eframe(|_| EffectcraftApp::new(Session::default())); + .with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); // The project opens once the compositor (built on a worker thread) is attached. A frame the // CPU composited while it was being built has the GPU frame's key, so the viewer would keep // showing it, and the comparison below would be the CPU against itself. @@ -215,7 +215,7 @@ fn a_lost_device_draws_nothing_autosaves_and_closes() { let mut s = Session { autosave_folder_override: Some(dir.clone()), ..Default::default() }; s.execute("comp.new", json!({"name": "Unsaved", "width": 64, "height": 64, "duration": 1})).unwrap(); assert!(s.is_dirty()); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); let told = std::rc::Rc::new(std::cell::RefCell::new(Vec::new())); let log = told.clone(); h.state_mut().hooks.device_lost = Some(Box::new(move |saved| log.borrow_mut().push(saved))); @@ -259,7 +259,7 @@ fn the_viewer_exposes_32_bpc_frames_on_the_gpu() { let lid = s.execute("layer.newSolid", json!({"color": "#ffffff"})).unwrap()["layer"].as_u64().unwrap(); s.execute("effect.apply", json!({"layers": [lid], "effect": "Exposure"})).unwrap(); s.execute("prop.set", json!({"layer": lid, "path": "effects/#1/master/exposure", "value": 2.0})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); settle(&mut h); let p = h.state().viewer_f16().expect("a half-float viewer frame").pixel(0).unwrap(); let l = effectcraft_engine::color::srgb_to_linear(p[0] / p[3]); diff --git a/crates/ui-egui/tests/it/ui_gradient_editor.rs b/crates/ui-egui/tests/it/ui_gradient_editor.rs index f5ee8634b..258bf5324 100644 --- a/crates/ui-egui/tests/it/ui_gradient_editor.rs +++ b/crates/ui-egui/tests/it/ui_gradient_editor.rs @@ -45,7 +45,7 @@ fn setup(timing: &[(&str, serde_json::Value)]) -> (Harness<'static, EffectcraftA s.execute(cmd, p).unwrap(); } let (groups, colors) = gradient_fill(&s.active_comp().unwrap().layer(LayerId(l)).unwrap().props).expect("a Gradient Fill"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.open_layers.insert(l); h.state_mut().ui.timeline.open_groups.extend(groups); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_gradient_handles.rs b/crates/ui-egui/tests/it/ui_gradient_handles.rs index f5d9d273e..02a242c59 100644 --- a/crates/ui-egui/tests/it/ui_gradient_handles.rs +++ b/crates/ui-egui/tests/it/ui_gradient_handles.rs @@ -53,7 +53,7 @@ fn setup(in_group: bool, prep: impl FnOnce(&mut Session, u64, u64)) -> (Session, } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h } diff --git a/crates/ui-egui/tests/it/ui_gradient_value.rs b/crates/ui-egui/tests/it/ui_gradient_value.rs index 84c3844c0..26ec7b328 100644 --- a/crates/ui-egui/tests/it/ui_gradient_value.rs +++ b/crates/ui-egui/tests/it/ui_gradient_value.rs @@ -31,7 +31,7 @@ fn the_timeline_gradient_value_opens_an_editor() { let l = s.execute("layer.newShape", json!({"kind": "rect"})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.addShapeItem", json!({"layer": l, "kind": "gfill"})).unwrap(); let (groups, colors) = gradient_fill(&s.active_comp().unwrap().layer(LayerId(l)).unwrap().props).expect("a Gradient Fill"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.open_layers.insert(l); h.state_mut().ui.timeline.open_groups.extend(groups); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_graph_fit.rs b/crates/ui-egui/tests/it/ui_graph_fit.rs index d80ae315e..69ebb3737 100644 --- a/crates/ui-egui/tests/it/ui_graph_fit.rs +++ b/crates/ui-egui/tests/it/ui_graph_fit.rs @@ -20,7 +20,7 @@ fn harness(select_layer: bool) -> (Harness<'static, EffectcraftApp>, u64, u64) { } let uid = s.active_comp().unwrap().layer(id).unwrap().props.prop("transform/rotation").unwrap().uid; s.execute("layer.select", json!({"layers": if select_layer { vec![id.0] } else { vec![] }})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.pps = Some(300.0); h.state_mut().ui.timeline.start = 0.0; h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_graph_theme.rs b/crates/ui-egui/tests/it/ui_graph_theme.rs index 49c6689a0..2f04e2a97 100644 --- a/crates/ui-egui/tests/it/ui_graph_theme.rs +++ b/crates/ui-egui/tests/it/ui_graph_theme.rs @@ -33,7 +33,7 @@ fn the_graph_editor_follows_the_theme() { } s.execute("layer.select", json!({"layers": [id.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.graph_editor = true; h.run_steps(4); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_group_rename.rs b/crates/ui-egui/tests/it/ui_group_rename.rs index 999ed1e3e..4abb75063 100644 --- a/crates/ui-egui/tests/it/ui_group_rename.rs +++ b/crates/ui-egui/tests/it/ui_group_rename.rs @@ -28,7 +28,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Fx) { s.active_comp().unwrap().layer(effectcraft_engine::project::LayerId(l)).unwrap().props.group(path).unwrap().groups().next().unwrap().uid }; let (anim, mask, group) = (first(&s, text, "text/animators"), first(&s, shape, "masks"), first(&s, shape, "contents")); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(6); (h, Fx { text, shape, effect, anim, mask, group }) } diff --git a/crates/ui-egui/tests/it/ui_guide_layers.rs b/crates/ui-egui/tests/it/ui_guide_layers.rs index 92196f5f1..e5b8b59f1 100644 --- a/crates/ui-egui/tests/it/ui_guide_layers.rs +++ b/crates/ui-egui/tests/it/ui_guide_layers.rs @@ -21,7 +21,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, LayerId, LayerId) { }; let left = solid("Left", 160.0); let right = solid("Right", 480.0); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); (h, left, right) } diff --git a/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs b/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs index b527474c3..623e7b043 100644 --- a/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs +++ b/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs @@ -15,7 +15,7 @@ fn harness(panel: PanelKind) -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Red", "color": "#c04040"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(panel); h.state_mut().ui.maximized = Some(panel); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_inline_edit.rs b/crates/ui-egui/tests/it/ui_inline_edit.rs index dc7fd02e1..0213cb943 100644 --- a/crates/ui-egui/tests/it/ui_inline_edit.rs +++ b/crates/ui-egui/tests/it/ui_inline_edit.rs @@ -14,7 +14,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64) { let comp = s.active_comp_id().unwrap().0; // Arabic, Hebrew, Devanagari and Thai names typed below need installed system faces: draw // tofu on a host without them rather than failing the missing-glyph gate. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); (h, comp) } diff --git a/crates/ui-egui/tests/it/ui_keyframes.rs b/crates/ui-egui/tests/it/ui_keyframes.rs index d8cce232d..e79430f95 100644 --- a/crates/ui-egui/tests/it/ui_keyframes.rs +++ b/crates/ui-egui/tests/it/ui_keyframes.rs @@ -21,7 +21,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, LayerId, u64) { } let uid = s.active_comp().unwrap().layer(id).unwrap().props.prop("transform/opacity").unwrap().uid; s.execute("layer.select", json!({"layers": [id.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -518,7 +518,7 @@ fn properties_panel_edits_every_selected_layer() { s.execute("layer.select", json!({"layers": ids})).unwrap(); let first = s.state.selected_layers[0]; let uid = s.active_comp().unwrap().layer(first).unwrap().props.prop("transform/position").unwrap().uid; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(effectcraft_ui_egui::dock::PanelKind::Properties); h.run_steps(4); assert_eq!(h.state().auto.find("properties.selectedObjects").map(|e| e.label.clone()), Some("(3) Selected Objects".into())); @@ -571,7 +571,7 @@ fn ctrl_alt_scrub_in_the_timeline_is_proportional() { } let middle = ids[1]; let uid = s.active_comp().unwrap().layer(LayerId(middle)).unwrap().props.prop("transform/position").unwrap().uid; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.position", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_large_project.rs b/crates/ui-egui/tests/it/ui_large_project.rs index 1b41371db..a2c0a3476 100644 --- a/crates/ui-egui/tests/it/ui_large_project.rs +++ b/crates/ui-egui/tests/it/ui_large_project.rs @@ -15,7 +15,7 @@ fn spec() -> LargeSpec { } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs b/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs index 73ed95cbd..57e96cb1d 100644 --- a/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs +++ b/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs @@ -23,7 +23,7 @@ fn box_id(h: &Harness<'_, EffectcraftApp>) -> u64 { /// The harness with Box open in the Layer panel (focused). fn harness() -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.run_steps(3); let id = box_id(&h); h.state_mut().session.execute("layer.select", json!({"layers": [id]})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_layer_source_picker.rs b/crates/ui-egui/tests/it/ui_layer_source_picker.rs index 2daa450c4..a34bc1938 100644 --- a/crates/ui-egui/tests/it/ui_layer_source_picker.rs +++ b/crates/ui-egui/tests/it/ui_layer_source_picker.rs @@ -107,7 +107,7 @@ fn timeline_source_drop_down_picks_the_layer_and_undo_restores_none() { let mut app = EffectcraftApp::new(s); app.ui.timeline.open_layers.insert(light); app.ui.timeline.open_groups.insert(group); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let value_id = format!("timeline.prop.{source}.value"); @@ -176,7 +176,7 @@ fn effect_controls_layer_param_picks_through_the_shared_widget() { s.state.selected_layers = vec![LayerId(base)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(vec2(1600.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let value_id = format!("effectControls.prop.{prop}.value"); @@ -221,7 +221,7 @@ fn snapshot_source_dropdown_open_and_chosen() { let mut app = EffectcraftApp::new(s); app.ui.timeline.open_layers.insert(light); app.ui.timeline.open_groups.insert(group); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_pixels_per_point(2.0).wgpu().build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_pixels_per_point(2.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let save = |h: &mut Harness<'_, EffectcraftApp>, name: &str| { if let Ok(dir) = std::env::var("EC_SNAPSHOT_DIR") { diff --git a/crates/ui-egui/tests/it/ui_light_settings.rs b/crates/ui-egui/tests/it/ui_light_settings.rs index aac090802..7d310ee70 100644 --- a/crates/ui-egui/tests/it/ui_light_settings.rs +++ b/crates/ui-egui/tests/it/ui_light_settings.rs @@ -10,7 +10,7 @@ use serde_json::{Value, json}; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Lights", "width": 640, "height": 360, "duration": 2})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.step(); h } diff --git a/crates/ui-egui/tests/it/ui_live_preview.rs b/crates/ui-egui/tests/it/ui_live_preview.rs index abe3cc427..6c5e0b1d8 100644 --- a/crates/ui-egui/tests/it/ui_live_preview.rs +++ b/crates/ui-egui/tests/it/ui_live_preview.rs @@ -45,7 +45,7 @@ fn opacity_edits_show_completed_intermediate_frames_before_the_drag_stops() { let renderer = Arc::new(HeldRenderer::default()); let mut app = EffectcraftApp::new(session); app.frames.set_remote(Some(renderer.clone())); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.016).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.016).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); assert_eq!(h.state().frames.dispatch_remote(), 1); renderer.finish(); @@ -95,7 +95,7 @@ fn position_anchor_and_effect_edits_present_intermediate_pixels() { let renderer = Arc::new(HeldRenderer::default()); let mut app = EffectcraftApp::new(session); app.frames.set_remote(Some(renderer.clone())); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.016).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.016).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); h.state().frames.dispatch_remote(); let initial = renderer.finish(); @@ -124,7 +124,7 @@ fn continuous_opacity_preview_probe() { let mut session = Session::default(); session.execute("comp.new", json!({"width":1920,"height":1080,"duration":1})).unwrap(); let layer = session.execute("layer.newSolid", json!({"color":"#ffffff"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); let ready = Instant::now(); while h.state_mut().viewer_pixels().is_none() && ready.elapsed() < Duration::from_secs(5) { h.step(); diff --git a/crates/ui-egui/tests/it/ui_locked_color.rs b/crates/ui-egui/tests/it/ui_locked_color.rs index 5d7d1edd7..530940b45 100644 --- a/crates/ui-egui/tests/it/ui_locked_color.rs +++ b/crates/ui-egui/tests/it/ui_locked_color.rs @@ -63,7 +63,7 @@ fn locked_viewer_follows_display_profile_and_simulation() { s.execute("prefs.set", json!({"key": "previews.displayProfile", "value": "srgb"})).unwrap(); s.execute("view.displayColorManagement", json!({"value": true})).unwrap(); let images = Images::default(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).renderer(Capture(images.clone())).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).renderer(Capture(images.clone())).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); invoke(&mut h, "view.splitLockedViewer", json!({})); let first = expected_center(&mut h); diff --git a/crates/ui-egui/tests/it/ui_marker_names.rs b/crates/ui-egui/tests/it/ui_marker_names.rs index 190bd77bb..66fe11688 100644 --- a/crates/ui-egui/tests/it/ui_marker_names.rs +++ b/crates/ui-egui/tests/it/ui_marker_names.rs @@ -20,7 +20,7 @@ fn the_name_box_follows_the_theme() { s.execute("layer.newSolid", json!({"name": "Bed", "color": "#204060", "width": 640, "height": 360})).unwrap(); s.execute("markers.set", json!({"new": true, "time": 1.0, "comment": "Verse"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(4); let ctx = h.ctx.clone(); @@ -63,7 +63,7 @@ fn a_short_duration_stays_visible_beside_the_name_box() { // a second marker half a second later gives the timeline's scale (points per second) s.execute("markers.set", json!({"new": true, "time": 1.5})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(5); let tokens = h.state().tokens; let centre = |id: &str| { @@ -100,7 +100,7 @@ fn a_later_name_box_does_not_hide_an_earlier_duration_cap() { s.execute("comp.new", json!({"width": 640, "height": 360, "duration": 4})).unwrap(); s.execute("markers.set", json!({"new": true, "time": 1.0, "duration": 0.5, "label": "Red"})).unwrap(); s.execute("markers.set", json!({"new": true, "time": 1.3, "comment": "This name overlaps the earlier endpoint", "label": "Blue"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(5); let a = h.state().auto.find("timeline.marker.0").unwrap().rect; let b = h.state().auto.find("timeline.marker.1").unwrap().rect; diff --git a/crates/ui-egui/tests/it/ui_media_browser_cache.rs b/crates/ui-egui/tests/it/ui_media_browser_cache.rs index 44ca9dd81..293c6ec2b 100644 --- a/crates/ui-egui/tests/it/ui_media_browser_cache.rs +++ b/crates/ui-egui/tests/it/ui_media_browser_cache.rs @@ -81,7 +81,7 @@ fn browser_cache_refreshes_filters_navigates_and_recovers_from_errors() { } let mut session = Session { browser: Some(browser.clone()), ..Default::default() }; session.prefs.general.language = "en".into(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| { + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; app.show_panel(PanelKind::MediaBrowser); diff --git a/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs b/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs index 8372b2be5..3c612fcd9 100644 --- a/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs +++ b/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs @@ -54,7 +54,7 @@ fn file_folder_and_virtual_paths_copy_from_the_context_menu_without_document_cha session.prefs.general.language = "en".into(); session.execute("comp.new", json!({"width": 64, "height": 36, "duration": 2})).unwrap(); // The Chinese folder and file names need an installed CJK face. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).allow_missing_glyphs().build_eframe(|_| { + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; app.show_panel(PanelKind::MediaBrowser); @@ -91,6 +91,7 @@ fn file_folder_and_virtual_paths_copy_from_the_context_menu_without_document_cha fn copy_path_control_command_preserves_the_path_and_rejects_bad_arguments() { let mut app = EffectcraftApp::new(Session::default()); let ctx = egui::Context::default(); + effectcraft_ui_egui::framework::install_headless(&ctx); let project = app.session.project.clone(); let revision = app.session.revision; let history = app.session.history.undo.len(); diff --git a/crates/ui-egui/tests/it/ui_menus.rs b/crates/ui-egui/tests/it/ui_menus.rs index 512f1f376..0d4376a44 100644 --- a/crates/ui-egui/tests/it/ui_menus.rs +++ b/crates/ui-egui/tests/it/ui_menus.rs @@ -12,7 +12,7 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -299,7 +299,7 @@ fn space_previews_after_opening_the_demo_from_home() { let s = Session::default(); let mut app = EffectcraftApp::new(s); app.ui.start_screen = true; - Harness::builder().with_size(vec2(1400.0, 900.0)).build_eframe(|_| app) + Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; h.run_steps(3); let demo = rect(&h, "home.file.openDemoProject"); diff --git a/crates/ui-egui/tests/it/ui_new_primitive.rs b/crates/ui-egui/tests/it/ui_new_primitive.rs index c40aa23ed..015fa03c2 100644 --- a/crates/ui-egui/tests/it/ui_new_primitive.rs +++ b/crates/ui-egui/tests/it/ui_new_primitive.rs @@ -11,7 +11,7 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Scene", "width": 640, "height": 360, "duration": 2})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.step(); h } diff --git a/crates/ui-egui/tests/it/ui_object_matte.rs b/crates/ui-egui/tests/it/ui_object_matte.rs index 5f30ba03b..1806fc640 100644 --- a/crates/ui-egui/tests/it/ui_object_matte.rs +++ b/crates/ui-egui/tests/it/ui_object_matte.rs @@ -20,7 +20,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080", "width": 640, "height": 360})).unwrap(); s.execute("layer.newSolid", json!({"name": "Box", "color": "#e04020", "width": 80, "height": 80})).unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_panel_focus.rs b/crates/ui-egui/tests/it/ui_panel_focus.rs index 0d436f702..99d687379 100644 --- a/crates/ui-egui/tests/it/ui_panel_focus.rs +++ b/crates/ui-egui/tests/it/ui_panel_focus.rs @@ -19,7 +19,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("layer.newSolid", json!({"name": "Red", "color": [1.0, 0.0, 0.0, 1.0]})).unwrap(); s.state.open_comps = vec![ItemId(main)]; s.state.active_comp = Some(ItemId(main)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, other, main) } diff --git a/crates/ui-egui/tests/it/ui_panel_windows.rs b/crates/ui-egui/tests/it/ui_panel_windows.rs index 72b8bfff6..9f9dec821 100644 --- a/crates/ui-egui/tests/it/ui_panel_windows.rs +++ b/crates/ui-egui/tests/it/ui_panel_windows.rs @@ -74,7 +74,7 @@ fn a_click_on_a_floating_panel_does_nothing_while_a_dialog_is_open() { let mut app = EffectcraftApp::new(Session::default()); app.ui.start_screen = false; app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::Project, rect: [80.0, 120.0, 320.0, 240.0] }).unwrap(); - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).build_eframe(move |_| app); + let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); let close = |h: &Harness<'_, EffectcraftApp>| { let e = h.state().auto.elements.iter().find(|e| e.id.starts_with("panel.float.") && e.id.ends_with(".close")).expect("the floating window's ×"); diff --git a/crates/ui-egui/tests/it/ui_panels.rs b/crates/ui-egui/tests/it/ui_panels.rs index 2c2d650e9..5646f221b 100644 --- a/crates/ui-egui/tests/it/ui_panels.rs +++ b/crates/ui-egui/tests/it/ui_panels.rs @@ -18,7 +18,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Panels", "width": 320, "height": 180, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -169,7 +169,7 @@ fn saved_workspaces_persist_across_sessions() { let store = std::sync::Arc::new(MemoryConfig::default()); let launch = || { let s = Session { config: Some(store.clone()), ..Default::default() }; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(2); h }; @@ -338,7 +338,7 @@ fn ui_scale_setting_sizes_the_interface() { assert_eq!(ctx.zoom_factor(), 0.9); // A saved scale applies from the first frame. let s = Session { prefs: effectcraft_engine::prefs::Prefs::from_json(&h.state().session.prefs.to_json()), ..Default::default() }; - let mut h2 = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h2 = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h2.run_steps(3); assert_eq!(h2.ctx.zoom_factor(), 0.9); } @@ -359,7 +359,7 @@ fn settings_buttons_stay_in_view_at_200_percent() { s.prefs.disk.disk_cache_enabled = false; s.prefs.set("appearance.uiScale", json!(200)).unwrap(); s.save_prefs(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert_eq!(scale(&h), (200, 2.0)); let rect = |h: &Harness<'_, EffectcraftApp>, id: &str| { @@ -423,7 +423,7 @@ fn panels_snapshot() { s.execute("file.openDemoProject", json!({})).unwrap(); let solid = s.project.items.values().find(|i| matches!(i.kind, effectcraft_engine::project::ItemKind::Solid(_))).map(|i| i.id.0); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "window.workspace", json!({"name": "All Panels"})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_parameter_spacing.rs b/crates/ui-egui/tests/it/ui_parameter_spacing.rs index 167029f7c..21fe4d442 100644 --- a/crates/ui-egui/tests/it/ui_parameter_spacing.rs +++ b/crates/ui-egui/tests/it/ui_parameter_spacing.rs @@ -33,7 +33,7 @@ fn click(h: &mut Harness<'_, EffectcraftApp>, id: &str) { #[test] fn fixed_compact_rows_preserve_checkbox_and_point_hit_targets() { let (a, lid, checkbox, point) = setup(); - let mut h = Harness::builder().with_size(vec2(1500.0, 1000.0)).build_eframe(|_| a); + let mut h = Harness::builder().with_size(vec2(1500.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.run_steps(4); let fx = h.state().auto.find(&format!("effectControls.row.{checkbox}")).unwrap().rect; let tl = h.state().auto.find(&format!("timeline.prop.{checkbox}.row")).unwrap().rect; @@ -66,7 +66,7 @@ fn nested_groups_keep_indentation_value_alignment_and_effect_gaps_at_fixed_compa a.show_panel(PanelKind::EffectControls); a.ui.fx_closed.extend(closed); a.ui.timeline.search = "Temperature".into(); - let mut h = Harness::builder().with_size(vec2(1500.0, 1800.0)).build_eframe(|_| a); + let mut h = Harness::builder().with_size(vec2(1500.0, 1800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.run_steps(4); let rect = |h: &Harness<'_, EffectcraftApp>, id: String| h.state().auto.find(&id).unwrap_or_else(|| panic!("no {id}")).rect; let name_x = |kind: &str, uid| rect(&h, format!("effectControls.{kind}.{uid}.name"))[0]; diff --git a/crates/ui-egui/tests/it/ui_presets_folder.rs b/crates/ui-egui/tests/it/ui_presets_folder.rs index 1bcd9189c..842812974 100644 --- a/crates/ui-egui/tests/it/ui_presets_folder.rs +++ b/crates/ui-egui/tests/it/ui_presets_folder.rs @@ -39,7 +39,7 @@ fn presets_menu_copies_the_configured_folder_without_editing_the_project() { let expected = expected_folder(); for language in ["en", "ja"] { // The `ja` run draws Japanese menu text, which needs an installed CJK face. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().build_eframe(|_| { + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { let mut app = EffectcraftApp::new(Session::default()); app.session.prefs.general.language = language.into(); app.ui.start_screen = false; @@ -67,6 +67,7 @@ fn presets_menu_copies_the_configured_folder_without_editing_the_project() { fn presets_folder_control_command_returns_the_path_or_a_configuration_error() { let mut app = EffectcraftApp::new(Session::default()); let ctx = egui::Context::default(); + effectcraft_ui_egui::framework::install_headless(&ctx); let expected = expected_folder(); let mut reply = None; let mut output = ctx.run_ui(Default::default(), |ui| { @@ -122,7 +123,7 @@ fn shared_preset_rows_search_apply_and_undo_the_selected_definition() { session.prefs.general.language = "en".into(); session.execute("comp.new", json!({"width": 64, "height": 36, "duration": 2})).unwrap(); session.execute("layer.newText", json!({"text": "Cache"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| { + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; app.show_panel(PanelKind::EffectsPresets); diff --git a/crates/ui-egui/tests/it/ui_preview_align.rs b/crates/ui-egui/tests/it/ui_preview_align.rs index a41723d61..7588c56bf 100644 --- a/crates/ui-egui/tests/it/ui_preview_align.rs +++ b/crates/ui-egui/tests/it/ui_preview_align.rs @@ -16,7 +16,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("comp.new", json!({"name": "Preview", "width": 320, "height": 180, "frameRate": 24, "duration": 10})).unwrap(); s.execute("layer.newSolid", json!({"name": "A", "color": "#406080", "width": 40, "height": 30})).unwrap(); s.execute("layer.newSolid", json!({"name": "B", "color": "#806040", "width": 60, "height": 20})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_project_delete.rs b/crates/ui-egui/tests/it/ui_project_delete.rs index 2a395cf4b..ef66bd866 100644 --- a/crates/ui-egui/tests/it/ui_project_delete.rs +++ b/crates/ui-egui/tests/it/ui_project_delete.rs @@ -24,7 +24,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec, LayerId) { ); let folder = ItemId(s.execute("project.newFolder", json!({"name": "Folder"})).unwrap()["item"].as_u64().unwrap()); let keep = LayerId(s.execute("layer.newNull", json!({"name": "Keep this layer"})).unwrap()["layer"].as_u64().unwrap()); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); let folders: Vec = h.state().session.project.items.values().filter(|i| i.is_folder()).map(|i| i.id.0).collect(); h.state_mut().ui.project_open_folders.extend(folders); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_project_duplicate.rs b/crates/ui-egui/tests/it/ui_project_duplicate.rs index 2037c278b..a83fa0cb7 100644 --- a/crates/ui-egui/tests/it/ui_project_duplicate.rs +++ b/crates/ui-egui/tests/it/ui_project_duplicate.rs @@ -20,7 +20,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, ItemId, ItemId, ItemId) { let other = comp("Other"); let folder = ItemId(s.execute("project.newFolder", json!({"name": "Bin"})).unwrap()["item"].as_u64().unwrap()); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, main, other, folder) } diff --git a/crates/ui-egui/tests/it/ui_project_keyboard.rs b/crates/ui-egui/tests/it/ui_project_keyboard.rs index af2a796fe..5fff9657f 100644 --- a/crates/ui-egui/tests/it/ui_project_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_project_keyboard.rs @@ -23,7 +23,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, ItemId, ItemId, ItemId) { s.execute("project.move", json!({"items": [comp.0], "folder": folder.0})).unwrap(); s.execute("project.move", json!({"items": [solid.0], "folder": null})).unwrap(); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, folder, comp, solid) } diff --git a/crates/ui-egui/tests/it/ui_project_new_folder.rs b/crates/ui-egui/tests/it/ui_project_new_folder.rs index b86bf663d..c19e56858 100644 --- a/crates/ui-egui/tests/it/ui_project_new_folder.rs +++ b/crates/ui-egui/tests/it/ui_project_new_folder.rs @@ -20,7 +20,7 @@ fn harness(comps: usize) -> (Harness<'static, EffectcraftApp>, ItemId) { } let folder = ItemId(s.execute("project.newFolder", json!({"name": "Bin"})).unwrap()["item"].as_u64().unwrap()); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.project_open_folders.insert(folder.0); h.run_steps(3); (h, folder) diff --git a/crates/ui-egui/tests/it/ui_project_rows.rs b/crates/ui-egui/tests/it/ui_project_rows.rs index b8638bbd1..58b2dc979 100644 --- a/crates/ui-egui/tests/it/ui_project_rows.rs +++ b/crates/ui-egui/tests/it/ui_project_rows.rs @@ -20,7 +20,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, ItemId, ItemId, ItemId) { s.execute("project.move", json!({"items": [comp.0], "folder": folder.0})).unwrap(); s.execute("project.move", json!({"items": [solid.0], "folder": null})).unwrap(); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, folder, comp, solid) } @@ -234,7 +234,7 @@ fn dragging_in_the_empty_area_box_selects_items() { #[test] fn a_short_project_panel_draws() { for height in [400.0, 300.0] { - let mut h = Harness::builder().with_size(egui::vec2(640.0, height)).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(egui::vec2(640.0, height)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); assert!(h.state().auto.find("project.empty").is_some(), "the Project panel drew at {height} points"); } diff --git a/crates/ui-egui/tests/it/ui_quick_offset.rs b/crates/ui-egui/tests/it/ui_quick_offset.rs index 0587e85f3..db975f7ab 100644 --- a/crates/ui-egui/tests/it/ui_quick_offset.rs +++ b/crates/ui-egui/tests/it/ui_quick_offset.rs @@ -27,7 +27,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec) { ids.push(id); } s.execute("layer.select", json!({"layers": ids})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -210,7 +210,7 @@ fn a_quick_offset_released_off_screen_ends() { (0..40).map(|i| s.execute("layer.newSolid", json!({"name": format!("L{i}"), "color": "#e04020"})).unwrap()["layer"].as_u64().unwrap()).collect(); let (top, next) = (ids[39], ids[38]); s.execute("layer.select", json!({"layers": [top, next]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let from = center(&h, &format!("timeline.layer.{top}.bar")); h.input_mut().events.push(Event::PointerMoved(from)); diff --git a/crates/ui-egui/tests/it/ui_ram_preview.rs b/crates/ui-egui/tests/it/ui_ram_preview.rs index 8b3748a3f..5cfe808b7 100644 --- a/crates/ui-egui/tests/it/ui_ram_preview.rs +++ b/crates/ui-egui/tests/it/ui_ram_preview.rs @@ -30,7 +30,7 @@ fn an_edit_in_another_comp_keeps_the_cached_frames_and_undo_finds_them_again() { let b = s.execute("comp.new", json!({"name": "B", "width": 64, "height": 36, "duration": 1})).unwrap()["comp"].as_u64().unwrap(); let a = s.execute("comp.new", json!({"name": "A", "width": 64, "height": 36, "duration": 1})).unwrap()["comp"].as_u64().unwrap(); s.execute("layer.newSolid", json!({"color": "#3080ff"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); assert!(shown_cached(&h, a), "A's frame rendered"); // Edit B (open it, add a layer), then come back to A: its frame is still in RAM. @@ -59,7 +59,7 @@ fn the_timeline_shows_the_cached_frames_in_green() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Cache", "width": 64, "height": 36, "duration": 2})).unwrap(); s.execute("layer.newSolid", json!({"color": "#3080ff"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); h.run_steps(2); let green = h.state().tokens.cache_green; @@ -91,7 +91,7 @@ fn prefetch_waits_while_edits_keep_coming() { let c = s.execute("comp.new", json!({"name": "Drag", "width": 64, "height": 36, "duration": 2})).unwrap()["comp"].as_u64().unwrap(); let solid = s.execute("layer.newSolid", json!({"color": "#3080ff", "width": 16, "height": 16})).unwrap()["layer"].as_u64().unwrap(); // Short steps between edits; the app clock below is advanced explicitly. - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.05).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.05).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); // Prefetch waits for EDIT_QUIET on the app clock; a manual clock makes the pause // deterministic instead of depending on how long the test host took to run the steps. h.state_mut().use_manual_clock(); @@ -145,7 +145,7 @@ fn cached_frames_are_counted_at_one_third_resolution() { if let Some(comp) = std::sync::Arc::make_mut(&mut s.project).comp_mut(ItemId(c)) { comp.resolution = res; } - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); let series = h.state().shown_series(ItemId(c)); assert_eq!(series.scale, (res.scale(1.0, 1.0) * 1000.0).round() as u32, "{res:?}"); diff --git a/crates/ui-egui/tests/it/ui_render_queue.rs b/crates/ui-egui/tests/it/ui_render_queue.rs index 562b7a1c4..3e29c7cc8 100644 --- a/crates/ui-egui/tests/it/ui_render_queue.rs +++ b/crates/ui-egui/tests/it/ui_render_queue.rs @@ -29,7 +29,7 @@ fn render_settings_template_applies_from_a_menu_moved_to_fit_the_window() { let id = s.project.render_queue[0].id; assert_eq!(s.project.render_queue[0].settings.name, "Best Settings"); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); // Twirl the item open, as clicking its twirl does. h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique("rq-ui"), (vec![id], None::))); h.state_mut().show_panel(PanelKind::RenderQueue); @@ -79,7 +79,7 @@ fn clicking_the_output_file_name_opens_the_save_dialog() { Some(answer.clone()) })); let mut app = Some(app); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique("rq-ui"), (vec![id], None::))); h.state_mut().show_panel(PanelKind::RenderQueue); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs b/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs index 31c3ba823..7faeb515b 100644 --- a/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs @@ -19,7 +19,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { let comp = s.execute("comp.new", json!({"name": name, "width": 320, "height": 180, "duration": 4})).unwrap()["comp"].as_u64().unwrap(); s.execute("renderQueue.add", json!({"comp": comp})).unwrap(); } - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::RenderQueue); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_roto_objects.rs b/crates/ui-egui/tests/it/ui_roto_objects.rs index cbf52d07d..53a10e83f 100644 --- a/crates/ui-egui/tests/it/ui_roto_objects.rs +++ b/crates/ui-egui/tests/it/ui_roto_objects.rs @@ -74,7 +74,7 @@ fn the_boundary_view_outlines_each_object_and_show_object_picks_one() { // object 0 keeps the boundary colour (pink by default), object 1 is the first palette colour (blue-green) let (pink, cyan) = ([255, 64, 191], [60, 200, 255]); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h.state_mut().session.execute("layer.select", json!({"layers": [id]})).unwrap(); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_roto_span_confidence.rs b/crates/ui-egui/tests/it/ui_roto_span_confidence.rs index d9730b778..14437f1c0 100644 --- a/crates/ui-egui/tests/it/ui_roto_span_confidence.rs +++ b/crates/ui-egui/tests/it/ui_roto_span_confidence.rs @@ -75,7 +75,7 @@ fn the_span_bar_shows_the_trackers_confidence() { // the model stays loaded while the panel draws (its id is part of the cache keys) s.execute("roto.propagate", json!({"layer": id, "direction": "both", "wait": true})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h.state_mut().session.execute("layer.select", json!({"layers": [id]})).unwrap(); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_script_console.rs b/crates/ui-egui/tests/it/ui_script_console.rs index 9430bc7a2..4367027dd 100644 --- a/crates/ui-egui/tests/it/ui_script_console.rs +++ b/crates/ui-egui/tests/it/ui_script_console.rs @@ -19,7 +19,7 @@ fn click(h: &mut Harness<'_, EffectcraftApp>, id: &str) { #[test] fn script_console_runs_scripts() { let s = effectcraft_host::session(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::ScriptConsole); h.run_steps(3); for id in ["scriptConsole.input", "scriptConsole.output", "scriptConsole.run", "scriptConsole.clear"] { @@ -50,7 +50,7 @@ fn script_console_runs_scripts() { #[ignore] fn script_console_snapshot() { let s = effectcraft_host::session(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::ScriptConsole); h.run_steps(2); for code in ["var c = app.project.items.addComp('Console', 320, 180, 1, 2, 24); writeLn('made ' + c.name); c.id", "c.layers.addText('Hi').name", "nope()"] { diff --git a/crates/ui-egui/tests/it/ui_script_console_keyboard.rs b/crates/ui-egui/tests/it/ui_script_console_keyboard.rs index 8072238ea..b83953181 100644 --- a/crates/ui-egui/tests/it/ui_script_console_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_script_console_keyboard.rs @@ -16,7 +16,7 @@ const INPUT: &str = "Script… (⌘/Ctrl+Enter runs)"; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::ScriptConsole); h.state_mut().ui.maximized = Some(PanelKind::ScriptConsole); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_script_render.rs b/crates/ui-egui/tests/it/ui_script_render.rs index b3c24733c..9c2b78071 100644 --- a/crates/ui-egui/tests/it/ui_script_render.rs +++ b/crates/ui-egui/tests/it/ui_script_render.rs @@ -40,7 +40,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Arc, std::sync::mpsc::S let path = std::env::temp_dir().join(format!("ec-ui-script-render-{}.mp4", std::process::id())); s.execute("renderQueue.add", json!({"output": path.to_string_lossy()})).unwrap(); let (tx, rx) = std::sync::mpsc::channel(); - let h = Harness::builder().with_size(egui::vec2(1000.0, 700.0)).build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); + let h = Harness::builder().with_size(egui::vec2(1000.0, 700.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); (h, gate, tx) } diff --git a/crates/ui-egui/tests/it/ui_scriptui.rs b/crates/ui-egui/tests/it/ui_scriptui.rs index 6c46e71cf..ea5282a9d 100644 --- a/crates/ui-egui/tests/it/ui_scriptui.rs +++ b/crates/ui-egui/tests/it/ui_scriptui.rs @@ -13,7 +13,7 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = effectcraft_host::session(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -103,7 +103,7 @@ fn panels_open_at_quit_dock_again_at_launch() { let mut s = effectcraft_host::session(); s.config = Some(store.clone()); s.execute("window.restoreScriptPanels", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let panel = h.state().session.script_ui.windows.iter().find(|w| w.script == "Hello Panel.jsx").expect("the panel's window").id; assert!(h.state().ui.dock.is_docked(PanelKind::ScriptPanel(panel)), "the panel docks"); @@ -123,7 +123,7 @@ fn a_key_given_to_a_script_runs_it() { let store = std::sync::Arc::new(MemoryConfig::default()); let mut s = effectcraft_host::session(); s.config = Some(store.clone()); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().session.shortcuts().find(r#"file.runScript {"name":"Rename Layers.jsx"}"#).is_some(), "the shortcut table is built"); store.write("Scripts/Add Comp.jsx", "app.project.items.addComp('From Key', 64, 64, 1, 1, 25);").unwrap(); @@ -219,7 +219,7 @@ fn on_draw_concave_fills_and_images_render() { let png = png.to_string_lossy().replace('\\', "/"); let mut s = effectcraft_host::session(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_pixels_per_point(1.0).wgpu().build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_pixels_per_point(1.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let code = format!( r#" @@ -388,7 +388,7 @@ fn scheduled_import_reveals_its_composition_without_manual_clicks() { let mut s = effectcraft_host::session(); let result = s.execute("script.run", json!({"code": "var w=new Window('palette','Automatic import');var b=w.add('button',undefined,'Open');b.onClick=function(){app.scheduleTask(\"var c=app.project.items.addComp('Imported',64,64,1,1,25);c.openInViewer();\",0,false);};w.show();"})).unwrap(); assert_eq!(result["ok"], true, "{result}"); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.start_screen = true; h.run_steps(2); h.state_mut().session.execute("scriptui.click", json!({"window":"Automatic import","widget":"Open"})).unwrap(); @@ -542,7 +542,7 @@ fn a_docked_panel_button_opens_the_file_dialog() { store.write("Scripts/ScriptUI Panels/Subtitles Panel.jsx", panel).unwrap(); let mut s = effectcraft_host::session(); s.config = Some(store.clone()); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let asked: Arc>>> = Arc::default(); let log = asked.clone(); diff --git a/crates/ui-egui/tests/it/ui_scrolling.rs b/crates/ui-egui/tests/it/ui_scrolling.rs index 738878d82..bec6fc244 100644 --- a/crates/ui-egui/tests/it/ui_scrolling.rs +++ b/crates/ui-egui/tests/it/ui_scrolling.rs @@ -17,7 +17,7 @@ use super::ui_tail::drag; fn harness(w: f32, h: f32) -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(w, h)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(w, h)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -539,7 +539,7 @@ fn settings_page_column_fits_japanese_names() { eprintln!("required Japanese input {expected:?}: {:?}", face.info); } - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page": "scripting"})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_self_drop.rs b/crates/ui-egui/tests/it/ui_self_drop.rs index f8a44de83..2148d4312 100644 --- a/crates/ui-egui/tests/it/ui_self_drop.rs +++ b/crates/ui-egui/tests/it/ui_self_drop.rs @@ -14,7 +14,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { let clip = s.execute("comp.new", json!({"name": "Clip", "width": 160, "height": 90, "frameRate": 30, "duration": 1})).unwrap()["comp"].as_u64().unwrap(); let main = s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30, "duration": 4})).unwrap()["comp"].as_u64().unwrap(); s.execute("layer.newSolid", json!({"name": "Bottom", "color": "#406080"})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, main, clip) } diff --git a/crates/ui-egui/tests/it/ui_settings_info.rs b/crates/ui-egui/tests/it/ui_settings_info.rs index 955a709b4..fd6718002 100644 --- a/crates/ui-egui/tests/it/ui_settings_info.rs +++ b/crates/ui-egui/tests/it/ui_settings_info.rs @@ -37,7 +37,7 @@ fn check_info_transaction(via_escape: bool) { session.save_prefs(); session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); let original_brightness = session.prefs.appearance.brightness; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page":"appearance"})).unwrap(); @@ -125,7 +125,7 @@ fn gpu_information_names_the_adapter_and_why_the_gpu_is_off() { window_adapter: Some("NVIDIA GeForce RTX 4070 (Dx12, DiscreteGpu)".into()), ..Default::default() }; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.gpuInfo", json!({})).unwrap(); @@ -140,7 +140,7 @@ fn gpu_information_dialog_stays_in_place() { let mut session = Session::default(); session.prefs.appearance.ui_scale = 125; session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1280.0, 720.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1280.0, 720.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page":"previews"})).unwrap(); @@ -161,7 +161,7 @@ fn gpu_information_dialog_stays_in_place() { fn gpu_information_enter_presses_ok() { let mut session = Session::default(); session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let enter = |h: &mut Harness<'_, EffectcraftApp>| { for pressed in [true, false] { diff --git a/crates/ui-egui/tests/it/ui_settings_keyboard.rs b/crates/ui-egui/tests/it/ui_settings_keyboard.rs index e74ccfd94..041dcdf7b 100644 --- a/crates/ui-egui/tests/it/ui_settings_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_settings_keyboard.rs @@ -11,7 +11,7 @@ use egui_kittest::kittest::{NodeT, Queryable}; use serde_json::json; fn harness(page: &str) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page": page})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_shortcut_scopes.rs b/crates/ui-egui/tests/it/ui_shortcut_scopes.rs index 6c79fe72a..17904322a 100644 --- a/crates/ui-egui/tests/it/ui_shortcut_scopes.rs +++ b/crates/ui-egui/tests/it/ui_shortcut_scopes.rs @@ -20,6 +20,7 @@ fn app() -> EffectcraftApp { /// Press `key` with `modifiers` and run the shortcut dispatcher on it. fn press(app: &mut EffectcraftApp, key: Key, modifiers: Modifiers) { let ctx = egui::Context::default(); + effectcraft_ui_egui::framework::install_headless(&ctx); let raw = egui::RawInput { events: vec![egui::Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers }], ..Default::default() }; let mut output = ctx.run_ui(raw, |ui| effectcraft_ui_egui::menus::handle_shortcuts(app, ui.ctx())); output.textures_delta.clear(); diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index cc9e56041..fe40ca05f 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -20,7 +20,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("layer.addItem", json!({"item": pre})).unwrap(); s.state.open_comps = vec![ItemId(main)]; s.state.active_comp = Some(ItemId(main)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, pre, main) } @@ -440,7 +440,7 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu .collect(); s.state.open_comps = vec![ItemId(comps[0])]; s.state.active_comp = Some(ItemId(comps[0])); - let mut h = Harness::builder().with_size(egui::vec2(1000.0, 800.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1000.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let alone = rect(&h, "panel.tab.RenderQueue"); h.state_mut().session.state.open_comps = comps.iter().map(|c| ItemId(*c)).collect(); diff --git a/crates/ui-egui/tests/it/ui_tail.rs b/crates/ui-egui/tests/it/ui_tail.rs index 293ba87ae..e4684cf45 100644 --- a/crates/ui-egui/tests/it/ui_tail.rs +++ b/crates/ui-egui/tests/it/ui_tail.rs @@ -15,7 +15,7 @@ fn harness_at(size: egui::Vec2) -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Tail", "width": 640, "height": 360, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080", "width": 640, "height": 360})).unwrap(); - let mut h = Harness::builder().with_size(size).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(size).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_text_edit.rs b/crates/ui-egui/tests/it/ui_text_edit.rs index 24a43522f..5b52c723d 100644 --- a/crates/ui-egui/tests/it/ui_text_edit.rs +++ b/crates/ui-egui/tests/it/ui_text_edit.rs @@ -19,7 +19,7 @@ fn app() -> EffectcraftApp { /// A headless window at the size and frame step the viewer tests here are written for. fn harness(a: EffectcraftApp) -> Harness<'static, EffectcraftApp> { - Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |cc| { + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |cc| { EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); a }) @@ -82,7 +82,7 @@ fn type_tool_skips_hidden_and_unsoloed_text_layers() { let (target, value) = if switch == "video" { (ids[1], false) } else { (ids[0], true) }; s.execute("layer.setSwitch", json!({"layers": [target], "switch": switch, "value": value})).unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; h.run_steps(3); let comp = rect(&h, "viewer.comp"); @@ -94,7 +94,7 @@ fn type_tool_skips_hidden_and_unsoloed_text_layers() { #[test] fn modal_blocks_background_text_events() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.run_steps(3); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; h.run_steps(1); @@ -870,7 +870,7 @@ fn a_chord_bound_to_both_forwarded_commands_resolves_in_list_order() { fn ime_producer_follows_the_committed_text_and_cause() { // A Latin accent is multi-byte in UTF-8 (the byte offsets below) and Inter draws it, so the // harness keeps its strict missing-glyph check; no CJK fallback face is needed headlessly. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; @@ -908,7 +908,7 @@ fn click_away_clears_the_canvas_ime_descriptor_in_the_final_pass() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let solid = s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap()["layer"].as_u64().unwrap(); let title = s.execute("layer.newText", json!({"text": "Title", "size": 80, "position": [100, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": title, "caret": 5})).unwrap(); @@ -930,7 +930,7 @@ fn switching_text_targets_interrupts_and_rejects_a_delayed_commit() { let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); // The delayed commit carries a multi-byte accent Inter draws: no broad missing-glyph // allowance, and the stale-composition path is still exercised with real IME events. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -962,7 +962,7 @@ fn a_delayed_preedit_after_a_target_switch_cannot_rearm_the_stale_guard() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -988,7 +988,7 @@ fn late_preedit_and_commit_split_across_idle_frames_cannot_retarget() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1026,7 +1026,7 @@ fn late_preedit_and_delete_split_across_idle_frames_cannot_retarget() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1061,7 +1061,7 @@ fn empty_preedit_keeps_the_old_target_until_the_pending_commit_arrives() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1090,7 +1090,7 @@ fn a_matching_fence_after_old_terminals_admits_the_next_preedit_in_the_same_batc s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1121,7 +1121,7 @@ fn delete_surrounding_bytes_through_the_app_replaces_the_emoji() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "café😀", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": lid, "caret": 5})).unwrap(); @@ -1140,7 +1140,7 @@ fn ime_interruption_editor() -> (Harness<'static, EffectcraftApp>, Pos2) { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "abcd", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).build_eframe(move |cc| { + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |cc| { EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); EffectcraftApp::new(s) }); diff --git a/crates/ui-egui/tests/it/ui_text_range_handles.rs b/crates/ui-egui/tests/it/ui_text_range_handles.rs index 7ce301b37..a4458278a 100644 --- a/crates/ui-egui/tests/it/ui_text_range_handles.rs +++ b/crates/ui-egui/tests/it/ui_text_range_handles.rs @@ -42,7 +42,7 @@ fn setup() -> (Session, Ids) { } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h } diff --git a/crates/ui-egui/tests/it/ui_theme_favorites.rs b/crates/ui-egui/tests/it/ui_theme_favorites.rs index 424b28c49..811a970d5 100644 --- a/crates/ui-egui/tests/it/ui_theme_favorites.rs +++ b/crates/ui-egui/tests/it/ui_theme_favorites.rs @@ -37,7 +37,7 @@ fn star_controls_save_and_favorite_menu_selects_the_family() { let store = Arc::new(MemoryConfig::default()); let mut session = Session { config: Some(store.clone()), ..Default::default() }; session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page":"appearance"})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_time_zoom_controls.rs b/crates/ui-egui/tests/it/ui_time_zoom_controls.rs index c1ea26b2b..7173c332e 100644 --- a/crates/ui-egui/tests/it/ui_time_zoom_controls.rs +++ b/crates/ui-egui/tests/it/ui_time_zoom_controls.rs @@ -24,7 +24,7 @@ fn harness(graph: bool) -> Harness<'static, EffectcraftApp> { let mut app = EffectcraftApp::new(s); // (Opening a comp may zoom; start from the whole comp.) app.ui.timeline.pps = None; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); h.state_mut().session.execute("time.set", json!({"time": 4.0})).unwrap(); h.state_mut().ui.timeline.pps = None; diff --git a/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs b/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs index bc0b9a7f9..b6129bd34 100644 --- a/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs +++ b/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs @@ -72,7 +72,7 @@ fn linked_audio_levels_move_both_channels_by_the_same_db() { let mut s = Session::default(); comps(&mut s); let (l, uid) = add_sound_layer(&mut s, [-6.0, -12.0]); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); reveal(&mut h, l, uid); let levels = |h: &Harness<'_, EffectcraftApp>| h.state().session.active_comp().unwrap().layer(LayerId(l)).unwrap().props.prop("audio/levels").unwrap().clone(); @@ -135,7 +135,7 @@ fn linked_typing_keeps_each_selected_layers_own_balance() { let (a, uid) = add_sound_layer(&mut s, [-6.0, -12.0]); let (b, other) = add_sound_layer(&mut s, [-20.0, -30.0]); s.execute("layer.select", json!({"layers": [a, b]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); reveal(&mut h, a, uid); reveal(&mut h, b, other); click(&mut h, &format!("timeline.prop.{uid}.link")); @@ -150,7 +150,7 @@ fn a_new_project_starts_with_its_audio_levels_unlinked() { let mut s = Session::default(); comps(&mut s); let (l, uid) = add_sound_layer(&mut s, [0.0, 0.0]); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); reveal(&mut h, l, uid); click(&mut h, &format!("timeline.prop.{uid}.link")); assert!(h.state().ui.timeline.is_linked(uid, false)); diff --git a/crates/ui-egui/tests/it/ui_timeline_effect_label.rs b/crates/ui-egui/tests/it/ui_timeline_effect_label.rs index deeee9e5d..a65e49b8c 100644 --- a/crates/ui-egui/tests/it/ui_timeline_effect_label.rs +++ b/crates/ui-egui/tests/it/ui_timeline_effect_label.rs @@ -20,7 +20,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { app.ui.timeline.open_layers.insert(layer); let effects = app.session.active_comp().and_then(|c| c.layer(LayerId(layer))).and_then(|l| l.props.sub("effects")).map(|g| g.uid); app.ui.timeline.open_groups.extend(effects); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, layer, fx) } diff --git a/crates/ui-egui/tests/it/ui_timeline_group_select.rs b/crates/ui-egui/tests/it/ui_timeline_group_select.rs index 0a553976b..cdcb64d1e 100644 --- a/crates/ui-egui/tests/it/ui_timeline_group_select.rs +++ b/crates/ui-egui/tests/it/ui_timeline_group_select.rs @@ -30,7 +30,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, [u64; 3]) { all(&l.props, &mut open); } app.ui.timeline.open_groups.extend(open); - let mut h = Harness::builder().with_size(vec2(1600.0, 1100.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, layer, pins) } diff --git a/crates/ui-egui/tests/it/ui_timeline_interacting.rs b/crates/ui-egui/tests/it/ui_timeline_interacting.rs index 5cf11ad0e..34daef19e 100644 --- a/crates/ui-egui/tests/it/ui_timeline_interacting.rs +++ b/crates/ui-egui/tests/it/ui_timeline_interacting.rs @@ -32,7 +32,7 @@ fn fixture(mode: &str) -> Fixture { let opacity = comp.layers.iter().find(|l| l.id.0 == solid).unwrap().props.prop("transform/opacity").unwrap().uid; s.execute("layer.select", json!({"layers": [solid]})).unwrap(); s.execute("view.fastPreviewMode", json!({"mode": mode})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_timeline_marquee.rs b/crates/ui-egui/tests/it/ui_timeline_marquee.rs index 9d72f08aa..6a7069f5b 100644 --- a/crates/ui-egui/tests/it/ui_timeline_marquee.rs +++ b/crates/ui-egui/tests/it/ui_timeline_marquee.rs @@ -21,7 +21,7 @@ fn harness_for(duration: f64) -> (Harness<'static, EffectcraftApp>, u64) { s.execute("prop.addKey", json!({"layer": id, "path": "transform/opacity", "time": t, "value": v})).unwrap(); } s.execute("layer.select", json!({"layers": [id]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -93,7 +93,7 @@ fn a_box_dragged_across_the_outline_and_the_graph_selects_rows_and_keys() { ids.push(id); } s.execute("layer.select", json!({"layers": ids})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -138,7 +138,7 @@ fn rows_harness() -> (Harness<'static, EffectcraftApp>, Vec) { ids.push(id); } s.execute("layer.select", json!({"layers": ids})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_timeline_pan.rs b/crates/ui-egui/tests/it/ui_timeline_pan.rs index 56bbd8a45..88cf0d636 100644 --- a/crates/ui-egui/tests/it/ui_timeline_pan.rs +++ b/crates/ui-egui/tests/it/ui_timeline_pan.rs @@ -18,7 +18,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64) { } s.execute("layer.select", json!({"layers": []})).unwrap(); let app = EffectcraftApp::new(s); - let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, top) } diff --git a/crates/ui-egui/tests/it/ui_timeline_shapes.rs b/crates/ui-egui/tests/it/ui_timeline_shapes.rs index 6a7f50a10..05a814d87 100644 --- a/crates/ui-egui/tests/it/ui_timeline_shapes.rs +++ b/crates/ui-egui/tests/it/ui_timeline_shapes.rs @@ -13,7 +13,7 @@ use egui_kittest::kittest::Queryable; use serde_json::json; fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_timeline_switches.rs b/crates/ui-egui/tests/it/ui_timeline_switches.rs index ea0798d93..1b0877666 100644 --- a/crates/ui-egui/tests/it/ui_timeline_switches.rs +++ b/crates/ui-egui/tests/it/ui_timeline_switches.rs @@ -22,7 +22,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec) { .collect(); ids.reverse(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, ids) } @@ -219,7 +219,7 @@ fn the_bar_past_the_source_end_is_striped() { s.execute("comp.new", json!({"name": "Inner", "width": 64, "height": 64, "frameRate": 30, "duration": 2})).unwrap(); s.execute("comp.new", json!({"name": "Outer", "width": 64, "height": 64, "frameRate": 30, "duration": 4})).unwrap(); let l = s.execute("layer.addItem", json!({"item": "Inner"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let past = format!("timeline.layer.{l}.bar.afterSource"); assert!(h.state().auto.find(&past).is_none(), "the source fills the whole bar"); diff --git a/crates/ui-egui/tests/it/ui_timeline_trim.rs b/crates/ui-egui/tests/it/ui_timeline_trim.rs index 9aaf1f500..b5f3dcff4 100644 --- a/crates/ui-egui/tests/it/ui_timeline_trim.rs +++ b/crates/ui-egui/tests/it/ui_timeline_trim.rs @@ -20,7 +20,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("layer.timing", json!({"layers": [pre], "in": 3.0, "out": 7.0})).unwrap(); s.execute("layer.select", json!({"layers": []})).unwrap(); let app = EffectcraftApp::new(s); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); (h, solid, pre) } diff --git a/crates/ui-egui/tests/it/ui_timeline_zoom.rs b/crates/ui-egui/tests/it/ui_timeline_zoom.rs index 76f55740a..56c9c7f9f 100644 --- a/crates/ui-egui/tests/it/ui_timeline_zoom.rs +++ b/crates/ui-egui/tests/it/ui_timeline_zoom.rs @@ -16,7 +16,7 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64) { let layer = s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap()["layer"].as_u64().unwrap(); let mut app = EffectcraftApp::new(s); app.ui.timeline.pps = Some(200.0); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); (h, layer) } @@ -273,7 +273,7 @@ fn shift_dragging_the_work_area_snaps_to_the_current_time() { s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); let mut app = EffectcraftApp::new(s); app.ui.timeline.pps = Some(100.0); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| app); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); let reset = |h: &mut Harness<'_, EffectcraftApp>| { h.state_mut().session.execute("comp.workArea", json!({"start": 1.0, "end": 4.0})).unwrap(); h.state_mut().session.execute("time.set", json!({"time": 6.0})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_toolbar_gradient.rs b/crates/ui-egui/tests/it/ui_toolbar_gradient.rs index b5682ffae..047fdb863 100644 --- a/crates/ui-egui/tests/it/ui_toolbar_gradient.rs +++ b/crates/ui-egui/tests/it/ui_toolbar_gradient.rs @@ -38,7 +38,7 @@ fn setup(items: &[&str], tool: serde_json::Value, select: bool) -> (Harness<'sta } s.state.selected_layers = if select { vec![LayerId(l)] } else { vec![] }; s.state.selected_props.clear(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); // With no shape layer selected, Fill / Stroke show while a shape tool is active. if !select { h.state_mut().ui.tool = Tool::Rectangle; diff --git a/crates/ui-egui/tests/it/ui_tracker.rs b/crates/ui-egui/tests/it/ui_tracker.rs index b4e4bf051..2aab9d3e8 100644 --- a/crates/ui-egui/tests/it/ui_tracker.rs +++ b/crates/ui-egui/tests/it/ui_tracker.rs @@ -27,7 +27,7 @@ fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { #[test] fn tracker_panel_and_track_point_widgets() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().show_panel(PanelKind::Tracker); h.run_steps(3); let all = ids(&h); @@ -140,7 +140,7 @@ fn zoomed_out_track_point_can_be_grabbed() { s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); s.execute("layer.select", json!({"layers": ["Plate"]})).unwrap(); s.execute("track.motion", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().ui.viewer.zoom = Some(mag); diff --git a/crates/ui-egui/tests/it/ui_unreadable_footage.rs b/crates/ui-egui/tests/it/ui_unreadable_footage.rs index 4d283d62d..fd99cdd25 100644 --- a/crates/ui-egui/tests/it/ui_unreadable_footage.rs +++ b/crates/ui-egui/tests/it/ui_unreadable_footage.rs @@ -50,7 +50,7 @@ fn harness(broken: fn(&Footage) -> bool, proxy: Option) -> (Harness<'st fn open(mut s: Session) -> Harness<'static, EffectcraftApp> { s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h } diff --git a/crates/ui-egui/tests/it/ui_video_preview_off.rs b/crates/ui-egui/tests/it/ui_video_preview_off.rs index 37a35f856..257885ab6 100644 --- a/crates/ui-egui/tests/it/ui_video_preview_off.rs +++ b/crates/ui-egui/tests/it/ui_video_preview_off.rs @@ -19,7 +19,7 @@ fn an_audio_only_preview_says_video_preview_is_off() { s.execute("comp.new", json!({"name": "Muted", "width": 320, "height": 180, "duration": 10})).unwrap(); let sc = s.prefs.preview.current; s.prefs.preview.get_mut(sc).include_video = false; - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); let chip = |h: &Harness<'_, EffectcraftApp>| h.ctx.data(|d| d.get_temp::(egui::Id::unique("viewer-video-off-chip"))); assert!(chip(&h).is_none()); diff --git a/crates/ui-egui/tests/it/ui_view_layout.rs b/crates/ui-egui/tests/it/ui_view_layout.rs index a6af5c688..05222dd9f 100644 --- a/crates/ui-egui/tests/it/ui_view_layout.rs +++ b/crates/ui-egui/tests/it/ui_view_layout.rs @@ -11,7 +11,7 @@ fn harness(comp: Option<&str>) -> Harness<'static, EffectcraftApp> { if let Some(comp) = comp { s.execute("comp.open", json!({"comp": comp})).unwrap(); } - Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)) + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)) } /// Click the centre of the automation element `id`. diff --git a/crates/ui-egui/tests/it/ui_viewer.rs b/crates/ui-egui/tests/it/ui_viewer.rs index 6dee87535..3a89c036d 100644 --- a/crates/ui-egui/tests/it/ui_viewer.rs +++ b/crates/ui-egui/tests/it/ui_viewer.rs @@ -23,7 +23,7 @@ fn app() -> EffectcraftApp { } fn harness() -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| app()); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.run_steps(3); h } @@ -127,7 +127,7 @@ fn selection_harness() -> Harness<'static, EffectcraftApp> { s.execute("layer.newSolid", json!({"name": name, "color": "#406080", "width": 80, "height": 80})).unwrap(); } s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -285,7 +285,7 @@ fn viewer_double_click_opens_the_topmost_layer_over_a_selected_one() { s.execute("layer.addItem", json!({"item": "Inner"})).unwrap(); let back = s.active_comp().unwrap().layers[1].id; s.execute("layer.select", json!({"layers": [back.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(40); let at = screen(&h, [320.0, 180.0]); h.input_mut().events.push(Event::PointerMoved(at)); @@ -3008,7 +3008,7 @@ fn full_resolution_frames_wider_than_the_texture_limit_fit() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Wide", "width": 2400, "height": 400, "duration": 1})).unwrap(); s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); // (egui's font atlas needs 1024.) h.input_mut().max_texture_side = Some(1024); h.state_mut().session.execute("view.res.full", json!({})).unwrap(); @@ -3115,7 +3115,7 @@ fn frame_sits_on_the_physical_pixel_grid() { for ppp in [1.0f32, 1.25, 1.5] { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Grid", "width": 301, "height": 201, "duration": 1})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(ppp).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(ppp).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); for (mag, pan) in [(1.0f32, [0.3f32, 0.37]), (2.0, [-0.45, 0.2])] { h.state_mut().ui.viewer.zoom = Some(mag / ppp); @@ -3145,7 +3145,7 @@ fn fit_up_to_100_follows_the_maximized_panel() { h.run_steps(2); }; // A comp larger than the panel: it fills the docked panel, then the maximized one. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| { + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Big", "width": 3840, "height": 2160, "duration": 4})).unwrap(); EffectcraftApp::new(s) @@ -3505,7 +3505,7 @@ fn null_eye_hides_it_in_the_viewer() { s.execute("comp.new", json!({"name": "Nulls", "width": 640, "height": 360, "duration": 4})).unwrap(); let n = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.select", json!({"layers": [n]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); let handle = format!("viewer.handle.{n}.0"); let eye = format!("timeline.layer.{n}.video"); @@ -3541,7 +3541,7 @@ fn unselected_null_keeps_its_outline() { s.execute("comp.new", json!({"name": "Nulls", "width": 640, "height": 360, "duration": 4})).unwrap(); let n = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.select", json!({"layers": [n]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); // Use the selected box's actual geometry, so transformed nulls use the same outline. let corners: Vec = (0..4).map(|i| rect(&h, &format!("viewer.handle.{n}.{i}")).center()).collect(); diff --git a/crates/ui-egui/tests/it/ui_viewer_trackpad.rs b/crates/ui-egui/tests/it/ui_viewer_trackpad.rs index 55466371a..a45e2643d 100644 --- a/crates/ui-egui/tests/it/ui_viewer_trackpad.rs +++ b/crates/ui-egui/tests/it/ui_viewer_trackpad.rs @@ -11,7 +11,7 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "View", "width": 640, "height": 360, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_viewers.rs b/crates/ui-egui/tests/it/ui_viewers.rs index fc8857198..122f29a3d 100644 --- a/crates/ui-egui/tests/it/ui_viewers.rs +++ b/crates/ui-egui/tests/it/ui_viewers.rs @@ -65,7 +65,7 @@ fn new_viewers_lock_route_comps_and_activate_on_click() { let c = new_comp(&mut s, "C"); let b = new_comp(&mut s, "B"); let a = new_comp(&mut s, "A"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); // View ▸ New Viewer: viewer 1 shows A too, viewer 0 (the Composition panel) is locked. invoke(&mut h, "view.newViewer", json!({})); @@ -127,7 +127,7 @@ fn a_locked_viewer_keeps_its_comp_when_the_project_panel_opens_another() { let mut s = Session::default(); let b = new_comp(&mut s, "B"); let a = new_comp(&mut s, "A"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); // Viewer 0 locked to A, and B in viewer 1 (a tab next to it). invoke(&mut h, "view.newViewer", json!({})); @@ -150,7 +150,7 @@ fn viewers_snapshot() { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); let other = s.project.items.values().filter(|i| i.as_comp().is_some()).map(|i| i.id).find(|id| Some(*id) != s.active_comp_id()).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); invoke(&mut h, "view.newViewer", json!({})); h.state_mut() diff --git a/crates/ui-egui/tests/it/ui_visual_review.rs b/crates/ui-egui/tests/it/ui_visual_review.rs index 6d079f1f5..27f328b95 100644 --- a/crates/ui-egui/tests/it/ui_visual_review.rs +++ b/crates/ui-egui/tests/it/ui_visual_review.rs @@ -18,7 +18,7 @@ fn all_ui_review_captures() { s.execute("layer.newSolid", json!({"name":"Plate","color":"#406080","width":160,"height":120})).unwrap(); s.execute("renderQueue.add", json!({"format":"png","output":"review-[#####].png"})).unwrap(); std::sync::Arc::make_mut(&mut s.project).settings.gpu_acceleration = false; - let mut h = Harness::builder().with_size(size).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(size).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h.render_serialized().unwrap().save(out.join(format!("{label}-workspace.png"))).unwrap(); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_web_gpu_storage.rs b/crates/ui-egui/tests/it/ui_web_gpu_storage.rs index 694d98507..228d26a6c 100644 --- a/crates/ui-egui/tests/it/ui_web_gpu_storage.rs +++ b/crates/ui-egui/tests/it/ui_web_gpu_storage.rs @@ -231,7 +231,7 @@ fn settings_disk_page_shows_the_browser_storage_manager() { let mut s = Session::default(); let host = Arc::new(Storage::default()); s.storage = Some(host.clone()); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(2); effectcraft_ui_egui::panels::settings::open(h.state_mut(), "disk"); h.run_steps(3); @@ -252,7 +252,7 @@ fn settings_disk_page_shows_the_browser_storage_manager() { assert_eq!(*host.cleared.lock().unwrap(), vec!["diskCache".to_string()]); assert!(*host.persist_asked.lock().unwrap()); // Without a host (the desktop) the section is not there. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(2); effectcraft_ui_egui::panels::settings::open(h.state_mut(), "disk"); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_web_offload.rs b/crates/ui-egui/tests/it/ui_web_offload.rs index fde177cb6..a3456a355 100644 --- a/crates/ui-egui/tests/it/ui_web_offload.rs +++ b/crates/ui-egui/tests/it/ui_web_offload.rs @@ -193,7 +193,7 @@ fn waiting_commands_reply_when_their_offloaded_job_ends() { s.execute("layer.newSolid", json!({"color": "#406080"})).unwrap(); s.execute("renderQueue.add", json!({"format": "gif", "output": "/w.gif"})).unwrap(); let (tx, rx) = std::sync::mpsc::channel(); - let mut h = Harness::builder().with_size(egui::vec2(1280.0, 800.0)).build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); + let mut h = Harness::builder().with_size(egui::vec2(1280.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); h.run_steps(2); // `renderQueue.render` waits by default: the job goes to the worker, the reply waits. let (req, reply) = ControlRequest::new("engine.execute", json!({"command": "renderQueue.render", "params": {}})); diff --git a/crates/ui-egui/tests/it/ui_window_title.rs b/crates/ui-egui/tests/it/ui_window_title.rs index 66ef62235..66b0991b2 100644 --- a/crates/ui-egui/tests/it/ui_window_title.rs +++ b/crates/ui-egui/tests/it/ui_window_title.rs @@ -9,7 +9,7 @@ use serde_json::json; #[test] fn the_reported_title_follows_the_open_document() { - let mut h = Harness::builder().with_size(vec2(800.0, 600.0)).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(vec2(800.0, 600.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); let clean = h.state().window_title().to_owned(); assert!(clean.starts_with("EffectCraft - ") && !clean.ends_with(" *"), "{clean}"); diff --git a/crates/ui-egui/tests/it/ui_workflow_selection.rs b/crates/ui-egui/tests/it/ui_workflow_selection.rs index e7bcedb60..46fda276a 100644 --- a/crates/ui-egui/tests/it/ui_workflow_selection.rs +++ b/crates/ui-egui/tests/it/ui_workflow_selection.rs @@ -14,7 +14,7 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("layer.newSolid", json!({"name":format!("Tile {n}"),"width":80,"height":80,"color":"#406080"})).unwrap(); } s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -389,7 +389,7 @@ fn project_edit_commands_do_not_target_timeline_layers() { #[test] fn compact_settings_keeps_confirmation_buttons_clickable() { - let mut h = Harness::builder().with_size(vec2(1024.0, 768.0)).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder().with_size(vec2(1024.0, 768.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); h.state_mut().dialog = Some(effectcraft_ui_egui::Dialog::Settings); h.run_steps(4); h.get_by_label(" OK ").click(); @@ -607,7 +607,7 @@ fn timeline_context_menu_creates_shapes_and_masks_from_text() { s.execute("edit.deselectAll", json!({})).unwrap(); let text = s.active_comp().unwrap().layers.iter().find(|l| matches!(l.source, LayerSource::Text)).unwrap().id.0; let plate = s.active_comp().unwrap().layers.iter().find(|l| l.name == "Plate").unwrap().id.0; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let row = |h: &Harness<'_, EffectcraftApp>, id: u64| { let r = rect(h, &format!("timeline.layer.{id}.row")); @@ -663,7 +663,7 @@ fn layer_context_menus_offer_create_shapes_from_vector_layer_for_vector_footage( let logo = s.execute("layer.addItem", json!({"item": item})).unwrap()["layer"].as_u64().unwrap(); let plate = s.execute("layer.newSolid", json!({"name":"Plate","width":40,"height":40,"color":"#406080"})).unwrap()["layer"].as_u64().unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let right_click = |h: &mut Harness<'_, EffectcraftApp>, p: Pos2| { for pressed in [true, false] { diff --git a/crates/ui-egui/tests/it/ui_workspace_focus.rs b/crates/ui-egui/tests/it/ui_workspace_focus.rs index 338c8c2b7..62a5498b2 100644 --- a/crates/ui-egui/tests/it/ui_workspace_focus.rs +++ b/crates/ui-egui/tests/it/ui_workspace_focus.rs @@ -154,7 +154,7 @@ fn tab_and_shift_tab_traverse_toolbar_and_space_activates_only_focused_tool() { let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; app.ui.show_menu_bar = false; - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).build_eframe(move |_| app); + let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); for _ in 0..8 { key(&mut h, Key::Tab, Modifiers::NONE); @@ -202,7 +202,7 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { { *size = SplitSize::FixedFirst(420.0); } - let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).build_eframe(move |_| app); + let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); assert!(h.state().auto.find("panel.tab.EffectControls").is_some(), "the inactive tab must be visible in this fixture"); let before = h.state().ui.dock.clone(); @@ -255,7 +255,7 @@ impl ControlDriver { let mut app = EffectcraftApp::new(Session::default()).with_control(rx); app.ui.start_screen = false; app.ui.show_menu_bar = false; - let mut driver = Self { h: Harness::builder().with_size(vec2(1200.0, 760.0)).build_eframe(move |_| app), tx }; + let mut driver = Self { h: Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app), tx }; driver.frames(4, true); driver.ok("engine.execute", json!({"command":"comp.new", "params":{"name":"Native Validation", "width":160,"height":90,"duration":1}}), true); driver.ok("engine.execute", json!({"command":"layer.newSolid", "params":{"name":"Validation Red","color":"#ff0000"}}), true); @@ -352,6 +352,7 @@ fn unowned_tab_keeps_the_timeline_mini_flowchart_shortcut() { let mut app = EffectcraftApp::new(session); app.ui.focused = PanelKind::Timeline; let ctx = egui::Context::default(); + effectcraft_ui_egui::framework::install_headless(&ctx); let raw = egui::RawInput { events: vec![egui::Event::Key { key: Key::Tab, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::NONE }], ..Default::default() diff --git a/crates/ui-egui/tests/it/viewer_geometry.rs b/crates/ui-egui/tests/it/viewer_geometry.rs index 72ee46013..d6f8cd190 100644 --- a/crates/ui-egui/tests/it/viewer_geometry.rs +++ b/crates/ui-egui/tests/it/viewer_geometry.rs @@ -26,7 +26,10 @@ fn harness_at_scale(width: f32, kind: ThemeKind, scale: f32) -> Harness<'static, let mut h = Harness::builder() .with_size(vec2(width, 360.0)) .with_pixels_per_point(scale) - .with_context_setup(move |ctx| theme::install(ctx, &tokens, "en")) + .with_context_setup(move |ctx| { + effectcraft_ui_egui::framework::install_headless(ctx); + theme::install(ctx, &tokens, "en"); + }) .build_ui_state( |ui, app: &mut EffectcraftApp| { app.auto.begin_frame(); From 6ebf9b8e520ec8f59116cfaa7397e3f21ff433d3 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:56:09 +0000 Subject: [PATCH 06/39] dock: built-in workspaces through next's model constructors --- crates/ui-egui/src/dock.rs | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index b08d06349..3d4c70690 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -186,25 +186,34 @@ pub fn permissions(_panel: &PanelKind) -> Permissions { /// A tab group. pub fn tabs(p: &[PanelKind], active: usize) -> Node { - Node::Tabs { panels: p.to_vec(), active } + Node::tabs(p.to_vec(), active) } /// Stacked panels: (panel, open, height). Open entries share the stack's height in proportion to /// their heights; an entry without one counts as craft-ui's `DockStyle::min_pane` (40). pub fn stack(e: &[(PanelKind, bool, Option)]) -> Node { - Node::Stack { entries: e.iter().map(|&(panel, open, height)| StackEntry { panel, open, height }).collect() } + Node::stack( + e.iter() + .map(|&(panel, open, height)| { + let mut entry = StackEntry::new(panel); + entry.open = open; + entry.height = height; + entry + }) + .collect(), + ) } /// Two frames side by side. pub fn hsplit(size: SplitSize, a: Node, b: Node) -> Node { - Node::Split { axis: Axis::X, size, first: Box::new(a), second: Box::new(b) } + Node::split(Axis::X, size, a, b) } /// Two frames one above the other. pub fn vsplit(size: SplitSize, a: Node, b: Node) -> Node { - Node::Split { axis: Axis::Y, size, first: Box::new(a), second: Box::new(b) } + Node::split(Axis::Y, size, a, b) } /// A workspace of just `root`, with no floating windows. pub fn docked(root: Node) -> Workspace { - Workspace::new(Layout { root: Some(root), floating: Vec::new() }) + Workspace::new(Layout::new(Some(root), Vec::new())) } /// The built-in workspaces: After Effects 2026's (Window ▸ Workspace), less Libraries (an Adobe @@ -234,7 +243,9 @@ pub const WORKSPACES: &[&str] = &[ /// id, so a built-in layout built again is the same set of windows. fn workspace_floating(name: &str) -> Vec> { use PanelKind::*; - let f = |id: u64, panels: &[PanelKind], rect: [f32; 4]| Floating::single(panels.to_vec(), 0, rect).with_id(id); + let f = |id: u64, panels: &[PanelKind], [x, y, w, h]: [f32; 4]| { + Floating::single(id, panels.to_vec(), 0, Rect::from_min_size(pos2(x, y), vec2(w, h))) + }; match name { "Undocked Panels" => vec![ f(1, &[Project, EffectControls], [24.0, 110.0, 320.0, 420.0]), @@ -254,7 +265,7 @@ pub const PREVIEW_FRAME: f32 = TAB_STRIP + 46.0; /// The built-in layout of a named workspace (an unknown name gets Default's). pub fn workspace(name: &str) -> Layout { - Layout { root: Some(workspace_root(name)), floating: workspace_floating(name) } + Layout::new(Some(workspace_root(name)), workspace_floating(name)) } /// The docked tree of a named workspace. From 440a48bf5cea8fc7fd9ad3d53933b50184f50c6c Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:56:20 +0000 Subject: [PATCH 07/39] dock: workspace queries through next's accessors; floating windows are columns --- crates/ui-egui/src/dock.rs | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index 3d4c70690..1a4e59783 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -464,25 +464,33 @@ fn node_group(node: &Node, p: PanelKind) -> Option> { impl WorkspaceExt for Workspace { fn is_docked(&self, p: PanelKind) -> bool { - self.layout.root.as_ref().is_some_and(|root| node_group(root, p).is_some()) + self.layout().root.as_ref().is_some_and(|root| node_group(root, p).is_some()) } fn is_floating(&self, p: PanelKind) -> bool { - self.layout.floating.iter().any(|w| w.contains(&p)) + self.layout().floating.iter().any(|w| w.contains(&p)) } fn is_open(&self, p: PanelKind) -> bool { - self.layout.contains(&p) + self.layout().contains(&p) } fn is_visible(&self, p: PanelKind) -> bool { - self.layout.panel_state(&p) == PanelState::Front + self.layout().panel_state(&p) == PanelState::Front } fn group_of(&self, p: PanelKind) -> Vec { - self.layout.root.iter().chain(self.layout.floating.iter().map(|w| &w.root)).find_map(|node| node_group(node, p)).unwrap_or_default() + let layout = self.layout(); + layout + .root + .as_ref() + .and_then(|root| node_group(root, p)) + .or_else(|| layout.floating.iter().flat_map(|w| w.groups()).find(|g| g.panels.contains(&p)).map(|g| g.panels.clone())) + .unwrap_or_default() } fn panels(&self) -> Vec { + let layout = self.layout(); let mut out = Vec::new(); - for node in self.layout.root.iter().chain(self.layout.floating.iter().map(|w| &w.root)) { - node_panels(node, &mut out); + if let Some(root) = &layout.root { + node_panels(root, &mut out); } + out.extend(layout.floating.iter().flat_map(|w| w.panels().copied())); out } } @@ -490,12 +498,7 @@ impl WorkspaceExt for Workspace { /// Every panel a workspace names: open, or closed with a recorded place. pub fn referenced_panels(workspace: &Workspace) -> Vec { let mut out = workspace.panels(); - out.extend(workspace.hidden.iter().map(|(p, _)| *p)); - if let Some(saved) = &workspace.saved { - for node in saved.root.iter().chain(saved.floating.iter().map(|w| &w.root)) { - node_panels(node, &mut out); - } - } + out.extend(workspace.hidden().iter().map(|(p, _)| *p)); out } From fa3b952882016f20cf0bd492e3989c2940904e2c Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 16:57:36 +0000 Subject: [PATCH 08/39] Cargo.lock: craft-host, craft-keymap, craft-theme and craft-window as direct dependencies of the UI crate --- Cargo.lock | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed23309d2..544dbab0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1794,7 +1794,6 @@ version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" dependencies = [ "dispatch2", - "egui", "objc2 0.6.5", "objc2-app-kit 0.3.2", "wasm-bindgen", @@ -3105,10 +3104,13 @@ dependencies = [ "bytemuck", "chrono", "craft-behavior", + "craft-host", + "craft-keymap", "craft-mime", - "craft-quit", + "craft-theme", "craft-ui", "craft-update", + "craft-window", "effectcraft-color", "effectcraft-engine", "effectcraft-geom", From 96af635ca504af014fc7ccbc19f7f07a07110e36 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 18:59:23 +0000 Subject: [PATCH 09/39] Repin craft-libs to dock-gaps 9fd8b0cdaa --- Cargo.lock | 182 +++++++++++++++++++------------------- Cargo.toml | 72 +++++++-------- crates/effects/Cargo.toml | 2 +- 3 files changed, 128 insertions(+), 128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 544dbab0c..3424e6e7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1315,12 +1315,12 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "rustix 1.1.6", ] @@ -1351,10 +1351,10 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "log", "thiserror 2.0.21", ] @@ -1362,7 +1362,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1385,7 +1385,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "egui", ] @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "md-5", "rayon", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" [[package]] name = "craft-color" @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "serde", ] @@ -1423,7 +1423,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "serde", ] @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "thiserror 2.0.21", ] @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "serde", "serde_json", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" [[package]] name = "craft-exr" @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "exr", "flate2", @@ -1497,7 +1497,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" [[package]] name = "craft-frame" @@ -1527,10 +1527,10 @@ dependencies = [ [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "rayon", "serde", ] @@ -1538,7 +1538,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "gif", "image", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "chrono", "fixed_decimal", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "serde_json", ] @@ -1612,13 +1612,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-host", "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "egui", "serde", "serde_json", @@ -1627,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-zip", "serde_json", @@ -1646,7 +1646,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1669,14 +1669,14 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "serde", "thiserror 2.0.21", ] @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "chrono", "craft-codepage", @@ -1704,7 +1704,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "flate2", "serde", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "hayro-syntax", "serde", @@ -1725,7 +1725,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "async-channel", "async-io", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-eps", "kurbo", @@ -1780,7 +1780,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "encoding_rs", "flate2", @@ -1791,7 +1791,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1817,7 +1817,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-atomic", "craft-host", @@ -1839,9 +1839,9 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "thiserror 2.0.21", ] @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1905,7 +1905,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "serde", "thiserror 2.0.21", @@ -1925,9 +1925,9 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "serde", "web-time", ] @@ -1935,12 +1935,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1954,7 +1954,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-behavior", "craft-i18n", @@ -1970,7 +1970,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "accesskit", "craft-behavior", @@ -2008,7 +2008,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-behavior", "craft-host", @@ -2037,7 +2037,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-behavior", "craft-host", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-behavior", "craft-host", @@ -2078,7 +2078,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-behavior", "craft-host", @@ -2097,7 +2097,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "chrono", "craft-host", @@ -2126,7 +2126,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "flate2", "serde", @@ -2148,9 +2148,9 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "rav1e", "rayon", "thiserror 2.0.21", @@ -2159,7 +2159,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "image", "thiserror 2.0.21", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "winsafe", ] @@ -2176,7 +2176,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "craft-appkit", "craft-atomic", @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "thiserror 2.0.21", ] @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2688,12 +2688,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2803,7 +2803,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2854,17 +2854,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2969,7 +2969,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "miniz_oxide 0.9.1", ] @@ -2977,7 +2977,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -4374,7 +4374,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "hayro-ccitt", ] @@ -4388,7 +4388,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=3ad64a26ea8a72c03c416681e14f7744393790b1#3ad64a26ea8a72c03c416681e14f7744393790b1" +source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index a3a717b1e..edc4ed8e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -236,8 +236,8 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1", version = "=0.3.0" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", version = "=0.3.0" } 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" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index 1c4ea0b7a..a36022fb9 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3ad64a26ea8a72c03c416681e14f7744393790b1" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } From 74ba361444deb70832bd2369b662eac8bc213b36 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 19:17:33 +0000 Subject: [PATCH 10/39] dock: EffectCraft's panels on next's DockArea - dock_ui: DockArea over the given workspace (one Arc kept while equal), a Tracked spec model (tab names, label swatches, the Timeline's comps as panel documents), EffectCraft's lock and panel menu in each group header, DockConfig from the old style flags (side edge zones, Maximize Frame, Close Other Panels in Group, float on empty drop, title bars only move, wheel selects tabs, tab close buttons, native windows), DockArea::raise for a floating panel shown by a command, window_files per panel, automation ids from DockAreaOutput::sources. - dock_command: the window.panel.* and ui.dock vocabulary, app-local. - Lock Workspace is UiState::dock_locked, saved in the workspaces file; an earlier file's own workspace lock carries over once. - Native window places of earlier files are dropped: the dock places its OS windows again (native_outer and the place sanitizing go). - Floating-window keys and text-field edits go through the window host. - Tests: next's constructors; ui_dock_resize goes (divider geometry is the dock's own behaviour, with its trials). --- crates/ui-egui/Cargo.toml | 2 +- crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/app/frame.rs | 2 +- crates/ui-egui/src/app/window.rs | 19 +- crates/ui-egui/src/dock.rs | 214 +---- crates/ui-egui/src/dock_command.rs | 466 ++++++++++ crates/ui-egui/src/dock_ui.rs | 823 +++++++++--------- crates/ui-egui/src/lib.rs | 5 +- crates/ui-egui/src/menus/entries.rs | 2 +- crates/ui-egui/src/menus/frontend.rs | 4 - crates/ui-egui/src/menus/invoke.rs | 18 +- crates/ui-egui/src/menus/tests.rs | 34 +- crates/ui-egui/src/native_menu.rs | 39 +- crates/ui-egui/src/panels.rs | 4 +- .../ui-egui/src/panels/viewer_text/tests.rs | 10 +- crates/ui-egui/src/panels/viewers.rs | 2 +- crates/ui-egui/src/state.rs | 10 +- crates/ui-egui/src/workspace_state.rs | 40 +- crates/ui-egui/src/workspace_state/legacy.rs | 68 +- crates/ui-egui/src/workspace_state/tests.rs | 121 ++- crates/ui-egui/tests/it/main.rs | 1 - crates/ui-egui/tests/it/shared_docking_ui.rs | 97 ++- crates/ui-egui/tests/it/ui_dock_resize.rs | 85 -- crates/ui-egui/tests/it/ui_effect_controls.rs | 137 ++- crates/ui-egui/tests/it/ui_panel_focus.rs | 9 +- crates/ui-egui/tests/it/ui_panel_windows.rs | 39 +- crates/ui-egui/tests/it/ui_scrolling.rs | 6 +- crates/ui-egui/tests/it/ui_tabs.rs | 16 +- crates/ui-egui/tests/it/ui_viewers.rs | 39 +- crates/ui-egui/tests/it/ui_workspace_focus.rs | 76 +- docs/control-protocol.md | 22 +- 31 files changed, 1304 insertions(+), 1107 deletions(-) create mode 100644 crates/ui-egui/src/dock_command.rs delete mode 100644 crates/ui-egui/tests/it/ui_dock_resize.rs diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 2f3d940b0..d370a85c1 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -14,7 +14,7 @@ craft-mime = { workspace = true } craft-ui = { workspace = true } craft-behavior = { workspace = true } craft-host = { workspace = true } -craft-keymap = { workspace = true } +craft-keymap = { workspace = true, features = ["egui"] } craft-theme = { workspace = true } craft-window = { workspace = true } effectcraft-time = { workspace = true } diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 3fc3803ad..d4925756c 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -122,6 +122,7 @@ impl EffectcraftApp { native_viewports: vec![], unpublished_viewports: vec![], pending_panel_raise: None, + live_dock: Default::default(), home_thumbs: Default::default(), home_thumb_saved: None, window_title: String::new(), diff --git a/crates/ui-egui/src/app/frame.rs b/crates/ui-egui/src/app/frame.rs index cca733c7c..d93b5673b 100644 --- a/crates/ui-egui/src/app/frame.rs +++ b/crates/ui-egui/src/app/frame.rs @@ -309,7 +309,7 @@ impl EffectcraftApp { // A hidden window paints when work needs a UI pass: queued input and waits, a settled // screenshot, or playback into a child viewport. let focused = self.focused; - let child_viewports = !self.ui.dock.layout.floating.is_empty() || prefs_live::video_preview_active(self, focused); + let child_viewports = !self.ui.dock.layout().floating.is_empty() || prefs_live::video_preview_active(self, focused); let paint = self.want_paint || !self.synthetic.is_empty() || !self.input_waiters.is_empty() diff --git a/crates/ui-egui/src/app/window.rs b/crates/ui-egui/src/app/window.rs index e741932f4..4dabd6192 100644 --- a/crates/ui-egui/src/app/window.rs +++ b/crates/ui-egui/src/app/window.rs @@ -101,22 +101,23 @@ impl EffectcraftApp { } .filter(|q| self.ui.dock.is_open(*q)); let mut workspace = self.ui.dock.clone(); - let known = workspace.hidden.iter().any(|(q, _)| *q == p); + let known = workspace.hidden().iter().any(|(q, _)| *q == p); let opened = if p == PanelKind::Composition && near.is_none() && !known && self.ui.dock.is_docked(PanelKind::Timeline) { workspace .apply( - craft_behavior::dock::Action::OpenAt { - panel: p, - anchor: PanelKind::Timeline, - placement: craft_behavior::dock::DockPlacement::Split(craft_ui::docking::Zone::Top), - }, + craft_behavior::dock::Action::open_at( + p, + PanelKind::Timeline, + craft_behavior::dock::DockPlacement::Split(craft_behavior::DockSide::Top), + ), + self.ui.dock_locked, dock::permissions, ) .map(|_| ()) } else if known { - workspace.set_visible(p, true, near, dock::permissions) + workspace.set_visible(p, true, near, self.ui.dock_locked, dock::permissions) } else { - workspace.apply(craft_behavior::dock::Action::Open { panel: p, anchor: near }, dock::permissions).map(|_| ()) + workspace.apply(craft_behavior::dock::Action::open(p, near), self.ui.dock_locked, dock::permissions).map(|_| ()) }; match opened { Ok(()) => self.ui.dock = workspace, @@ -126,7 +127,7 @@ impl EffectcraftApp { } } } - let _ = self.ui.dock.apply(craft_behavior::dock::Action::Activate { panel: p }, dock::permissions); + let _ = self.ui.dock.apply(craft_behavior::dock::Action::activate(p), self.ui.dock_locked, dock::permissions); if self.ui.dock.is_floating(p) { self.pending_panel_raise = Some(p); } diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index 1a4e59783..c9f7d7275 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -1,15 +1,14 @@ //! EffectCraft's panels and built-in workspaces in craft-ui's shared docking model //! ([`craft_ui::docking`]): splits, tab groups, After Effects' stacked panels and floating //! windows. craft-ui owns the layout model, its validation and every transaction; EffectCraft -//! owns the panel ids, the built-in workspaces and the decorations of its tabs (the comp tabs of -//! the Timeline, label swatches and viewer locks). +//! owns the panel ids, the built-in workspaces and the viewer locks in its group headers. -use egui::{Align2, Rect, Sense, Stroke, pos2, vec2}; +use egui::{Align2, Rect, Sense, pos2, vec2}; use serde::{Deserialize, Serialize}; +pub use craft_behavior::dock::SplitSize; pub use craft_behavior::dock::{Floating, Node, PanelState, Permissions, StackEntry}; pub use craft_behavior::flow::Axis; -pub use craft_behavior::dock::SplitSize; use crate::icons::{self, Icon}; use crate::theme::Tokens; @@ -189,7 +188,7 @@ pub fn tabs(p: &[PanelKind], active: usize) -> Node { Node::tabs(p.to_vec(), active) } /// Stacked panels: (panel, open, height). Open entries share the stack's height in proportion to -/// their heights; an entry without one counts as craft-ui's `DockStyle::min_pane` (40). +/// their heights; an entry without one shares the stack's height with the others. pub fn stack(e: &[(PanelKind, bool, Option)]) -> Node { Node::stack( e.iter() @@ -243,9 +242,7 @@ pub const WORKSPACES: &[&str] = &[ /// id, so a built-in layout built again is the same set of windows. fn workspace_floating(name: &str) -> Vec> { use PanelKind::*; - let f = |id: u64, panels: &[PanelKind], [x, y, w, h]: [f32; 4]| { - Floating::single(id, panels.to_vec(), 0, Rect::from_min_size(pos2(x, y), vec2(w, h))) - }; + let f = |id: u64, panels: &[PanelKind], [x, y, w, h]: [f32; 4]| Floating::single(id, panels.to_vec(), 0, Rect::from_min_size(pos2(x, y), vec2(w, h))); match name { "Undocked Panels" => vec![ f(1, &[Project, EffectControls], [24.0, 110.0, 320.0, 420.0]), @@ -442,7 +439,7 @@ pub(crate) fn node_panels(node: &Node, out: &mut Vec) { node_panels(second, out); } Node::Tabs { panels, .. } => out.extend(panels.iter().copied()), - Node::Stack { entries } => out.extend(entries.iter().map(|e| e.panel)), + Node::Stack { entries, .. } => out.extend(entries.iter().map(|e| e.panel)), Node::Dock { columns, .. } => { for group in columns.iter().flat_map(|c| c.groups.iter()) { out.extend(group.panels.iter().copied()); @@ -456,7 +453,7 @@ fn node_group(node: &Node, p: PanelKind) -> Option> { match node { Node::Split { first, second, .. } => node_group(first, p).or_else(|| node_group(second, p)), Node::Tabs { panels, .. } => panels.contains(&p).then(|| panels.clone()), - Node::Stack { entries } => entries.iter().any(|e| e.panel == p).then(|| vec![p]), + Node::Stack { entries, .. } => entries.iter().any(|e| e.panel == p).then(|| vec![p]), Node::Dock { columns, .. } => columns.iter().flat_map(|c| c.groups.iter()).find(|g| g.panels.contains(&p)).map(|g| g.panels.clone()), _ => None, } @@ -521,176 +518,13 @@ pub fn stack_gutter_id(layout: &Layout, p: PanelKind) -> Option { path.pop(); found } - Node::Stack { entries } => entries.iter().position(|e| e.panel == p).map(|i| format!("dock.gutter.{path}s{i}")), + Node::Stack { entries, .. } => entries.iter().position(|e| e.panel == p).map(|i| format!("dock.gutter.{path}s{i}")), _ => None, } } rec(layout.root.as_ref()?, p, &mut String::new(), 0) } -/// One document a panel shows as a tab of its own (the Timeline: one tab per open comp, as in -/// After Effects). -#[derive(Debug, Clone, PartialEq)] -pub struct DocTab { - pub id: u64, - pub title: String, - /// The comp's label colour. - pub swatch: egui::Color32, - /// The document the panel shows now. - pub active: bool, -} - -/// What the Timeline's comp tabs did this frame. -#[derive(Debug, Clone, PartialEq)] -pub enum DocAction { - /// Show comp `id`. - Activate(u64), - /// Close comp `id`'s Timeline (its ×, or a middle click). - Close(u64), -} - -/// Room around a tab's label, as craft-ui gives its dock tabs. -const TAB_PADDING: f32 = 24.0; -/// Width of the » button that lists the comp tabs with no room in the strip. -const DOC_OVERFLOW: f32 = 22.0; -/// Room for the × after a comp's name. Every comp tab keeps it, so a tab keeps its width when it -/// is shown or hovered. -const DOC_CLOSE: f32 = 16.0; - -/// A comp tab's text: the label swatch, then the name, as the panel tabs with a swatch show it. -fn doc_job(doc: &DocTab, font: &egui::FontId, color: egui::Color32) -> egui::text::LayoutJob { - let mut job = egui::text::LayoutJob::default(); - job.append("\u{25a0} ", 0.0, egui::TextFormat::simple(font.clone(), doc.swatch)); - job.append(&doc.title, 0.0, egui::TextFormat::simple(font.clone(), color)); - job -} - -/// The width of one line of `job` at the fonts' current size. -fn text_width(ctx: &egui::Context, job: egui::text::LayoutJob) -> f32 { - ctx.fonts_mut(|f| f.layout_job(job)).size().x -} - -/// The width each comp tab asks for in the Timeline group's tab row. -pub fn doc_widths(ctx: &egui::Context, docs: &[DocTab], font: &egui::FontId) -> Vec { - docs.iter().map(|d| text_width(ctx, doc_job(d, font, egui::Color32::WHITE)) + TAB_PADDING + DOC_CLOSE).collect() -} - -/// The × of comp tab `doc` at `rect`, clipped to `clip`; true when clicked. `shown` is the comp -/// the Timeline shows while it is the group's shown panel. Automation: -/// `panel.tab.Timeline..close`, and `panel.tab.Timeline.close` for the shown comp's. -fn doc_close( - ui: &mut egui::Ui, - rect: Rect, - clip: Rect, - doc: &DocTab, - shown: bool, - style: &craft_ui::docking::DockStyle, - reg: &mut crate::automation::Registry, -) -> bool { - let timeline = PanelKind::Timeline.id(); - let hit = ui.interact(rect.expand(2.0), egui::Id::unique(("comp-tab-close", doc.id)), Sense::click()); - hit.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, hit.enabled(), "Close")); - let cc = if hit.hovered() { style.text } else { style.inactive_text }; - let k = 3.5; - let painter = ui.painter().with_clip_rect(clip); - painter.line_segment([rect.center() + vec2(-k, -k), rect.center() + vec2(k, k)], Stroke::new(1.2, cc)); - painter.line_segment([rect.center() + vec2(-k, k), rect.center() + vec2(k, -k)], Stroke::new(1.2, cc)); - reg.add_response(&format!("panel.tab.{timeline}.{}.close", doc.id), &hit, "Close"); - if shown { - reg.add_response(&format!("panel.tab.{timeline}.close"), &hit, "Close"); - } - hit.clicked() -} - -/// Draw the Timeline's comp tabs into `strip`, the part of the Timeline group's tab row after its -/// panel tabs. Each is a tab like the panel tabs: the comp's label swatch and name, then a × -/// that closes the comp's Timeline: always on the shown comp while the Timeline is the group's -/// shown panel (`selected`), on the other comp tabs while the pointer is over them. Tabs that do -/// not fit go to a » menu at the end; the shown comp's tab always stays in the row. Shift+, and -/// Shift+. step through every open comp. Automation: `panel.tab.Timeline.`, the ×s (see -/// [`doc_close`]), `panel.tab.Timeline.more` for », and `panel.tab.Timeline.more.` for its -/// items. -pub fn doc_tabs( - ui: &mut egui::Ui, - strip: Rect, - docs: &[DocTab], - selected: bool, - style: &craft_ui::docking::DockStyle, - reg: &mut crate::automation::Registry, -) -> Vec { - let mut out = Vec::new(); - let timeline = PanelKind::Timeline.id(); - let widths = doc_widths(ui.ctx(), docs, &style.font); - let active = docs.iter().position(|d| d.active).unwrap_or(0); - let fit = craft_ui::tabs::fit_whole(&widths, active, strip.width(), DOC_OVERFLOW); - let clip = strip.intersect(ui.clip_rect()); - let mid = strip.center().y; - let mut x = strip.min.x; - for (index, width) in &fit.shown { - let Some(doc) = docs.get(*index) else { continue }; - let tab = Rect::from_min_size(pos2(x, strip.min.y), vec2(*width, strip.height())); - x += width; - let on = selected && doc.active; - let color = if on { style.text } else { style.inactive_text }; - let mut job = doc_job(doc, &style.font, color); - job.wrap = egui::text::TextWrapping { - max_width: (tab.width() - TAB_PADDING - DOC_CLOSE).max(0.0), - max_rows: 1, - break_anywhere: true, - overflow_character: Some('\u{2026}'), - }; - let galley = ui.fonts_mut(|f| f.layout_job(job)); - let label_end = tab.min.x + TAB_PADDING * 0.5 + galley.size().x; - let resp = craft_ui::tabs::Tab::new(egui::Id::unique(("comp-tab", doc.id)), &doc.title, on).focus_stroke(Stroke::new(1.0, style.accent)).show_at( - ui, - tab, - |ui, response| { - let painter = ui.painter().with_clip_rect(tab.intersect(clip)); - painter.rect_filled(tab, 0.0, if on || response.hovered() { style.active_background } else { style.tab_background }); - painter.galley(pos2(tab.min.x + TAB_PADDING * 0.5, mid - galley.size().y * 0.5), galley.clone(), color); - }, - ); - let resp = if galley.elided { resp.on_hover_text(&doc.title) } else { resp }; - reg.add_response(&format!("panel.tab.{timeline}.{}", doc.id), &resp, &doc.title); - // After the tab, so the × takes the clicks over it. - if on || ui.rect_contains_pointer(tab.intersect(clip)) { - let cr = Rect::from_center_size(pos2(label_end + DOC_CLOSE / 2.0, mid), vec2(10.0, 10.0)); - if doc_close(ui, cr, tab.intersect(clip), doc, on, style, reg) { - out.push(DocAction::Close(doc.id)); - } - } - if resp.clicked() { - out.push(DocAction::Activate(doc.id)); - } - if resp.middle_clicked() { - out.push(DocAction::Close(doc.id)); - } - } - if !fit.overflow.is_empty() && fit.overflow_width > 0.0 { - let more = Rect::from_min_size(pos2(x, strip.min.y), vec2(fit.overflow_width, strip.height())); - let resp = ui.interact(more, egui::Id::unique("comp-tabs-more"), Sense::click()); - resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, resp.enabled(), "More compositions")); - reg.add_response(&format!("panel.tab.{timeline}.more"), &resp, "More compositions"); - let color = if resp.hovered() { style.text } else { style.inactive_text }; - ui.painter().with_clip_rect(more.intersect(clip)).text(more.center(), Align2::CENTER_CENTER, "\u{bb}", style.font.clone(), color); - egui::Popup::menu(&resp).show(|ui| { - egui::ScrollArea::vertical().max_height(360.0).show(ui, |ui| { - for index in &fit.overflow { - let Some(doc) = docs.get(*index) else { continue }; - let item = ui.button(doc_job(doc, &style.font, style.text)); - item.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, item.enabled(), &doc.title)); - reg.add_response(&format!("panel.tab.{timeline}.more.{}", doc.id), &item, &doc.title); - if item.clicked() { - out.push(DocAction::Activate(doc.id)); - ui.close(); - } - } - }); - }); - } - out -} - /// A panel lock button (Composition viewers and the Timeline keep their comp while locked, /// Effect Controls its layer): a closed padlock while locked, an open one while unlocked. /// Returns true when clicked. Automation: `panel.tab..lock`. @@ -718,11 +552,11 @@ pub fn placeholder(ui: &mut egui::Ui, rect: Rect, t: &Tokens, text: &str) { mod tests { use super::*; use PanelKind::*; + use craft_behavior::DockSide; use craft_behavior::dock::{Action, DockPlacement}; - use craft_ui::docking::Zone; fn apply(w: &mut Workspace, action: Action) { - w.apply(action, permissions).unwrap(); + w.apply(action, false, permissions).unwrap(); } /// Only the title changes: existing saved workspace layouts still deserialize. @@ -759,7 +593,7 @@ mod tests { } for name in WORKSPACES { let layout = workspace(name); - assert!(layout.root.iter().chain(layout.floating.iter().map(|f| &f.root)).all(no_stack), "{name}"); + assert!(layout.root.iter().all(no_stack), "{name}"); } } @@ -767,15 +601,13 @@ mod tests { fn default_right_column_is_a_short_preview_frame_over_the_properties_frame() { let default = workspace("Default"); let Some(Node::Split { second, size: SplitSize::FixedSecond(300.0), .. }) = &default.root else { panic!("{default:?}") }; - let Node::Split { axis: Axis::Y, size: SplitSize::FixedFirst(PREVIEW_FRAME), first, second } = second.as_ref() else { - panic!("{second:?}") - }; + let Node::Split { axis: Axis::Y, size: SplitSize::FixedFirst(PREVIEW_FRAME), first, second, .. } = second.as_ref() else { panic!("{second:?}") }; assert_eq!(**first, tabs(&[Preview], 0)); assert_eq!(**second, tabs(&[Properties, Align, Audio, EffectsPresets], 0)); let mut w = Workspace::new(default); assert!(w.is_visible(Preview) && w.is_visible(Properties) && !w.is_visible(Align)); // The Properties frame takes tabs; the Preview frame stays a frame of its own. - apply(&mut w, Action::Move { panel: Project, anchor: Properties, placement: DockPlacement::Tab { before: None } }); + apply(&mut w, Action::move_beside(Project, Properties, DockPlacement::tab(None))); assert_eq!(w.group_of(Project), vec![Properties, Align, Audio, EffectsPresets, Project]); assert_eq!(w.group_of(Preview), vec![Preview]); } @@ -783,35 +615,35 @@ mod tests { #[test] fn panels_split_off_and_join_tab_groups() { let mut w = docked(hsplit(SplitSize::FixedFirst(300.0), tabs(&[Project, EffectControls], 0), tabs(&[Composition, Layer], 0))); - apply(&mut w, Action::Move { panel: EffectControls, anchor: Composition, placement: DockPlacement::Split(Zone::Right) }); + apply(&mut w, Action::move_beside(EffectControls, Composition, DockPlacement::Split(DockSide::End))); assert_eq!(w.group_of(EffectControls), vec![EffectControls]); assert_eq!(w.group_of(Project), vec![Project]); - apply(&mut w, Action::Move { panel: EffectControls, anchor: Composition, placement: DockPlacement::Tab { before: Some(Layer) } }); + apply(&mut w, Action::move_beside(EffectControls, Composition, DockPlacement::tab(Some(Layer)))); assert_eq!(w.group_of(Composition), vec![Composition, EffectControls, Layer]); assert!(w.is_visible(EffectControls)); // A rejected move (onto itself, onto a closed panel) changes nothing. let before = w.clone(); - assert!(w.apply(Action::Move { panel: Project, anchor: Info, placement: DockPlacement::Split(Zone::Left) }, permissions).is_err()); + assert!(w.apply(Action::move_beside(Project, Info, DockPlacement::Split(DockSide::Start)), false, permissions).is_err()); assert_eq!(w, before); } #[test] fn closed_panels_reopen_where_they_were_docked_or_floating() { let mut w = Workspace::new(workspace("Standard")); - apply(&mut w, Action::Close { panel: Info }); + apply(&mut w, Action::close(Info)); assert!(!w.is_open(Info)); - w.set_visible(Info, true, None, permissions).unwrap(); + w.set_visible(Info, true, None, false, permissions).unwrap(); assert_eq!(w.group_of(Info), vec![Info, Audio]); - apply(&mut w, Action::Float { panel: Audio, rect: [40.0, 50.0, 300.0, 200.0] }); - apply(&mut w, Action::Close { panel: Audio }); - w.set_visible(Audio, true, None, permissions).unwrap(); + apply(&mut w, Action::float(Audio, Rect::from_min_size(pos2(40.0, 50.0), vec2(300.0, 200.0)))); + apply(&mut w, Action::close(Audio)); + w.set_visible(Audio, true, None, false, permissions).unwrap(); assert!(w.is_floating(Audio)); // Closing an earlier, inactive tab keeps the shown panel. let mut w = docked(tabs(&[Properties, Align, EffectsPresets], 2)); - apply(&mut w, Action::Close { panel: Properties }); + apply(&mut w, Action::close(Properties)); assert!(w.is_visible(EffectsPresets)); // A panel never laid out opens beside its anchor. - apply(&mut w, Action::Open { panel: History, anchor: Some(Align) }); + apply(&mut w, Action::open(History, Some(Align))); assert_eq!(w.group_of(History), vec![Align, EffectsPresets, History]); assert_eq!(referenced_panels(&w).iter().filter(|p| **p == Properties).count(), 1, "the closed panel is still known"); } diff --git a/crates/ui-egui/src/dock_command.rs b/crates/ui-egui/src/dock_command.rs new file mode 100644 index 000000000..35fd4fb7e --- /dev/null +++ b/crates/ui-egui/src/dock_command.rs @@ -0,0 +1,466 @@ +//! EffectCraft's docking command vocabulary: `window.panel.*` and `ui.dock`, as the control +//! channel, the menus and the dock area's own changes write them. Each command becomes the +//! craft-behavior layout actions it stands for on the current workspace. + +use craft_behavior::DockSide; +use craft_behavior::dock::{Action, DockEdge, DockError, DockPlacement, Layout, PanelPlace, SplitSize, Target, node_at}; +use craft_ui::docking::FloatSpace; +use egui::{Rect, pos2, vec2}; +use serde::{Deserialize, Deserializer}; + +use crate::dock::{Node, PanelKind, Workspace}; + +/// A drop zone by name. PascalCase names of the side zones also parse. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum ZoneName { + Tab, + #[serde(alias = "Center")] + Center, + #[serde(alias = "Left")] + Left, + #[serde(alias = "Right")] + Right, + #[serde(alias = "Top")] + Top, + #[serde(alias = "Bottom")] + Bottom, + Above, + Below, +} + +/// A present field, `null` included: `Some(None)` for `null`, `None` when absent. +fn present<'de, D: Deserializer<'de>, T: Deserialize<'de>>(deserializer: D) -> Result, D::Error> { + T::deserialize(deserializer).map(Some) +} + +/// A required field that may be `null`. +fn required<'de, D: Deserializer<'de>, T: Deserialize<'de>>(deserializer: D) -> Result { + T::deserialize(deserializer) +} + +/// A `ui.dock` operation, tagged by `operation`. Rects are `[x, y, width, height]`. +#[derive(Clone, Debug, PartialEq, Deserialize)] +#[serde(tag = "operation", rename_all = "camelCase")] +pub enum DockOperation { + Open { + panel: PanelKind, + }, + Close { + panel: PanelKind, + }, + Activate { + panel: PanelKind, + }, + Float { + panel: PanelKind, + rect: [f32; 4], + }, + MoveFloating { + panel: PanelKind, + rect: [f32; 4], + }, + /// `zone` defaults to `center`; `before` only applies to a center or tab move. + Move { + panel: PanelKind, + target: PanelKind, + #[serde(default)] + zone: Option, + #[serde(default, deserialize_with = "present")] + before: Option>, + }, + SetStackOpen { + panel: PanelKind, + open: bool, + }, + /// `height` is required; `null` clears it. + ResizeStack { + panel: PanelKind, + #[serde(deserialize_with = "required")] + height: Option, + }, + ResizeSplit { + path: Vec, + size: SplitSize, + }, +} + +/// `ui.dock`: a raw layout action or an operation. +#[derive(Clone, Debug, PartialEq, Deserialize)] +#[serde(untagged)] +pub enum UiDock { + Action { action: Action }, + Operation(DockOperation), +} + +/// A docking command, tagged by `command` (its id). +#[derive(Clone, Debug, PartialEq, Deserialize)] +#[serde(tag = "command")] +pub enum DockCommand { + /// A raw layout action. + #[serde(rename = "window.panel.layout")] + Layout { action: Action }, + /// Move a panel (or its group, with `group`) next to `anchor`; `zone` defaults to `tab`. + #[serde(rename = "window.panel.move")] + Move { + panel: PanelKind, + anchor: PanelKind, + #[serde(default)] + zone: Option, + #[serde(default, deserialize_with = "present")] + before: Option>, + #[serde(default)] + group: bool, + #[serde(default)] + placement: Option>, + }, + /// Float a panel, its group or its column; given values replace the rect's. + #[serde(rename = "window.panel.float")] + Float { + panel: PanelKind, + #[serde(default)] + x: Option, + #[serde(default)] + y: Option, + #[serde(default)] + width: Option, + #[serde(default)] + height: Option, + #[serde(default)] + group: bool, + #[serde(default)] + column: bool, + }, + /// Dock a panel: beside `anchor` in `zone` (default `tab`), as the last column of the dock on + /// `side`, along an outer edge (a side `zone` alone), or back into the docked layout. + #[serde(rename = "window.panel.dock")] + Dock { + panel: PanelKind, + #[serde(default)] + anchor: Option, + #[serde(default)] + zone: Option, + #[serde(default, deserialize_with = "present")] + before: Option>, + #[serde(default)] + group: bool, + #[serde(default)] + column: bool, + #[serde(default)] + side: Option, + }, + #[serde(rename = "window.panel.activate")] + Activate { panel: PanelKind }, + #[serde(rename = "window.panel.close")] + Close { panel: PanelKind }, + #[serde(rename = "window.panel.closeGroup")] + CloseGroup { panel: PanelKind }, + #[serde(rename = "window.panel.closeOthers")] + CloseOthers { panel: PanelKind }, + /// Minimize or restore the panel's group; without `minimized` it toggles. + #[serde(rename = "window.panel.minimize")] + Minimize { + panel: PanelKind, + #[serde(default)] + minimized: Option, + }, + /// Collapse the panel's column to icons or expand it; without `iconic` it toggles. + #[serde(rename = "window.panel.iconic")] + Iconic { + panel: PanelKind, + #[serde(default)] + iconic: Option, + }, + /// The panel in a floating window of its own (`native` true, the default) or docked again. + #[serde(rename = "window.panel.window")] + Window { + panel: PanelKind, + #[serde(default)] + native: Option, + }, + #[serde(rename = "ui.dock")] + UiDock(UiDock), +} + +/// The size a command floats a panel at when the dock has drawn nothing yet. +const DEFAULT_FLOAT: egui::Vec2 = vec2(420.0, 320.0); + +/// `[x, y, width, height]` as a rect. +pub fn rect_of([x, y, width, height]: [f32; 4]) -> Rect { + Rect::from_min_size(pos2(x, y), vec2(width, height)) +} + +/// How much of the layout a command moves. +#[derive(Clone, Copy)] +enum Unit { + Panel, + Group, + Column, +} + +impl Unit { + fn of(group: bool, column: bool) -> Self { + if column { + Self::Column + } else if group { + Self::Group + } else { + Self::Panel + } + } + + /// The action that moves this unit of `panel` to `to`. A floating panel's column is its whole window. + fn to(self, layout: &Layout, panel: PanelKind, to: Target) -> Action { + let floating = matches!(layout.place(&panel), Some(PanelPlace::Floating { .. })); + match (self, to) { + (Self::Panel, Target::At { anchor, placement, .. }) => Action::move_beside(panel, anchor, placement), + (Self::Panel, to) => Action::move_panel(panel, to), + (Self::Group, to) => Action::move_group(panel, to), + (Self::Column, to) if floating => Action::move_window(panel, to), + (Self::Column, to) => Action::move_column(panel, to), + } + } + + /// The panels that move with `panel`. + fn members(self, layout: &Layout, panel: PanelKind) -> Vec { + let place = layout.place(&panel); + match self { + Self::Panel => vec![panel], + Self::Group => match place.as_ref() { + Some(PanelPlace::Node(_)) => match place.as_ref().and_then(|place| layout.node_of(place)) { + Some(Node::Tabs { panels, .. }) => panels.clone(), + _ => vec![panel], + }, + Some(place) => layout.group(place).map(|group| group.panels.clone()).unwrap_or_else(|| vec![panel]), + None => vec![panel], + }, + Self::Column => match place.as_ref() { + Some(place @ (PanelPlace::Dock { .. } | PanelPlace::Floating { .. })) => { + layout.column(place).map(|column| column.panels().copied().collect()).unwrap_or_else(|| vec![panel]) + } + _ => vec![panel], + }, + } + } +} + +/// Where a command puts what it moves relative to `anchor`: `zone` (default `default`) and +/// `before`, with side zones mapped onto the anchor's container by [`DockPlacement::for_zone`]. +fn placement( + layout: &Layout, + anchor: PanelKind, + zone: Option, + before: Option>, + default: ZoneName, +) -> Result, DockError> { + let side = |side| DockPlacement::for_zone(layout, &anchor, side); + Ok(match (zone.unwrap_or(default), before) { + (ZoneName::Tab | ZoneName::Center, Some(before)) => DockPlacement::tab(before), + (ZoneName::Tab, None) => DockPlacement::tab(None), + (ZoneName::Center, None) => DockPlacement::Split(DockSide::Center), + (_, Some(_)) => return Err(DockError::InvalidPlacement), + (ZoneName::Left, None) => side(DockSide::Start)?, + (ZoneName::Right, None) => side(DockSide::End)?, + (ZoneName::Top, None) => side(DockSide::Top)?, + (ZoneName::Bottom, None) => side(DockSide::Bottom)?, + (ZoneName::Above, None) => DockPlacement::group(false, None), + (ZoneName::Below, None) => DockPlacement::group(true, None), + }) +} + +/// The panels of the last column of the dock on `side`, or `None` without such a dock. +fn last_column(layout: &Layout, side: DockEdge) -> Option> { + let path = layout.dock_path(side)?; + match node_at(layout.root.as_ref()?, &path)? { + Node::Dock { columns, .. } => Some(columns.last()?.panels().copied().collect()), + _ => None, + } +} + +impl DockCommand { + /// Every `window.panel.*` command id. + pub const IDS: &'static [&'static str] = &[ + "window.panel.layout", + "window.panel.move", + "window.panel.float", + "window.panel.dock", + "window.panel.activate", + "window.panel.close", + "window.panel.closeGroup", + "window.panel.closeOthers", + "window.panel.minimize", + "window.panel.iconic", + "window.panel.window", + ]; + + /// The command `id` with `params`. Its own `command` key is set from `id`. + pub fn parse(id: &str, params: &serde_json::Value) -> Result { + let mut tagged = if params.is_object() { params.clone() } else { serde_json::json!({}) }; + if let Some(fields) = tagged.as_object_mut() { + fields.insert("command".into(), serde_json::json!(id)); + } + serde_json::from_value(tagged).map_err(|error| error.to_string()) + } + + /// The raw layout action the command carries, if it is one. + pub fn raw_action(&self) -> Option<&Action> { + match self { + Self::Layout { action } | Self::UiDock(UiDock::Action { action }) => Some(action), + _ => None, + } + } + + /// The panel the command shows: opening or activating it, or docking it back into the layout. + pub fn shown(&self) -> Option { + match self { + Self::Activate { panel } + | Self::Dock { panel, anchor: None, side: None, .. } + | Self::UiDock(UiDock::Operation(DockOperation::Open { panel } | DockOperation::Activate { panel })) => Some(*panel), + _ => None, + } + } + + /// The outer edge `window.panel.dock` goes to: a side zone without an anchor or side. + pub fn edge(&self) -> Option { + match self { + Self::Dock { anchor: None, side: None, zone: Some(zone), .. } => match zone { + ZoneName::Left => Some(DockSide::Start), + ZoneName::Right => Some(DockSide::End), + ZoneName::Top => Some(DockSide::Top), + ZoneName::Bottom => Some(DockSide::Bottom), + _ => None, + }, + _ => None, + } + } + + /// The layout actions this command makes on `workspace`, to apply all or none. A panel or + /// anchor that is not shown is [`DockError::MissingPanel`] or [`DockError::MissingTarget`]. + /// `space` is where a float without a rect goes: the dock's last [`FloatSpace`]. + pub fn to_actions(&self, workspace: &Workspace, space: Option<&FloatSpace>) -> Result>, DockError> { + let layout = workspace.layout(); + let shown = |panel: &PanelKind| if layout.contains(panel) { Ok(()) } else { Err(DockError::MissingPanel) }; + let one = |action: Action| Ok(vec![action]); + match self { + Self::Layout { action } | Self::UiDock(UiDock::Action { action }) => one(action.clone()), + Self::Move { panel, anchor, zone, before, group, placement: given } => { + shown(panel)?; + let placement = match given { + Some(placement) => placement.clone(), + None => placement(layout, *anchor, *zone, *before, ZoneName::Tab)?, + }; + one(Unit::of(*group, false).to(layout, *panel, Target::at(*anchor, placement))) + } + Self::Float { panel, x, y, width, height, group, column } => { + shown(panel)?; + let given = [*x, *y, *width, *height]; + let rect = |base: Rect| { + let mut values = [base.min.x, base.min.y, base.width(), base.height()]; + for (value, given) in values.iter_mut().zip(given) { + *value = given.unwrap_or(*value); + } + rect_of(values) + }; + let unit = Unit::of(*group, *column); + let window = layout.floating.iter().find(|window| window.contains(panel)); + let lone = window.is_some_and(|window| window.panels().count() == 1); + let whole = window.is_some_and(|window| window.groups().len() == 1); + let placed = || { + let size = space.and_then(|space| space.panel(panel)).or(space.map(|space| space.default_size)).unwrap_or(DEFAULT_FLOAT); + rect(space.map_or_else(|| Rect::from_center_size(pos2(840.0, 510.0), size), |space| space.place(size))) + }; + match (unit, window.map(|window| window.rect)) { + (Unit::Panel, Some(base)) if lone => one(Action::move_floating(*panel, rect(base))), + (Unit::Column, Some(base)) => one(Action::move_floating(*panel, rect(base))), + (Unit::Group, Some(base)) if whole => one(Action::move_floating(*panel, rect(base))), + (Unit::Panel, _) => one(Action::float(*panel, placed())), + (unit, _) => one(unit.to(layout, *panel, Target::float(placed()))), + } + } + Self::Dock { panel, anchor, zone, before, group, column, side } => { + shown(panel)?; + let unit = Unit::of(*group, *column); + if let Some(anchor) = anchor { + let placement = placement(layout, *anchor, *zone, *before, ZoneName::Tab)?; + return one(unit.to(layout, *panel, Target::at(*anchor, placement))); + } + let members = unit.members(layout, *panel); + if let Some(side) = side { + let to = match last_column(layout, *side) { + Some(column) => match column.into_iter().find(|p| !members.contains(p)) { + Some(anchor) => Target::at(anchor, DockPlacement::column(true)), + // What moves already is that dock's last column. + None => return Ok(Vec::new()), + }, + None => Target::new_dock(*side), + }; + let unit = match (unit, &to) { + (Unit::Panel, Target::NewDock { .. }) if Unit::Group.members(layout, *panel).len() == 1 => Unit::Group, + (unit, _) => unit, + }; + return one(unit.to(layout, *panel, to)); + } + if let Some(zone) = self.edge() { + if before.is_some() { + return Err(DockError::InvalidPlacement); + } + // Every EffectCraft panel moves and closes: no edge narrows to a protected canvas. + let anchor = layout.edge_anchor(false, &|_| false, &|p| members.contains(p)).ok_or(DockError::MissingTarget)?; + return one(unit.to(layout, *panel, Target::at(anchor, DockPlacement::Edge(zone)))); + } + if !matches!(layout.place(panel), Some(PanelPlace::Floating { .. })) { + return Ok(Vec::new()); + } + let anchor = layout + .panels() + .into_iter() + .copied() + .filter(|p| !members.contains(p)) + .find(|p| !matches!(layout.place(p), Some(PanelPlace::Floating { .. }))) + .ok_or(DockError::MissingTarget)?; + one(unit.to(layout, *panel, Target::at(anchor, DockPlacement::tab(None)))) + } + Self::Activate { panel } => { + shown(panel)?; + one(Action::activate(*panel)) + } + Self::Close { panel } => one(Action::close(*panel)), + Self::CloseGroup { panel } => one(Action::close_group(*panel)), + Self::CloseOthers { panel } => one(Action::close_others(*panel)), + Self::Minimize { panel, minimized } => { + let place = layout.place(panel).ok_or(DockError::MissingPanel)?; + // An accordion entry is minimized while it is closed. + let current = match &place { + PanelPlace::Node(path) => match layout.root.as_ref().and_then(|root| node_at(root, path)) { + Some(Node::Stack { entries, .. }) => entries.iter().any(|entry| entry.panel == *panel && !entry.open), + _ => false, + }, + place => layout.group(place).is_some_and(|group| group.minimized), + }; + one(Action::set_minimized(*panel, minimized.unwrap_or(!current))) + } + Self::Iconic { panel, iconic } => { + let place = layout.place(panel).ok_or(DockError::MissingPanel)?; + let current = layout.column(&place).is_some_and(|column| column.iconic); + one(Action::set_iconic(*panel, iconic.unwrap_or(!current))) + } + // A floating window of its own is the app's (`EffectcraftApp::set_panel_window`). + Self::Window { .. } => Err(DockError::NotAllowed), + Self::UiDock(UiDock::Operation(operation)) => match operation { + DockOperation::Open { panel } | DockOperation::Activate { panel } => { + shown(panel)?; + one(Action::activate(*panel)) + } + DockOperation::Close { panel } => one(Action::close(*panel)), + DockOperation::Float { panel, rect } => one(Action::float(*panel, rect_of(*rect))), + DockOperation::MoveFloating { panel, rect } => one(Action::move_floating(*panel, rect_of(*rect))), + DockOperation::Move { panel, target, zone, before } => { + one(Action::move_beside(*panel, *target, placement(layout, *target, *zone, *before, ZoneName::Center)?)) + } + DockOperation::SetStackOpen { panel, open } => one(Action::set_stack_open(*panel, *open)), + DockOperation::ResizeStack { panel, height } => one(Action::resize_stack(*panel, *height)), + DockOperation::ResizeSplit { path, size } => one(Action::resize_split(path.clone(), *size)), + }, + } + } +} diff --git a/crates/ui-egui/src/dock_ui.rs b/crates/ui-egui/src/dock_ui.rs index 6e98e11ee..4f7556728 100644 --- a/crates/ui-egui/src/dock_ui.rs +++ b/crates/ui-egui/src/dock_ui.rs @@ -1,79 +1,35 @@ -//! EffectCraft's panels in craft-ui's shared docking. craft-ui draws the frames, tab strips, -//! stacked panels, floating windows, dividers and drop previews and owns the gestures (drag a tab -//! onto a group to tab it there or split it off to a side; hold Cmd/Ctrl at the release, or drop -//! outside every group, to float it). EffectCraft draws the panel bodies, the ≡ panel menu, the -//! Timeline's comp tabs and the viewer locks in each group header, and runs every layout change -//! through its command path (`window.dockAction`), so pointer, menu and control-channel changes -//! share one route. +//! EffectCraft's panels in craft-ui's shared docking. craft-ui's `DockArea` draws the frames, +//! tab strips (the Timeline's comp tabs included, as its panel's documents), stacked panels, +//! floating windows, dividers and drop previews and owns the gestures (drag a tab onto a group to +//! tab it there or split it off to a side; hold Cmd/Ctrl at the release, or drop outside every +//! group, to float it). EffectCraft draws the panel bodies and the viewer lock and ≡ panel menu in +//! each group header, and runs every layout change through its command path +//! (`window.dockAction`), so pointer, menu and control-channel changes share one route. -use crate::state::UiState; -use craft_behavior::dock::{Action, DockError, Floating, Node}; -use craft_ui::docking::{Divider, DockArea, DockCommand, DockContent, DockEvent, DockStyle, FloatSpace, Hit, ResizeEdge, UiDock}; -use egui::{Rect, Sense, Stroke, StrokeKind, pos2, vec2}; +use std::sync::Arc; + +use craft_behavior::dock::{Action, Floating}; +use craft_ui::contract::{Bind, BodyCx, PlainData, Tracked}; +use craft_ui::docking::{DividerKind, DockConfig, DockEvent, DockPanels, DockSource, FloatSpace, PanelDocument, PanelSpec, PanelSpecs, SourceKind}; +use craft_ui::patterns::dock::{DockArea, DockAreaOutput, WindowFiles}; +use craft_ui::runtime::windows::ResizeEdge; +use egui::{Rect, Sense, Stroke, StrokeKind, Ui, vec2}; use serde_json::{Value, json}; -use crate::dock::{self, DocAction, DocTab, PanelKind, Workspace, WorkspaceExt as _}; +use crate::dock::{self, PanelKind, Permissions, Workspace, WorkspaceExt as _}; +use crate::dock_command::DockCommand; use crate::icons::{self, Icon}; use crate::theme::Tokens; use crate::{EffectcraftApp, panels}; -/// The dock area's egui id; `DockArea::hit_rects` and `float_space` read by it. -pub fn area_id() -> egui::Id { - egui::Id::unique("effectcraft-docking") -} - -/// Width of the ≡ panel menu button at the end of each tab strip. +/// Width of the ≡ panel menu button in each group header. const MENU_W: f32 = 26.0; /// Width of the viewer lock before it. const LOCK_W: f32 = 18.0; -/// The smallest and largest native panel window, in points. -pub const PANEL_WINDOW_MIN: [f32; 2] = [160.0, 100.0]; -pub const PANEL_WINDOW_MAX: f32 = 16_384.0; -/// The farthest a native panel window may sit from the desktop origin, in points. -pub const PANEL_WINDOW_MAX_POS: f32 = 100_000.0; - -/// A native panel window's desktop rect made safe to hand to the windowing system: finite, with -/// a size within [`PANEL_WINDOW_MIN`]..=[`PANEL_WINDOW_MAX`] and a position within -/// ±[`PANEL_WINDOW_MAX_POS`] (hostile workspace files and bad monitor reports included). -pub fn sanitized_window_rect(rect: [f32; 4]) -> [f32; 4] { - let finite = |v: f32, fallback: f32| if v.is_finite() { v } else { fallback }; - let [x, y, w, h] = rect; - [ - finite(x, 0.0).clamp(-PANEL_WINDOW_MAX_POS, PANEL_WINDOW_MAX_POS), - finite(y, 0.0).clamp(-PANEL_WINDOW_MAX_POS, PANEL_WINDOW_MAX_POS), - finite(w, 420.0).clamp(PANEL_WINDOW_MIN[0], PANEL_WINDOW_MAX), - finite(h, 320.0).clamp(PANEL_WINDOW_MIN[1], PANEL_WINDOW_MAX), - ] -} - -/// How long to wait for the main window to report its frame before migrated native windows -/// keep their places as they are, in seconds. -const FRAME_REPORT_WAIT: f64 = 2.0; - -/// Moves the native rects of [`UiState::native_outer`]'s windows from the OS window's outer -/// position to its content position, by the main window's frame offset (`inner` less `outer`, -/// the main window's desktop rects): the earlier version's windows had the same OS title bar. -/// Without a report by [`FRAME_REPORT_WAIT`] (a backend without window positions), the places -/// stay as they are. -pub(crate) fn native_outer_to_content(ui: &mut UiState, outer: Option, inner: Option, now: f64) { - let offset = match (outer, inner) { - (Some(outer), Some(inner)) if outer.min.is_finite() && inner.min.is_finite() => inner.min - outer.min, - _ if now < FRAME_REPORT_WAIT => return, - _ => egui::Vec2::ZERO, - }; - let ids = std::mem::take(&mut ui.native_outer); - for window in ui.dock.layout.floating.iter_mut().filter(|w| ids.contains(&w.id)) { - if let Some([x, y, w, h]) = window.native { - window.native = Some(sanitized_window_rect([x + offset.x, y + offset.y, w, h])); - } - } -} - /// A new floating group's default rect near the centre of `screen`. -pub fn default_float_rect(screen: Rect) -> [f32; 4] { - let c = screen.center(); - [c.x - 210.0, c.y - 160.0, 420.0, 320.0] +pub fn default_float_rect(screen: Rect) -> Rect { + Rect::from_center_size(screen.center(), vec2(420.0, 320.0)) } /// A panel named by its title or id ("Effect Controls", "EffectControls") or its serialized @@ -92,8 +48,8 @@ fn check_raw_action(action: &Action) -> Result<(), String> { Ok(()) } -/// The docking commands: `window.dockAction {action}`, craft-ui's `window.panel.*` commands, -/// `ui.dock` and `ui.dock.reset`. `None` for any other id. +/// The docking commands: `window.dockAction {action}`, the `window.panel.*` commands, `ui.dock` +/// and `ui.dock.reset`. `None` for any other id. pub(crate) fn route(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: &Value) -> Option> { match id { "window.dockAction" => Some((|| { @@ -109,19 +65,14 @@ pub(crate) fn route(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, par Some(Ok(json!({"docking": app.ui.dock}))) } "ui.dock" => Some((|| { - let mut tagged = if params.is_object() { params.clone() } else { json!({}) }; - if let Some(fields) = tagged.as_object_mut() { - fields.insert("command".into(), json!("ui.dock")); - } - let command: DockCommand = serde_json::from_value(tagged).map_err(|error| format!("invalid ui.dock params: {error}"))?; + let command = DockCommand::parse("ui.dock", params).map_err(|error| format!("invalid ui.dock params: {error}"))?; app.run_dock_command(ctx, command)?; Ok(json!({"docking": app.ui.dock})) })()), - _ if id.starts_with("window.panel.") && DockCommand::::IDS.contains(&id) => Some((|| { - let mut tagged = if params.is_object() { params.clone() } else { json!({}) }; - if let Some(fields) = tagged.as_object_mut() { - fields.insert("command".into(), json!(id)); - // EffectCraft's panel names ("Effect Controls") as well as craft-ui's ids. + _ if DockCommand::IDS.contains(&id) => Some((|| { + let mut params = if params.is_object() { params.clone() } else { json!({}) }; + if let Some(fields) = params.as_object_mut() { + // EffectCraft's panel names ("Effect Controls") as well as the serialized ids. for key in ["panel", "anchor", "before"] { if let Some(name) = fields.get(key).and_then(Value::as_str) { let panel = PanelKind::from_name(name).ok_or(format!("unknown panel `{name}`"))?; @@ -129,7 +80,7 @@ pub(crate) fn route(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, par } } } - let command: DockCommand = serde_json::from_value(tagged).map_err(|error| format!("invalid docking command: {error}"))?; + let command = DockCommand::parse(id, ¶ms).map_err(|error| format!("invalid docking command: {error}"))?; app.run_dock_command(ctx, command)?; Ok(Value::Null) })()), @@ -154,43 +105,25 @@ impl EffectcraftApp { crate::menus::invoke(self, ctx, "window.dockAction", json!({"action": value})).map(|_| ()) } - /// Run a craft-ui docking command on the current workspace, all or nothing. Named - /// workspaces and Reset are EffectCraft's own (`window.workspace`, `window.resetWorkspace`). - pub(crate) fn run_dock_command(&mut self, ctx: &egui::Context, command: DockCommand) -> Result<(), String> { - if let DockCommand::Layout { action } | DockCommand::UiDock(UiDock::Action { action }) = &command { + /// Run a docking command on the current workspace, all or nothing. Named workspaces and + /// Reset are EffectCraft's own (`window.workspace`, `window.resetWorkspace`). + pub(crate) fn run_dock_command(&mut self, ctx: &egui::Context, command: DockCommand) -> Result<(), String> { + if let Some(action) = command.raw_action() { check_raw_action(action)?; } - if command.is_app_owned() { - if matches!(command, DockCommand::ResetWorkspace {}) { - let name = self.ui.workspace.clone(); - self.set_workspace(&name); - return Ok(()); - } - return Err("use the window.workspace commands for named workspaces".into()); + if let DockCommand::Window { panel, native } = command { + return self.set_panel_window(ctx, panel, native.or(Some(true))).map(drop); } // A closed panel opens through EffectCraft's own path, which puts it in its usual place // and runs the viewer and ScriptUI lifecycles. - let shown = match &command { - DockCommand::Activate { panel } | DockCommand::UiDock(UiDock::Operation(craft_ui::docking::DockOperation::Open { panel })) => Some(*panel), - DockCommand::UiDock(UiDock::Operation(craft_ui::docking::DockOperation::Activate { panel })) => Some(*panel), - _ => None, - }; - if let Some(panel) = shown.filter(|panel| !self.ui.dock.is_open(*panel)) { + if let Some(panel) = command.shown().filter(|panel| !self.ui.dock.is_open(*panel)) { self.show_panel(panel); - return Ok(()); - } - let space = craft_ui::docking::float_space(ctx, area_id()).unwrap_or_else(|| FloatSpace::new(ctx.content_rect())); - match command.to_actions(&self.ui.dock, false, &space) { - Ok(actions) => self.apply_dock_all(actions), - // Showing a hidden panel at an edge, and Lock, change more than the layout. - Err(DockError::NotAllowed) => { - let mut workspace = self.ui.dock.clone(); - let closed = command.apply(&mut workspace, false, &space, dock::permissions).map_err(|error| error.to_string())?; - self.commit_workspace(workspace, &closed, true); - Ok(()) + if command.edge().is_none() { + return Ok(()); } - Err(error) => Err(error.to_string()), } + let actions = command.to_actions(&self.ui.dock, self.live_dock.float_space.as_ref()).map_err(|error| error.to_string())?; + self.apply_dock_all(actions) } pub fn apply_dock(&mut self, action: Action) -> Result<(), String> { @@ -214,9 +147,9 @@ impl EffectcraftApp { | Action::MoveColumn { .. } ); let closing = matches!(&action, Action::Close { .. } | Action::CloseGroup { .. } | Action::CloseWindow { .. } | Action::CloseOthers { .. }); - let docked = workspace.layout.root.is_some(); - closed.extend(workspace.apply(action, dock::permissions).map_err(|error| error.to_string())?); - if !closing && docked && workspace.layout.root.is_none() { + let docked = workspace.layout().root.is_some(); + closed.extend(workspace.apply(action, self.ui.dock_locked, dock::permissions).map_err(|error| error.to_string())?); + if !closing && docked && workspace.layout().root.is_none() { return Err("the last docked panel must remain in the workspace".into()); } } @@ -245,7 +178,7 @@ impl EffectcraftApp { /// Close a panel wherever it is (docked or floating). A rejected close changes nothing. pub fn close_panel(&mut self, p: PanelKind) { if self.ui.dock.is_open(p) { - let _ = self.apply_dock(Action::Close { panel: p }); + let _ = self.apply_dock(Action::close(p)); } } @@ -259,18 +192,16 @@ impl EffectcraftApp { pos.and_then(|p| self.dock_rects.iter().rev().find(|(_, r)| r.contains(p)).map(|(k, _)| *k)).unwrap_or(self.ui.focused) } - /// Whether panel `p` is in a floating window with a desktop place: its own OS window on - /// desktop (craft-ui `native-windows`); on the web and in embedded viewports the window - /// stays in the page and the place is kept for a desktop session. + /// Whether panel `p` is in a floating window: on desktop each is an OS window of its own + /// (`DockConfig::native_windows`), which can go on another monitor; on the web and in + /// embedded viewports it stays in the page. pub fn in_panel_window(&self, p: PanelKind) -> bool { - self.ui.dock.layout.floating.iter().any(|w| w.contains(&p) && w.native.is_some()) + self.ui.dock.is_floating(p) } - /// Move panel `p` into a floating window of its own, which on desktop is an OS window that - /// can go on another monitor, or back into the main window (`window` false), where it joins - /// the first docked group. `None` toggles. A docked panel is undocked first, and its window - /// opens over the panel's place in the main window. Returns whether `p` is now in a window - /// of its own. + /// Move panel `p` into a floating window of its own, or back into the main window + /// (`window` false), where it joins the first docked group. `None` toggles. A docked panel + /// floats over its place in the main window. Returns whether `p` is now in a window. pub fn set_panel_window(&mut self, ctx: &egui::Context, p: PanelKind, window: Option) -> Result { let current = self.in_panel_window(p); let window = window.unwrap_or(!current); @@ -278,36 +209,28 @@ impl EffectcraftApp { return Ok(current); } if !window { - // On desktop every floating window is an OS window, so the way back is docking. - let anchor = self.ui.dock.layout.root.as_ref().and_then(|root| { + let anchor = self.ui.dock.layout().root.as_ref().and_then(|root| { let mut panels = Vec::new(); dock::node_panels(root, &mut panels); panels.into_iter().find(|panel| *panel != p) }); let actions = match anchor { - Some(anchor) => vec![Action::Move { panel: p, anchor, placement: craft_behavior::dock::DockPlacement::Tab { before: None } }], + Some(anchor) => vec![Action::move_beside(p, anchor, craft_behavior::dock::DockPlacement::tab(None))], // Nothing is docked: the panel becomes the docked layout. - None => vec![Action::Close { panel: p }, Action::Open { panel: p, anchor: None }], + None => vec![Action::close(p), Action::open(p, None)], }; let mut workspace = self.ui.dock.clone(); // One transaction, so the panel is never reported closed and keeps its state. - let closed = workspace.apply_all(actions, dock::permissions).map_err(|_| format!("can't dock {}", p.title()))?; + let closed = workspace.apply_all(actions, self.ui.dock_locked, dock::permissions).map_err(|_| format!("can't dock {}", p.title()))?; self.commit_workspace(workspace, &closed, true); return Ok(false); } - if !self.ui.dock.is_floating(p) { - if !self.ui.dock.is_docked(p) { - return Err(format!("{} is not open", p.title())); - } - let rect = default_float_rect(ctx.input_for(egui::ViewportId::ROOT, |i| i.content_rect())); - self.apply_dock(Action::Float { panel: p, rect }).map_err(|_| format!("can't undock {}", p.title()))?; + if !self.ui.dock.is_docked(p) { + return Err(format!("{} is not open", p.title())); } - let Some([x, y, w, h]) = self.ui.dock.layout.floating.iter().find(|f| f.contains(&p)).map(|f| f.rect) else { - return Err(format!("can't undock {}", p.title())); - }; - let origin = ctx.input_for(egui::ViewportId::ROOT, |i| i.viewport().inner_rect.map(|r| r.min)).unwrap_or(pos2(0.0, 0.0)); - let rect = sanitized_window_rect([origin.x + x, origin.y + y, w, h]); - self.apply_dock(Action::SetNative { panel: p, rect: Some(rect) })?; + let place = self.dock_rects.iter().find(|(panel, _)| *panel == p).map(|(_, rect)| *rect); + let rect = place.unwrap_or_else(|| default_float_rect(ctx.input_for(egui::ViewportId::ROOT, |i| i.content_rect()))); + self.apply_dock(Action::float(p, rect)).map_err(|_| format!("can't undock {}", p.title()))?; if self.ui.maximized == Some(p) { self.ui.maximized = None; } @@ -342,46 +265,77 @@ impl EffectcraftApp { out } - /// A comp's label colour as a tab swatch (faint without a label). - fn comp_swatch(&self, cid: effectcraft_engine::project::ItemId) -> egui::Color32 { + /// A comp's label colour as a tab swatch; `None` without a label (the theme's empty swatch). + fn comp_swatch(&self, cid: effectcraft_engine::project::ItemId) -> Option { match self.session.project.item(cid).map(|i| i.label) { - Some(l) if l != effectcraft_engine::color::Label::None => self.tokens.label(l), - _ => self.tokens.text_faint, + Some(l) if l != effectcraft_engine::color::Label::None => Some(self.tokens.label(l)), + _ => None, } } /// The Timeline's comp tabs: one per open comp, as in After Effects (opening a precomp adds a /// tab next to its parent's instead of replacing it). - fn tab_docs(&self) -> Vec { + fn tab_docs(&self) -> Vec { let st = &self.session.state; st.open_comps .iter() .filter_map(|id| { let it = self.session.project.item(*id).filter(|i| i.as_comp().is_some())?; - Some(DocTab { id: id.0, title: it.name.clone(), swatch: self.comp_swatch(*id), active: st.active_comp == Some(*id) }) + Some(DocRow { id: id.0, label: it.name.clone(), swatch: self.comp_swatch(*id).map(rgba), shown: st.active_comp == Some(*id) }) }) .collect() } /// The label-colour swatch before a tab's name: each Composition viewer's comp, and Effect /// Controls' (and with Use Label Color for Related Tabs, Properties') selected layer. - fn tab_swatches(&self) -> Vec<(PanelKind, egui::Color32)> { + fn tab_swatches(&self) -> Vec<(PanelKind, Option)> { let mut v = Vec::new(); for id in std::iter::once(0).chain(self.ui.viewers.keys().copied().filter(|v| *v != 0)) { - let swatch = panels::viewers::comp_of(self, id).map_or(self.tokens.text_faint, |c| self.comp_swatch(c)); + let swatch = panels::viewers::comp_of(self, id).and_then(|c| self.comp_swatch(c)); v.push((panels::viewers::panel(id), swatch)); } if let Some(l) = self.session.active_comp().and_then(|c| self.session.state.selected_layers.first().and_then(|id| c.layer(*id))) && l.label != effectcraft_engine::color::Label::None { - v.push((PanelKind::EffectControls, self.tokens.label(l.label))); + v.push((PanelKind::EffectControls, Some(self.tokens.label(l.label)))); if self.session.prefs.appearance.use_label_color_for_tabs { - v.push((PanelKind::Properties, self.tokens.label(l.label))); + v.push((PanelKind::Properties, Some(self.tokens.label(l.label)))); } } v } + /// The panel name the Window menu uses; `Markers` is only in the panel catalog, and the two + /// panels in neither (`History`, `ScriptUI Panel`) keep their English names. + fn logical_label(panel: PanelKind) -> String { + let title = panel.title(); + let listed = crate::i18n::command_label("window.panel", title); + if listed == title { crate::i18n::tr(title).to_string() } else { listed.to_string() } + } + + /// Read the panels' tab names, swatches and the Timeline's comps into the dock's spec model, + /// moving its revision only when one changed. + fn refresh_dock_specs(&mut self) { + let titles = self.tab_titles(); + let swatches = self.tab_swatches(); + let docs = self.tab_docs(); + let rows: Vec = self + .ui + .dock + .panels() + .into_iter() + .map(|panel| SpecRow { + panel: panel.id(), + label: titles.iter().find(|(p, _)| *p == panel).map_or_else(|| Self::logical_label(panel), |(_, t)| t.clone()), + swatch: swatches.iter().find(|(p, _)| *p == panel).map(|(_, swatch)| swatch.map(rgba)), + documents: if panel == PanelKind::Timeline { docs.clone() } else { Vec::new() }, + }) + .collect(); + if self.live_dock.specs.rows != rows { + self.live_dock.specs.rows = rows; + } + } + /// Draw panel `p`'s body in `rect`: register its automation region, put the Composition Navigator above an active /// viewer when a nested-comp flow exists, then call the panel's `show` and (for a viewer) the sketch overlay. fn panel_body(&mut self, ui: &mut egui::Ui, p: PanelKind, rect: Rect) { @@ -424,16 +378,12 @@ impl EffectcraftApp { self.dialog.is_some() || panels::dialogs::modal_open(ctx) || file_dialog } - /// Draw the Home screen or workspace in `body`. Shared craft-ui docking owns the dock tree, - /// group chrome, tab dragging and floating native windows; this adapter draws panel bodies, - /// applies the returned events/actions and shows the panel menu. + /// Draw the Home screen or workspace in `body`. craft-ui's `DockArea` owns the dock tree, + /// group chrome, tab dragging and floating native windows; this adapter keeps the panels' + /// specs, draws their bodies and headers, and applies the returned actions and events. pub(crate) fn dock_area(&mut self, ui: &mut egui::Ui, body: Rect) { let t = self.tokens; let ctx = ui.ctx().clone(); - if !self.ui.native_outer.is_empty() { - let (outer, inner, now) = ctx.input_for(egui::ViewportId::ROOT, |i| (i.viewport().outer_rect, i.viewport().inner_rect, i.time)); - native_outer_to_content(&mut self.ui, outer, inner, now); - } if self.ui.start_screen { // Home covers the whole workspace, as in After Effects (the panels wait behind it). let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body).id_salt("home")); @@ -441,33 +391,33 @@ impl EffectcraftApp { panels::home::show(self, &mut child, body); return; } - let style = dock_style(ui, &t); + self.refresh_dock_specs(); + let shown = self.live_dock.shown(&self.ui.dock); + // The specs leave the app while its panels borrow it, and come back with their revision. + let specs = std::mem::take(&mut self.live_dock.specs); let maximized = self.ui.maximized.filter(|m| self.ui.dock.is_docked(*m)); - let mut area = DockArea::new(area_id()).float_bounds(body).maximized(maximized).locked(self.ui.dock.locked).input_blocked(self.floats_blocked(&ctx)); - if let Some(panel) = self.pending_panel_raise.take() { - area = area.raise_panel(panel); - } - let layout = self.ui.dock.layout.clone(); + let locked = self.ui.dock_locked; + let raise = self.pending_panel_raise.take(); + let ime = NativeIme::new(&shown.layout().floating, &self.live_dock.windows, &self.unpublished_viewports); let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body).id_salt("effectcraft-dock-area")); child.set_clip_rect(body.intersect(ui.clip_rect())); - let docs = self.tab_docs(); - let ime = NativeIme::new(&layout.floating, &self.unpublished_viewports); - let mut content = EffectContent { - titles: self.tab_titles(), - swatches: self.tab_swatches(), - docs, - ctx: ctx.clone(), - style: style.clone(), - app: self, - tokens: t, - doc_actions: Vec::new(), - locks: Vec::new(), - menu: None, - bodies: Vec::new(), - ime, + let mut panels = EffectPanels { app: &mut *self, tokens: t, locks: Vec::new(), menu: None, bodies: Vec::new(), ime }; + let output = { + let mut area = DockArea::new("Panels", Bind::given(Arc::clone(&shown)), &specs, &mut panels, dock_config()); + if let Some(panel) = maximized { + area = area.maximized(panel); + } + if locked { + area = area.locked(); + } + if let Some(panel) = raise { + area = area.raise(panel); + } + area.show(&mut child) }; - let mut output = area.show_content(&mut child, &layout, &style, &mut content); - let EffectContent { doc_actions, locks, menu, bodies, ime, .. } = content; + let EffectPanels { locks, menu, bodies, ime, .. } = panels; + self.live_dock.specs = specs; + let DockAreaOutput { actions, requested, events, focused, picked, error, float_space, windows, window_files, sources, .. } = output; self.dock_rects = bodies; self.unpublished_viewports = ime.unpublished(); // A window that closed or docked takes its composition with it. @@ -476,22 +426,49 @@ impl EffectcraftApp { for viewport in gone { panels::viewer_text::end_viewport(self, &ctx, viewport); } - self.forward_window_input(&ctx, std::mem::take(&mut output.forwarded_events), std::mem::take(&mut output.window_files)); - if let Some(panel) = output.focused { + if float_space.is_some() { + self.live_dock.float_space = float_space; + } + self.forward_window_input(&ctx, &windows, window_files); + self.live_dock.windows = windows; + // Key focus moving to a group, or a tab picked, focuses that panel. + let moved = focused != self.live_dock.focused; + self.live_dock.focused = focused; + if let Some(panel) = picked.or(focused.filter(|_| moved)) { self.focus_panel(&ctx, panel); } - if let Some(error) = output.error { - self.ui.status = error.to_string(); + if let Some(error) = error { + self.ui.status = error.error.to_string(); } - for event in output.events { - if let DockEvent::ToggleMaximize { panel } = event { - self.toggle_maximize(panel); + for event in events { + match event { + DockEvent::ToggleMaximize { panel, .. } => self.toggle_maximize(panel), + // The Timeline's comp tabs: show that comp / close its Timeline. + DockEvent::DocumentPicked { panel: PanelKind::Timeline, document, .. } => { + self.focus_panel(&ctx, PanelKind::Timeline); + if self.session.state.active_comp.map(|c| c.0) != Some(document) + && let Err(error) = crate::menus::invoke(self, &ctx, "comp.open", json!({"comp": document})) + { + self.ui.status = error; + } + } + DockEvent::DocumentClosed { panel: PanelKind::Timeline, document, .. } => { + if let Err(error) = crate::menus::invoke(self, &ctx, "comp.close", json!({"comp": document})) { + self.ui.status = error; + } + } + _ => {} } } - for action in output.actions { - if let Err(error) = self.dock_command(&ctx, action) { - self.ui.status = error; + // A layout a panel changed during the pass takes priority over the gestures of the one shown. + if self.ui.dock == *shown { + for action in actions.into_iter().chain(requested) { + if let Err(error) = self.dock_command(&ctx, action) { + self.ui.status = error; + } } + } else { + craft_ui::runtime::drag::cancel(&ctx, craft_behavior::CancelReason::HostChanged); } for p in locks { if p == PanelKind::EffectControls { @@ -504,108 +481,77 @@ impl EffectcraftApp { self.ui.locked_tabs.insert(p.id().to_string()); } } - for action in doc_actions { - let result = match action { - // The Timeline's comp tabs: show that comp / close its Timeline. - DocAction::Activate(id) => { - let _ = self.apply_dock(Action::Activate { panel: PanelKind::Timeline }); - self.focus_panel(&ctx, PanelKind::Timeline); - if self.session.state.active_comp.map(|c| c.0) == Some(id) { - Ok(Value::Null) - } else { - crate::menus::invoke(self, &ctx, "comp.open", json!({"comp": id})) - } - } - DocAction::Close(id) => crate::menus::invoke(self, &ctx, "comp.close", json!({"comp": id})), - }; - if let Err(error) = result { - self.ui.status = error; - } - } if let Some(open) = menu { ctx.data_mut(|d| d.insert_temp::(egui::Id::unique("panel-menu"), open)); // the owner window draws it on its next pass ctx.request_repaint(); } drop_menu_of_closed_window(&ctx, &self.native_viewports); - let hits = DockArea::::hit_rects(&ctx, area_id()); - self.register_dock_hits(&hits); + self.register_dock_hits(&sources); panels::panel_menu_popup(self, ui); } /// Keys and dropped files that reach a floating panel's own OS window go to the main /// window's next frame ([`crate::EffectcraftApp::raw_input_hook`]), so its shortcuts and - /// file import handle them. Text is not forwarded, and nothing is while a text field in - /// the main window has the keyboard. - fn forward_window_input(&mut self, ctx: &egui::Context, events: Vec, files: Vec>) { - let typing = ctx.egui_wants_keyboard_input(); - let events = events.into_iter().filter(|event| !typing && !matches!(event, egui::Event::Text(_) | egui::Event::Ime(_))); - self.forwarded.events.extend(events); - if handed_over_to_the_timeline(files.iter().map(|window| (window.panel, !window.dropped.is_empty()))) { + /// file import handle them. Text is not forwarded, and no key is while a text field has the + /// keyboard. + fn forward_window_input(&mut self, ctx: &egui::Context, windows: &[(PanelKind, egui::ViewportId)], files: Vec>) { + let typing = crate::native_menu::text_field_window(ctx).is_some(); + for (_, viewport) in windows { + let events = ctx.input_for(*viewport, |i| i.events.clone()); + self.forwarded.events.extend(events.into_iter().filter(|event| !typing && !matches!(event, egui::Event::Text(_) | egui::Event::Ime(_)))); + } + if handed_over_to_the_timeline(files.iter().map(|drop| (drop.panel, !drop.files.is_empty()))) { self.forwarded.dropped_on_timeline = true; } - self.forwarded.files.extend(files.into_iter().flat_map(|window| window.dropped)); + #[cfg(not(target_arch = "wasm32"))] + self.forwarded.files.extend(files.into_iter().flat_map(|drop| drop.files).map(|file| Arc::new(WindowFile(file)) as egui::DroppedFileHandle)); + #[cfg(target_arch = "wasm32")] + let _ = files; if !self.forwarded.events.is_empty() || !self.forwarded.files.is_empty() { ctx.request_repaint(); } } - /// Automation ids for craft-ui's gesture sources: `panel.tab.`, `panel.drag.` - /// (the group's drag bar), `panel.border.` (the top border above its tabs), - /// `panel.tabs.more.`, `panel.header.` (a stacked panel's open/close button), - /// `panel.float..move`, `.close`, `.resize` (bottom-right - /// corner) and `.resize.`, `dock.gutter.` (`a`/`b` per split level; a stack's gap - /// below entry `i` adds `s`), `dock.corner..` where two dividers meet, and - /// the same inside floating window `n` as `panel.float..gutter.…` and `.corner.…`. - fn register_dock_hits(&mut self, hits: &[(Hit, Rect)]) { - let window = |panel: &PanelKind| self.ui.dock.layout.floating.iter().position(|window| window.contains(panel)); + /// Automation ids for the dock's gesture sources: `panel.tab.`, `panel.drag.` + /// (the group's drag bar), `panel.float..move` and `.resize` (bottom-right corner) and + /// `.resize.` for floating window `n`, `dock.gutter.` (`a`/`b` per split level; a + /// stack's gap below entry `i` adds `s`), `dock.gutter.group.` under a dock + /// column's group and `dock.column.` at a dock column's inner edge. + fn register_dock_hits(&mut self, sources: &[DockSource]) { + let window = |panel: &PanelKind| self.ui.dock.layout().floating.iter().position(|window| window.contains(panel)); // Tabs are labelled as drawn: "Composition Intro", not "Composition". let titles = self.tab_titles(); let title = |panel: &PanelKind| titles.iter().find(|(p, _)| p == panel).map_or_else(|| panel.title().to_string(), |(_, t)| t.clone()); let mut found = Vec::new(); - for (hit, rect) in hits { - let entry = match hit { - Hit::Tab(panel) => (format!("panel.tab.{}", panel.id()), title(panel)), - Hit::DragBar(panel) => (format!("panel.drag.{}", panel.id()), "Move panel group".into()), - Hit::Border(panel) => (format!("panel.border.{}", panel.id()), "Move panel group".into()), - Hit::Overflow(panel) => (format!("panel.tabs.more.{}", panel.id()), "More tabs".into()), - Hit::StackToggle(panel) => (format!("panel.header.{}", panel.id()), title(panel)), - Hit::Title(panel) => match window(panel) { + for source in sources { + let entry = match &source.kind { + SourceKind::Tab(panel) => (format!("panel.tab.{}", panel.id()), title(panel)), + SourceKind::GroupBar(panel) => (format!("panel.drag.{}", panel.id()), "Move panel group".into()), + SourceKind::WindowGrip(panel) => match window(panel) { Some(index) => (format!("panel.float.{index}.move"), "Move floating panel".into()), None => continue, }, - Hit::Close(panel) => match window(panel) { - Some(index) => (format!("panel.float.{index}.close"), "Close floating panel".into()), - None => continue, - }, - Hit::Resize(panel, edge) => match window(panel) { + SourceKind::WindowResize(panel, edge) => match window(panel) { Some(index) if *edge == ResizeEdge::BottomRight => (format!("panel.float.{index}.resize"), "Resize floating panel".into()), Some(index) => (format!("panel.float.{index}.resize.{edge:?}"), "Resize floating panel".into()), None => continue, }, - Hit::Divider(Divider::Split(path)) => (format!("dock.gutter.{}", path_id(path)), "gutter".into()), - Hit::Divider(Divider::Stack(panel)) => match dock::stack_gutter_id(&self.ui.dock.layout, *panel) { - Some(id) => (id, "gutter".into()), - None => continue, - }, - Hit::Divider(Divider::Intersection(outer, inner)) => (format!("dock.corner.{}.{}", path_id(outer), path_id(inner)), "gutter corner".into()), - Hit::Divider(Divider::WindowSplit(panel, path)) => match window(panel) { - Some(index) => (format!("panel.float.{index}.gutter.{}", path_id(path)), "gutter".into()), - None => continue, - }, - Hit::Divider(Divider::WindowIntersection(panel, outer, inner)) => match window(panel) { - Some(index) => (format!("panel.float.{index}.corner.{}.{}", path_id(outer), path_id(inner)), "gutter corner".into()), - None => continue, - }, + SourceKind::Divider(DividerKind::Split(path)) => (format!("dock.gutter.{}", path_id(path)), "gutter".into()), + SourceKind::Divider(DividerKind::Groups(panel)) => { + let id = dock::stack_gutter_id(self.ui.dock.layout(), *panel).unwrap_or_else(|| format!("dock.gutter.group.{}", panel.id())); + (id, "gutter".into()) + } + SourceKind::Divider(DividerKind::ColumnEdge(panel)) => (format!("dock.column.{}", panel.id()), "gutter".into()), _ => continue, }; - found.push((entry, *rect, DockArea::hit_id(area_id(), hit))); + found.push((entry, source.rect, source.id)); } - // The widget id lets keyboard focus on a divider or grip map to its element. - for ((id, label), rect, widget) in found { + // The node id lets keyboard focus on a divider or grip map to its element. + for ((id, label), rect, node) in found { self.auto.add(&id, rect, &label); if let Some(element) = self.auto.elements.last_mut() { - element.response_id = Some(widget); + element.response_id = Some(node); } } } @@ -617,33 +563,107 @@ fn path_id(path: &[bool]) -> String { } /// After Effects' window is all frames: drops on all four window edges, Ctrl/Cmd-drag undocks, -/// a release over no target floats, and a floating window's title bar only moves it. -fn dock_style(ui: &egui::Ui, t: &Tokens) -> DockStyle { - let mut style = DockStyle::from_ui(ui); - style.side_edge_zones = true; - style.new_dock_zones = false; - style.maximize_item = true; - style.close_others_item = true; - style.command_press_floats = true; - style.float_on_empty_drop = true; - style.title_bar_docks = false; - style.float_hint = true; - style.wheel_selects_tabs = true; - style.middle_click_closes_tabs = true; - style.float_label = "Undock Panel".into(); - style.float_group_label = "Undock Frame".into(); - style.close_group_label = "Close Frame".into(); - style.tab_height = t.tab_h; - style.gap = t.gap; - style.background = t.panel_bg; - style.tab_background = t.panel_bg; - style.active_background = t.panel_bg; - style.floating_background = t.panel_bg; - style.text = t.tab_text_active; - style.inactive_text = t.tab_text; - style.accent = t.focus; - style.font = Tokens::ui(12.0); - style +/// a release over no target floats, a floating window's title bar only moves it, and the tabs +/// close with their ×, a middle click, or the group menu's Close Other Panels in Group. +fn dock_config() -> DockConfig { + DockConfig::default() + .side_edge_zones(true) + .new_dock_zones(false) + .maximize_item(true) + .close_others_item(true) + .float_on_empty_drop(true) + .title_bar_docks(false) + .wheel_selects_tabs(true) + .tab_close_buttons(true) + .native_windows(true) +} + +/// A colour as the spec model keeps it. +fn rgba(color: egui::Color32) -> [u8; 4] { + color.to_srgba_unmultiplied() +} + +/// A kept colour as a tab swatch. +fn srgba([r, g, b, a]: [u8; 4]) -> craft_theme::Srgba { + craft_theme::Srgba::from(egui::Color32::from_rgba_unmultiplied(r, g, b, a)) +} + +/// What the dock area keeps between frames: the workspace it shows, the panels' specs, and what +/// its last pass reported that the next one or a command needs. +#[derive(Default)] +pub(crate) struct LiveDock { + shown: Option>, + specs: Tracked, + /// Where a command floats a panel without a rect. + float_space: Option>, + /// The OS windows the floating windows showed in, named by their first panel. + windows: Vec<(PanelKind, egui::ViewportId)>, + /// The panel whose group held key focus. + focused: Option, +} + +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 open panels: tab names, label swatches and the Timeline's comps. +#[derive(Clone, Debug, Default, PartialEq, PlainData)] +struct DockSpecs { + rows: Vec, +} + +/// One open panel's spec, by panel id. +#[derive(Clone, Debug, PartialEq, PlainData)] +struct SpecRow { + panel: String, + label: String, + /// The label swatch before the name; `Some(None)` is the theme's empty swatch. + swatch: Option>, + documents: Vec, +} + +/// One of the Timeline's comp tabs. +#[derive(Clone, Debug, PartialEq, PlainData)] +struct DocRow { + id: u64, + label: String, + swatch: Option<[u8; 4]>, + /// The comp the Timeline shows. + shown: bool, +} + +impl PanelSpecs for DockSpecs { + fn spec(&self, panel: &PanelKind) -> PanelSpec { + let id = panel.id(); + let Some(row) = self.rows.iter().find(|row| row.panel == id) else { return PanelSpec::new(panel.title()).host_body() }; + // Every panel body is EffectCraft's own egui code: the dock runs it with the window's style. + let mut spec = PanelSpec::new(row.label.clone()).host_body(); + if let Some(swatch) = row.swatch { + spec = spec.swatch(swatch.map(srgba)); + } + if !row.documents.is_empty() { + let documents = row + .documents + .iter() + .map(|doc| PanelDocument::new(doc.id, doc.label.clone()).swatch(doc.swatch.map(srgba)).closable(true).shown(doc.shown)) + .collect(); + spec = spec.documents(documents); + } + spec + } + + fn permissions(&self, panel: &PanelKind) -> Permissions { + dock::permissions(panel) + } } /// Panels with a lock: the Composition viewers and the Timeline keep their comp while locked, @@ -662,16 +682,9 @@ fn is_locked(app: &EffectcraftApp, panel: PanelKind) -> bool { } /// EffectCraft's side of the dock area for one frame. -struct EffectContent<'a> { +struct EffectPanels<'a> { app: &'a mut EffectcraftApp, tokens: Tokens, - titles: Vec<(PanelKind, String)>, - swatches: Vec<(PanelKind, egui::Color32)>, - docs: Vec, - /// Measures the comp tabs for their width in the tab row. - ctx: egui::Context, - style: DockStyle, - doc_actions: Vec, /// Viewer locks clicked. locks: Vec, /// The ≡ button clicked: its panel, where its menu opens and the viewport it was clicked in. @@ -682,6 +695,84 @@ struct EffectContent<'a> { ime: NativeIme, } +impl DockPanels for EffectPanels<'_> { + fn body(&mut self, panel: &PanelKind, ui: &mut Ui, _: &mut BodyCx<'_>) { + let t = self.tokens; + let rect = ui.max_rect(); + self.bodies.push((*panel, rect)); + // A floating panel's OS window is a pass of its own: its text IME descriptor is set up + // before its first body and published after its bodies (the main window does both in + // `draw`). + let viewport = ui.ctx().viewport_id(); + let native = viewport != egui::ViewportId::ROOT && !ui.ctx().embed_viewports(); + if native && self.ime.begin_body(viewport) { + panels::viewer_text::begin_ui(ui.ctx()); + } + self.app.panel_body(ui, *panel, rect); + if native && self.ime.publishes(viewport, panels::viewer_text::ime_recorded(ui.ctx())) { + panels::viewer_text::finish_ime(self.app, ui); + } + // The ≡ menu of a panel in its own OS window is drawn by that window's pass, after its + // last body, at that window's coordinates. + if native && self.ime.menu_turn(viewport) { + panels::panel_menu_area(self.app, ui); + } + // The body fills its frame; allocating it lets a floated panel keep its full size. + ui.allocate_rect(rect, Sense::hover()); + // Painted after the body so child backgrounds cannot hide the focus outline. + if self.app.ui.focused == *panel { + ui.painter().rect_stroke(rect, 0.0, Stroke::new(1.0, t.focus), StrokeKind::Inside); + } + } + + /// The viewer lock and the ≡ panel menu of the shown panel, before the tabs. + fn group_header(&mut self, panels: &[PanelKind], active: usize, ui: &mut Ui, _: &mut BodyCx<'_>) { + let Some(active) = panels.get(active).copied() else { return }; + let t = self.tokens; + let height = ui.available_height().max(18.0); + if has_lock(active) { + let (slot, _) = ui.allocate_exact_size(vec2(LOCK_W, height), Sense::hover()); + let lock = Rect::from_center_size(slot.center(), vec2(14.0, 14.0)); + let locked = is_locked(self.app, active); + if dock::lock_button(ui, lock, active, locked, &t, &mut self.app.auto) { + self.locks.push(active); + } + } + let (slot, _) = ui.allocate_exact_size(vec2(MENU_W, height), Sense::hover()); + let rect = Rect::from_center_size(slot.center(), vec2(18.0, 18.0)); + let response = ui.interact(rect, egui::Id::unique(("panel-menu-button", active.id())), Sense::click()); + response.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, response.enabled(), "panel menu")); + self.app.auto.add_response(&format!("panel.menu.{}", active.id()), &response, "panel menu"); + let color = if response.hovered() { t.tab_text_active } else { t.tab_text }; + icons::paint(ui.painter(), Rect::from_center_size(rect.center(), vec2(16.0, 16.0)), Icon::Hamburger, color); + crate::widgets::focus_outline(ui, &response, &t); + if response.clicked() { + self.app.ui.focused = active; + self.menu = Some((active, rect.left_bottom(), ui.ctx().viewport_id())); + } + } +} + +/// A file dropped on a floating panel's OS window, handed to the main window's file import. +#[cfg(not(target_arch = "wasm32"))] +#[derive(Debug)] +struct WindowFile(craft_ui::runtime::drag::OsFile); + +#[cfg(not(target_arch = "wasm32"))] +impl egui::DroppedFile for WindowFile { + fn path(&self) -> &std::path::Path { + self.0.path.as_deref().unwrap_or_else(|| std::path::Path::new(&self.0.name)) + } + + fn bytes(&self) -> Result, String> { + match (&self.0.bytes, &self.0.path) { + (Some(bytes), _) => Ok(bytes.to_vec()), + (None, Some(path)) => std::fs::read(path).map_err(|error| error.to_string()), + (None, None) => Err(format!("{}: no path or contents", self.0.name)), + } + } +} + /// Which body of a native floating window publishes its IME descriptor. /// /// Each OS window is an egui pass of its own. `viewer_text::finish_ime` publishes what the pass's @@ -702,13 +793,15 @@ pub(crate) struct NativeIme { } impl NativeIme { + /// `viewports` are the OS windows the dock reported last pass, each named by a panel of its + /// window. A window not among them yet (it opens this pass) publishes after every body. /// `unpublished` are the windows that drew last pass but never published: the layout's count /// was too high for them, so they publish after every body this pass. - pub(crate) fn new(floating: &[Floating], unpublished: &[egui::ViewportId]) -> Self { + pub(crate) fn new(floating: &[Floating], viewports: &[(PanelKind, egui::ViewportId)], unpublished: &[egui::ViewportId]) -> Self { let expected = floating .iter() .filter_map(|window| { - let viewport = window_viewport(window.id)?; + let viewport = viewports.iter().find(|(panel, _)| window.contains(panel)).map(|(_, viewport)| *viewport)?; let count = if unpublished.contains(&viewport) { 0 } else { window_bodies(window) }; Some((viewport, count)) }) @@ -778,148 +871,18 @@ pub(crate) fn drop_menu_of_closed_window(ctx: &egui::Context, windows: &[egui::V }); } -/// The OS window craft-ui opens for the floating window `id`. -#[cfg(not(target_arch = "wasm32"))] -fn window_viewport(id: u64) -> Option { - Some(DockArea::::window_viewport(area_id(), id)) -} - -/// The web keeps floating windows in the page. -#[cfg(target_arch = "wasm32")] -fn window_viewport(_id: u64) -> Option { - None -} - -/// The panel bodies craft-ui draws in a floating window: the active panel of each group and each -/// open stack entry. A minimized window shows its bar only. +/// The panel bodies the dock draws in a floating window: the shown panel of each group that is +/// not minimized. A window collapsed to icons shows none. fn window_bodies(window: &Floating) -> usize { - if window.minimized { + if window.column.iconic { return 0; } - let mut count = 0usize; - let mut nodes = vec![&window.root]; - while let Some(node) = nodes.pop() { - match node { - Node::Split { first, second, .. } => nodes.extend([&**first, &**second]), - Node::Tabs { panels, active } => count = count.saturating_add(usize::from(panels.get(*active).is_some())), - Node::Stack { entries } => count = count.saturating_add(entries.iter().filter(|e| e.open).count()), - _ => {} - } - } - count + window.groups().iter().filter(|group| !group.minimized && group.active_panel().is_some()).count() } -impl EffectContent<'_> { - fn header_width(&self, active: PanelKind, strip_width: f32) -> f32 { - let lock = if has_lock(active) { LOCK_W } else { 0.0 }; - (lock + MENU_W).min(strip_width * 2.0 / 3.0).max(MENU_W) - } - - /// Whether the group of `panels` shows comp tabs: it holds the Timeline and comps are open. - fn has_doc_tabs(&self, panels: &[PanelKind]) -> bool { - panels.contains(&PanelKind::Timeline) && !self.docs.is_empty() - } -} - -impl DockContent for EffectContent<'_> { - fn body(&mut self, ui: &mut egui::Ui, panel: &PanelKind) { - let t = self.tokens; - let rect = ui.max_rect(); - self.bodies.push((*panel, rect)); - // A floating panel's OS window is a pass of its own: its text IME descriptor is set up - // before its first body and published after its bodies (the main window does both in - // `draw`). - let viewport = ui.ctx().viewport_id(); - let native = viewport != egui::ViewportId::ROOT && !ui.ctx().embed_viewports(); - if native && self.ime.begin_body(viewport) { - panels::viewer_text::begin_ui(ui.ctx()); - } - self.app.panel_body(ui, *panel, rect); - if native && self.ime.publishes(viewport, panels::viewer_text::ime_recorded(ui.ctx())) { - panels::viewer_text::finish_ime(self.app, ui); - } - // The ≡ menu of a panel in its own OS window is drawn by that window's pass, after its - // last body, at that window's coordinates. - if native && self.ime.menu_turn(viewport) { - panels::panel_menu_area(self.app, ui); - } - // The body fills its frame; allocating it lets a floated panel keep its full size. - ui.allocate_rect(rect, Sense::hover()); - // Painted after the body so child backgrounds cannot hide the focus outline. - if self.app.ui.focused == *panel { - ui.painter().rect_stroke(rect, 0.0, Stroke::new(1.0, t.focus), StrokeKind::Inside); - } - } - - fn logical_label(&self, panel: &PanelKind) -> String { - let title = panel.title(); - // The Window menu names most panels; `Markers` is only in the panel catalog, and the two - // panels in neither (`History`, `ScriptUI Panel`) keep their English names. - let listed = crate::i18n::command_label("window.panel", title); - if listed == title { crate::i18n::tr(title).to_string() } else { listed.to_string() } - } - - /// The tab names what the panel shows ("Composition Intro"), after the label swatch of its - /// comp or layer. With comps open, the Timeline's own tab is just "Timeline"; each comp has a - /// tab of its own after the group's panel tabs. - fn label(&mut self, _ui: &egui::Ui, panel: &PanelKind, logical: &str, font: &egui::FontId, color: egui::Color32) -> egui::WidgetText { - let title = self.titles.iter().find(|(p, _)| p == panel).map_or(logical, |(_, s)| s.as_str()); - let Some((_, swatch)) = self.swatches.iter().find(|(p, _)| p == panel) else { return title.into() }; - let mut job = egui::text::LayoutJob::default(); - job.append("■ ", 0.0, egui::TextFormat::simple(font.clone(), *swatch)); - job.append(title, 0.0, egui::TextFormat::simple(font.clone(), color)); - job.into() - } - - fn group_header_width(&self, _panels: &[PanelKind], active: &PanelKind, _floating: bool, strip_width: f32) -> f32 { - self.header_width(*active, strip_width) - } - - /// The viewer lock and the ≡ panel menu of the shown panel. - fn group_header(&mut self, ui: &mut egui::Ui, _panels: &[PanelKind], active: &PanelKind, _floating: bool) { - let t = self.tokens; - let header = ui.max_rect(); - let menu = Rect::from_min_max(pos2((header.max.x - MENU_W).max(header.min.x), header.min.y), header.max); - if has_lock(*active) { - let lock = Rect::from_center_size(pos2(menu.min.x - LOCK_W / 2.0, header.center().y), vec2(14.0, 14.0)); - let locked = is_locked(self.app, *active); - if dock::lock_button(ui, lock, *active, locked, &t, &mut self.app.auto) { - self.locks.push(*active); - } - } - let rect = Rect::from_center_size(menu.center(), vec2(18.0, 18.0)); - let response = ui.interact(rect, egui::Id::unique(("panel-menu-button", active.id())), Sense::click()); - response.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, response.enabled(), "panel menu")); - self.app.auto.add_response(&format!("panel.menu.{}", active.id()), &response, "panel menu"); - let color = if response.hovered() { t.tab_text_active } else { t.tab_text }; - icons::paint(ui.painter(), Rect::from_center_size(rect.center(), vec2(16.0, 16.0)), Icon::Hamburger, color); - crate::widgets::focus_outline(ui, &response, &t); - if response.clicked() { - self.app.ui.focused = *active; - self.menu = Some((*active, rect.left_bottom(), ui.ctx().viewport_id())); - } - } - - fn group_extra_tabs_width(&self, panels: &[PanelKind], _active: &PanelKind, _floating: bool) -> f32 { - if !self.has_doc_tabs(panels) { - return 0.0; - } - dock::doc_widths(&self.ctx, &self.docs, &self.style.font).iter().sum() - } - - /// The Timeline's comp tabs, after its group's panel tabs whichever panel is shown. - fn group_extra_tabs(&mut self, ui: &mut egui::Ui, panels: &[PanelKind], active: &PanelKind, _floating: bool) { - if self.has_doc_tabs(panels) { - let selected = *active == PanelKind::Timeline; - self.doc_actions.extend(dock::doc_tabs(ui, ui.max_rect(), &self.docs, selected, &self.style, &mut self.app.auto)); - } - } -} - -/// Whether a handed-over *drop* named the Timeline. A floating window reports its hovered files -/// too, so a drag that only passes over the Timeline window must not count: its flag would survive -/// and send the next drop somewhere else. The panel comes from the window, which the main window's -/// pointer can never reach (#2661). +/// Whether a handed-over *drop* named the Timeline. Only a drop with files counts, so a window +/// that only saw a file pass over it never sends the next drop somewhere else. The panel comes +/// from the window, which the main window's pointer can never reach (#2661). fn handed_over_to_the_timeline(drops: impl Iterator) -> bool { drops.into_iter().any(|(panel, has_files)| has_files && matches!(panel, PanelKind::Timeline)) } @@ -929,8 +892,8 @@ mod tests { use super::*; /// A drop handed over by a floating window says which panel it landed on; only the Timeline - /// turns it into a layer instead of a project item. A window that only saw the file hover over - /// it carries no files and must not count, or its flag would outlive the drag (#2661). + /// turns it into a layer instead of a project item. A drop without files must not count, or + /// its flag would outlive the drag (#2661). #[test] fn only_a_timeline_drop_is_handed_over_to_the_timeline() { let cases = [ diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 8f5030fcb..7ec994d60 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -27,10 +27,11 @@ pub mod control; pub mod credits; pub mod display_gpu; pub mod dock; +pub mod dock_command; pub mod dock_ui; mod expression_diagnostics; -pub mod framework; pub mod frames; +pub mod framework; pub mod gpu_failure; pub mod header; pub mod i18n; @@ -500,6 +501,8 @@ pub struct EffectcraftApp { pub(crate) unpublished_viewports: Vec, /// A floating panel shown by a command: its window comes to the front next frame. pub(crate) pending_panel_raise: Option, + /// What the dock area keeps between frames. + pub(crate) live_dock: dock_ui::LiveDock, /// Home screen: recent-project thumbnail textures by path (None = no thumbnail). pub(crate) home_thumbs: std::collections::HashMap>, /// The (project path, saved revision) whose thumbnail was stored last. diff --git a/crates/ui-egui/src/menus/entries.rs b/crates/ui-egui/src/menus/entries.rs index c3641196f..2a1434f78 100644 --- a/crates/ui-egui/src/menus/entries.rs +++ b/crates/ui-egui/src/menus/entries.rs @@ -132,7 +132,7 @@ pub(crate) fn entry_enabled(app: &EffectcraftApp, e: &MenuEntry) -> bool { return !app.session.is_rendering() && !app.session.project.render_queue.is_empty(); } if e.command == "file.close" && super::invoke::no_params(&e.params) && app.ui.focused == PanelKind::RenderQueue { - return !app.ui.dock.locked; + return !app.ui.dock_locked; } if e.command == "window.panel" { return true; diff --git a/crates/ui-egui/src/menus/frontend.rs b/crates/ui-egui/src/menus/frontend.rs index d03aa77cf..9f2590db0 100644 --- a/crates/ui-egui/src/menus/frontend.rs +++ b/crates/ui-egui/src/menus/frontend.rs @@ -363,7 +363,6 @@ pub fn frontend(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, p: Valu Value::Null } "window.saveWorkspace" => { - crate::workspace_state::ensure_positions_ready(&app.ui)?; let name = app.ui.workspace.clone(); app.ui.saved_workspaces.insert(name.clone(), app.ui.dock.clone()); app.store_saved_workspaces()?; @@ -380,7 +379,6 @@ pub fn frontend(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, p: Valu ); return Ok(Value::Null); }; - crate::workspace_state::ensure_positions_ready(&app.ui)?; app.ui.saved_workspaces.insert(name.clone(), app.ui.dock.clone()); app.ui.workspace = name.clone(); app.store_saved_workspaces()?; @@ -404,7 +402,6 @@ pub fn frontend(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, p: Valu }; let builtin = crate::dock::WORKSPACES.contains(&name.as_str()); if p.get("delete").and_then(Value::as_bool) == Some(true) { - crate::workspace_state::ensure_positions_ready(&app.ui)?; if app.ui.saved_workspaces.remove(&name).is_none() && !builtin { return Err(format!("no workspace `{name}`")); } @@ -419,7 +416,6 @@ pub fn frontend(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, p: Valu if builtin { return Err(format!("`{name}` is a built-in workspace: save it as a new workspace instead")); } - crate::workspace_state::ensure_positions_ready(&app.ui)?; let dock = app.ui.saved_workspaces.remove(&name).ok_or_else(|| format!("no workspace `{name}`"))?; app.ui.saved_workspaces.insert(new.to_string(), dock); if app.ui.workspace == name { diff --git a/crates/ui-egui/src/menus/invoke.rs b/crates/ui-egui/src/menus/invoke.rs index 4bb7fae7c..bcd0f7481 100644 --- a/crates/ui-egui/src/menus/invoke.rs +++ b/crates/ui-egui/src/menus/invoke.rs @@ -243,7 +243,7 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V // Close follows panel focus too: with the Render Queue active, Cmd+W closes that panel and // leaves the active composition open (it used to close the composition next to it). if id == "file.close" && no_params(¶ms) && app.ui.focused == PanelKind::RenderQueue { - app.apply_dock(craft_behavior::dock::Action::Close { panel: PanelKind::RenderQueue })?; + app.apply_dock(craft_behavior::dock::Action::close(PanelKind::RenderQueue))?; // The focus goes to a panel that is still there, so the next Close acts on the composition // instead of on the queue that is gone. let next = [PanelKind::Timeline, PanelKind::Composition, PanelKind::Project].into_iter().find(|p| panel_shown(app, *p)).unwrap_or(PanelKind::Project); @@ -443,17 +443,23 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V "closePanel" => { let p = panel_of("panel").ok_or("closePanel: need `panel`")??; if app.ui.dock.is_open(p) { - app.apply_dock(craft_behavior::dock::Action::Close { panel: p })?; + app.apply_dock(craft_behavior::dock::Action::close(p))?; } return Ok(Value::Null); } "floatPanel" => { let p = panel_of("panel").ok_or("floatPanel: need `panel`")??; let r = match params.get("rect") { - Some(value) => serde_json::from_value::<[f32; 4]>(value.clone()).map_err(|_| "rect must contain four finite numbers")?, + Some(value) => { + let rect = serde_json::from_value::<[f32; 4]>(value.clone()).map_err(|_| "rect must contain four finite numbers")?; + if !rect.iter().all(|v| v.is_finite()) { + return Err("rect must contain four finite numbers".into()); + } + crate::dock_command::rect_of(rect) + } None => crate::dock_ui::default_float_rect(ctx.content_rect()), }; - app.apply_dock(craft_behavior::dock::Action::Float { panel: p, rect: r }).map_err(|e| format!("can't undock {}: {e}", p.title()))?; + app.apply_dock(craft_behavior::dock::Action::float(p, r)).map_err(|e| format!("can't undock {}: {e}", p.title()))?; return Ok(Value::Null); } _ => { @@ -475,8 +481,8 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V if let Some(before) = panel_of("before") { command["before"] = json!(before?); } - let command: craft_ui::docking::DockCommand = - serde_json::from_value(command).map_err(|e| format!("dockPanel: zone: center|tab|left|right|top|bottom|above|below ({e})"))?; + let command = crate::dock_command::DockCommand::parse("window.panel.dock", &command) + .map_err(|e| format!("dockPanel: zone: center|tab|left|right|top|bottom|above|below ({e})"))?; app.run_dock_command(ctx, command).map_err(|e| format!("can't dock {}: {e}", p.title()))?; app.show_panel(p); return Ok(Value::Null); diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index 97b678c61..5abae7e5a 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -685,7 +685,7 @@ fn closing_the_render_queue_reveals_the_panel_receiving_focus() { assert!(!app.ui.dock.is_visible(PanelKind::Project)); app.show_panel(PanelKind::RenderQueue); if maximized { - app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::RenderQueue, rect: [50.0, 60.0, 400.0, 200.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::float(PanelKind::RenderQueue, crate::dock_command::rect_of([50.0, 60.0, 400.0, 200.0]))).unwrap(); app.toggle_maximize(PanelKind::EffectControls); app.ui.focused = PanelKind::RenderQueue; assert!(app.ui.dock.is_floating(PanelKind::RenderQueue)); @@ -702,13 +702,16 @@ fn closing_the_render_queue_reveals_the_panel_receiving_focus() { fn closing_a_floating_queue_preserves_the_maximized_composition() { let mut session = effectcraft_engine::Session::default(); session.execute("comp.new", json!({"name": "A", "width": 32, "height": 32, "duration": 2})).unwrap(); - let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = egui_kittest::Harness::builder() + .with_size(egui::vec2(1200.0, 800.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); let ctx = h.ctx.clone(); let app = h.state_mut(); app.show_panel(PanelKind::Composition); app.show_panel(PanelKind::RenderQueue); - app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::RenderQueue, rect: [50.0, 60.0, 400.0, 200.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::float(PanelKind::RenderQueue, crate::dock_command::rect_of([50.0, 60.0, 400.0, 200.0]))).unwrap(); app.toggle_maximize(PanelKind::Composition); app.ui.focused = PanelKind::RenderQueue; assert!(app.ui.dock.is_visible(PanelKind::Timeline), "the hidden underlying tab triggers the regression"); @@ -727,7 +730,7 @@ fn queue_close_preserves_state_when_workspace_is_locked() { let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); app.session.execute("comp.new", json!({"name": "A", "duration": 2})).unwrap(); app.show_panel(PanelKind::RenderQueue); - app.ui.dock.locked = true; + app.ui.dock_locked = true; let workspace = app.ui.dock.clone(); let comp = app.session.active_comp_id(); for _ in 0..2 { @@ -737,7 +740,7 @@ fn queue_close_preserves_state_when_workspace_is_locked() { assert_eq!(app.session.active_comp_id(), comp); } assert!(!menu_items(&app).iter().find(|item| item.id == "file.close").unwrap().enabled); - app.ui.dock.locked = false; + app.ui.dock_locked = false; invoke(&mut app, &ctx, "file.close", Value::Null).unwrap(); assert!(!app.ui.dock.is_open(PanelKind::RenderQueue)); } @@ -752,12 +755,8 @@ fn queue_close_preserves_viewer_command_target() { app.ui.viewers.insert(0, Some(a)); app.ui.viewers.insert(1, Some(b)); app.ui.active_viewer = 1; - app.apply_dock(craft_behavior::dock::Action::Move { - panel: PanelKind::Timeline, - anchor: PanelKind::Composition, - placement: craft_behavior::dock::DockPlacement::Tab { before: None }, - }) - .unwrap(); + app.apply_dock(craft_behavior::dock::Action::move_beside(PanelKind::Timeline, PanelKind::Composition, craft_behavior::dock::DockPlacement::tab(None))) + .unwrap(); app.close_panel(PanelKind::Timeline); app.show_panel(PanelKind::Composition); app.show_panel(PanelKind::RenderQueue); @@ -776,7 +775,10 @@ fn queue_close_keeps_passive_viewer_focus_across_frames() { let mut session = effectcraft_engine::Session::default(); let a = session.execute("comp.new", json!({"name": "A", "width": 32, "height": 32, "duration": 2})).unwrap()["comp"].as_u64().unwrap(); let b = session.execute("comp.new", json!({"name": "B", "width": 32, "height": 32, "duration": 2})).unwrap()["comp"].as_u64().unwrap(); - let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = egui_kittest::Harness::builder() + .with_size(egui::vec2(1200.0, 800.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); let ctx = h.ctx.clone(); let app = h.state_mut(); @@ -784,12 +786,8 @@ fn queue_close_keeps_passive_viewer_focus_across_frames() { app.ui.viewers.insert(0, Some(a)); app.ui.viewers.insert(1, Some(b)); app.ui.active_viewer = 1; - app.apply_dock(craft_behavior::dock::Action::Move { - panel: PanelKind::Timeline, - anchor: PanelKind::Composition, - placement: craft_behavior::dock::DockPlacement::Tab { before: None }, - }) - .unwrap(); + app.apply_dock(craft_behavior::dock::Action::move_beside(PanelKind::Timeline, PanelKind::Composition, craft_behavior::dock::DockPlacement::tab(None))) + .unwrap(); app.close_panel(PanelKind::Timeline); app.show_panel(PanelKind::Composition); app.show_panel(PanelKind::RenderQueue); diff --git a/crates/ui-egui/src/native_menu.rs b/crates/ui-egui/src/native_menu.rs index a905fc7a0..5197481b3 100644 --- a/crates/ui-egui/src/native_menu.rs +++ b/crates/ui-egui/src/native_menu.rs @@ -443,7 +443,10 @@ impl MenuSync { /// window, where any widget that holds the keyboard counts (the Viewer's text editor is not an /// egui text field). pub fn text_field_window(ctx: &egui::Context) -> Option { - craft_ui::docking::typing_window(ctx).or_else(|| ctx.egui_wants_keyboard_input().then_some(egui::ViewportId::ROOT)) + let host = craft_ui::runtime::windows::WindowHost::of(ctx); + let window = host.key_window(); + let floating = (window != egui::ViewportId::ROOT && host.typing()).then_some(window); + floating.or_else(|| ctx.egui_wants_keyboard_input().then_some(egui::ViewportId::ROOT)) } /// Whether a focused text field takes the menu command `command` ([`activate`]): the native menu @@ -476,8 +479,8 @@ fn text_field_event(command: &str) -> Option> { /// Hand a text field's Edit command to the window `window` whose field has the keyboard. The /// main window gets the clipboard text itself and the events through the synthetic queue; a -/// floating panel's OS window gets each key pressed and released, and asks for the clipboard -/// text on Cmd+V (`craft_ui::docking::send_keys`). +/// floating panel's OS window gets each key pressed and released through the window host, and +/// the clipboard text as typed text on Cmd+V. fn send_to_text_field(app: &mut EffectcraftApp, ctx: &egui::Context, window: egui::ViewportId, events: Vec) { if window == egui::ViewportId::ROOT { for event in events { @@ -493,19 +496,25 @@ fn send_to_text_field(app: &mut EffectcraftApp, ctx: &egui::Context, window: egu ctx.request_repaint(); return; } - let events = events - .into_iter() - .flat_map(|event| { - let release = match &event { - egui::Event::Key { key, physical_key, modifiers, .. } => { - Some(egui::Event::Key { key: *key, physical_key: *physical_key, pressed: false, repeat: false, modifiers: *modifiers }) + let host = craft_ui::runtime::windows::WindowHost::of(ctx); + let platform = craft_keymap::egui::platform(ctx); + for event in events { + let (key, modifiers) = match event { + egui::Event::Key { key: egui::Key::V, .. } => { + if let Some(text) = app.hooks.clipboard_text.as_ref().and_then(|f| f()) { + host.inject_text(window, &text); } - _ => None, - }; - std::iter::once(event).chain(release) - }) - .collect(); - craft_ui::docking::send_keys(ctx, window, events); + continue; + } + egui::Event::Key { key, modifiers, .. } => (key, modifiers), + egui::Event::Copy => (egui::Key::C, egui::Modifiers::COMMAND), + egui::Event::Cut => (egui::Key::X, egui::Modifiers::COMMAND), + _ => continue, + }; + if let Some(key) = craft_keymap::Key::from_egui(key) { + host.inject_key(window, key, craft_keymap::Mods::from_egui(&modifiers, platform), false); + } + } } /// Run a native menu item (by id) the way the in-window menu bar does. While a text field has diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs index e0be9a80d..b47492f53 100644 --- a/crates/ui-egui/src/panels.rs +++ b/crates/ui-egui/src/panels.rs @@ -344,13 +344,13 @@ pub(crate) fn panel_menu_area(app: &mut EffectcraftApp, ui: &mut egui::Ui) { // only ever narrows what the area measured: the separator fills whatever width it is given ui.set_max_width(ui.max_rect().width().min(width)); if ui.button(tr("Close Panel")).clicked() { - let _ = app.dock_command(ui.ctx(), craft_behavior::dock::Action::Close { panel }); + let _ = app.dock_command(ui.ctx(), craft_behavior::dock::Action::close(panel)); close = true; } let floating = crate::dock::WorkspaceExt::is_floating(&app.ui.dock, panel); if !floating && ui.button(tr("Undock Panel")).clicked() { let r = crate::dock_ui::default_float_rect(ui.ctx().content_rect()); - let _ = app.dock_command(ui.ctx(), craft_behavior::dock::Action::Float { panel, rect: r }); + let _ = app.dock_command(ui.ctx(), craft_behavior::dock::Action::float(panel, r)); close = true; } // Multiple monitors: an OS window of its own, which can go on another screen. Where diff --git a/crates/ui-egui/src/panels/viewer_text/tests.rs b/crates/ui-egui/src/panels/viewer_text/tests.rs index 3017fb632..639373038 100644 --- a/crates/ui-egui/src/panels/viewer_text/tests.rs +++ b/crates/ui-egui/src/panels/viewer_text/tests.rs @@ -147,7 +147,7 @@ impl ImePass { /// One native floating window holding the Timeline's group and then the Viewer's. fn two_group_window() -> craft_behavior::dock::Floating { let groups = vec![craft_behavior::dock::Group::new(vec![PanelKind::Timeline], 0), craft_behavior::dock::Group::new(vec![PanelKind::Viewer(1)], 0)]; - craft_behavior::dock::Floating::stack(groups, [0.0, 0.0, 320.0, 360.0]).expect("two groups make a window") + craft_behavior::dock::Floating::stack(1, groups, egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(320.0, 360.0))).expect("two groups make a window") } impl ImePass { @@ -169,7 +169,7 @@ impl ImePass { let raw = egui::RawInput { viewport_id: viewport, viewports, screen_rect: Some(rect), events, ..Default::default() }; let mut preedit = None; let mut out = ctx.run_ui(raw, |ui| { - let mut ime = crate::dock_ui::NativeIme::new(std::slice::from_ref(window), &[]); + let mut ime = crate::dock_ui::NativeIme::new(std::slice::from_ref(window), &[(PanelKind::Timeline, viewport)], &[]); let order = if viewer_first { [true, false] } else { [false, true] }; for viewer in order { if ime.begin_body(viewport) { @@ -198,7 +198,7 @@ impl ImePass { #[test] fn native_window_with_a_group_before_the_viewer_keeps_the_composition() { let window = two_group_window(); - let viewport = craft_ui::docking::DockArea::::window_viewport(crate::dock_ui::area_id(), window.id); + let viewport = egui::ViewportId::from_hash_of(("native panel window", window.id)); let preview = || egui::Event::Ime(egui::ImeEvent::Preedit { text: "é".into(), active_range_chars: None }); for viewer_first in [false, true] { let (mut app, _) = editor("abcd", 4, 4); @@ -223,12 +223,12 @@ fn native_window_with_a_group_before_the_viewer_keeps_the_composition() { assert_eq!(preedit, None); // A window that drew fewer bodies than its layout counts publishes after every body in // its next pass. - let mut ime = crate::dock_ui::NativeIme::new(std::slice::from_ref(&window), &[]); + let mut ime = crate::dock_ui::NativeIme::new(std::slice::from_ref(&window), &[(PanelKind::Timeline, viewport)], &[]); ime.begin_body(viewport); assert!(!ime.publishes(viewport, false)); let unpublished = ime.unpublished(); assert_eq!(unpublished, vec![viewport]); - let mut ime = crate::dock_ui::NativeIme::new(std::slice::from_ref(&window), &unpublished); + let mut ime = crate::dock_ui::NativeIme::new(std::slice::from_ref(&window), &[(PanelKind::Timeline, viewport)], &unpublished); ime.begin_body(viewport); assert!(ime.publishes(viewport, false)); } diff --git a/crates/ui-egui/src/panels/viewers.rs b/crates/ui-egui/src/panels/viewers.rs index 2959cded0..4fe287262 100644 --- a/crates/ui-egui/src/panels/viewers.rs +++ b/crates/ui-egui/src/panels/viewers.rs @@ -327,7 +327,7 @@ fn add_viewer(app: &mut EffectcraftApp, near: u32) -> u32 { app.ui.viewers.insert(id, None); let p = panel(id); let anchor = [panel(near), PanelKind::Composition].into_iter().find(|q| app.ui.dock.is_open(*q)); - let _ = app.ui.dock.apply(craft_behavior::dock::Action::Open { panel: p, anchor }, crate::dock::permissions); + let _ = app.ui.dock.apply(craft_behavior::dock::Action::open(p, anchor), app.ui.dock_locked, crate::dock::permissions); id } diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index 0f7d97bc0..5a7df800b 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -653,11 +653,9 @@ pub struct UiState { /// The panel maximized to fill the dock area (`~`), if any. #[serde(default)] pub maximized: Option, - /// Floating windows of [`Self::dock`] whose native rect holds the OS window's outer - /// position, from a workspace file of an earlier version (see - /// `crate::dock_ui::native_outer_to_content`). Workspaces are not saved while any remain. - #[serde(skip)] - pub native_outer: Vec, + /// Lock Workspace: no panel of [`Self::dock`] moves, floats or closes. + #[serde(default)] + pub dock_locked: bool, /// Locked Composition / Timeline tabs (panel ids): opening another composition does not /// bring a locked panel forward (the tab's lock icon, as After Effects' viewer lock). #[serde(default)] @@ -792,7 +790,7 @@ impl Default for UiState { workspace: "Default".into(), dock: crate::dock::Workspace::new(crate::dock::workspace("Default")), saved_workspaces: Default::default(), - native_outer: Vec::new(), + dock_locked: false, maximized: None, locked_tabs: BTreeSet::new(), effect_controls_lock: None, diff --git a/crates/ui-egui/src/workspace_state.rs b/crates/ui-egui/src/workspace_state.rs index de2e99ce7..1005fb029 100644 --- a/crates/ui-egui/src/workspace_state.rs +++ b/crates/ui-egui/src/workspace_state.rs @@ -28,6 +28,10 @@ struct Snapshot { focused: PanelKind, maximized: Option, saved_workspaces: BTreeMap, + /// Lock Workspace. A file without it loads unlocked, unless its workspace carries the + /// earlier format's own `locked` ([`WorkspaceStore::load`]). + #[serde(default)] + locked: bool, } impl Snapshot { @@ -39,6 +43,7 @@ impl Snapshot { focused: ui.focused, maximized: ui.maximized, saved_workspaces: ui.saved_workspaces.clone(), + locked: ui.dock_locked, } } @@ -48,12 +53,7 @@ impl Snapshot { ui.focused = self.focused; ui.maximized = self.maximized; ui.saved_workspaces = self.saved_workspaces; - // A native window's place is made safe to hand to the windowing system. - for workspace in std::iter::once(&mut ui.dock).chain(ui.saved_workspaces.values_mut()) { - for window in &mut workspace.layout.floating { - window.native = window.native.map(crate::dock_ui::sanitized_window_rect); - } - } + ui.dock_locked = self.locked; // Reserve restored viewer slots without restoring any project-specific composition // links. New Viewer allocates from this map, including after switching named layouts. for workspace in std::iter::once(&ui.dock).chain(ui.saved_workspaces.values()) { @@ -107,19 +107,23 @@ pub(crate) struct WorkspaceStore { impl WorkspaceStore { pub(crate) fn load(config: Option<&dyn ConfigStore>, ui: &mut UiState) -> Self { let mut original = None; - let mut outer = Vec::new(); let loaded = config.map_or(Ok(None), |c| c.read_bounded(FILE, MAX_BYTES)).map_err(|e| e.to_string()).and_then(|text| { text.map(|text| { let value: serde_json::Value = serde_json::from_str(&text).map_err(|e| e.to_string())?; let snapshot = if legacy::is_legacy(&value) { - let (snapshot, windows) = legacy::migrate(value, ui)?; + let snapshot = legacy::migrate(value, ui)?; original = Some(text); - outer = windows; snapshot } else if value.get("version").is_none() { return Err("not a workspace file".to_string()); } else { - serde_json::from_value::(value).map_err(|e| e.to_string())? + // A file written before the lock moved out of the workspace keeps its lock once. + let earlier_lock = value.get("locked").is_none().then(|| value.pointer("/dock/locked").and_then(serde_json::Value::as_bool)).flatten(); + let mut snapshot = serde_json::from_value::(value).map_err(|e| e.to_string())?; + if let Some(locked) = earlier_lock { + snapshot.locked = locked; + } + snapshot }; snapshot.validate()?; Ok(snapshot) @@ -129,7 +133,6 @@ impl WorkspaceStore { let error = match loaded { Ok(Some(snapshot)) => { snapshot.apply(ui); - ui.native_outer = outer; None } Ok(None) => None, @@ -163,12 +166,12 @@ impl WorkspaceStore { || self.saved.focused != ui.focused || self.saved.maximized != ui.maximized || self.saved.saved_workspaces != ui.saved_workspaces + || self.saved.locked != ui.dock_locked } pub(crate) fn save(&mut self, config: Option<&dyn ConfigStore>, ui: &UiState) -> Result { let Some(config) = config else { return Ok(false) }; - // A window still at its outer position would be saved as if that were its content's. - if !self.has_changes(ui) || !ui.native_outer.is_empty() { + if !self.has_changes(ui) { return Ok(false); } let snapshot = Snapshot::capture(ui); @@ -197,20 +200,9 @@ impl WorkspaceStore { let path = config.dir().map_or_else(|| FILE.to_string(), |dir| dir.join(FILE).display().to_string()); return Err(format!("{path} couldn't be loaded at startup, so it is left untouched; fix or move it and restart")); } - ensure_positions_ready(ui)?; self.save(Some(config), ui).map(|_| ()) } } -/// Explicit saves must wait until migrated native-window positions refer to their content. -/// Check before capturing a named layout too, so a later background save cannot persist -/// a snapshot made with the old outer-window positions. -pub(crate) fn ensure_positions_ready(ui: &UiState) -> Result<(), String> { - if !ui.native_outer.is_empty() { - return Err("workspace window positions are still being restored; try saving again in a moment".into()); - } - Ok(()) -} - #[cfg(test)] mod tests; diff --git a/crates/ui-egui/src/workspace_state/legacy.rs b/crates/ui-egui/src/workspace_state/legacy.rs index 73b30bbf5..b3609477a 100644 --- a/crates/ui-egui/src/workspace_state/legacy.rs +++ b/crates/ui-egui/src/workspace_state/legacy.rs @@ -9,17 +9,16 @@ //! group with all its tabs; a frame with a height keeps it as a fixed size (its tab strip //! added), and the others share the rest. A closed frame's tabs join the open frame above it //! (below it, at the top of the column), as a split has no collapsed frames. -//! - A floating group in its own native window (`panel_windows`) keeps that place as the -//! window's native rect. The earlier version stored the OS window's outer position, so the -//! window's id is returned for [`crate::dock_ui::native_outer_to_content`] to move it to its -//! content position once the main window reports its frame. +//! - A floating group in its own native window (`panel_windows`) floats where it was in the +//! main window; the dock places its OS window again. //! - Closed panels had no recorded place: they stay closed and reopen at their default place. use std::collections::BTreeMap; +use craft_behavior::dock::SplitSize; use craft_behavior::dock::{Floating, Node}; use craft_behavior::flow::Axis; -use craft_behavior::dock::SplitSize; +use egui::{Rect, pos2, vec2}; use serde::Deserialize; use super::{Snapshot, VERSION}; @@ -64,13 +63,6 @@ struct OldFloating { rect: [f32; 4], } -/// The floating group holding `panel` shows in its own native window at `rect`. -#[derive(Deserialize)] -struct OldPanelWindow { - panel: PanelKind, - rect: [f32; 4], -} - #[derive(Deserialize)] struct OldSnapshot { workspace: String, @@ -80,8 +72,6 @@ struct OldSnapshot { maximized: Option, saved_workspaces: BTreeMap, saved_floating: BTreeMap>, - #[serde(default)] - panel_windows: Vec, } #[derive(Deserialize)] @@ -100,28 +90,25 @@ pub(super) fn is_legacy(value: &serde_json::Value) -> bool { } } -/// The snapshot an earlier version's file describes, and the ids of its floating windows whose -/// native rect holds the OS window's outer position. `ui` supplies what an unversioned record +/// The snapshot an earlier version's file describes. `ui` supplies what an unversioned record /// leaves out (the current arrangement). The caller validates the result. -pub(super) fn migrate(value: serde_json::Value, ui: &UiState) -> Result<(Snapshot, Vec), String> { +pub(super) fn migrate(value: serde_json::Value, ui: &UiState) -> Result { if value.get("version").is_none() { let record: OldRecord = serde_json::from_value(value).map_err(|e| e.to_string())?; let mut snapshot = Snapshot::capture(ui); snapshot.saved_workspaces = named(record.workspaces, record.floating)?; - return Ok((snapshot, Vec::new())); + return Ok(snapshot); } let old: OldSnapshot = serde_json::from_value(value).map_err(|e| e.to_string())?; - let dock = workspace(old.dock, old.floating, &old.panel_windows)?; - let outer = dock.layout.floating.iter().filter(|window| window.native.is_some()).map(|window| window.id).collect(); - let snapshot = Snapshot { + Ok(Snapshot { version: VERSION, workspace: old.workspace, - dock, + dock: workspace(old.dock, old.floating)?, focused: old.focused, maximized: old.maximized, saved_workspaces: named(old.saved_workspaces, old.saved_floating)?, - }; - Ok((snapshot, outer)) + locked: false, + }) } /// Named workspaces with their floating groups; floating groups of no named workspace are @@ -131,12 +118,12 @@ fn named(roots: BTreeMap, mut floating: BTreeMap, windows: &[OldPanelWindow]) -> Result { +fn workspace(root: OldNode, floating: Vec) -> Result { // Closing the last docked panel left an empty tab group as the root. let root = match root { OldNode::Tabs { panels, .. } if panels.is_empty() => None, @@ -144,14 +131,13 @@ fn workspace(root: OldNode, floating: Vec, windows: &[OldPanelWindo }; let floating = floating .into_iter() - .map(|group| { - let native = windows.iter().find(|window| group.panels.contains(&window.panel)).map(|window| window.rect); - let mut window = Floating::single(group.panels, group.active, group.rect); - window.native = native.map(crate::dock_ui::sanitized_window_rect); - window + .zip(1_u64..) + .map(|(group, id)| { + let [x, y, w, h] = group.rect; + Floating::single(id, group.panels, group.active, Rect::from_min_size(pos2(x, y), vec2(w, h))) }) .collect(); - Ok(Workspace::new(Layout { root, floating })) + Ok(Workspace::new(Layout::new(root, floating))) } fn node(old: OldNode, depth: usize) -> Result, String> { @@ -159,17 +145,17 @@ fn node(old: OldNode, depth: usize) -> Result, String> { return Err("workspace dock tree exceeds supported limits".into()); } Ok(match old { - OldNode::Tabs { panels, active } => Node::Tabs { panels, active }, - OldNode::Split { vertical, size, a, b } => Node::Split { - axis: if vertical { Axis::Y } else { Axis::X }, - size: match size { + OldNode::Tabs { panels, active } => Node::tabs(panels, active), + OldNode::Split { vertical, size, a, b } => Node::split( + if vertical { Axis::Y } else { Axis::X }, + match size { OldSplitSize::Ratio(value) => SplitSize::Ratio(value), OldSplitSize::FixedA(value) => SplitSize::FixedFirst(value), OldSplitSize::FixedB(value) => SplitSize::FixedSecond(value), }, - first: Box::new(node(*a, depth.saturating_add(1))?), - second: Box::new(node(*b, depth.saturating_add(1))?), - }, + node(*a, depth.saturating_add(1))?, + node(*b, depth.saturating_add(1))?, + ), OldNode::Stack { entries } => column(entries, depth)?, }) } @@ -227,7 +213,7 @@ fn column(entries: Vec, depth: usize) -> Result, for frame in frames.into_iter().rev() { let own = frame_size(&frame); let gap = if node.is_some() { FRAME_GAP } else { 0.0 }; - let tabs = Node::Tabs { panels: frame.panels, active: frame.active }; + let tabs = Node::tabs(frame.panels, frame.active); node = Some(match node { None => tabs, Some(rest) => { @@ -237,7 +223,7 @@ fn column(entries: Vec, depth: usize) -> Result, // Shares the rest with the flexible frames below. (None, None) => SplitSize::Ratio(1.0 / (below_flexible as f32 + 1.0)), }; - Node::Split { axis: Axis::Y, size, first: Box::new(tabs), second: Box::new(rest) } + Node::split(Axis::Y, size, tabs, rest) } }); below_fixed = match (own, below_fixed) { diff --git a/crates/ui-egui/src/workspace_state/tests.rs b/crates/ui-egui/src/workspace_state/tests.rs index 98a42fa65..04856b7f8 100644 --- a/crates/ui-egui/src/workspace_state/tests.rs +++ b/crates/ui-egui/src/workspace_state/tests.rs @@ -1,8 +1,8 @@ use super::*; use crate::dock::{Floating, Layout, Node, StackEntry, WorkspaceExt as _}; use craft_behavior::dock::Action; -use craft_behavior::flow::Axis; use craft_behavior::dock::SplitSize; +use craft_behavior::flow::Axis; use effectcraft_engine::config::MemoryConfig; fn minimal() -> Workspace { @@ -10,7 +10,11 @@ fn minimal() -> Workspace { } fn tabs(panels: &[PanelKind]) -> Node { - Node::Tabs { panels: panels.to_vec(), active: 0 } + Node::tabs(panels.to_vec(), 0) +} + +fn rect(x: f32, y: f32, w: f32, h: f32) -> egui::Rect { + egui::Rect::from_min_size(egui::pos2(x, y), egui::vec2(w, h)) } #[test] @@ -67,20 +71,12 @@ fn corrupt_future_or_unknown_workspace_keeps_defaults_and_original_file() { const V1: &str = include_str!("../../tests/fixtures/workspaces-v1.json"); #[test] -fn explicit_save_reports_pending_migration_and_can_be_retried() { +fn explicit_save_rewrites_an_earlier_file_and_keeps_a_backup() { let config = MemoryConfig::default(); config.write(FILE, V1).unwrap(); let mut ui = UiState::default(); let mut store = WorkspaceStore::load(Some(&config), &mut ui); - assert!(!ui.native_outer.is_empty()); - assert!(!store.save(Some(&config), &ui).unwrap(), "background saves defer quietly"); - let error = store.save_now(Some(&config), &ui).unwrap_err(); - assert!(error.contains("positions") && error.contains("try saving again"), "{error}"); - assert_eq!(config.read(FILE).as_deref(), Some(V1)); - assert_eq!(config.read(BACKUP), None); assert!(store.has_changes(&ui)); - - crate::dock_ui::native_outer_to_content(&mut ui, None, None, 3.0); store.save_now(Some(&config), &ui).unwrap(); assert_eq!(config.read(BACKUP).as_deref(), Some(V1)); let mut restored = UiState::default(); @@ -108,34 +104,26 @@ fn version_one_file_loads_with_every_panel_in_place() { ), tabs(&[Properties]), ); - assert_eq!(ui.dock.layout.root, Some(root)); - let floating: Vec<_> = ui.dock.layout.floating.iter().map(|w| (w.panels().copied().collect::>(), w.rect, w.native)).collect(); + assert_eq!(ui.dock.layout().root, Some(root)); + let floating: Vec<_> = ui.dock.layout().floating.iter().map(|w| (w.panels().copied().collect::>(), w.rect, w.native)).collect(); assert_eq!( floating, [ - (vec![Preview], [900.0, 120.0, 300.0, 260.0], None), - (vec![RenderQueue], [200.0, 500.0, 520.0, 240.0], Some(crate::dock_ui::sanitized_window_rect([200.0, 500.0, 520.0, 240.0]))), + (vec![Preview], rect(900.0, 120.0, 300.0, 260.0), None), + // Its native window's place goes: the dock places the OS window again. + (vec![RenderQueue], rect(200.0, 500.0, 520.0, 240.0), None), ] ); // Closed panels stay closed. for panel in [Align, Layer] { assert!(!ui.dock.is_open(panel), "{panel:?}"); } - // The native window's place is its outer position until the main window reports its - // frame (here a 28-point title bar); the file is not rewritten before. - let id = ui.dock.layout.floating[1].id; - assert_eq!(ui.native_outer, [id]); let mut store = store; - assert!(!store.save(Some(&config), &ui).unwrap()); - let outer = egui::Rect::from_min_size(egui::pos2(10.0, 20.0), egui::vec2(1600.0, 1000.0)); - crate::dock_ui::native_outer_to_content(&mut ui, Some(outer), Some(outer.translate(egui::vec2(0.0, 28.0))), 0.1); - assert_eq!(ui.dock.layout.floating[1].native, Some([200.0, 528.0, 520.0, 240.0])); - assert!(ui.native_outer.is_empty()); assert!(store.save(Some(&config), &ui).unwrap()); // The named workspace still has Layer, closed only after it was saved. let saved = ui.saved_workspaces.get("My Layout").unwrap(); assert!(saved.is_docked(Layer) && saved.is_floating(Preview) && !saved.is_open(Align)); - assert_eq!(saved.layout.floating.iter().filter_map(|w| w.native).count(), 0); + assert_eq!(saved.layout().floating.iter().filter(|w| w.native.is_some()).count(), 0); } #[test] @@ -144,13 +132,6 @@ fn version_one_file_is_rewritten_once_in_the_current_format_and_kept_as_a_backup config.write(FILE, V1).unwrap(); let mut ui = UiState::default(); let mut store = WorkspaceStore::load(Some(&config), &mut ui); - // A backend that reports no window positions: the native place stays as it was. - let native = ui.dock.layout.floating[1].native; - crate::dock_ui::native_outer_to_content(&mut ui, None, None, 1.0); - assert!(!ui.native_outer.is_empty(), "waits for a report"); - crate::dock_ui::native_outer_to_content(&mut ui, None, None, 5.0); - assert!(ui.native_outer.is_empty()); - assert_eq!(ui.dock.layout.floating[1].native, native); let migrated = Snapshot::capture(&ui); assert!(store.has_changes(&ui), "the migrated layout is written without waiting for an edit"); assert!(store.save(Some(&config), &ui).unwrap()); @@ -178,16 +159,16 @@ fn stacked_frames_with_tabs_and_an_empty_root_migrate() { let mut ui = UiState::default(); let store = WorkspaceStore::load(Some(&config), &mut ui); assert_eq!(store.error, None); - assert_eq!(ui.dock.layout.root, None); + assert_eq!(ui.dock.layout().root, None); assert!(ui.dock.is_floating(PanelKind::Project)); use PanelKind::*; // Each open frame is a tab group with all its tabs; a frame's height is a fixed size // (with its tab strip), and the frame without one takes the rest. let column = crate::dock::vsplit(SplitSize::FixedSecond(80.0 + crate::dock::TAB_STRIP), tabs(&[Info]), crate::dock::tabs(&[Audio, Preview], 1)); - assert_eq!(ui.saved_workspaces.get("Mine").and_then(|w| w.layout.root.clone()), Some(column)); + assert_eq!(ui.saved_workspaces.get("Mine").and_then(|w| w.layout().root.clone()), Some(column)); // Closed frames' tabs join the open frame above them, or below at the top. let column = crate::dock::vsplit(SplitSize::FixedFirst(46.0 + crate::dock::TAB_STRIP), tabs(&[Preview, Properties, Paint, Align]), tabs(&[Info])); - assert_eq!(ui.saved_workspaces.get("Column").and_then(|w| w.layout.root.clone()), Some(column)); + assert_eq!(ui.saved_workspaces.get("Column").and_then(|w| w.layout().root.clone()), Some(column)); assert_eq!(ui.saved_workspaces.len(), 2, "floating groups of no named workspace are dropped"); } @@ -214,25 +195,21 @@ fn explicit_save_with_nothing_new_succeeds() { #[test] fn invalid_tabs_split_and_deep_tree_are_rejected() { let mut snapshot = Snapshot::capture(&UiState::default()); - snapshot.dock = Workspace::new(Layout { root: Some(Node::Tabs { panels: vec![PanelKind::Project], active: usize::MAX }), floating: vec![] }); + snapshot.dock = Workspace::new(Layout::new(Some(Node::tabs(vec![PanelKind::Project], usize::MAX)), vec![])); assert!(snapshot.validate().is_err()); - let split = |size, first, second| Node::Split { axis: Axis::X, size, first: Box::new(first), second: Box::new(second) }; - snapshot.dock = Workspace::new(Layout { - root: Some(split(SplitSize::FixedFirst(f32::NAN), tabs(&[PanelKind::Project]), tabs(&[PanelKind::Timeline]))), - floating: vec![], - }); + let split = |size, first, second| Node::split(Axis::X, size, first, second); + snapshot.dock = + Workspace::new(Layout::new(Some(split(SplitSize::FixedFirst(f32::NAN), tabs(&[PanelKind::Project]), tabs(&[PanelKind::Timeline]))), vec![])); assert!(snapshot.validate().is_err()); let mut root = tabs(&[PanelKind::Composition]); for _ in 0..=craft_behavior::dock::MAX_DEPTH { root = split(SplitSize::Ratio(0.5), root, tabs(&[])); } - snapshot.dock = Workspace::new(Layout { root: Some(root), floating: vec![] }); + snapshot.dock = Workspace::new(Layout::new(Some(root), vec![])); assert!(snapshot.validate().is_err()); // A panel in two places. - snapshot.dock = Workspace::new(Layout { - root: Some(tabs(&[PanelKind::Project])), - floating: vec![Floating::single(vec![PanelKind::Project], 0, [0.0, 0.0, 200.0, 100.0])], - }); + snapshot.dock = + Workspace::new(Layout::new(Some(tabs(&[PanelKind::Project])), vec![Floating::single(1, vec![PanelKind::Project], 0, rect(0.0, 0.0, 200.0, 100.0))])); assert!(snapshot.validate().is_err()); } @@ -242,9 +219,9 @@ fn closing_all_docked_panels_remains_a_persistable_layout() { let mut ui = UiState::default(); let mut store = WorkspaceStore::load(Some(&config), &mut ui); for panel in ui.dock.panels() { - ui.dock.apply(Action::Close { panel }, crate::dock::permissions).unwrap(); + ui.dock.apply(Action::close(panel), false, crate::dock::permissions).unwrap(); } - assert!(ui.dock.layout.root.is_none()); + assert!(ui.dock.layout().root.is_none()); assert!(store.save(Some(&config), &ui).unwrap()); let mut restored = UiState::default(); let loaded = WorkspaceStore::load(Some(&config), &mut restored); @@ -258,8 +235,8 @@ fn floating_groups_and_named_snapshots_roundtrip_without_document_state() { let mut ui = UiState::default(); let mut store = WorkspaceStore::load(Some(&config), &mut ui); ui.workspace = "Floating".into(); - ui.dock.apply(Action::Float { panel: PanelKind::Preview, rect: [50.0, 80.0, 200.0, 160.0] }, crate::dock::permissions).unwrap(); - ui.dock.apply(Action::Close { panel: PanelKind::Align }, crate::dock::permissions).unwrap(); + ui.dock.apply(Action::float(PanelKind::Preview, crate::dock_command::rect_of([50.0, 80.0, 200.0, 160.0])), false, crate::dock::permissions).unwrap(); + ui.dock.apply(Action::close(PanelKind::Align), false, crate::dock::permissions).unwrap(); ui.saved_workspaces.insert(ui.workspace.clone(), ui.dock.clone()); ui.maximized = Some(PanelKind::Composition); ui.project_search = "do not persist".into(); @@ -268,7 +245,7 @@ fn floating_groups_and_named_snapshots_roundtrip_without_document_state() { WorkspaceStore::load(Some(&config), &mut restored); assert_eq!(Snapshot::capture(&restored), Snapshot::capture(&ui)); // The closed panel's place comes back with it. - assert!(restored.dock.hidden.iter().any(|(p, _)| *p == PanelKind::Align)); + assert!(restored.dock.hidden().iter().any(|(p, _)| *p == PanelKind::Align)); assert!(restored.project_search.is_empty()); } @@ -277,7 +254,7 @@ fn restored_viewer_slots_do_not_reuse_ids_or_restore_document_links() { let config = MemoryConfig::default(); let mut ui = UiState::default(); let mut store = WorkspaceStore::load(Some(&config), &mut ui); - let two = |viewer| Workspace::new(Layout { root: Some(tabs(&[PanelKind::Composition, PanelKind::Viewer(viewer)])), floating: vec![] }); + let two = |viewer| Workspace::new(Layout::new(Some(tabs(&[PanelKind::Composition, PanelKind::Viewer(viewer)])), vec![])); ui.dock = two(2); ui.saved_workspaces.insert("Two views".into(), two(5)); ui.viewers.insert(2, Some(42)); @@ -296,15 +273,12 @@ fn invalid_viewer_ids_are_rejected_in_every_workspace_reference() { for location in 0..8 { let mut snapshot = Snapshot::capture(&UiState::default()); let panel = PanelKind::Viewer(id); - let docked = Workspace::new(Layout { root: Some(tabs(&[panel])), floating: vec![] }); - let stacked = - Workspace::new(Layout { root: Some(Node::Stack { entries: vec![StackEntry { panel, open: true, height: None }] }), floating: vec![] }); - let floating = Workspace::new(Layout { - root: Some(tabs(&[PanelKind::Composition])), - floating: vec![Floating::single(vec![panel], 0, [0.0, 0.0, 200.0, 100.0])], - }); - let mut hidden = Workspace::new(Layout { root: Some(tabs(&[PanelKind::Composition, panel])), floating: vec![] }); - hidden.apply(Action::Close { panel }, crate::dock::permissions).unwrap(); + let docked = Workspace::new(Layout::new(Some(tabs(&[panel])), vec![])); + let stacked = Workspace::new(Layout::new(Some(Node::stack(vec![StackEntry::new(panel)])), vec![])); + let floating = + Workspace::new(Layout::new(Some(tabs(&[PanelKind::Composition])), vec![Floating::single(1, vec![panel], 0, rect(0.0, 0.0, 200.0, 100.0))])); + let mut hidden = Workspace::new(Layout::new(Some(tabs(&[PanelKind::Composition, panel])), vec![])); + hidden.apply(Action::close(panel), false, crate::dock::permissions).unwrap(); match location { 0 => snapshot.focused = panel, 1 => snapshot.maximized = Some(panel), @@ -324,19 +298,32 @@ fn invalid_viewer_ids_are_rejected_in_every_workspace_reference() { } } +/// Lock Workspace persists with the workspaces; a file without it loads unlocked, and a file +/// whose workspace carries the earlier format's own lock keeps it once. #[test] -fn hostile_native_window_places_are_made_safe_on_load() { +fn the_workspace_lock_survives_a_save_and_an_earlier_files_lock_carries_over() { let config = MemoryConfig::default(); let mut ui = UiState::default(); let mut store = WorkspaceStore::load(Some(&config), &mut ui); - ui.dock.apply(Action::Float { panel: PanelKind::Project, rect: [10.0, 10.0, 300.0, 200.0] }, crate::dock::permissions).unwrap(); - ui.dock.apply(Action::SetNative { panel: PanelKind::Project, rect: Some([90_000.0, -90_000.0, 1.0e5, 0.5]) }, crate::dock::permissions).unwrap(); + ui.dock_locked = true; assert!(store.save(Some(&config), &ui).unwrap()); let mut restored = UiState::default(); WorkspaceStore::load(Some(&config), &mut restored); - let native = restored.dock.layout.floating.iter().find(|w| w.contains(&PanelKind::Project)).and_then(|w| w.native).unwrap(); - assert_eq!(native, crate::dock_ui::sanitized_window_rect(native)); - assert!(native[2] <= crate::dock_ui::PANEL_WINDOW_MAX && native[3] >= crate::dock_ui::PANEL_WINDOW_MIN[1]); + assert!(restored.dock_locked); + + let mut saved: serde_json::Value = serde_json::from_str(&config.read(FILE).unwrap()).unwrap(); + saved.as_object_mut().unwrap().remove("locked"); + config.write(FILE, &saved.to_string()).unwrap(); + let mut unlocked = UiState::default(); + WorkspaceStore::load(Some(&config), &mut unlocked); + assert!(!unlocked.dock_locked, "a file without the lock loads unlocked"); + + saved["dock"]["locked"] = serde_json::json!(true); + config.write(FILE, &saved.to_string()).unwrap(); + let mut earlier = UiState::default(); + let loaded = WorkspaceStore::load(Some(&config), &mut earlier); + assert_eq!(loaded.error, None); + assert!(earlier.dock_locked, "the earlier workspace's own lock carries over"); } #[test] diff --git a/crates/ui-egui/tests/it/main.rs b/crates/ui-egui/tests/it/main.rs index 4444fcc5e..5e6ce22f0 100644 --- a/crates/ui-egui/tests/it/main.rs +++ b/crates/ui-egui/tests/it/main.rs @@ -29,7 +29,6 @@ mod ui_crypto_pick; mod ui_crypto_pick_undo; mod ui_crypto_select; mod ui_dialog_preview; -mod ui_dock_resize; mod ui_drag_drop; mod ui_effect_controls; mod ui_effect_drop_highlight; diff --git a/crates/ui-egui/tests/it/shared_docking_ui.rs b/crates/ui-egui/tests/it/shared_docking_ui.rs index 12e598a19..052d4f8a4 100644 --- a/crates/ui-egui/tests/it/shared_docking_ui.rs +++ b/crates/ui-egui/tests/it/shared_docking_ui.rs @@ -1,7 +1,6 @@ //! EffectCraft's workspaces in craft-ui's shared docking: transactions, the command path, pointer //! gestures and persistence. -use craft_behavior::dock::{Action, DockPlacement, Node, StackEntry}; -use craft_ui::docking::Zone; +use craft_behavior::dock::{Action, DockPlacement, Node}; use effectcraft_engine::Session; use effectcraft_ui_egui::{ EffectcraftApp, @@ -17,7 +16,12 @@ fn invoke(app: &mut EffectcraftApp, id: &str, params: serde_json::Value) -> Resu } fn floating(app: &EffectcraftApp) -> &[dock::Floating] { - &app.ui.dock.layout.floating + &app.ui.dock.layout().floating +} + +/// A rect as `[x, y, width, height]`. +fn rect4(r: Rect) -> [f32; 4] { + [r.min.x, r.min.y, r.width(), r.height()] } #[test] @@ -27,28 +31,28 @@ fn shared_move_preserves_accordion_metadata_and_unrelated_active_tabs() { dock::tabs(&[PanelKind::Project, PanelKind::Composition, PanelKind::Layer], 1), dock::stack(&[(PanelKind::Preview, false, Some(73.0)), (PanelKind::Properties, true, Some(211.0)), (PanelKind::Align, false, None)]), )); - workspace.apply(Action::Close { panel: PanelKind::Project }, dock::permissions).unwrap(); + workspace.apply(Action::close(PanelKind::Project), false, dock::permissions).unwrap(); assert!(workspace.is_visible(PanelKind::Composition)); - workspace - .apply(Action::Move { panel: PanelKind::Preview, anchor: PanelKind::Layer, placement: DockPlacement::Tab { before: None } }, dock::permissions) - .unwrap(); - let Some(Node::Split { second, size, .. }) = &workspace.layout.root else { panic!("split was lost") }; + workspace.apply(Action::move_beside(PanelKind::Preview, PanelKind::Layer, DockPlacement::tab(None)), false, dock::permissions).unwrap(); + let Some(Node::Split { second, size, .. }) = &workspace.layout().root else { panic!("split was lost") }; assert_eq!(*size, SplitSize::FixedSecond(300.0)); - let Node::Stack { entries } = second.as_ref() else { panic!("stack was lost") }; + let Node::Stack { entries, .. } = second.as_ref() else { panic!("stack was lost") }; // The unrelated stacked panels keep their exact state. - assert_eq!( - entries, - &vec![StackEntry { panel: PanelKind::Properties, open: true, height: Some(211.0) }, StackEntry { panel: PanelKind::Align, open: false, height: None }] - ); + let entries: Vec<_> = entries.iter().map(|entry| (entry.panel, entry.open, entry.height)).collect(); + assert_eq!(entries, [(PanelKind::Properties, true, Some(211.0)), (PanelKind::Align, false, None)]); assert_eq!(workspace.group_of(PanelKind::Preview), vec![PanelKind::Composition, PanelKind::Layer, PanelKind::Preview]); // Rejected moves and geometry change nothing. let before = workspace.clone(); assert!( workspace - .apply(Action::Move { panel: PanelKind::Preview, anchor: PanelKind::Audio, placement: DockPlacement::Split(Zone::Left) }, dock::permissions) + .apply(Action::move_beside(PanelKind::Preview, PanelKind::Audio, DockPlacement::Split(craft_behavior::DockSide::Start)), false, dock::permissions) + .is_err() + ); + assert!( + workspace + .apply(Action::float(PanelKind::Preview, effectcraft_ui_egui::dock_command::rect_of([0.0, 0.0, f32::INFINITY, 200.0])), false, dock::permissions) .is_err() ); - assert!(workspace.apply(Action::Float { panel: PanelKind::Preview, rect: [0.0, 0.0, f32::INFINITY, 200.0] }, dock::permissions).is_err()); assert_eq!(workspace, before); } @@ -66,14 +70,14 @@ fn every_builtin_workspace_validates_and_roundtrips_with_dynamic_identities() { let ids = |layout: &Layout| layout.floating.iter().map(|w| w.id).collect::>(); assert_eq!(ids(&dock::workspace("Undocked Panels")), ids(&dock::workspace("Undocked Panels"))); let mut workspace = dock::docked(dock::tabs(&[PanelKind::Composition, PanelKind::Viewer(42), PanelKind::ScriptPanel(77)], 1)); - workspace.apply(Action::Float { panel: PanelKind::ScriptPanel(77), rect: [20.0, 30.0, 400.0, 300.0] }, dock::permissions).unwrap(); + workspace + .apply(Action::float(PanelKind::ScriptPanel(77), effectcraft_ui_egui::dock_command::rect_of([20.0, 30.0, 400.0, 300.0])), false, dock::permissions) + .unwrap(); let text = serde_json::to_string(&workspace).unwrap(); assert!(text.contains("\"ScriptPanel\":77") && text.contains("\"Viewer\":42"), "{text}"); assert_eq!(serde_json::from_str::(&text).unwrap(), workspace); - workspace - .apply(Action::Move { panel: PanelKind::ScriptPanel(77), anchor: PanelKind::Viewer(42), placement: DockPlacement::Tab { before: None } }, dock::permissions) - .unwrap(); - assert!(workspace.layout.floating.is_empty()); + workspace.apply(Action::move_beside(PanelKind::ScriptPanel(77), PanelKind::Viewer(42), DockPlacement::tab(None)), false, dock::permissions).unwrap(); + assert!(workspace.layout().floating.is_empty()); assert!(workspace.is_visible(PanelKind::ScriptPanel(77))); } @@ -114,7 +118,8 @@ fn pointer_drop_merges_floats_and_redocks_without_project_changes() { ), dock::tabs(&[PanelKind::Timeline], 0), )); - let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); + let mut h = + Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(4); let project = h.state().session.project.clone(); let times = h.state().session.state.times.clone(); @@ -132,14 +137,14 @@ fn pointer_drop_merges_floats_and_redocks_without_project_changes() { let grips: Vec<_> = h.query_all_by_label("Resize panel window").collect(); assert!(!grips.is_empty() && grips.iter().all(|grip| grip.accesskit_node().role() == egui::accesskit::Role::Button)); // Its corner resizes it and its title bar moves it. - let original = floating(h.state())[0].rect; + let original = rect4(floating(h.state())[0].rect); let grip = rect(&h, "panel.float.0.resize").center(); drag(&mut h, grip, grip - vec2(36.0, 24.0), Modifiers::NONE); - let resized = floating(h.state())[0].rect; + let resized = rect4(floating(h.state())[0].rect); assert!(resized[2] < original[2] - 25.0 && resized[3] < original[3] - 15.0, "{original:?} -> {resized:?}"); let bar = rect(&h, "panel.float.0.move"); drag(&mut h, bar.center(), bar.center() - vec2(24.0, 18.0), Modifiers::NONE); - let moved = floating(h.state())[0].rect; + let moved = rect4(floating(h.state())[0].rect); assert!(moved[0] < resized[0] - 15.0 && moved[1] < resized[1] - 10.0, "{resized:?} -> {moved:?}"); // Its tab dropped on a docked tab strip docks it again. let from = rect(&h, "panel.tab.Info").center(); @@ -157,10 +162,10 @@ fn current_and_named_floating_layouts_survive_restart() { use std::sync::Arc; let store = Arc::new(MemoryConfig::default()); let mut app = EffectcraftApp::new(Session { config: Some(store.clone()), ..Default::default() }); - app.apply_dock(Action::Float { panel: PanelKind::Project, rect: [45.0, 65.0, 430.0, 310.0] }).unwrap(); + app.apply_dock(Action::float(PanelKind::Project, effectcraft_ui_egui::dock_command::rect_of([45.0, 65.0, 430.0, 310.0]))).unwrap(); invoke(&mut app, "window.saveWorkspaceAs", json!({"name": "Shared float"})).unwrap(); let saved = app.ui.dock.clone(); - app.apply_dock(Action::MoveFloating { panel: PanelKind::Project, rect: [75.0, 95.0, 480.0, 360.0] }).unwrap(); + app.apply_dock(Action::move_floating(PanelKind::Project, effectcraft_ui_egui::dock_command::rect_of([75.0, 95.0, 480.0, 360.0]))).unwrap(); let current = app.ui.dock.clone(); eframe::App::on_exit(&mut app); let mut restarted = EffectcraftApp::new(Session { config: Some(store), ..Default::default() }); @@ -181,12 +186,12 @@ fn float_command_rejects_malformed_rectangles_and_keeps_one_docked_panel() { // The last docked panel stays docked, whether it moves alone, with its group or by command. app.ui.dock = dock::docked(dock::tabs(&[PanelKind::Project], 0)); let before = app.ui.dock.clone(); - assert!(app.apply_dock(Action::Float { panel: PanelKind::Project, rect: [1.0, 2.0, 300.0, 200.0] }).is_err()); + assert!(app.apply_dock(Action::float(PanelKind::Project, effectcraft_ui_egui::dock_command::rect_of([1.0, 2.0, 300.0, 200.0]))).is_err()); assert!(invoke(&mut app, "window.panel.float", json!({"panel": "Project", "group": true})).is_err()); assert_eq!(app.ui.dock, before); // Closing it is allowed. invoke(&mut app, "window.closePanel", json!({"panel": "Project"})).unwrap(); - assert!(app.ui.dock.layout.root.is_none()); + assert!(app.ui.dock.layout().root.is_none()); } /// A floating panel dragged towards the window's bottom edge moves there, and its title bar @@ -204,11 +209,11 @@ fn floating_panel_dragged_towards_the_window_edge_keeps_moving() { h.run_steps(3); let bar = rect(&h, "panel.float.0.move"); drag(&mut h, bar.center(), bar.center() + vec2(40.0, 420.0), Modifiers::NONE); - let moved = floating(h.state())[0].rect; + let moved = rect4(floating(h.state())[0].rect); assert!(moved[1] > 550.0, "the panel moved down: {moved:?}"); let bar = rect(&h, "panel.float.0.move"); drag(&mut h, bar.center(), bar.center() - vec2(30.0, 200.0), Modifiers::NONE); - let back = floating(h.state())[0].rect; + let back = rect4(floating(h.state())[0].rect); assert!(back[1] < moved[1] - 150.0, "{moved:?} -> {back:?}"); } @@ -221,15 +226,15 @@ fn catalog_docking_action_supports_resize_reorder_and_floating_geometry() { dock::tabs(&[PanelKind::Composition], 0), )); for action in [ - Action::ResizeSplit { path: vec![], size: SplitSize::FixedFirst(360.0) }, - Action::Move { panel: PanelKind::Info, anchor: PanelKind::Project, placement: DockPlacement::Tab { before: Some(PanelKind::Project) } }, - Action::Float { panel: PanelKind::Info, rect: [20.0, 40.0, 300.0, 200.0] }, - Action::MoveFloating { panel: PanelKind::Info, rect: [45.0, 65.0, 330.0, 240.0] }, + Action::resize_split(vec![], SplitSize::FixedFirst(360.0)), + Action::move_beside(PanelKind::Info, PanelKind::Project, DockPlacement::tab(Some(PanelKind::Project))), + Action::float(PanelKind::Info, effectcraft_ui_egui::dock_command::rect_of([20.0, 40.0, 300.0, 200.0])), + Action::move_floating(PanelKind::Info, effectcraft_ui_egui::dock_command::rect_of([45.0, 65.0, 330.0, 240.0])), ] { invoke(&mut app, "window.dockAction", json!({"action": action})).unwrap(); } - assert_eq!(floating(&app)[0].rect, [45.0, 65.0, 330.0, 240.0]); - let Some(Node::Split { size, .. }) = &app.ui.dock.layout.root else { panic!("split lost") }; + assert_eq!(rect4(floating(&app)[0].rect), [45.0, 65.0, 330.0, 240.0]); + let Some(Node::Split { size, .. }) = &app.ui.dock.layout().root else { panic!("split lost") }; assert_eq!(*size, SplitSize::FixedFirst(360.0)); let before = app.ui.dock.clone(); assert!(invoke(&mut app, "window.dockAction", json!({"action": {"ResizeSplit": {"path": [true, true], "size": {"Ratio": 0.5}}}})).is_err()); @@ -252,7 +257,7 @@ fn ui_dock_and_window_panel_commands_parse_craft_ui_commands() { invoke(&mut app, "ui.dock", json!({"action": {"Activate": {"panel": "Layer"}}})).unwrap(); assert!(app.ui.dock.is_visible(PanelKind::Layer)); invoke(&mut app, "ui.dock", json!({"operation": "float", "panel": "Info", "rect": [100, 100, 300, 200]})).unwrap(); - assert_eq!(floating(&app)[0].rect, [100.0, 100.0, 300.0, 200.0]); + assert_eq!(rect4(floating(&app)[0].rect), [100.0, 100.0, 300.0, 200.0]); // `window.panel.*` takes EffectCraft's panel names too. invoke(&mut app, "window.panel.dock", json!({"panel": "Info", "anchor": "Project", "zone": "right"})).unwrap(); assert!(floating(&app).is_empty() && app.ui.dock.is_docked(PanelKind::Info)); @@ -284,10 +289,7 @@ fn raw_open_actions_are_rejected_through_every_docking_route() { let mut app = EffectcraftApp::new(Session::default()); let before = app.ui.dock.clone(); for panel in [PanelKind::ScriptPanel(77), PanelKind::Viewer(42)] { - for action in [ - Action::Open { panel, anchor: Some(PanelKind::Project) }, - Action::OpenAt { panel, anchor: PanelKind::Project, placement: DockPlacement::Tab { before: None } }, - ] { + for action in [Action::open(panel, Some(PanelKind::Project)), Action::open_at(panel, PanelKind::Project, DockPlacement::tab(None))] { for id in ["ui.dock", "window.panel.layout", "window.dockAction"] { let error = invoke(&mut app, id, json!({"action": action})).unwrap_err(); assert!(error.contains("panel open commands"), "{id}: {error}"); @@ -311,9 +313,9 @@ fn catalog_close_keeps_dynamic_panel_identity_and_releases_viewers() { app.ui.viewers.insert(42, Some(7)); app.ui.maximized = Some(PanelKind::Viewer(42)); for panel in [PanelKind::Viewer(42), PanelKind::ScriptPanel(77)] { - invoke(&mut app, "window.dockAction", json!({"action": Action::Close { panel }})).unwrap(); + invoke(&mut app, "window.dockAction", json!({"action": Action::close(panel)})).unwrap(); assert!(!app.ui.dock.is_open(panel)); - assert!(app.ui.dock.hidden.iter().any(|(p, _)| *p == panel), "{panel:?} keeps its place"); + assert!(app.ui.dock.hidden().iter().any(|(p, _)| *p == panel), "{panel:?} keeps its place"); } assert!(app.ui.dock.is_docked(PanelKind::Composition)); assert_eq!(app.ui.maximized, None); @@ -326,7 +328,8 @@ fn stacked_panels_resize_by_pointer_without_changing_closed_entries() { session.execute("comp.new", json!({"width": 160, "height": 90, "duration": 1})).unwrap(); let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; - let mut h = Harness::builder().with_size(vec2(1000.0, 720.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); + let mut h = + Harness::builder().with_size(vec2(1000.0, 720.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(4); h.state_mut().ui.dock = dock::docked(dock::stack(&[(PanelKind::Preview, true, Some(100.0)), (PanelKind::Properties, true, None), (PanelKind::Align, false, Some(77.0))])); @@ -337,9 +340,9 @@ fn stacked_panels_resize_by_pointer_without_changing_closed_entries() { drag(&mut h, from, from + vec2(0.0, 16.0), Modifiers::NONE); let after = rect(&h, "panel.Preview").height(); assert!((after - before - 16.0).abs() < 2.0, "{before} -> {after}"); - let Some(Node::Stack { entries }) = &h.state().ui.dock.layout.root else { panic!("stack lost") }; + let Some(Node::Stack { entries, .. }) = &h.state().ui.dock.layout().root else { panic!("stack lost") }; assert!(entries[0].height.unwrap_or_default() > 100.0, "{entries:?}"); - assert_eq!(entries[2], StackEntry { panel: PanelKind::Align, open: false, height: Some(77.0) }); + assert_eq!((entries[2].panel, entries[2].open, entries[2].height), (PanelKind::Align, false, Some(77.0))); assert!(std::sync::Arc::ptr_eq(&project, &h.state().session.project)); } @@ -348,7 +351,7 @@ fn failed_close_preserves_viewer_lifecycle_and_maximize_state() { let mut app = EffectcraftApp::new(Session::default()); // A locked workspace refuses the close. app.ui.dock = dock::docked(dock::tabs(&[PanelKind::Composition, PanelKind::Viewer(42)], 1)); - app.ui.dock.locked = true; + app.ui.dock_locked = true; app.ui.maximized = Some(PanelKind::Viewer(42)); app.ui.viewers.insert(42, Some(3)); app.ui.active_viewer = 42; diff --git a/crates/ui-egui/tests/it/ui_dock_resize.rs b/crates/ui-egui/tests/it/ui_dock_resize.rs deleted file mode 100644 index 29af2cdce..000000000 --- a/crates/ui-egui/tests/it/ui_dock_resize.rs +++ /dev/null @@ -1,85 +0,0 @@ -//! Shared pane resizing in the full application, including application shortcut ownership. - -use crate::gpu_test::RenderSerial; -use craft_ui::docking::{Divider, DockArea, Hit}; -use effectcraft_engine::Session; -use effectcraft_ui_egui::EffectcraftApp; -use effectcraft_ui_egui::dock::{self, Node, PanelKind, SplitSize}; -use effectcraft_ui_egui::theme::ThemeKind; -use egui::{Event, Key, Modifiers, PointerButton, Rect, pos2, vec2}; -use egui_kittest::Harness; -use serde_json::json; - -fn snapshots(h: &mut Harness<'_, EffectcraftApp>, directory: Option<&std::path::Path>, phase: &str) { - let Some(directory) = directory else { return }; - std::fs::create_dir_all(directory).unwrap(); - for (name, theme) in [("dark", ThemeKind::Dark), ("darker", ThemeKind::Darker), ("light", ThemeKind::Light)] { - let ctx = h.ctx.clone(); - h.state_mut().set_theme(&ctx, theme); - h.run_steps(3); - h.render_serialized().unwrap().save(directory.join(format!("effectcraft-{phase}-{name}.png"))).unwrap(); - } - let ctx = h.ctx.clone(); - h.state_mut().set_theme(&ctx, ThemeKind::Dark); - h.run_steps(3); -} - -fn first_size(h: &Harness<'_, EffectcraftApp>) -> f32 { - match &h.state().ui.dock.layout.root { - Some(Node::Split { size: SplitSize::FixedFirst(value), .. }) => *value, - ref other => panic!("fixed-size mode changed: {other:?}"), - } -} - -#[test] -fn focused_dock_resize_owns_arrows_and_keeps_pointer_dragging() { - let _device = crate::gpu_test::lock(); - let mut session = Session::default(); - session.execute("comp.new", json!({"name": "Split test", "width": 160, "height": 90, "duration": 1})).unwrap(); - session.execute("layer.newSolid", json!({"name": "Selected", "color": [1.0, 0.0, 0.0, 1.0]})).unwrap(); - let mut app = EffectcraftApp::new(session); - app.ui.start_screen = false; - let directory = std::env::var_os("CRAFT_UI_PANES_SNAPSHOT_DIR").map(std::path::PathBuf::from); - let mut builder = Harness::builder().with_size(vec2(1400.0, 900.0)).with_max_steps(10_000); - if directory.is_some() { - builder = builder.wgpu(); - } - let mut h = builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); - h.run_steps(4); - snapshots(&mut h, directory.as_deref(), "workspace"); - h.state_mut().ui.focused = PanelKind::Composition; - h.state_mut().ui.dock = - dock::docked(dock::hsplit(SplitSize::FixedFirst(400.0), dock::tabs(&[PanelKind::Project], 0), dock::tabs(&[PanelKind::Composition], 0))); - h.run_steps(3); - let before_project = h.state().session.project.clone(); - let before_times = h.state().session.state.times.clone(); - let id = DockArea::::hit_id(effectcraft_ui_egui::dock_ui::area_id(), &Hit::Divider(Divider::Split(Vec::new()))); - h.ctx.memory_mut(|memory| memory.request_focus(id)); - h.run_steps(2); - assert_eq!(h.ctx.memory(|memory| memory.focused()), Some(id)); - snapshots(&mut h, directory.as_deref(), "focused-resize"); - h.event(Event::Key { key: Key::ArrowRight, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::NONE }); - h.step(); - h.event(Event::Key { key: Key::ArrowRight, physical_key: None, pressed: false, repeat: false, modifiers: Modifiers::NONE }); - h.step(); - assert_eq!(first_size(&h), 408.0); - assert_eq!(h.state().session.state.times, before_times); - assert!(std::sync::Arc::ptr_eq(&h.state().session.project, &before_project), "the viewer shortcut must not nudge a selected layer"); - - h.run_steps(2); - let element = h.state().auto.find("dock.gutter.").unwrap(); - let from = Rect::from_min_size(pos2(element.rect[0], element.rect[1]), vec2(element.rect[2], element.rect[3])).center(); - h.event(Event::PointerMoved(from)); - h.step(); - h.event(Event::PointerButton { pos: from, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }); - h.step(); - for offset in [5.0, 10.0, 15.0, 20.0] { - h.event(Event::PointerMoved(from + vec2(offset, 0.0))); - h.step(); - } - h.event(Event::PointerButton { pos: from + vec2(20.0, 0.0), button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); - h.step(); - assert_eq!(first_size(&h), 428.0); - assert_eq!(h.state().session.state.times, before_times); - assert!(std::sync::Arc::ptr_eq(&h.state().session.project, &before_project)); -} diff --git a/crates/ui-egui/tests/it/ui_effect_controls.rs b/crates/ui-egui/tests/it/ui_effect_controls.rs index 0a8a5095b..b51490176 100644 --- a/crates/ui-egui/tests/it/ui_effect_controls.rs +++ b/crates/ui-egui/tests/it/ui_effect_controls.rs @@ -104,7 +104,11 @@ fn header_arrow_harness() -> (Harness<'static, EffectcraftApp>, LayerId, [(u64, let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1000.0, 700.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1000.0, 700.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(4); (h, LayerId(lid), effects) } @@ -165,7 +169,12 @@ fn effect_header_arrows_ignore_hidden_panels_with_stale_focus() { "closed" => h.state_mut().close_panel(PanelKind::EffectControls), "maximized" => h.state_mut().toggle_maximize(PanelKind::Composition), "floating under maximized" => { - h.state_mut().apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::EffectControls, rect: [40.0, 40.0, 600.0, 400.0] }).unwrap(); + h.state_mut() + .apply_dock(craft_behavior::dock::Action::float( + PanelKind::EffectControls, + effectcraft_ui_egui::dock_command::rect_of([40.0, 40.0, 600.0, 400.0]), + )) + .unwrap(); h.state_mut().toggle_maximize(PanelKind::Composition); } _ => h.state_mut().ui.start_screen = true, @@ -187,10 +196,15 @@ fn effect_header_arrows_work_wherever_effect_controls_is_on_screen() { let (mut h, lid, [(fx, prop), _, _]) = header_arrow_harness(); h.state_mut().toggle_maximize(PanelKind::EffectControls); if place == "floating" { - h.state_mut().apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::EffectControls, rect: [40.0, 40.0, 600.0, 400.0] }).unwrap(); + h.state_mut() + .apply_dock(craft_behavior::dock::Action::float( + PanelKind::EffectControls, + effectcraft_ui_egui::dock_command::rect_of([40.0, 40.0, 600.0, 400.0]), + )) + .unwrap(); } else { - let placement = craft_behavior::dock::DockPlacement::Tab { before: None }; - h.state_mut().apply_dock(craft_behavior::dock::Action::Move { panel: PanelKind::EffectControls, anchor: PanelKind::Composition, placement }).unwrap(); + let placement = craft_behavior::dock::DockPlacement::tab(None); + h.state_mut().apply_dock(craft_behavior::dock::Action::move_beside(PanelKind::EffectControls, PanelKind::Composition, placement)).unwrap(); h.state_mut().toggle_maximize(PanelKind::Composition); assert_eq!(h.state().ui.maximized, Some(PanelKind::Composition), "the frame was maximized from its Composition tab"); } @@ -439,7 +453,11 @@ fn effect_header_down_and_up_scroll_the_picked_effect_into_view() { app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); app.ui.focused = PanelKind::EffectControls; - let mut h = Harness::builder().with_size(egui::vec2(800.0, 300.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(800.0, 300.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(4); let panel = rect_of(&h, "panel.EffectControls"); let last = fx[fx.len() - 1]; @@ -463,7 +481,8 @@ fn effect_header_down_and_up_scroll_the_picked_effect_into_view() { #[test] fn effect_controls_widgets_register_automation_ids() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let have = ids(&h); let want = [ @@ -515,7 +534,8 @@ fn tint_swap_button_targets_its_instance_and_undoes_both_colors() { let blur = s.execute("effect.apply", json!({"effect": "Gaussian Blur"})).unwrap()["effects"][0].as_u64().unwrap(); let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let id = format!("effectControls.effect.{target}.swapColors"); let rect = h.state().auto.find(&id).unwrap().rect; @@ -542,7 +562,8 @@ fn tint_swap_button_targets_its_instance_and_undoes_both_colors() { #[test] fn crosshair_and_eyedropper_pick_from_the_viewer() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); // Crosshair: a click at comp (330, 190) is layer (105, 55) on the 200%-scaled layer // (anchor (100, 50) at position (320, 180)). @@ -580,7 +601,8 @@ fn the_eyedropper_samples_under_the_pointer_in_a_region_of_interest() { app.session.execute("view.setRegionOfInterest", json!({"rect": [0.0, 0.0, 320.0, 180.0]})).unwrap(); // (Not the red it will pick.) app.session.execute("prop.set", json!({"layer": x.small, "prop": x.color, "value": [0.0, 0.0, 1.0, 1.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h.state_mut().ui.fx_pick = Some(FxPick { kind: "color".into(), layer: x.small, prop: x.color, name: "Color".into() }); h.step(); @@ -611,7 +633,10 @@ fn the_eyedropper_stays_armed_until_the_viewer_has_a_frame() { let KV::Color(c) = v else { panic!("{v:?}") }; c }; - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.fx_pick = Some(FxPick { kind: "color".into(), layer: top, prop, name: "Color".into() }); h.step(); let pos = effectcraft_ui_egui::panels::viewer::comp_to_screen(&h.ctx, [100.0, 100.0]).unwrap(); @@ -642,7 +667,8 @@ fn keyer_eyedropper_picks_the_screen_from_the_effect_input() { s.state.selected_layers = vec![LayerId(screen)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); h.state_mut().ui.fx_pick = Some(FxPick { kind: "color".into(), layer: screen, prop, name: "Screen Colour".into() }); h.step(); @@ -664,7 +690,8 @@ fn keyer_eyedropper_picks_the_screen_from_the_effect_input() { #[test] fn command_clicking_an_effect_twirl_closes_and_opens_its_groups() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); let fx = h.state_mut().session.execute("effect.apply", json!({"layers": [x.small], "effect": "Color Grading"})).unwrap()["effects"][0].as_u64().unwrap(); // Only this effect open, so its header is on screen. let l = layer(&h.state().session, x.small); @@ -694,7 +721,8 @@ fn command_clicking_an_effect_twirl_closes_and_opens_its_groups() { #[test] fn shift_click_on_effect_headers_selects_a_range_and_command_toggles() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); let fx: Vec = layer(&h.state().session, x.small).effects().unwrap().groups().map(|g| g.uid).collect(); // All twirled closed, so every header is on screen. h.state_mut().ui.fx_closed.extend(fx.iter().copied()); @@ -756,7 +784,8 @@ fn type_into(h: &mut Harness<'_, EffectcraftApp>, id: &str, text: &str) { #[test] fn angle_revolutions_scrub_and_take_typing() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let angle = |h: &Harness<'_, EffectcraftApp>| layer(&h.state().session, x.small).effects().unwrap().find(x.angle).unwrap().value.as_f64(); h.state_mut().session.execute("prop.set", json!({"layer": x.small, "prop": x.angle, "value": 45.0})).unwrap(); @@ -820,7 +849,8 @@ fn right_click_in_effect_controls_shows_the_effect_menu() { s.state.selected_layers = vec![LayerId(b), LayerId(a)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); let category = " Blur & Sharpen"; // An effect's header: its own menu. @@ -883,7 +913,8 @@ fn extractor_offers_the_exr_layers_and_channels() { s.state.selected_layers = vec![LayerId(l)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let values = |h: &Harness<'_, EffectcraftApp>| -> Vec { let l = layer(&h.state().session, l); @@ -956,7 +987,8 @@ fn cryptomatte_layer_popup_follows_the_footage() { s.state.selected_layers = vec![LayerId(l)]; let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); // The file has only CryptoMaterial, so that is what the closed popup shows, and all it lists. assert!(h.query_by_label("CryptoMaterial").is_some() && h.query_by_label("CryptoObject").is_none()); @@ -996,7 +1028,8 @@ fn point_picker_handle_follows_hover_then_commits_once_across_effects() { app.show_panel(PanelKind::EffectControls); app.ui.viewer.zoom = Some(0.85); app.ui.viewer.pan = [25.0, -10.0]; - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let id = format!("viewer.effectPoint.{point}"); let original = rect_of(&h, &id).center(); @@ -1027,7 +1060,8 @@ fn point_picker_handle_follows_hover_then_commits_once_across_effects() { #[test] fn point_picker_preview_cancels_and_works_with_layer_controls_hidden() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let value = layer(&h.state().session, x.small).props.find(x.point).unwrap().value.clone(); let undo = h.state().session.history.undo.len(); @@ -1058,7 +1092,8 @@ fn radial_center_stays_draggable_when_its_property_is_selected() { let effect = l.effects().unwrap().groups().find(|g| g.match_id == "ec.blur.ccradialfast").unwrap(); let point = effect.get("center").unwrap().uid; app.session.state.selected_props = vec![(LayerId(x.small), point)]; - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let id = format!("viewer.effectPoint.{point}"); assert!(ids(&h).contains(&id), "selected point must keep its handle"); @@ -1085,7 +1120,11 @@ fn radial_center_stays_draggable_when_its_property_is_selected() { #[test] fn clicking_an_effect_parameter_activates_its_header_and_handles() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); let name = rect_of(&h, &format!("effectControls.prop.{}.name", x.point)).center(); click(&mut h, name); @@ -1111,7 +1150,8 @@ fn non_point_parameters_activate_handles_across_effect_families() { s.state.selected_props.clear(); let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let name = rect_of(&h, &format!("effectControls.prop.{prop}.name")).center(); click(&mut h, name); @@ -1125,7 +1165,8 @@ fn non_point_parameters_activate_handles_across_effect_families() { #[test] fn custom_effect_editors_activate_their_owner() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let graph = rect_of(&h, &format!("effectControls.effect.{}.curves.graph", x.curves)).center(); click(&mut h, graph); @@ -1167,7 +1208,8 @@ fn file_and_text_parameters_have_widgets() { assert_eq!(exts, ["cube"]); vec![pick.lock().unwrap().clone()] })); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); settle(&mut h); let ctx = h.ctx.clone(); let r = effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "effect.apply", json!({"effect": "Apply Color LUT"})).unwrap(); @@ -1217,7 +1259,11 @@ fn file_and_text_parameters_have_widgets() { #[test] fn effect_control_name_can_be_renamed_from_its_header() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); let name = format!("effectControls.effect.{}.name", x.point_fx); let point = rect_of(&h, &name).center(); @@ -1242,7 +1288,11 @@ fn effect_control_name_can_be_renamed_from_its_header() { #[test] fn effect_rename_opens_with_the_name_selected() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); let edit = format!("effectControls.effect.{}.nameEdit", x.point_fx); let current_name = @@ -1294,7 +1344,11 @@ fn effect_rename_opens_with_the_name_selected() { #[test] fn double_clicking_an_effect_property_name_reveals_it_in_the_timeline() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); let row = format!("timeline.prop.{}.name", x.point); assert!(!ids(&h).contains(&row), "the effect's property is not in the Timeline before the double-click"); @@ -1309,7 +1363,11 @@ fn double_clicking_an_effect_property_name_reveals_it_in_the_timeline() { #[test] fn effect_rename_escape_keeps_the_name() { let (app, x) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); let point = rect_of(&h, &format!("effectControls.effect.{}.name", x.point_fx)).center(); double_click(&mut h, point); @@ -1371,7 +1429,8 @@ fn select_layer(h: &mut Harness<'_, EffectcraftApp>, layer: u64) { #[test] fn locked_effect_controls_keep_their_layer_until_it_is_deleted() { let (app, a, b, fa, fb) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert!(shows_effect(&h, fa) && !shows_effect(&h, fb), "A is shown before locking"); let comp = h.state().session.active_comp_id().unwrap().0; @@ -1424,7 +1483,8 @@ fn locked_effect_controls_keep_their_layer_until_it_is_deleted() { #[test] fn replacing_the_project_unlocks_effect_controls() { let (app, a, b, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let lock = rect_of(&h, "panel.tab.EffectControls.lock").center(); click(&mut h, lock); @@ -1453,7 +1513,8 @@ fn a_lock_request_with_no_layer_shown_fails_and_keeps_the_other_comps_lock() { } } let (app, a, _, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h)["ok"], true); let kept = h.state().ui.effect_controls_lock; @@ -1484,7 +1545,8 @@ fn a_lock_request_while_locked_in_another_comp_fails() { } } let (app, a, _, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h)["ok"], true); let kept = h.state().ui.effect_controls_lock; @@ -1516,7 +1578,8 @@ fn a_lock_request_after_a_project_replacement_does_not_report_the_old_lock() { } } let (app, a, _, _, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h)["ok"], true); assert_eq!(h.state().ui.effect_controls_lock.map(|l| l.layer), Some(a)); @@ -1532,7 +1595,8 @@ fn a_lock_request_after_a_project_replacement_does_not_report_the_old_lock() { #[test] fn applying_an_effect_while_locked_keeps_the_selection() { let (app, a, b, fa, _) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); let lock = rect_of(&h, "panel.tab.EffectControls.lock").center(); click(&mut h, lock); @@ -1567,7 +1631,8 @@ fn effect_controls_lock_over_the_control_channel() { } } let (app, a, b, fa, fb) = two_layers(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); assert_eq!(send(&mut h, json!({"effectControlsLocked": true}))["ok"], true); assert_eq!(h.state().ui.effect_controls_lock.map(|l| l.layer), Some(a)); diff --git a/crates/ui-egui/tests/it/ui_panel_focus.rs b/crates/ui-egui/tests/it/ui_panel_focus.rs index 99d687379..04fa5ee57 100644 --- a/crates/ui-egui/tests/it/ui_panel_focus.rs +++ b/crates/ui-egui/tests/it/ui_panel_focus.rs @@ -19,7 +19,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("layer.newSolid", json!({"name": "Red", "color": [1.0, 0.0, 0.0, 1.0]})).unwrap(); s.state.open_comps = vec![ItemId(main)]; s.state.active_comp = Some(ItemId(main)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, other, main) } @@ -93,9 +96,9 @@ fn opening_a_comp_in_the_minimal_workspace_docks_the_viewer_above_the_timeline() invoke(&mut h, "window.closePanel", json!({"panel": "Composition"})); assert!(!h.state().ui.dock.is_docked(PanelKind::Composition)); invoke(&mut h, "comp.open", json!({"comp": other})); - match &h.state().ui.dock.layout.root { + match &h.state().ui.dock.layout().root { Some(Node::Split { axis: effectcraft_ui_egui::dock::SplitAxis::Vertical, first, second, .. }) => { - assert_eq!(**first, Node::Tabs { panels: vec![PanelKind::Composition], active: 0 }, "the viewer is on top"); + assert_eq!(**first, Node::tabs(vec![PanelKind::Composition], 0), "the viewer is on top"); assert!(matches!(&**second, Node::Tabs { panels, .. } if panels.contains(&PanelKind::Timeline))); } other => panic!("expected the viewer above the Timeline, got {other:?}"), diff --git a/crates/ui-egui/tests/it/ui_panel_windows.rs b/crates/ui-egui/tests/it/ui_panel_windows.rs index 9f9dec821..b4dee1600 100644 --- a/crates/ui-egui/tests/it/ui_panel_windows.rs +++ b/crates/ui-egui/tests/it/ui_panel_windows.rs @@ -5,17 +5,12 @@ use effectcraft_engine::Session; use effectcraft_ui_egui::EffectcraftApp; use effectcraft_ui_egui::dock::{PanelKind, WorkspaceExt as _}; -use effectcraft_ui_egui::dock_ui::sanitized_window_rect; use serde_json::json; fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, params: serde_json::Value) -> Result { effectcraft_ui_egui::menus::invoke(app, ctx, "window.panelWindow", params) } -fn native(app: &EffectcraftApp, panel: PanelKind) -> Option<[f32; 4]> { - app.ui.dock.layout.floating.iter().find(|w| w.contains(&panel)).and_then(|w| w.native) -} - #[test] fn panel_window_command_moves_a_docked_panel_into_its_own_window_and_back() { let mut app = EffectcraftApp::new(Session::default()); @@ -24,10 +19,8 @@ fn panel_window_command_moves_a_docked_panel_into_its_own_window_and_back() { assert_eq!(invoke(&mut app, &ctx, json!({"panel": "Project", "window": true})).unwrap(), json!({"window": true})); // Undocked first, then given a window of its own. assert!(!app.ui.dock.is_docked(PanelKind::Project)); - assert!(app.ui.dock.layout.floating.iter().any(|w| w.panels().copied().collect::>() == [PanelKind::Project])); + assert!(app.ui.dock.layout().floating.iter().any(|w| w.panels().copied().collect::>() == [PanelKind::Project])); assert!(app.in_panel_window(PanelKind::Project)); - let rect = native(&app, PanelKind::Project).unwrap(); - assert_eq!(rect, sanitized_window_rect(rect)); // Asking again changes nothing; no `window` toggles. assert_eq!(invoke(&mut app, &ctx, json!({"panel": "Project", "window": true})).unwrap(), json!({"window": true})); assert_eq!(invoke(&mut app, &ctx, json!({"panel": "Project"})).unwrap(), json!({"window": false})); @@ -49,36 +42,20 @@ fn panel_window_command_moves_a_docked_panel_into_its_own_window_and_back() { assert!(app.ui.dock.is_docked(PanelKind::Project)); } -#[test] -fn panel_windows_survive_restart_with_hostile_places_made_safe() { - use effectcraft_engine::config::MemoryConfig; - use std::sync::Arc; - let store = Arc::new(MemoryConfig::default()); - let mut app = EffectcraftApp::new(Session { config: Some(store.clone()), ..Default::default() }); - let ctx = egui::Context::default(); - invoke(&mut app, &ctx, json!({"panel": "Project", "window": true})).unwrap(); - let hostile = [90_000.0, -99_000.0, 99_000.0, 0.5]; - app.apply_dock(craft_behavior::dock::Action::SetNative { panel: PanelKind::Project, rect: Some(hostile) }).unwrap(); - eframe::App::on_exit(&mut app); - let restarted = EffectcraftApp::new(Session { config: Some(store), ..Default::default() }); - assert_eq!(native(&restarted, PanelKind::Project), Some(sanitized_window_rect(hostile))); - let [x, y, w, h] = sanitized_window_rect(hostile); - assert!(x <= 100_000.0 && y >= -100_000.0 && (160.0..=16_384.0).contains(&w) && (100.0..=16_384.0).contains(&h)); - assert!(sanitized_window_rect([f32::NAN, f32::INFINITY, f32::NAN, f32::NEG_INFINITY]).iter().all(|v| v.is_finite())); -} - #[test] fn a_click_on_a_floating_panel_does_nothing_while_a_dialog_is_open() { - use egui::{Event, Modifiers, PointerButton, pos2, vec2}; + use egui::{Event, Modifiers, PointerButton, vec2}; use egui_kittest::Harness; let mut app = EffectcraftApp::new(Session::default()); app.ui.start_screen = false; - app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::Project, rect: [80.0, 120.0, 320.0, 240.0] }).unwrap(); - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); + app.apply_dock(craft_behavior::dock::Action::float(PanelKind::Project, effectcraft_ui_egui::dock_command::rect_of([80.0, 120.0, 320.0, 240.0]))).unwrap(); + let mut h = + Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); + // The floating window's ×, by its accessible name. let close = |h: &Harness<'_, EffectcraftApp>| { - let e = h.state().auto.elements.iter().find(|e| e.id.starts_with("panel.float.") && e.id.ends_with(".close")).expect("the floating window's ×"); - pos2(e.rect[0] + e.rect[2] / 2.0, e.rect[1] + e.rect[3] / 2.0) + use egui_kittest::kittest::Queryable; + h.get_by_label("Close panel window").rect().center() }; let click = |h: &mut Harness<'_, EffectcraftApp>, pos| { h.event(Event::PointerMoved(pos)); diff --git a/crates/ui-egui/tests/it/ui_scrolling.rs b/crates/ui-egui/tests/it/ui_scrolling.rs index bec6fc244..af994d8e1 100644 --- a/crates/ui-egui/tests/it/ui_scrolling.rs +++ b/crates/ui-egui/tests/it/ui_scrolling.rs @@ -17,7 +17,8 @@ use super::ui_tail::drag; fn harness(w: f32, h: f32) -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(w, h)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = + Harness::builder().with_size(vec2(w, h)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -462,7 +463,8 @@ fn effect_values_stay_clear_of_the_keyframe_navigator() { app.session.execute("prop.toggleAnimation", json!({"layer": lid, "path": path})).unwrap(); app.session.execute("prop.set", json!({"layer": lid, "path": path, "value": [123456.7, 123456.7]})).unwrap(); let uid = app.session.active_comp().unwrap().layer(effectcraft_engine::project::LayerId(lid)).unwrap().props.prop(path).unwrap().uid; - app.apply_dock(craft_behavior::dock::Action::Float { panel: PanelKind::EffectControls, rect: [300.0, 150.0, 330.0, 500.0] }).unwrap(); + app.apply_dock(craft_behavior::dock::Action::float(PanelKind::EffectControls, effectcraft_ui_egui::dock_command::rect_of([300.0, 150.0, 330.0, 500.0]))) + .unwrap(); h.run_steps(3); let value = rect(&h, &format!("effectControls.prop.{uid}.value.1")); let nav = rect(&h, &format!("effectControls.prop.{uid}.prevKey")); diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index fe40ca05f..0b8fd2fcd 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -20,7 +20,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("layer.addItem", json!({"item": pre})).unwrap(); s.state.open_comps = vec![ItemId(main)]; s.state.active_comp = Some(ItemId(main)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, pre, main) } @@ -181,8 +184,8 @@ fn panels_dock_beside_others_and_gutters_resize_them() { let dock = |h: &Harness<'_, EffectcraftApp>| h.state().ui.dock.clone(); let tab = rect(&h, "panel.tab.EffectControls"); let tl = rect(&h, "panel.Timeline"); - // Inside the Timeline body's left drop zone. - let depth = craft_ui::docking::SIDE_EDGE_ZONE_DEPTH.min(tl.width().min(tl.height()) / 4.0); + // Inside the Timeline body's left drop zone, a few points in from its edge. + let depth = 16.0_f32.min(tl.width().min(tl.height()) / 4.0); drag(&mut h, tab.center(), pos2(tl.min.x + depth / 2.0, tl.center().y)); assert_eq!(group_of(&dock(&h), PanelKind::EffectControls), Some(vec![PanelKind::EffectControls])); assert!(!group_of(&dock(&h), PanelKind::Timeline).unwrap().contains(&PanelKind::EffectControls)); @@ -251,7 +254,7 @@ fn the_preview_frame_divider_resizes_it() { _ => None, } } - rec(w.layout.root.as_ref()?) + rec(w.layout().root.as_ref()?) } let (preview, props) = (rect(&h, "panel.Preview"), rect(&h, "panel.Properties")); let gap = preview_divider(&h); @@ -440,7 +443,10 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu .collect(); s.state.open_comps = vec![ItemId(comps[0])]; s.state.active_comp = Some(ItemId(comps[0])); - let mut h = Harness::builder().with_size(egui::vec2(1000.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1000.0, 800.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let alone = rect(&h, "panel.tab.RenderQueue"); h.state_mut().session.state.open_comps = comps.iter().map(|c| ItemId(*c)).collect(); diff --git a/crates/ui-egui/tests/it/ui_viewers.rs b/crates/ui-egui/tests/it/ui_viewers.rs index 122f29a3d..038b0884e 100644 --- a/crates/ui-egui/tests/it/ui_viewers.rs +++ b/crates/ui-egui/tests/it/ui_viewers.rs @@ -65,7 +65,10 @@ fn new_viewers_lock_route_comps_and_activate_on_click() { let c = new_comp(&mut s, "C"); let b = new_comp(&mut s, "B"); let a = new_comp(&mut s, "A"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); // View ▸ New Viewer: viewer 1 shows A too, viewer 0 (the Composition panel) is locked. invoke(&mut h, "view.newViewer", json!({})); @@ -74,13 +77,13 @@ fn new_viewers_lock_route_comps_and_activate_on_click() { assert_eq!((h.state().ui.active_viewer, shows(&h, 0), shows(&h, 1)), (1, Some(a), Some(a))); // Side by side, so both draw. h.state_mut() - .apply_dock(craft_behavior::dock::Action::Move { - panel: PanelKind::Viewer(1), - anchor: PanelKind::Composition, - placement: craft_behavior::dock::DockPlacement::Split(craft_ui::docking::Zone::Right), - }) + .apply_dock(craft_behavior::dock::Action::move_beside( + PanelKind::Viewer(1), + PanelKind::Composition, + craft_behavior::dock::DockPlacement::Split(craft_behavior::DockSide::End), + )) .unwrap(); - h.state_mut().apply_dock(craft_behavior::dock::Action::Activate { panel: PanelKind::Composition }).unwrap(); + h.state_mut().apply_dock(craft_behavior::dock::Action::activate(PanelKind::Composition)).unwrap(); h.run_steps(3); // Opening B shows it in the active (unlocked) viewer; the locked one keeps A. invoke(&mut h, "comp.open", json!({"comp": b})); @@ -127,7 +130,10 @@ fn a_locked_viewer_keeps_its_comp_when_the_project_panel_opens_another() { let mut s = Session::default(); let b = new_comp(&mut s, "B"); let a = new_comp(&mut s, "A"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); // Viewer 0 locked to A, and B in viewer 1 (a tab next to it). invoke(&mut h, "view.newViewer", json!({})); @@ -150,17 +156,20 @@ fn viewers_snapshot() { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); let other = s.project.items.values().filter(|i| i.as_comp().is_some()).map(|i| i.id).find(|id| Some(*id) != s.active_comp_id()).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); invoke(&mut h, "view.newViewer", json!({})); h.state_mut() - .apply_dock(craft_behavior::dock::Action::Move { - panel: PanelKind::Viewer(1), - anchor: PanelKind::Composition, - placement: craft_behavior::dock::DockPlacement::Split(craft_ui::docking::Zone::Right), - }) + .apply_dock(craft_behavior::dock::Action::move_beside( + PanelKind::Viewer(1), + PanelKind::Composition, + craft_behavior::dock::DockPlacement::Split(craft_behavior::DockSide::End), + )) .unwrap(); - h.state_mut().apply_dock(craft_behavior::dock::Action::Activate { panel: PanelKind::Composition }).unwrap(); + h.state_mut().apply_dock(craft_behavior::dock::Action::activate(PanelKind::Composition)).unwrap(); invoke(&mut h, "comp.open", json!({"comp": other.0})); for _ in 0..300 { h.step(); diff --git a/crates/ui-egui/tests/it/ui_workspace_focus.rs b/crates/ui-egui/tests/it/ui_workspace_focus.rs index 62a5498b2..c527379ff 100644 --- a/crates/ui-egui/tests/it/ui_workspace_focus.rs +++ b/crates/ui-egui/tests/it/ui_workspace_focus.rs @@ -11,32 +11,13 @@ use egui::{Event, Id, Key, Modifiers, vec2}; use egui_kittest::Harness; use serde_json::json; -/// The egui id of panel `p`'s dock tab. -fn tab_id(p: PanelKind) -> Id { - craft_ui::docking::DockArea::::hit_id(effectcraft_ui_egui::dock_ui::area_id(), &craft_ui::docking::Hit::Tab(p)) -} - -#[test] -fn workspace_commands_wait_for_migration_without_changing_named_layouts() { - let store = Arc::new(MemoryConfig::default()); - let original = include_str!("../fixtures/workspaces-v1.json"); - store.write("workspaces.json", original).unwrap(); - let mut app = EffectcraftApp::new(Session { config: Some(store.clone()), ..Default::default() }); - assert!(!app.ui.native_outer.is_empty()); - let ctx = egui::Context::default(); - let before = (app.ui.workspace.clone(), app.ui.saved_workspaces.clone(), app.ui.dock.clone()); - for (id, params) in [ - ("window.saveWorkspace", json!({})), - ("window.saveWorkspaceAs", json!({"name": "Too soon"})), - ("window.editWorkspaces", json!({"name": "My Layout", "delete": true})), - ("window.editWorkspaces", json!({"name": "My Layout", "rename": "Too soon"})), - ] { - let error = effectcraft_ui_egui::menus::invoke(&mut app, &ctx, id, params).unwrap_err(); - assert!(error.contains("positions"), "{id}: {error}"); - assert_eq!((app.ui.workspace.clone(), app.ui.saved_workspaces.clone(), app.ui.dock.clone()), before); - assert_eq!(store.read("workspaces.json").as_deref(), Some(original)); - assert_eq!(store.read("workspaces.old.json"), None); - } +/// Whether key focus is on the dock tab whose name starts with `name` (a tab names what its panel +/// shows: "Effect Controls Selected"), as the accessibility tree reports it. +fn tab_focused(h: &Harness<'_, EffectcraftApp>, name: &str) -> bool { + use egui_kittest::kittest::{NodeT, Queryable}; + h.root().children_recursive().any(|n| { + n.is_focused() && n.accesskit_node().role() == egui::accesskit::Role::Tab && n.accesskit_node().label().is_some_and(|label| label.starts_with(name)) + }) } #[test] @@ -51,7 +32,7 @@ fn named_and_current_workspaces_survive_frontend_restart() { let ctx = egui::Context::default(); effectcraft_ui_egui::menus::invoke(&mut app, &ctx, "window.saveWorkspaceAs", json!({"name": "Restart layout"})).unwrap(); let saved = app.ui.dock.clone(); - if let Some(Node::Split { size, .. }) = &mut app.ui.dock.layout.root { + if let Some(Node::Split { size, .. }) = &mut app.ui.dock.layout().root { *size = SplitSize::FixedFirst(390.0); } app.ui.focused = PanelKind::Layer; @@ -154,7 +135,8 @@ fn tab_and_shift_tab_traverse_toolbar_and_space_activates_only_focused_tool() { let mut app = EffectcraftApp::new(session); app.ui.start_screen = false; app.ui.show_menu_bar = false; - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); + let mut h = + Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); for _ in 0..8 { key(&mut h, Key::Tab, Modifiers::NONE); @@ -196,40 +178,32 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { app.ui.start_screen = false; app.ui.show_menu_bar = false; // Leave the inactive, layer-named tab visible instead of behind the overflow control. - if let Some(Node::Split { first, .. }) = &mut app.ui.dock.layout.root + if let Some(Node::Split { first, .. }) = &mut app.ui.dock.layout().root && let Node::Split { first, .. } = first.as_mut() && let Node::Split { size, .. } = first.as_mut() { *size = SplitSize::FixedFirst(420.0); } - let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); + let mut h = + Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); assert!(h.state().auto.find("panel.tab.EffectControls").is_some(), "the inactive tab must be visible in this fixture"); let before = h.state().ui.dock.clone(); - let target = tab_id(PanelKind::EffectControls); + let target = "Effect Controls"; let mut tabs = 0; for _ in 0..200 { key(&mut h, Key::Tab, Modifiers::NONE); tabs += 1; - if h.ctx.memory(|m| m.focused()) == Some(target) { + if tab_focused(&h, target) { break; } } - assert_eq!(h.ctx.memory(|m| m.focused()), Some(target)); + assert!(tab_focused(&h, target)); println!("Tab presses from no focus to Effect Controls: {tabs}"); assert_eq!(h.state().ui.dock, before, "traversal alone must not activate a tab"); - // craft-ui outlines the keyboard-focused tab, inset 2 pt, in the dock's accent (EffectCraft's - // focus colour). - let response = h.ctx.read_response(target).unwrap(); - assert!( - h.output().shapes.iter().any(|shape| { - matches!(&shape.shape, egui::Shape::Rect(r) if r.rect == response.rect.shrink(2.0) && r.stroke.color == h.state().tokens.focus && r.stroke.width > 0.0) - }), - "the dock tab must visibly show keyboard focus" - ); key(&mut h, Key::Space, Modifiers::NONE); let mut activated = before; - activated.apply(craft_behavior::dock::Action::Activate { panel: PanelKind::EffectControls }, dock::permissions).unwrap(); + activated.apply(craft_behavior::dock::Action::activate(PanelKind::EffectControls), false, dock::permissions).unwrap(); assert_eq!(h.state().ui.dock, activated); assert_eq!(h.state().ui.focused, PanelKind::EffectControls); assert!(!h.state().playback.playing); @@ -237,7 +211,7 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { let inspected = effectcraft_ui_egui::control::inspect(h.state(), &h.ctx); assert_eq!(inspected["keyboardFocus"]["automationId"], "panel.tab.EffectControls"); key(&mut h, Key::Tab, Modifiers::SHIFT); - assert_eq!(h.ctx.memory(|m| m.focused()), Some(tab_id(PanelKind::Project))); + assert!(tab_focused(&h, "Project")); key(&mut h, Key::Enter, Modifiers::NONE); assert_eq!(h.state().ui.focused, PanelKind::Project); assert!(!h.state().playback.playing); @@ -255,7 +229,13 @@ impl ControlDriver { let mut app = EffectcraftApp::new(Session::default()).with_control(rx); app.ui.start_screen = false; app.ui.show_menu_bar = false; - let mut driver = Self { h: Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app), tx }; + let mut driver = Self { + h: Harness::builder() + .with_size(vec2(1200.0, 760.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| app), + tx, + }; driver.frames(4, true); driver.ok("engine.execute", json!({"command":"comp.new", "params":{"name":"Native Validation", "width":160,"height":90,"duration":1}}), true); driver.ok("engine.execute", json!({"command":"layer.newSolid", "params":{"name":"Validation Red","color":"#ff0000"}}), true); @@ -316,16 +296,16 @@ fn control_root_divider_drag_after_toolbar_and_dock_tab_keyboard_activation() { d.ok("ui.click", json!({"id":"tools.Selection"}), true); // The toolbar can grow as upstream adds controls. Traverse to the actual response // identity rather than assuming a fixed number of focus stops. - let target = tab_id(PanelKind::EffectControls); + let target = "Effect Controls"; for tabs in 1..=200 { d.ok("ui.key", json!({"key":"Tab"}), true); assert!(d.h.state().ui.mini_flowchart.is_none(), "dock-tab traversal must not open a foreground popup"); - if d.h.ctx.memory(|memory| memory.focused()) == Some(target) { + if tab_focused(&d.h, target) { println!("control Tab presses to Effect Controls: {tabs}"); break; } } - assert_eq!(d.h.ctx.memory(|memory| memory.focused()), Some(target), "Effect Controls must remain reachable by control-channel Tab traversal"); + assert!(tab_focused(&d.h, target), "Effect Controls must remain reachable by control-channel Tab traversal"); d.ok("ui.key", json!({"key":"Space"}), true); assert_eq!(d.h.state().ui.focused, PanelKind::EffectControls); d.ok("ui.key", json!({"key":"Tab","shift":true}), true); diff --git a/docs/control-protocol.md b/docs/control-protocol.md index d83c811f9..dc54b05a1 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -156,8 +156,7 @@ frames and can be assigned through `shortcuts.set`. | `ui.screenshot` | `{path?, panel?, id?}` | `{path, width, height}`: a PNG of the window, or cropped to one panel or element. The panel or element rectangle is resolved when the capture is issued (after the UI settles), so it follows a panel that moved; a panel or id that is not on screen is retried and then reported, never replaced by a whole-window shot. | Element ids are stable, for example `tools.Selection`, `panel.Timeline`, `panel.tab.EffectControls`, -`panel.tab.Timeline.` (one Timeline tab per open comp; `panel.tab.Timeline` is the shown -one), `panel.tab.Viewer()` and `viewers.` (View ▸ New Viewer's other Composition viewers; +`panel.tab.Viewer()` and `viewers.` (View ▸ New Viewer's other Composition viewers; `viewers.0` is the Composition panel while another viewer is active), `header.workspace.Animation`, `project.item.` (a double-click opens the item, Enter renames it), `viewer.comp`, `viewer.handle..`, `timeline.layer..bar`, `timeline.layer..nestedMarker.` (a precomp's comp markers), `timeline.layer..twirl`, `timeline.layer..row` (click selects, @@ -231,12 +230,14 @@ takes a name, or as `{"Viewer":42}` and `{"ScriptPanel":77}` for viewers and Scr floating window holding Info. `Open` and `OpenAt` are refused: panels open through the panel commands (`window.panel`, `ui.panel.show`), which run the viewer and ScriptUI lifecycles. Closing runs them too. Pointer gestures dispatch through this command. -- craft-ui's commands: `window.panel.move`, `.float`, `.dock`, `.activate`, `.close`, - `.closeGroup`, `.closeOthers`, `.minimize`, `.iconic`, `.window` and `.layout`, with the params - of craft-ui's `DockCommand` (`docs/ui-docking.md` in craft-libs). `window.panel.` +- The panel commands `window.panel.move {panel, anchor, zone?, before?, group?}`, + `.float {panel, x?, y?, width?, height?, group?, column?}`, + `.dock {panel, anchor?, zone?, before?, group?, column?, side?}`, `.activate`, `.close`, + `.closeGroup`, `.closeOthers`, `.minimize {minimized?}`, `.iconic {iconic?}`, + `.window {native?}` (as `window.panelWindow`) and `.layout {action}`. `window.panel.` (`window.panel.Align`) opens and shows that panel. `window.panel.activate` on a closed panel reopens it where it was. -- `ui.dock {operation, panel, …}` or `ui.dock {action}`: craft-ui's `ui.dock` operations +- `ui.dock {operation, panel, …}` or `ui.dock {action}`: the operations (`open`, `close`, `activate`, `float {rect}`, `moveFloating {rect}`, `move {target, zone?, before?}`, `setStackOpen {open}`, `resizeStack {height}`, `resizeSplit {path, size}`; `rect` is `[x, y, width, height]`). It returns @@ -261,12 +262,11 @@ run the main window's shortcuts, and files dropped on one import as on the main modal dialog is open, floating windows take no input. The automation ids of the docking chrome are `panel.tab.`, `panel.drag.` (a -group's drag bar), `panel.tabs.more.`, `panel.menu.` (≡), `panel.header.` -(a stacked panel's open and close button), `panel.tab..lock` (viewer lock), -`panel.tab.Timeline.` and `panel.tab.Timeline.close` (the Timeline's comp tabs), -`panel.float..move`, `.close`, `.resize` and `.resize.` for floating window `n`, +group's drag bar), `panel.menu.` (≡), `panel.tab..lock` (viewer lock), +`panel.float..move`, `.resize` and `.resize.` for floating window `n`, and `dock.gutter.` for dividers (`a`/`b` per split level; a stack's gap below entry `i` adds -`s`) and `dock.corner..` where two dividers meet. +`s`). The other parts (the Timeline's comp tabs, a floating window's close button, the tab +overflow menu) are found by their accessible names. Saved workspaces (`workspaces.json`, version 2) hold craft-ui `Workspace`s: the layout, the closed panels with where each goes back, the lock, and each floating window's desktop place. A From bce6460d3c5bd66e22e63c577f4090b3e91f9538 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 19:17:33 +0000 Subject: [PATCH 11/39] rustfmt: test harness lines over the line width --- crates/ui-egui/src/app/viewer_frames.rs | 10 ++- crates/ui-egui/src/color_picker.rs | 10 ++- crates/ui-egui/src/panels/text_panels.rs | 1 - .../ui-egui/tests/it/render_queue_snapshot.rs | 10 ++- crates/ui-egui/tests/it/ui_3d.rs | 34 ++++++-- crates/ui-egui/tests/it/ui_accessibility.rs | 5 +- .../tests/it/ui_accessibility_audit.rs | 5 +- crates/ui-egui/tests/it/ui_agent_audit.rs | 5 +- .../ui-egui/tests/it/ui_alt_drag_duplicate.rs | 10 ++- .../ui-egui/tests/it/ui_audio_panel_levels.rs | 5 +- crates/ui-egui/tests/it/ui_audio_scrub.rs | 81 +++++++++++++---- crates/ui-egui/tests/it/ui_batch_links.rs | 5 +- crates/ui-egui/tests/it/ui_batch_switches.rs | 10 ++- .../tests/it/ui_blank_context_menus.rs | 5 +- crates/ui-egui/tests/it/ui_camera_tracker.rs | 19 ++-- .../tests/it/ui_character_eyedropper.rs | 12 ++- .../tests/it/ui_character_stroke_order.rs | 6 +- crates/ui-egui/tests/it/ui_checkbox_drag.rs | 5 +- crates/ui-egui/tests/it/ui_comp_presets.rs | 29 +++++-- crates/ui-egui/tests/it/ui_crypto_pick.rs | 14 ++- .../ui-egui/tests/it/ui_crypto_pick_undo.rs | 7 +- crates/ui-egui/tests/it/ui_crypto_select.rs | 7 +- crates/ui-egui/tests/it/ui_dialog_preview.rs | 5 +- crates/ui-egui/tests/it/ui_drag_drop.rs | 35 ++++++-- .../tests/it/ui_effect_drop_highlight.rs | 5 +- crates/ui-egui/tests/it/ui_effect_names.rs | 6 +- .../tests/it/ui_effects_presets_keyboard.rs | 5 +- crates/ui-egui/tests/it/ui_env_light_gpu.rs | 3 +- .../ui-egui/tests/it/ui_export_overwrite.rs | 5 +- .../ui-egui/tests/it/ui_flowchart_keyboard.rs | 11 ++- crates/ui-egui/tests/it/ui_font_search.rs | 25 ++++-- crates/ui-egui/tests/it/ui_form_fit.rs | 5 +- crates/ui-egui/tests/it/ui_frame_step.rs | 20 ++++- crates/ui-egui/tests/it/ui_fx_editors.rs | 8 +- crates/ui-egui/tests/it/ui_gpu.rs | 50 +++++++---- crates/ui-egui/tests/it/ui_gradient_editor.rs | 5 +- .../ui-egui/tests/it/ui_gradient_handles.rs | 5 +- crates/ui-egui/tests/it/ui_gradient_value.rs | 5 +- crates/ui-egui/tests/it/ui_graph_fit.rs | 5 +- crates/ui-egui/tests/it/ui_graph_theme.rs | 5 +- crates/ui-egui/tests/it/ui_group_rename.rs | 6 +- crates/ui-egui/tests/it/ui_guide_layers.rs | 5 +- .../ui-egui/tests/it/ui_info_tracker_a11y.rs | 5 +- crates/ui-egui/tests/it/ui_inline_edit.rs | 6 +- crates/ui-egui/tests/it/ui_keyframes.rs | 15 +++- crates/ui-egui/tests/it/ui_large_project.rs | 5 +- .../ui-egui/tests/it/ui_layer_panel_zoom.rs | 3 +- .../tests/it/ui_layer_source_picker.rs | 7 +- crates/ui-egui/tests/it/ui_light_settings.rs | 5 +- crates/ui-egui/tests/it/ui_live_preview.rs | 18 +++- crates/ui-egui/tests/it/ui_locked_color.rs | 6 +- crates/ui-egui/tests/it/ui_marker_names.rs | 15 +++- .../tests/it/ui_media_browser_cache.rs | 18 ++-- .../tests/it/ui_media_browser_copy_path.rs | 19 ++-- crates/ui-egui/tests/it/ui_menus.rs | 5 +- crates/ui-egui/tests/it/ui_new_primitive.rs | 5 +- crates/ui-egui/tests/it/ui_object_matte.rs | 5 +- crates/ui-egui/tests/it/ui_panels.rs | 25 ++++-- crates/ui-egui/tests/it/ui_presets_folder.rs | 34 +++++--- crates/ui-egui/tests/it/ui_preview_align.rs | 5 +- crates/ui-egui/tests/it/ui_project_delete.rs | 5 +- .../ui-egui/tests/it/ui_project_duplicate.rs | 5 +- .../ui-egui/tests/it/ui_project_keyboard.rs | 5 +- .../ui-egui/tests/it/ui_project_new_folder.rs | 5 +- crates/ui-egui/tests/it/ui_project_rows.rs | 10 ++- crates/ui-egui/tests/it/ui_quick_offset.rs | 10 ++- crates/ui-egui/tests/it/ui_ram_preview.rs | 21 ++++- crates/ui-egui/tests/it/ui_render_queue.rs | 10 ++- .../tests/it/ui_render_queue_keyboard.rs | 5 +- crates/ui-egui/tests/it/ui_roto_objects.rs | 5 +- .../tests/it/ui_roto_span_confidence.rs | 5 +- crates/ui-egui/tests/it/ui_script_console.rs | 10 ++- .../tests/it/ui_script_console_keyboard.rs | 5 +- crates/ui-egui/tests/it/ui_script_render.rs | 5 +- crates/ui-egui/tests/it/ui_scriptui.rs | 32 +++++-- crates/ui-egui/tests/it/ui_self_drop.rs | 5 +- crates/ui-egui/tests/it/ui_settings_info.rs | 20 ++++- .../ui-egui/tests/it/ui_settings_keyboard.rs | 5 +- crates/ui-egui/tests/it/ui_tail.rs | 3 +- crates/ui-egui/tests/it/ui_text_edit.rs | 86 +++++++++++++++---- .../ui-egui/tests/it/ui_text_range_handles.rs | 5 +- crates/ui-egui/tests/it/ui_theme_favorites.rs | 5 +- .../ui-egui/tests/it/ui_time_zoom_controls.rs | 3 +- .../tests/it/ui_timeline_audio_levels.rs | 15 +++- .../tests/it/ui_timeline_interacting.rs | 5 +- .../ui-egui/tests/it/ui_timeline_marquee.rs | 15 +++- crates/ui-egui/tests/it/ui_timeline_shapes.rs | 5 +- .../ui-egui/tests/it/ui_timeline_switches.rs | 10 ++- .../ui-egui/tests/it/ui_toolbar_gradient.rs | 5 +- crates/ui-egui/tests/it/ui_tracker.rs | 8 +- .../ui-egui/tests/it/ui_unreadable_footage.rs | 5 +- .../ui-egui/tests/it/ui_video_preview_off.rs | 6 +- crates/ui-egui/tests/it/ui_view_layout.rs | 5 +- crates/ui-egui/tests/it/ui_viewer.rs | 45 +++++++--- crates/ui-egui/tests/it/ui_viewer_trackpad.rs | 5 +- crates/ui-egui/tests/it/ui_visual_review.rs | 3 +- crates/ui-egui/tests/it/ui_web_gpu_storage.rs | 10 ++- crates/ui-egui/tests/it/ui_web_offload.rs | 5 +- crates/ui-egui/tests/it/ui_window_title.rs | 5 +- .../ui-egui/tests/it/ui_workflow_selection.rs | 20 ++++- 100 files changed, 900 insertions(+), 257 deletions(-) diff --git a/crates/ui-egui/src/app/viewer_frames.rs b/crates/ui-egui/src/app/viewer_frames.rs index 80eb84af6..96dc4d28d 100644 --- a/crates/ui-egui/src/app/viewer_frames.rs +++ b/crates/ui-egui/src/app/viewer_frames.rs @@ -273,7 +273,10 @@ mod tests { session.execute("layer.newSolid", serde_json::json!({"color": "#808080"})).unwrap(); session.execute("effect.apply", serde_json::json!({"layer": 1, "effect": "Apply Color LUT"})).unwrap(); session.execute("prop.set", serde_json::json!({"layer": 1, "path": "effects/#1/lut", "value": lut.to_string_lossy()})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(session)); + let mut harness = egui_kittest::Harness::builder() + .with_size(egui::vec2(1200.0, 800.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|_| crate::EffectcraftApp::new(session)); let centre = |h: &egui_kittest::Harness<'_, crate::EffectcraftApp>| { h.state().viewer_image.as_ref().map(|img| img.pixels[img.pixels.len() / 2 + img.size[0] / 2].r()) }; @@ -308,7 +311,10 @@ mod tests { let cid = session.active_comp_id().unwrap(); let item = session.execute("file.import", serde_json::json!({"paths": [png.to_string_lossy()]})).unwrap()["items"][0].clone(); session.execute("layer.addItem", serde_json::json!({"item": item})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(session)); + let mut harness = egui_kittest::Harness::builder() + .with_size(egui::vec2(1200.0, 800.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|_| crate::EffectcraftApp::new(session)); let centre = |h: &egui_kittest::Harness<'_, crate::EffectcraftApp>| { h.state().viewer_image.as_ref().map(|img| img.pixels[img.pixels.len() / 2 + img.size[0] / 2].r()) }; diff --git a/crates/ui-egui/src/color_picker.rs b/crates/ui-egui/src/color_picker.rs index 7c8812957..34cd8d97e 100644 --- a/crates/ui-egui/src/color_picker.rs +++ b/crates/ui-egui/src/color_picker.rs @@ -674,7 +674,10 @@ mod tests { let mut session = effectcraft_engine::Session::default(); session.execute("comp.new", serde_json::json!({"width": 320, "height": 180, "duration": 2})).unwrap(); session.execute("layer.newSolid", serde_json::json!({"color": "#204060"})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(session)); + let mut harness = egui_kittest::Harness::builder() + .with_size(vec2(1200.0, 800.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|_| crate::EffectcraftApp::new(session)); settle_sampling_viewer(&mut harness); harness } @@ -751,7 +754,10 @@ mod tests { let lid = s.execute("layer.newSolid", serde_json::json!({"color": "#ffffff"})).unwrap()["layer"].as_u64().unwrap(); s.execute("effect.apply", serde_json::json!({"layers": [lid], "effect": "Exposure"})).unwrap(); s.execute("prop.set", serde_json::json!({"layer": lid, "path": "effects/#1/master/exposure", "value": 2.0})).unwrap(); - let mut harness = egui_kittest::Harness::builder().with_size(vec2(1200.0, 800.0)).with_context_setup(crate::framework::install_headless).build_eframe(|_| crate::EffectcraftApp::new(s)); + let mut harness = egui_kittest::Harness::builder() + .with_size(vec2(1200.0, 800.0)) + .with_context_setup(crate::framework::install_headless) + .build_eframe(|_| crate::EffectcraftApp::new(s)); for _ in 0..400 { harness.step(); if harness.state().frames.inflight() == 0 && harness.state().viewer_f16.is_some() { diff --git a/crates/ui-egui/src/panels/text_panels.rs b/crates/ui-egui/src/panels/text_panels.rs index b206acf54..e80f20bfc 100644 --- a/crates/ui-egui/src/panels/text_panels.rs +++ b/crates/ui-egui/src/panels/text_panels.rs @@ -1090,7 +1090,6 @@ fn fit_preview(lines: &[Vec<[f32; 2]>], room: Rect, baseline: f32) -> Option<(f3 Some((k, o)) } - /// The tallest the font menu gets, its header included. const FONT_MENU_HEIGHT: f32 = 380.0; diff --git a/crates/ui-egui/tests/it/render_queue_snapshot.rs b/crates/ui-egui/tests/it/render_queue_snapshot.rs index 164a4daf0..46bbc1e89 100644 --- a/crates/ui-egui/tests/it/render_queue_snapshot.rs +++ b/crates/ui-egui/tests/it/render_queue_snapshot.rs @@ -31,7 +31,10 @@ fn render_queue_panel_snapshot() { } let ids: Vec = s.project.render_queue.iter().take(3).map(|i| i.id).collect(); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app.take().expect("app")); h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique("rq-ui"), (ids, None::))); h.state_mut().show_panel(effectcraft_ui_egui::dock::PanelKind::RenderQueue); h.run_steps(4); @@ -55,7 +58,10 @@ fn templates_dialog_snapshot() { let kind = std::env::var("RQ_TEMPLATES_KIND").unwrap_or_else(|_| "outputModule".into()); s.execute("app.templates", json!({"kind": kind})).unwrap(); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app.take().expect("app")); h.run_steps(4); assert!(h.state().dialog.is_some(), "the Templates dialog is open"); let img = h.render_serialized().expect("render"); diff --git a/crates/ui-egui/tests/it/ui_3d.rs b/crates/ui-egui/tests/it/ui_3d.rs index f2c61a64b..63c19f1e4 100644 --- a/crates/ui-egui/tests/it/ui_3d.rs +++ b/crates/ui-egui/tests/it/ui_3d.rs @@ -33,7 +33,8 @@ fn settle(h: &mut Harness<'_, EffectcraftApp>) { #[test] fn viewer_registers_3d_controls() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); settle(&mut h); h.step(); let ids: Vec = h.state().auto.previous.iter().chain(h.state().auto.elements.iter()).map(|e| e.id.clone()).collect(); @@ -64,7 +65,8 @@ fn click_id(h: &mut Harness<'_, EffectcraftApp>, id: &str) { /// and switches it, as After Effects' Composition panel does. #[test] fn renderer_menu_shows_and_switches_the_comp_renderer() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().session.execute("comp.settings", json!({"renderer": "classic3D"})).unwrap(); h.run_steps(3); let label = |h: &Harness<'_, EffectcraftApp>| h.state().auto.find("viewer.renderer3d").map(|e| e.label.clone()); @@ -82,7 +84,8 @@ fn renderer_menu_shows_and_switches_the_comp_renderer() { #[test] fn camera_and_light_dialogs_create_layers() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.step(); let ctx = h.ctx.clone(); let n0 = h.state().session.active_comp().unwrap().layers.len(); @@ -112,7 +115,12 @@ fn camera_and_light_dialogs_create_layers() { fn snapshot() { let _device = crate::gpu_test::lock(); let dir = std::env::var("EC_SNAPSHOT_DIR").ok(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(1.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_pixels_per_point(1.0) + .wgpu() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app()); let shots: [(&str, Option<&str>); 4] = [("active", None), ("custom1", Some("view.3d.custom1")), ("top", Some("view.3d.top")), ("left", Some("view.3d.left"))]; for (name, cmd) in shots { @@ -155,7 +163,8 @@ fn snapshot() { /// frame, and 3D layers reaching past the frame draw pixels there. #[test] fn extended_viewer_renders_past_the_comp_frame() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().session.execute("view.3d.custom1", json!({})).unwrap(); // Zoom out so the viewer shows plenty of pasteboard. h.state_mut().ui.viewer.zoom = Some(0.15); @@ -209,7 +218,10 @@ fn layout_views_draw_the_camera_and_follow_its_position() { s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); let cam = s.execute("layer.newCamera", json!({"position": [320, 180, -300], "poi": [320, 180, 0]})).unwrap()["layer"].as_u64().unwrap(); s.execute("view.layout", json!({"views": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); let centre = |h: &Harness<'_, EffectcraftApp>, view: &str| { let id = format!("viewer.view.{view}.camera.{cam}"); @@ -235,7 +247,10 @@ fn four_views() -> Harness<'static, EffectcraftApp> { s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); s.execute("layer.newCamera", json!({"position": [320, 180, -300], "poi": [320, 180, 0]})).unwrap(); s.execute("view.layout", json!({"views": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); h } @@ -288,7 +303,10 @@ fn gizmo_harness(w: u32, h: u32) -> (Harness<'static, EffectcraftApp>, u64) { let solid = s.execute("layer.newSolid", json!({"color": "#ff0000", "width": w, "height": h})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); s.execute("layer.select", json!({"layers": [solid]})).unwrap(); - let mut harness = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut harness = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); settle(&mut harness); (harness, solid) } diff --git a/crates/ui-egui/tests/it/ui_accessibility.rs b/crates/ui-egui/tests/it/ui_accessibility.rs index 12803dd00..dcbae3c14 100644 --- a/crates/ui-egui/tests/it/ui_accessibility.rs +++ b/crates/ui-egui/tests/it/ui_accessibility.rs @@ -22,7 +22,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("file.openDemoProject", json!({})).unwrap(); // A text layer under edit gives the Character / Paragraph panels their controls. let _ = s.execute("layer.select", json!({"layers": ["EFFECTCRAFT"]})); - Harness::builder().with_size(egui::vec2(1680.0, 1020.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)) + Harness::builder() + .with_size(egui::vec2(1680.0, 1020.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)) } #[test] diff --git a/crates/ui-egui/tests/it/ui_accessibility_audit.rs b/crates/ui-egui/tests/it/ui_accessibility_audit.rs index 0ef4f0872..52e475316 100644 --- a/crates/ui-egui/tests/it/ui_accessibility_audit.rs +++ b/crates/ui-egui/tests/it/ui_accessibility_audit.rs @@ -142,7 +142,10 @@ fn app_session() -> Session { } fn harness() -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(app_session())); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(app_session())); // The default workspace gives Preview a short frame at the top of the right column; its // controls below that frame stay in the tree and would be counted against the panel under it. // The per-panel pass opens Preview again for its own scenario. diff --git a/crates/ui-egui/tests/it/ui_agent_audit.rs b/crates/ui-egui/tests/it/ui_agent_audit.rs index 59e4bd0a8..477850e87 100644 --- a/crates/ui-egui/tests/it/ui_agent_audit.rs +++ b/crates/ui-egui/tests/it/ui_agent_audit.rs @@ -21,7 +21,10 @@ fn session() -> Session { } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1680.0, 1020.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1680.0, 1020.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs b/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs index f9ec80d92..c834fb0cd 100644 --- a/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs +++ b/crates/ui-egui/tests/it/ui_alt_drag_duplicate.rs @@ -18,7 +18,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { s.execute("prop.set", json!({"layer": a, "path": "transform/position", "value": [150.0, 180.0]})).unwrap(); s.execute("prop.set", json!({"layer": b, "path": "transform/position", "value": [450.0, 180.0]})).unwrap(); s.execute("layer.select", json!({"layers": [a, b]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); (h, a, b) } @@ -139,7 +142,10 @@ fn alt_dragging_a_gizmo_arrow_moves_a_copy() { let solid = s.execute("layer.newSolid", json!({"color": "#ff0000", "width": 200, "height": 200})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.setSwitch", json!({"layer": solid, "switch": "threeD", "value": true})).unwrap(); s.execute("layer.select", json!({"layers": [solid]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(6); let p0 = pos(&h, LayerId(solid)); let [x, y, w, hh] = h.state().auto.find(&format!("viewer.gizmo.{solid}.x")).expect("x arrow registered").rect; diff --git a/crates/ui-egui/tests/it/ui_audio_panel_levels.rs b/crates/ui-egui/tests/it/ui_audio_panel_levels.rs index fd58cf514..518da1794 100644 --- a/crates/ui-egui/tests/it/ui_audio_panel_levels.rs +++ b/crates/ui-egui/tests/it/ui_audio_panel_levels.rs @@ -54,7 +54,10 @@ fn sound_layer(s: &mut Session, levels: [f64; 2]) -> u64 { /// The harness with layer `l` selected and the Audio panel up. fn harness(mut s: Session, l: u64) -> Harness<'static, EffectcraftApp> { s.execute("layer.select", json!({"layers": [l]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Audio); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_audio_scrub.rs b/crates/ui-egui/tests/it/ui_audio_scrub.rs index c14476d0f..9e2333897 100644 --- a/crates/ui-egui/tests/it/ui_audio_scrub.rs +++ b/crates/ui-egui/tests/it/ui_audio_scrub.rs @@ -135,7 +135,8 @@ fn scrubbing_plays_one_frame_per_new_frame() { fn cmd_dragging_the_current_time_scrubs_and_an_idle_scrub_closes() { let fake = Fake::default(); let (app, _) = setup(true, &fake); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); let cti = h.state().auto.find("timeline.cti").expect("current time indicator").clone(); let from = pos2(cti.rect[0] + cti.rect[2] / 2.0, cti.rect[1] + cti.rect[3] / 2.0); @@ -217,7 +218,11 @@ fn preview_with_audio_holds_the_first_frame_and_sounds_from_it() { app.frames.set_remote(Some(renderer)); let ahead = (app.frames.lanes() * 2).max(4) as i64; app.session.execute("comp.settings", json!({"comp": cid.0, "duration": (4 * ahead) as f64 / 30.0})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); @@ -254,7 +259,11 @@ fn preview_with_audio_sounds_without_caching_the_work_area() { let gate = GatedFrames::default(); let renderer: Arc = Arc::new(gate.clone()); app.frames.set_remote(Some(renderer)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); @@ -281,7 +290,11 @@ fn a_preview_behind_its_sound_drops_frames_and_keeps_the_sound() { let gate = GatedFrames::default(); let renderer: Arc = Arc::new(gate.clone()); app.frames.set_remote(Some(renderer)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); @@ -346,7 +359,11 @@ fn a_sound_in_the_first_100_ms_is_heard() { app.session.execute("layer.timing", json!({"layers": [l], "in": start, "out": start + 0.1})).unwrap(); app.session.execute("time.set", json!({"time": start})).unwrap(); let first = (start * 30.0) as i64; - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let now = h.state().now(); @@ -366,7 +383,8 @@ fn a_sound_in_the_first_100_ms_is_heard() { fn audio_only_previews_start_at_once() { let fake = Fake::default(); let (app, cid) = setup(true, &fake); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let now = h.state().now(); @@ -382,7 +400,11 @@ fn no_device_plays_the_picture_and_stop_ends_the_wait() { let fake = Fake::default(); let (mut app, cid) = setup_long(true, &fake, 10.0); app.hooks.audio_device = Some(Box::new(|_| None)); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let now = h.state().now(); @@ -451,7 +473,11 @@ fn startup_finishes_at_any_ram_preview_budget() { if !device { app.hooks.audio_device = Some(Box::new(|_| None)); } - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); let budget = ((fit as f64 + 0.5) * 9216.0 / 0.9) as usize; @@ -482,7 +508,11 @@ fn extended_viewer(fake: &Fake) -> (Harness<'static, EffectcraftApp>, ItemId, [u let mut app = EffectcraftApp::new(s); let f = fake.clone(); app.hooks.audio_device = Some(Box::new(move |_| Some(Box::new(f.clone()) as Box))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); // The viewer shows the pasteboard: frames render the extended region. let deadline = std::time::Instant::now() + std::time::Duration::from_secs(30); @@ -591,7 +621,11 @@ fn a_device_that_fails_to_start_plays_the_picture() { let fake = Fake::default(); let (mut app, cid) = setup_long(true, &fake, 8.0); app.hooks.audio_device = Some(Box::new(|_| Some(Box::new(Broken) as Box))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); assert!(until_started(&mut h), "it left its startup"); @@ -644,7 +678,11 @@ fn a_started_preview_follows_its_sound() { let device = Playing::default(); let d = device.clone(); app.hooks.audio_device = Some(Box::new(move |_| Some(Box::new(d.clone()) as Box))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); assert!(until_started(&mut h) && h.state().audio.is_some(), "the sound started"); @@ -671,7 +709,11 @@ fn startup_does_not_wait_when_the_ram_preview_holds_no_frame() { for budget in [0, 9216 / 2] { let fake = Fake::default(); let (app, _) = setup_long(true, &fake, 8.0); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); h.state().frames.set_budget(budget); @@ -720,7 +762,11 @@ fn adding_markers_does_not_stop_the_sound() { let fake = Fake::default(); let (app, cid) = setup(true, &fake); // Everything is cached before the preview starts, so the sound starts at once. - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 31.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 31.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(2); let deadline = std::time::Instant::now() + std::time::Duration::from_secs(60); let now = h.ctx.input(|i| i.time); @@ -751,7 +797,11 @@ fn unmuting_a_silent_preview_starts_audio_at_its_current_frame() { app.session.execute("layer.setSwitch", json!({"layers": [layer], "switch": "audio", "value": false})).unwrap(); let gate = GatedFrames::default(); app.frames.set_remote(Some(Arc::new(gate.clone()))); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.render(&mut h, cid, &(0..60).collect::>()); @@ -871,7 +921,8 @@ fn preview_rate_audio_drives_video_at_half_speed_and_loops() { let gate = GatedFrames::default(); app.frames.set_remote(Some(Arc::new(gate.clone()))); let ahead = (app.frames.parallelism() * 2).max(4) as i64; - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.state_mut().use_manual_clock(); h.run_steps(2); gate.discard(&mut h); diff --git a/crates/ui-egui/tests/it/ui_batch_links.rs b/crates/ui-egui/tests/it/ui_batch_links.rs index bbbbf76ee..f9cc70c4c 100644 --- a/crates/ui-egui/tests/it/ui_batch_links.rs +++ b/crates/ui-egui/tests/it/ui_batch_links.rs @@ -20,7 +20,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, [u64; 6]) { s.execute("prop.set", json!({"layer": ids[3], "path": "transform/position", "value": [60, 40]})).unwrap(); s.execute("prop.set", json!({"layer": ids[3], "path": "transform/scale", "value": [50, 50]})).unwrap(); s.history.undo.clear(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.show_modes = true; h.state_mut().ui.timeline.columns_w = 900.0; h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_batch_switches.rs b/crates/ui-egui/tests/it/ui_batch_switches.rs index da174138b..b496774d4 100644 --- a/crates/ui-egui/tests/it/ui_batch_switches.rs +++ b/crates/ui-egui/tests/it/ui_batch_switches.rs @@ -22,7 +22,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec) { .collect(); ids.reverse(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, ids) } @@ -165,7 +168,10 @@ fn switch_targets_skip_the_layers_the_switch_does_not_apply_to() { let cam = s.execute("layer.newCamera", json!({})).unwrap()["layer"].as_u64().unwrap(); s.execute("effect.apply", json!({"effect": "ec.blur.gaussian", "layers": [solid]})).unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); select(&mut h, &[solid, null, cam]); diff --git a/crates/ui-egui/tests/it/ui_blank_context_menus.rs b/crates/ui-egui/tests/it/ui_blank_context_menus.rs index 37f96f86e..bfa678673 100644 --- a/crates/ui-egui/tests/it/ui_blank_context_menus.rs +++ b/crates/ui-egui/tests/it/ui_blank_context_menus.rs @@ -12,7 +12,10 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut session = Session::default(); session.execute("comp.new", json!({"name":"Empty", "width":640,"height":360,"duration":4})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); // English whatever the system language: the menu items found below by label are translated. h.state_mut().session.prefs.general.language = "en".into(); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_camera_tracker.rs b/crates/ui-egui/tests/it/ui_camera_tracker.rs index 45e40c446..5838f2a0e 100644 --- a/crates/ui-egui/tests/it/ui_camera_tracker.rs +++ b/crates/ui-egui/tests/it/ui_camera_tracker.rs @@ -75,7 +75,8 @@ fn click(h: &mut Harness<'_, EffectcraftApp>, at: egui::Pos2, modifiers: egui::M #[test] fn deleting_viewer_track_points_preserves_the_effect_and_layer() { let (a, plate, uid) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); let point = rect(&h, "viewer.cameraTracker.point.7").center(); @@ -92,7 +93,8 @@ fn deleting_viewer_track_points_preserves_the_effect_and_layer() { #[test] fn viewer_points_selection_and_effect_controls() { let (a, plate, uid) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); let all = ids(&h); @@ -207,7 +209,8 @@ fn blender_export_button_opens_python_dialog_and_writes_scene() { #[test] fn effect_controls_show_how_many_frames_a_partial_solve_solved() { let (a, plate, uid) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::EffectControls); h.run_steps(4); let line = format!("effectControls.cameraTracker.{uid}.partialSolve"); @@ -247,7 +250,8 @@ fn drag_with(h: &mut Harness<'_, EffectcraftApp>, button: egui::PointerButton, f #[test] fn viewer_zooms_and_pans_over_the_track_points() { let (a, ..) = app(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| a); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); // Wheel over a point: zooms. @@ -310,7 +314,12 @@ fn snapshot_showcase_track() { s.execute("layer.select", json!({"layers": ["#1"]})).unwrap(); s.execute("track.camera", json!({"layer": "#1", "wait": true})).unwrap(); s.execute("time.set", json!({"time": 2.0})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(1.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_pixels_per_point(1.0) + .wgpu() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); settle(&mut h); let pts: Vec = ids(&h).into_iter().filter(|i| i.starts_with("viewer.cameraTracker.point.")).collect(); diff --git a/crates/ui-egui/tests/it/ui_character_eyedropper.rs b/crates/ui-egui/tests/it/ui_character_eyedropper.rs index 205bd9937..0174d0b9d 100644 --- a/crates/ui-egui/tests/it/ui_character_eyedropper.rs +++ b/crates/ui-egui/tests/it/ui_character_eyedropper.rs @@ -48,7 +48,11 @@ fn character_fill_eyedropper_samples_viewer_and_keeps_text_selection() { let mut app = EffectcraftApp::new(s); app.set_workspace("Text"); let builder = Harness::builder().with_size(vec2(1600.0, 1400.0)); - let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) } else { builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; + let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { + builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) + } else { + builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) + }; h.state_mut().show_panel(PanelKind::Character); settle(&mut h); click_auto(&mut h, "character.fill.eyedropper"); @@ -76,7 +80,11 @@ fn character_stroke_eyedropper_samples_viewer() { app.ui.viewer.show_layer_controls = false; app.ui.dock = dock::docked(dock::hsplit(SplitSize::FixedSecond(360.0), dock::tabs(&[PanelKind::Composition], 0), dock::tabs(&[PanelKind::Character], 0))); let builder = Harness::builder().with_size(vec2(1200.0, 760.0)); - let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) } else { builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; + let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { + builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) + } else { + builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) + }; h.state_mut().show_panel(PanelKind::Character); h.state_mut().show_panel(PanelKind::Composition); settle(&mut h); diff --git a/crates/ui-egui/tests/it/ui_character_stroke_order.rs b/crates/ui-egui/tests/it/ui_character_stroke_order.rs index 80596a6ea..7a74901ef 100644 --- a/crates/ui-egui/tests/it/ui_character_stroke_order.rs +++ b/crates/ui-egui/tests/it/ui_character_stroke_order.rs @@ -49,7 +49,11 @@ fn character_stroke_order_menu_sets_layer_fill_and_stroke() { let mut app = EffectcraftApp::new(s); app.set_workspace("Text"); let builder = Harness::builder().with_size(vec2(1600.0, 1400.0)); - let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) } else { builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) }; + let mut h = if std::env::var_os("EC_SNAPSHOT_DIR").is_some() { + builder.wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) + } else { + builder.with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app) + }; h.state_mut().show_panel(PanelKind::Character); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_checkbox_drag.rs b/crates/ui-egui/tests/it/ui_checkbox_drag.rs index 263ace3da..5dc44abc0 100644 --- a/crates/ui-egui/tests/it/ui_checkbox_drag.rs +++ b/crates/ui-egui/tests/it/ui_checkbox_drag.rs @@ -20,7 +20,10 @@ fn view_options_drag_checks_and_unchecks_neighbours() { let mut session = Session::default(); session.prefs.disk.disk_cache_enabled = false; session.execute("comp.new", json!({"width":32,"height":32,"duration":1})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1200.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1200.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.state_mut().ui.viewer.rulers = false; h.state_mut().ui.viewer.guides = true; h.state_mut().ui.viewer.grid = false; diff --git a/crates/ui-egui/tests/it/ui_comp_presets.rs b/crates/ui-egui/tests/it/ui_comp_presets.rs index a9b006df9..1af3b3748 100644 --- a/crates/ui-egui/tests/it/ui_comp_presets.rs +++ b/crates/ui-egui/tests/it/ui_comp_presets.rs @@ -9,7 +9,11 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Edit", "width": 2560, "height": 1440, "frameRate": 60, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -114,8 +118,12 @@ fn composition_settings_buttons_fit_every_language() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Edit", "width": 2560, "height": 1440, "frameRate": 60, "duration": 4})).unwrap(); s.prefs.general.language = language.into(); - let mut h = - Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .allow_missing_glyphs() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); open_settings(&mut h); let mut oks = vec![]; @@ -148,7 +156,11 @@ fn rect_of(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { fn composition_settings_view_stays_put_when_it_scrolls() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Edit", "width": 2560, "height": 1440, "frameRate": 60, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 520.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 520.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); open_settings(&mut h); let (view, ok) = (rect_of(&h, "dialog.comp.view"), rect_of(&h, "dialog.comp.ok")); @@ -183,7 +195,8 @@ fn composition_settings_refits_when_the_language_changes() { .with_max_steps(30) // `run` checks accessibility after settling; that is not what this test is about. .with_accessibility_check(false) - .with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); open_settings(&mut h); click(&mut h, "dialog.comp.tab.advanced"); @@ -203,7 +216,11 @@ fn composition_settings_refits_when_the_language_changes() { /// leaves the Home screen for the new composition; Cancel keeps it. #[test] fn new_composition_dialog_ok_leaves_the_home_screen() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); h.state_mut().ui.start_screen = true; h.state_mut().dialog = Some(Dialog::NewComp); diff --git a/crates/ui-egui/tests/it/ui_crypto_pick.rs b/crates/ui-egui/tests/it/ui_crypto_pick.rs index 6c84a6331..2ed3c5f31 100644 --- a/crates/ui-egui/tests/it/ui_crypto_pick.rs +++ b/crates/ui-egui/tests/it/ui_crypto_pick.rs @@ -92,7 +92,12 @@ fn harness(s: Session, size: egui::Vec2, ppp: f32, ec: f32) -> Harness<'static, /// [`harness`] whose steps advance the clock by `dt` seconds. fn harness_dt(s: Session, size: egui::Vec2, ppp: f32, ec: f32, dt: f32) -> Harness<'static, EffectcraftApp> { let app = app(s, ec); - let mut h = Harness::builder().with_size(size).with_pixels_per_point(ppp).with_step_dt(dt).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(size) + .with_pixels_per_point(ppp) + .with_step_dt(dt) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); h } @@ -651,7 +656,12 @@ fn picks_on_the_gpu_viewer() { } let (s, ids) = crypto_session("gpu", 1919, 1079, false); let app = app(s, 420.0); - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_pixels_per_point(1.0).wgpu_setup(setup).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(vec2(1400.0, 900.0)) + .with_pixels_per_point(1.0) + .wgpu_setup(setup) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); if h.state().gpu_adapter().is_none() { eprintln!("the viewer stayed on the CPU ({adapter}): skipping"); diff --git a/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs b/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs index 8ed0426d2..d88a63356 100644 --- a/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs +++ b/crates/ui-egui/tests/it/ui_crypto_pick_undo.rs @@ -94,7 +94,12 @@ fn harness(s: Session, size: egui::Vec2) -> Harness<'static, EffectcraftApp> { dock::hsplit(SplitSize::FixedSecond(420.0), dock::tabs(&[PanelKind::Composition], 0), dock::tabs(&[PanelKind::EffectControls], 0)), dock::hsplit(SplitSize::FixedSecond(300.0), dock::tabs(&[PanelKind::Timeline], 0), dock::tabs(&[PanelKind::History], 0)), )); - let mut h = Harness::builder().with_size(size).with_pixels_per_point(1.0).with_step_dt(0.25).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(size) + .with_pixels_per_point(1.0) + .with_step_dt(0.25) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); h } diff --git a/crates/ui-egui/tests/it/ui_crypto_select.rs b/crates/ui-egui/tests/it/ui_crypto_select.rs index 35076cff0..1f25c594f 100644 --- a/crates/ui-egui/tests/it/ui_crypto_select.rs +++ b/crates/ui-egui/tests/it/ui_crypto_select.rs @@ -63,7 +63,12 @@ fn harness(s: Session) -> Harness<'static, EffectcraftApp> { dock::hsplit(SplitSize::FixedSecond(420.0), dock::tabs(&[PanelKind::Composition], 0), dock::tabs(&[PanelKind::EffectControls], 0)), dock::tabs(&[PanelKind::Timeline], 0), )); - let mut h = Harness::builder().with_size(vec2(1400.0, 800.0)).with_pixels_per_point(1.0).with_step_dt(0.25).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(vec2(1400.0, 800.0)) + .with_pixels_per_point(1.0) + .with_step_dt(0.25) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); settle(&mut h); h } diff --git a/crates/ui-egui/tests/it/ui_dialog_preview.rs b/crates/ui-egui/tests/it/ui_dialog_preview.rs index e18827caa..c142eba79 100644 --- a/crates/ui-egui/tests/it/ui_dialog_preview.rs +++ b/crates/ui-egui/tests/it/ui_dialog_preview.rs @@ -17,7 +17,10 @@ fn harness(setup: impl FnOnce(&mut Session)) -> Harness<'static, EffectcraftApp> let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 10})).unwrap(); setup(&mut s); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_drag_drop.rs b/crates/ui-egui/tests/it/ui_drag_drop.rs index 631a9c220..839debce3 100644 --- a/crates/ui-egui/tests/it/ui_drag_drop.rs +++ b/crates/ui-egui/tests/it/ui_drag_drop.rs @@ -28,7 +28,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64) { s.execute("layer.newSolid", json!({"name": name, "color": "#406080"})).unwrap(); } s.execute("time.set", json!({"time": 1.0})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, clip) } @@ -299,7 +302,10 @@ fn project_footage_dropped_on_empty_timeline_creates_first_comp() { s.execute("file.importPlaceholder", json!({"name": "Landscape.png", "width": 640, "height": 360, "frameRate": 24, "duration": 5})).unwrap()["item"] .as_u64() .unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().session.active_comp().is_none()); let from = rect(&h, &format!("project.item.{footage}.name")).center(); @@ -322,7 +328,10 @@ fn multiple_selected_footage_dropped_on_empty_timeline_asks_how_to_create_comps( let first = s.execute("file.importPlaceholder", json!({"name": "First.png", "width": 160, "height": 90})).unwrap()["item"].as_u64().unwrap(); let second = s.execute("file.importPlaceholder", json!({"name": "Second.png", "width": 300, "height": 200})).unwrap()["item"].as_u64().unwrap(); s.state.project_selection = vec![effectcraft_engine::project::ItemId(first), effectcraft_engine::project::ItemId(second)]; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let from = rect(&h, &format!("project.item.{first}.name")).center(); let to = rect(&h, "panel.Timeline").center(); @@ -341,7 +350,10 @@ fn project_footage_dropped_on_empty_viewer_creates_first_comp() { s.execute("file.importPlaceholder", json!({"name": "Landscape.png", "width": 640, "height": 360, "frameRate": 24, "duration": 5})).unwrap()["item"] .as_u64() .unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().session.active_comp().is_none()); let from = rect(&h, &format!("project.item.{footage}.name")).center(); @@ -364,7 +376,10 @@ fn multiple_selected_footage_dropped_on_empty_viewer_asks_how_to_create_comps() let first = s.execute("file.importPlaceholder", json!({"name": "First.png", "width": 160, "height": 90})).unwrap()["item"].as_u64().unwrap(); let second = s.execute("file.importPlaceholder", json!({"name": "Second.png", "width": 300, "height": 200})).unwrap()["item"].as_u64().unwrap(); s.state.project_selection = vec![effectcraft_engine::project::ItemId(first), effectcraft_engine::project::ItemId(second)]; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let from = rect(&h, &format!("project.item.{first}.name")).center(); let viewer = rect(&h, "panel.Composition"); @@ -650,7 +665,10 @@ fn import_dialog_offers_the_image_sequence_option() { /// of it, as in After Effects. #[test] fn new_composition_from_footage_makes_a_comp_of_the_picked_file() { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); let dir = frames("fromfootage", 2); let pick = dir.join("frame_0002.png").to_string_lossy().to_string(); @@ -702,7 +720,10 @@ fn a_dropped_folder_imports_as_one_sequence_with_sequence_interpretation() { fn illustrator_import_offers_and_applies_retain_layer_sizes() { let path = std::env::temp_dir().join(format!("effectcraft-retain-ui-{}.ai", std::process::id())); std::fs::write(&path, b"%PDF-1.4\n1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj\n2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj\n3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 120 80] /Contents 4 0 R >> endobj\n4 0 obj << >> stream\n1 0 0 rg 20 15 30 20 re f\nendstream endobj\n%%EOF").unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(effectcraft_host::session())); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(effectcraft_host::session())); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "file.import", json!({"paths": [path]})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs b/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs index 48ad490d4..7bf2bf22a 100644 --- a/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs +++ b/crates/ui-egui/tests/it/ui_effect_drop_highlight.rs @@ -23,7 +23,10 @@ fn effect_drag_highlights_the_layer_under_the_pointer() { s.execute("comp.new", json!({"name": "Main", "width": 640, "height": 360, "duration": 4})).unwrap(); let a = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); let b = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().auto.find("timeline.dropTarget").is_none(), "nothing is lit without a drag"); let (row_a, row_b) = (rect(&h, &format!("timeline.layer.{a}.row")), rect(&h, &format!("timeline.layer.{b}.row"))); diff --git a/crates/ui-egui/tests/it/ui_effect_names.rs b/crates/ui-egui/tests/it/ui_effect_names.rs index 680b8dd2e..7ba774416 100644 --- a/crates/ui-egui/tests/it/ui_effect_names.rs +++ b/crates/ui-egui/tests/it/ui_effect_names.rs @@ -34,7 +34,11 @@ fn harness(language: &str) -> (Harness<'static, EffectcraftApp>, u64) { app.show_panel(PanelKind::Timeline); // The Chinese/Japanese names under test have no installed face on every host: draw tofu // instead of failing the missing-glyph gate (the glyph coverage test covers the bundled set). - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(vec2(1400.0, 900.0)) + .allow_missing_glyphs() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(4); (h, fx) } diff --git a/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs b/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs index 8e30181b9..e768a032a 100644 --- a/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_effects_presets_keyboard.rs @@ -16,7 +16,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Red", "color": "#c04040"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::EffectsPresets); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_env_light_gpu.rs b/crates/ui-egui/tests/it/ui_env_light_gpu.rs index a5b492ca0..7520fa3bb 100644 --- a/crates/ui-egui/tests/it/ui_env_light_gpu.rs +++ b/crates/ui-egui/tests/it/ui_env_light_gpu.rs @@ -57,7 +57,8 @@ fn environment_light_lights_the_scene_on_the_gpu() { .with_size(egui::vec2(1400.0, 900.0)) .with_pixels_per_point(1.0) .wgpu_setup(same_adapter(adapter)) - .with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); // The project opens once the compositor (built on a worker thread) is attached, so the // frames compared below are GPU frames, not ones the CPU composited meanwhile (see ui_gpu.rs). wait_for_compositor(&mut h); diff --git a/crates/ui-egui/tests/it/ui_export_overwrite.rs b/crates/ui-egui/tests/it/ui_export_overwrite.rs index 402a82ae4..07f2f9475 100644 --- a/crates/ui-egui/tests/it/ui_export_overwrite.rs +++ b/crates/ui-egui/tests/it/ui_export_overwrite.rs @@ -38,7 +38,10 @@ impl Rig { }; std::sync::Arc::make_mut(&mut s.project).add_item("clip.png", Label::Aqua, None, ItemKind::Footage(clip)); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app.take().expect("app")); h.run_steps(2); Rig { h, dir } } diff --git a/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs b/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs index a03eaeafb..a3600c8f8 100644 --- a/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_flowchart_keyboard.rs @@ -28,7 +28,10 @@ fn sized(w: f32, hh: f32) -> Harness<'static, EffectcraftApp> { id(s.execute("comp.new", json!({"name": "Main", "width": 100, "height": 100, "duration": 2})).unwrap()); s.execute("layer.addItem", json!({"item": mid})).unwrap(); s.execute("layer.addItem", json!({"item": inner})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(w, hh)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(w, hh)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Flowchart); h.state_mut().ui.maximized = Some(PanelKind::Flowchart); h.run_steps(4); @@ -108,7 +111,11 @@ fn the_toolbar_automation_labels_stay_english_in_another_language() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 100, "height": 100, "duration": 2})).unwrap(); s.prefs.general.language = "fr".into(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .allow_missing_glyphs() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Flowchart); h.state_mut().ui.maximized = Some(PanelKind::Flowchart); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_font_search.rs b/crates/ui-egui/tests/it/ui_font_search.rs index d326646bc..6069dd5a2 100644 --- a/crates/ui-egui/tests/it/ui_font_search.rs +++ b/crates/ui-egui/tests/it/ui_font_search.rs @@ -94,7 +94,10 @@ fn font_search_preserves_edited_text_and_applies_only_to_selected_characters() { let lid = s.execute("layer.newText", json!({"text": "First second", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); s.execute("text.edit", json!({"layer": lid})).unwrap(); s.execute("text.setSelection", json!({"start": 0, "end": 5})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); click(&mut h, "character.font"); @@ -143,7 +146,10 @@ fn font_menu_lists_a_name_the_interface_fonts_lack_in_english() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "Native", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); click(&mut h, "character.font"); @@ -192,7 +198,10 @@ fn font_menu_filters_variable_fonts() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "Var", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); let families = |h: &Harness<'_, EffectcraftApp>| -> Vec { @@ -232,7 +241,10 @@ fn font_menu_grows_back_after_an_empty_search() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "Grow", "font": "Inter"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); let rows = |h: &Harness<'_, EffectcraftApp>| h.state().auto.query("character.font.option.").len(); @@ -266,7 +278,10 @@ fn font_menu_rescan_button_adds_fonts_installed_later() { let mut s = Session::default(); s.execute("comp.new", json!({"width": 320, "height": 180})).unwrap(); s.execute("layer.newText", json!({"text": "Keep this text", "font": "Inter"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Character); h.run_steps(3); click(&mut h, "character.font"); diff --git a/crates/ui-egui/tests/it/ui_form_fit.rs b/crates/ui-egui/tests/it/ui_form_fit.rs index fec67e8f7..f4c5b235a 100644 --- a/crates/ui-egui/tests/it/ui_form_fit.rs +++ b/crates/ui-egui/tests/it/ui_form_fit.rs @@ -14,7 +14,10 @@ fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> Rect { fn project_settings_fits_the_form_width() { let mut session = Session::default(); session.prefs.disk.disk_cache_enabled = false; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "file.projectSettings", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_frame_step.rs b/crates/ui-egui/tests/it/ui_frame_step.rs index 75d71887d..2950dfe0c 100644 --- a/crates/ui-egui/tests/it/ui_frame_step.rs +++ b/crates/ui-egui/tests/it/ui_frame_step.rs @@ -20,7 +20,10 @@ fn cmd_arrows_step_the_current_frame() { let mut session = Session::default(); session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let cid = session.state.active_comp.unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(2); let frame = |h: &Harness<'_, EffectcraftApp>| { let app = h.state(); @@ -53,7 +56,10 @@ fn plain_arrows_nudge_the_selected_layer() { session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let lid = session.execute("layer.newSolid", json!({"name": "Box", "width": 40, "height": 40, "color": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); session.execute("layer.select", json!({"layers": [lid]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(2); let x = |h: &Harness<'_, EffectcraftApp>| { h.state().session.active_comp().unwrap().layer(LayerId(lid)).unwrap().props.prop("transform/position").unwrap().value.as_vec3()[0] @@ -83,7 +89,10 @@ fn clicking_a_timeline_row_then_arrows_nudge_the_layer() { session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let lid = session.execute("layer.newSolid", json!({"name": "Box", "width": 40, "height": 40, "color": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); session.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); let row = { let e = h.state().auto.find(&format!("timeline.layer.{lid}.row")).expect("timeline row"); @@ -114,7 +123,10 @@ fn arrows_nudge_from_any_panel_but_project() { session.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30.0, "duration": 4.0})).unwrap(); let lid = session.execute("layer.newSolid", json!({"name": "Box", "width": 40, "height": 40, "color": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); session.execute("layer.select", json!({"layers": [lid]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(2); let x = |h: &Harness<'_, EffectcraftApp>| { h.state().session.active_comp().unwrap().layer(LayerId(lid)).unwrap().props.prop("transform/position").unwrap().value.as_vec3()[0] diff --git a/crates/ui-egui/tests/it/ui_fx_editors.rs b/crates/ui-egui/tests/it/ui_fx_editors.rs index bf2591541..4fd9ffc59 100644 --- a/crates/ui-egui/tests/it/ui_fx_editors.rs +++ b/crates/ui-egui/tests/it/ui_fx_editors.rs @@ -17,7 +17,8 @@ fn harness(s: Session) -> Harness<'static, EffectcraftApp> { let mut app = EffectcraftApp::new(s); app.show_panel(PanelKind::EffectControls); app.toggle_maximize(PanelKind::EffectControls); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1400.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1400.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(4); h } @@ -287,7 +288,10 @@ fn mesh_warp_vertices_drag_on_the_viewer() { fn composition_tabs_and_scrolling_preview() { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); rect(&h, "panel.tab.Timeline.close"); rect(&h, "preview.scroll"); diff --git a/crates/ui-egui/tests/it/ui_gpu.rs b/crates/ui-egui/tests/it/ui_gpu.rs index 24addb35a..e8912634c 100644 --- a/crates/ui-egui/tests/it/ui_gpu.rs +++ b/crates/ui-egui/tests/it/ui_gpu.rs @@ -60,16 +60,19 @@ fn the_interface_draws_and_composites_on_the_cpu_while_the_gpu_compositor_is_bui } let (release, gate) = std::sync::mpsc::channel::<()>(); let s = small_session(); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| { - let mut app = EffectcraftApp::new(s); - // The status line's 5 s expiry reads the app clock: a manual one makes the steps below - // stand for a known span of time. - app.use_manual_clock(); - app.hooks.before_gpu_build = Some(Box::new(move || { - let _ = gate.recv(); - })); - app - }); + let mut h = + Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe( + move |_| { + let mut app = EffectcraftApp::new(s); + // The status line's 5 s expiry reads the app clock: a manual one makes the steps below + // stand for a known span of time. + app.use_manual_clock(); + app.hooks.before_gpu_build = Some(Box::new(move || { + let _ = gate.recv(); + })); + app + }, + ); // The first frames paint, and a CPU frame reaches the viewer, while the worker still waits. for _ in 0..600 { h.step(); @@ -118,11 +121,14 @@ fn a_compositor_build_that_panics_leaves_the_viewer_on_the_cpu() { return; } let s = small_session(); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| { - let mut app = EffectcraftApp::new(s); - app.hooks.before_gpu_build = Some(Box::new(|| panic!("synthetic shader compiler panic"))); - app - }); + let mut h = + Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe( + move |_| { + let mut app = EffectcraftApp::new(s); + app.hooks.before_gpu_build = Some(Box::new(|| panic!("synthetic shader compiler panic"))); + app + }, + ); settle(&mut h); assert!(!h.state().gpu_initializing()); assert!(h.state().gpu_adapter().is_none()); @@ -169,7 +175,8 @@ fn viewer_draws_gpu_frames_that_match_the_cpu() { .with_size(egui::vec2(1400.0, 900.0)) .with_pixels_per_point(1.0) .wgpu_setup(same_adapter(adapter)) - .with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); // The project opens once the compositor (built on a worker thread) is attached. A frame the // CPU composited while it was being built has the GPU frame's key, so the viewer would keep // showing it, and the comparison below would be the CPU against itself. @@ -215,7 +222,10 @@ fn a_lost_device_draws_nothing_autosaves_and_closes() { let mut s = Session { autosave_folder_override: Some(dir.clone()), ..Default::default() }; s.execute("comp.new", json!({"name": "Unsaved", "width": 64, "height": 64, "duration": 1})).unwrap(); assert!(s.is_dirty()); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1200.0, 800.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); let told = std::rc::Rc::new(std::cell::RefCell::new(Vec::new())); let log = told.clone(); h.state_mut().hooks.device_lost = Some(Box::new(move |saved| log.borrow_mut().push(saved))); @@ -259,7 +269,11 @@ fn the_viewer_exposes_32_bpc_frames_on_the_gpu() { let lid = s.execute("layer.newSolid", json!({"color": "#ffffff"})).unwrap()["layer"].as_u64().unwrap(); s.execute("effect.apply", json!({"layers": [lid], "effect": "Exposure"})).unwrap(); s.execute("prop.set", json!({"layer": lid, "path": "effects/#1/master/exposure", "value": 2.0})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1200.0, 800.0)).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1200.0, 800.0)) + .wgpu() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); settle(&mut h); let p = h.state().viewer_f16().expect("a half-float viewer frame").pixel(0).unwrap(); let l = effectcraft_engine::color::srgb_to_linear(p[0] / p[3]); diff --git a/crates/ui-egui/tests/it/ui_gradient_editor.rs b/crates/ui-egui/tests/it/ui_gradient_editor.rs index 258bf5324..8195e9555 100644 --- a/crates/ui-egui/tests/it/ui_gradient_editor.rs +++ b/crates/ui-egui/tests/it/ui_gradient_editor.rs @@ -45,7 +45,10 @@ fn setup(timing: &[(&str, serde_json::Value)]) -> (Harness<'static, EffectcraftA s.execute(cmd, p).unwrap(); } let (groups, colors) = gradient_fill(&s.active_comp().unwrap().layer(LayerId(l)).unwrap().props).expect("a Gradient Fill"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.open_layers.insert(l); h.state_mut().ui.timeline.open_groups.extend(groups); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_gradient_handles.rs b/crates/ui-egui/tests/it/ui_gradient_handles.rs index 02a242c59..7fac02ed5 100644 --- a/crates/ui-egui/tests/it/ui_gradient_handles.rs +++ b/crates/ui-egui/tests/it/ui_gradient_handles.rs @@ -53,7 +53,10 @@ fn setup(in_group: bool, prep: impl FnOnce(&mut Session, u64, u64)) -> (Session, } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h } diff --git a/crates/ui-egui/tests/it/ui_gradient_value.rs b/crates/ui-egui/tests/it/ui_gradient_value.rs index 26ec7b328..5be67bbe6 100644 --- a/crates/ui-egui/tests/it/ui_gradient_value.rs +++ b/crates/ui-egui/tests/it/ui_gradient_value.rs @@ -31,7 +31,10 @@ fn the_timeline_gradient_value_opens_an_editor() { let l = s.execute("layer.newShape", json!({"kind": "rect"})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.addShapeItem", json!({"layer": l, "kind": "gfill"})).unwrap(); let (groups, colors) = gradient_fill(&s.active_comp().unwrap().layer(LayerId(l)).unwrap().props).expect("a Gradient Fill"); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.open_layers.insert(l); h.state_mut().ui.timeline.open_groups.extend(groups); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_graph_fit.rs b/crates/ui-egui/tests/it/ui_graph_fit.rs index 69ebb3737..8e4bf86c1 100644 --- a/crates/ui-egui/tests/it/ui_graph_fit.rs +++ b/crates/ui-egui/tests/it/ui_graph_fit.rs @@ -20,7 +20,10 @@ fn harness(select_layer: bool) -> (Harness<'static, EffectcraftApp>, u64, u64) { } let uid = s.active_comp().unwrap().layer(id).unwrap().props.prop("transform/rotation").unwrap().uid; s.execute("layer.select", json!({"layers": if select_layer { vec![id.0] } else { vec![] }})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.pps = Some(300.0); h.state_mut().ui.timeline.start = 0.0; h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_graph_theme.rs b/crates/ui-egui/tests/it/ui_graph_theme.rs index 2f04e2a97..87ac73057 100644 --- a/crates/ui-egui/tests/it/ui_graph_theme.rs +++ b/crates/ui-egui/tests/it/ui_graph_theme.rs @@ -33,7 +33,10 @@ fn the_graph_editor_follows_the_theme() { } s.execute("layer.select", json!({"layers": [id.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().ui.timeline.graph_editor = true; h.run_steps(4); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_group_rename.rs b/crates/ui-egui/tests/it/ui_group_rename.rs index 4abb75063..632d403be 100644 --- a/crates/ui-egui/tests/it/ui_group_rename.rs +++ b/crates/ui-egui/tests/it/ui_group_rename.rs @@ -28,7 +28,11 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Fx) { s.active_comp().unwrap().layer(effectcraft_engine::project::LayerId(l)).unwrap().props.group(path).unwrap().groups().next().unwrap().uid }; let (anim, mask, group) = (first(&s, text, "text/animators"), first(&s, shape, "masks"), first(&s, shape, "contents")); - let mut h = Harness::builder().with_size(egui::vec2(1700.0, 1100.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1700.0, 1100.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(6); (h, Fx { text, shape, effect, anim, mask, group }) } diff --git a/crates/ui-egui/tests/it/ui_guide_layers.rs b/crates/ui-egui/tests/it/ui_guide_layers.rs index e5b8b59f1..2206aa4e0 100644 --- a/crates/ui-egui/tests/it/ui_guide_layers.rs +++ b/crates/ui-egui/tests/it/ui_guide_layers.rs @@ -21,7 +21,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, LayerId, LayerId) { }; let left = solid("Left", 160.0); let right = solid("Right", 480.0); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(3); (h, left, right) } diff --git a/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs b/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs index 623e7b043..17264b508 100644 --- a/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs +++ b/crates/ui-egui/tests/it/ui_info_tracker_a11y.rs @@ -15,7 +15,10 @@ fn harness(panel: PanelKind) -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Red", "color": "#c04040"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(panel); h.state_mut().ui.maximized = Some(panel); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_inline_edit.rs b/crates/ui-egui/tests/it/ui_inline_edit.rs index 0213cb943..eef6b3687 100644 --- a/crates/ui-egui/tests/it/ui_inline_edit.rs +++ b/crates/ui-egui/tests/it/ui_inline_edit.rs @@ -14,7 +14,11 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64) { let comp = s.active_comp_id().unwrap().0; // Arabic, Hebrew, Devanagari and Thai names typed below need installed system faces: draw // tofu on a host without them rather than failing the missing-glyph gate. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .allow_missing_glyphs() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); (h, comp) } diff --git a/crates/ui-egui/tests/it/ui_keyframes.rs b/crates/ui-egui/tests/it/ui_keyframes.rs index e79430f95..9770f3ec5 100644 --- a/crates/ui-egui/tests/it/ui_keyframes.rs +++ b/crates/ui-egui/tests/it/ui_keyframes.rs @@ -21,7 +21,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, LayerId, u64) { } let uid = s.active_comp().unwrap().layer(id).unwrap().props.prop("transform/opacity").unwrap().uid; s.execute("layer.select", json!({"layers": [id.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -518,7 +521,10 @@ fn properties_panel_edits_every_selected_layer() { s.execute("layer.select", json!({"layers": ids})).unwrap(); let first = s.state.selected_layers[0]; let uid = s.active_comp().unwrap().layer(first).unwrap().props.prop("transform/position").unwrap().uid; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(effectcraft_ui_egui::dock::PanelKind::Properties); h.run_steps(4); assert_eq!(h.state().auto.find("properties.selectedObjects").map(|e| e.label.clone()), Some("(3) Selected Objects".into())); @@ -571,7 +577,10 @@ fn ctrl_alt_scrub_in_the_timeline_is_proportional() { } let middle = ids[1]; let uid = s.active_comp().unwrap().layer(LayerId(middle)).unwrap().props.prop("transform/position").unwrap().uid; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.position", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_large_project.rs b/crates/ui-egui/tests/it/ui_large_project.rs index a2c0a3476..cd2bfec38 100644 --- a/crates/ui-egui/tests/it/ui_large_project.rs +++ b/crates/ui-egui/tests/it/ui_large_project.rs @@ -15,7 +15,10 @@ fn spec() -> LargeSpec { } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs b/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs index 57e96cb1d..4fd00ea96 100644 --- a/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs +++ b/crates/ui-egui/tests/it/ui_layer_panel_zoom.rs @@ -23,7 +23,8 @@ fn box_id(h: &Harness<'_, EffectcraftApp>) -> u64 { /// The harness with Box open in the Layer panel (focused). fn harness() -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.run_steps(3); let id = box_id(&h); h.state_mut().session.execute("layer.select", json!({"layers": [id]})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_layer_source_picker.rs b/crates/ui-egui/tests/it/ui_layer_source_picker.rs index a34bc1938..96a01de34 100644 --- a/crates/ui-egui/tests/it/ui_layer_source_picker.rs +++ b/crates/ui-egui/tests/it/ui_layer_source_picker.rs @@ -221,7 +221,12 @@ fn snapshot_source_dropdown_open_and_chosen() { let mut app = EffectcraftApp::new(s); app.ui.timeline.open_layers.insert(light); app.ui.timeline.open_groups.insert(group); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_pixels_per_point(2.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_pixels_per_point(2.0) + .wgpu() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(4); let save = |h: &mut Harness<'_, EffectcraftApp>, name: &str| { if let Ok(dir) = std::env::var("EC_SNAPSHOT_DIR") { diff --git a/crates/ui-egui/tests/it/ui_light_settings.rs b/crates/ui-egui/tests/it/ui_light_settings.rs index 7d310ee70..d1b233517 100644 --- a/crates/ui-egui/tests/it/ui_light_settings.rs +++ b/crates/ui-egui/tests/it/ui_light_settings.rs @@ -10,7 +10,10 @@ use serde_json::{Value, json}; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Lights", "width": 640, "height": 360, "duration": 2})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.step(); h } diff --git a/crates/ui-egui/tests/it/ui_live_preview.rs b/crates/ui-egui/tests/it/ui_live_preview.rs index 6c5e0b1d8..2f8a2b408 100644 --- a/crates/ui-egui/tests/it/ui_live_preview.rs +++ b/crates/ui-egui/tests/it/ui_live_preview.rs @@ -45,7 +45,11 @@ fn opacity_edits_show_completed_intermediate_frames_before_the_drag_stops() { let renderer = Arc::new(HeldRenderer::default()); let mut app = EffectcraftApp::new(session); app.frames.set_remote(Some(renderer.clone())); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.016).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(0.016) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(3); assert_eq!(h.state().frames.dispatch_remote(), 1); renderer.finish(); @@ -95,7 +99,11 @@ fn position_anchor_and_effect_edits_present_intermediate_pixels() { let renderer = Arc::new(HeldRenderer::default()); let mut app = EffectcraftApp::new(session); app.frames.set_remote(Some(renderer.clone())); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.016).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(0.016) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app); h.run_steps(3); h.state().frames.dispatch_remote(); let initial = renderer.finish(); @@ -124,7 +132,11 @@ fn continuous_opacity_preview_probe() { let mut session = Session::default(); session.execute("comp.new", json!({"width":1920,"height":1080,"duration":1})).unwrap(); let layer = session.execute("layer.newSolid", json!({"color":"#ffffff"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); let ready = Instant::now(); while h.state_mut().viewer_pixels().is_none() && ready.elapsed() < Duration::from_secs(5) { h.step(); diff --git a/crates/ui-egui/tests/it/ui_locked_color.rs b/crates/ui-egui/tests/it/ui_locked_color.rs index 530940b45..e29b49031 100644 --- a/crates/ui-egui/tests/it/ui_locked_color.rs +++ b/crates/ui-egui/tests/it/ui_locked_color.rs @@ -63,7 +63,11 @@ fn locked_viewer_follows_display_profile_and_simulation() { s.execute("prefs.set", json!({"key": "previews.displayProfile", "value": "srgb"})).unwrap(); s.execute("view.displayColorManagement", json!({"value": true})).unwrap(); let images = Images::default(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).renderer(Capture(images.clone())).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .renderer(Capture(images.clone())) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); invoke(&mut h, "view.splitLockedViewer", json!({})); let first = expected_center(&mut h); diff --git a/crates/ui-egui/tests/it/ui_marker_names.rs b/crates/ui-egui/tests/it/ui_marker_names.rs index 66fe11688..fbb99a5cb 100644 --- a/crates/ui-egui/tests/it/ui_marker_names.rs +++ b/crates/ui-egui/tests/it/ui_marker_names.rs @@ -20,7 +20,10 @@ fn the_name_box_follows_the_theme() { s.execute("layer.newSolid", json!({"name": "Bed", "color": "#204060", "width": 640, "height": 360})).unwrap(); s.execute("markers.set", json!({"new": true, "time": 1.0, "comment": "Verse"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(4); let ctx = h.ctx.clone(); @@ -63,7 +66,10 @@ fn a_short_duration_stays_visible_beside_the_name_box() { // a second marker half a second later gives the timeline's scale (points per second) s.execute("markers.set", json!({"new": true, "time": 1.5})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(5); let tokens = h.state().tokens; let centre = |id: &str| { @@ -100,7 +106,10 @@ fn a_later_name_box_does_not_hide_an_earlier_duration_cap() { s.execute("comp.new", json!({"width": 640, "height": 360, "duration": 4})).unwrap(); s.execute("markers.set", json!({"new": true, "time": 1.0, "duration": 0.5, "label": "Red"})).unwrap(); s.execute("markers.set", json!({"new": true, "time": 1.3, "comment": "This name overlaps the earlier endpoint", "label": "Blue"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(5); let a = h.state().auto.find("timeline.marker.0").unwrap().rect; let b = h.state().auto.find("timeline.marker.1").unwrap().rect; diff --git a/crates/ui-egui/tests/it/ui_media_browser_cache.rs b/crates/ui-egui/tests/it/ui_media_browser_cache.rs index 293c6ec2b..6dc0192eb 100644 --- a/crates/ui-egui/tests/it/ui_media_browser_cache.rs +++ b/crates/ui-egui/tests/it/ui_media_browser_cache.rs @@ -81,13 +81,17 @@ fn browser_cache_refreshes_filters_navigates_and_recovers_from_errors() { } let mut session = Session { browser: Some(browser.clone()), ..Default::default() }; session.prefs.general.language = "en".into(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { - let mut app = EffectcraftApp::new(session); - app.ui.start_screen = false; - app.show_panel(PanelKind::MediaBrowser); - app.ui.maximized = Some(PanelKind::MediaBrowser); - app - }); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| { + let mut app = EffectcraftApp::new(session); + app.ui.start_screen = false; + app.show_panel(PanelKind::MediaBrowser); + app.ui.maximized = Some(PanelKind::MediaBrowser); + app + }); h.run_steps(3); let (time, first) = listing(&h, false); assert_eq!(names(&first), ["Sub", "Clip.csv", "notes.txt"]); diff --git a/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs b/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs index 3c612fcd9..3afe0fc55 100644 --- a/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs +++ b/crates/ui-egui/tests/it/ui_media_browser_copy_path.rs @@ -54,13 +54,18 @@ fn file_folder_and_virtual_paths_copy_from_the_context_menu_without_document_cha session.prefs.general.language = "en".into(); session.execute("comp.new", json!({"width": 64, "height": 36, "duration": 2})).unwrap(); // The Chinese folder and file names need an installed CJK face. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { - let mut app = EffectcraftApp::new(session); - app.ui.start_screen = false; - app.show_panel(PanelKind::MediaBrowser); - app.ui.maximized = Some(PanelKind::MediaBrowser); - app - }); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .allow_missing_glyphs() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| { + let mut app = EffectcraftApp::new(session); + app.ui.start_screen = false; + app.show_panel(PanelKind::MediaBrowser); + app.ui.maximized = Some(PanelKind::MediaBrowser); + app + }); h.run_steps(3); let project = h.state().session.project.clone(); let revision = h.state().session.revision; diff --git a/crates/ui-egui/tests/it/ui_menus.rs b/crates/ui-egui/tests/it/ui_menus.rs index 0d4376a44..35cddf7d6 100644 --- a/crates/ui-egui/tests/it/ui_menus.rs +++ b/crates/ui-egui/tests/it/ui_menus.rs @@ -12,7 +12,10 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("file.openDemoProject", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_new_primitive.rs b/crates/ui-egui/tests/it/ui_new_primitive.rs index 015fa03c2..777883811 100644 --- a/crates/ui-egui/tests/it/ui_new_primitive.rs +++ b/crates/ui-egui/tests/it/ui_new_primitive.rs @@ -11,7 +11,10 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Scene", "width": 640, "height": 360, "duration": 2})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.step(); h } diff --git a/crates/ui-egui/tests/it/ui_object_matte.rs b/crates/ui-egui/tests/it/ui_object_matte.rs index 1806fc640..c939d15d9 100644 --- a/crates/ui-egui/tests/it/ui_object_matte.rs +++ b/crates/ui-egui/tests/it/ui_object_matte.rs @@ -20,7 +20,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080", "width": 640, "height": 360})).unwrap(); s.execute("layer.newSolid", json!({"name": "Box", "color": "#e04020", "width": 80, "height": 80})).unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_panels.rs b/crates/ui-egui/tests/it/ui_panels.rs index 5646f221b..c265e2ab7 100644 --- a/crates/ui-egui/tests/it/ui_panels.rs +++ b/crates/ui-egui/tests/it/ui_panels.rs @@ -18,7 +18,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Panels", "width": 320, "height": 180, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -169,7 +172,10 @@ fn saved_workspaces_persist_across_sessions() { let store = std::sync::Arc::new(MemoryConfig::default()); let launch = || { let s = Session { config: Some(store.clone()), ..Default::default() }; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(2); h }; @@ -338,7 +344,10 @@ fn ui_scale_setting_sizes_the_interface() { assert_eq!(ctx.zoom_factor(), 0.9); // A saved scale applies from the first frame. let s = Session { prefs: effectcraft_engine::prefs::Prefs::from_json(&h.state().session.prefs.to_json()), ..Default::default() }; - let mut h2 = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h2 = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h2.run_steps(3); assert_eq!(h2.ctx.zoom_factor(), 0.9); } @@ -359,7 +368,10 @@ fn settings_buttons_stay_in_view_at_200_percent() { s.prefs.disk.disk_cache_enabled = false; s.prefs.set("appearance.uiScale", json!(200)).unwrap(); s.save_prefs(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert_eq!(scale(&h), (200, 2.0)); let rect = |h: &Harness<'_, EffectcraftApp>, id: &str| { @@ -423,7 +435,10 @@ fn panels_snapshot() { s.execute("file.openDemoProject", json!({})).unwrap(); let solid = s.project.items.values().find(|i| matches!(i.kind, effectcraft_engine::project::ItemKind::Solid(_))).map(|i| i.id.0); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app.take().expect("app")); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "window.workspace", json!({"name": "All Panels"})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_presets_folder.rs b/crates/ui-egui/tests/it/ui_presets_folder.rs index 842812974..427812f75 100644 --- a/crates/ui-egui/tests/it/ui_presets_folder.rs +++ b/crates/ui-egui/tests/it/ui_presets_folder.rs @@ -39,13 +39,17 @@ fn presets_menu_copies_the_configured_folder_without_editing_the_project() { let expected = expected_folder(); for language in ["en", "ja"] { // The `ja` run draws Japanese menu text, which needs an installed CJK face. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).allow_missing_glyphs().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { - let mut app = EffectcraftApp::new(Session::default()); - app.session.prefs.general.language = language.into(); - app.ui.start_screen = false; - app.show_panel(PanelKind::EffectsPresets); - app - }); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .allow_missing_glyphs() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| { + let mut app = EffectcraftApp::new(Session::default()); + app.session.prefs.general.language = language.into(); + app.ui.start_screen = false; + app.show_panel(PanelKind::EffectsPresets); + app + }); h.run_steps(3); let before = serde_json::to_value(&h.state().session.project).unwrap(); let revision = h.state().session.revision; @@ -123,12 +127,16 @@ fn shared_preset_rows_search_apply_and_undo_the_selected_definition() { session.prefs.general.language = "en".into(); session.execute("comp.new", json!({"width": 64, "height": 36, "duration": 2})).unwrap(); session.execute("layer.newText", json!({"text": "Cache"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { - let mut app = EffectcraftApp::new(session); - app.ui.start_screen = false; - app.show_panel(PanelKind::EffectsPresets); - app - }); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| { + let mut app = EffectcraftApp::new(session); + app.ui.start_screen = false; + app.show_panel(PanelKind::EffectsPresets); + app + }); h.run_steps(3); let shared = std::sync::Arc::new(entries); let now = h.ctx.input(|i| i.time); diff --git a/crates/ui-egui/tests/it/ui_preview_align.rs b/crates/ui-egui/tests/it/ui_preview_align.rs index 7588c56bf..a9b63d25b 100644 --- a/crates/ui-egui/tests/it/ui_preview_align.rs +++ b/crates/ui-egui/tests/it/ui_preview_align.rs @@ -16,7 +16,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("comp.new", json!({"name": "Preview", "width": 320, "height": 180, "frameRate": 24, "duration": 10})).unwrap(); s.execute("layer.newSolid", json!({"name": "A", "color": "#406080", "width": 40, "height": 30})).unwrap(); s.execute("layer.newSolid", json!({"name": "B", "color": "#806040", "width": 60, "height": 20})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_project_delete.rs b/crates/ui-egui/tests/it/ui_project_delete.rs index ef66bd866..bbe6c39a0 100644 --- a/crates/ui-egui/tests/it/ui_project_delete.rs +++ b/crates/ui-egui/tests/it/ui_project_delete.rs @@ -24,7 +24,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec, LayerId) { ); let folder = ItemId(s.execute("project.newFolder", json!({"name": "Folder"})).unwrap()["item"].as_u64().unwrap()); let keep = LayerId(s.execute("layer.newNull", json!({"name": "Keep this layer"})).unwrap()["layer"].as_u64().unwrap()); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); let folders: Vec = h.state().session.project.items.values().filter(|i| i.is_folder()).map(|i| i.id.0).collect(); h.state_mut().ui.project_open_folders.extend(folders); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_project_duplicate.rs b/crates/ui-egui/tests/it/ui_project_duplicate.rs index a83fa0cb7..9baa7b4ff 100644 --- a/crates/ui-egui/tests/it/ui_project_duplicate.rs +++ b/crates/ui-egui/tests/it/ui_project_duplicate.rs @@ -20,7 +20,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, ItemId, ItemId, ItemId) { let other = comp("Other"); let folder = ItemId(s.execute("project.newFolder", json!({"name": "Bin"})).unwrap()["item"].as_u64().unwrap()); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, main, other, folder) } diff --git a/crates/ui-egui/tests/it/ui_project_keyboard.rs b/crates/ui-egui/tests/it/ui_project_keyboard.rs index 5fff9657f..eb7c7bf43 100644 --- a/crates/ui-egui/tests/it/ui_project_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_project_keyboard.rs @@ -23,7 +23,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, ItemId, ItemId, ItemId) { s.execute("project.move", json!({"items": [comp.0], "folder": folder.0})).unwrap(); s.execute("project.move", json!({"items": [solid.0], "folder": null})).unwrap(); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, folder, comp, solid) } diff --git a/crates/ui-egui/tests/it/ui_project_new_folder.rs b/crates/ui-egui/tests/it/ui_project_new_folder.rs index c19e56858..de6cc53f5 100644 --- a/crates/ui-egui/tests/it/ui_project_new_folder.rs +++ b/crates/ui-egui/tests/it/ui_project_new_folder.rs @@ -20,7 +20,10 @@ fn harness(comps: usize) -> (Harness<'static, EffectcraftApp>, ItemId) { } let folder = ItemId(s.execute("project.newFolder", json!({"name": "Bin"})).unwrap()["item"].as_u64().unwrap()); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.project_open_folders.insert(folder.0); h.run_steps(3); (h, folder) diff --git a/crates/ui-egui/tests/it/ui_project_rows.rs b/crates/ui-egui/tests/it/ui_project_rows.rs index 58b2dc979..393107f04 100644 --- a/crates/ui-egui/tests/it/ui_project_rows.rs +++ b/crates/ui-egui/tests/it/ui_project_rows.rs @@ -20,7 +20,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, ItemId, ItemId, ItemId) { s.execute("project.move", json!({"items": [comp.0], "folder": folder.0})).unwrap(); s.execute("project.move", json!({"items": [solid.0], "folder": null})).unwrap(); s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, folder, comp, solid) } @@ -234,7 +237,10 @@ fn dragging_in_the_empty_area_box_selects_items() { #[test] fn a_short_project_panel_draws() { for height in [400.0, 300.0] { - let mut h = Harness::builder().with_size(egui::vec2(640.0, height)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(egui::vec2(640.0, height)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); assert!(h.state().auto.find("project.empty").is_some(), "the Project panel drew at {height} points"); } diff --git a/crates/ui-egui/tests/it/ui_quick_offset.rs b/crates/ui-egui/tests/it/ui_quick_offset.rs index db975f7ab..87bfd6050 100644 --- a/crates/ui-egui/tests/it/ui_quick_offset.rs +++ b/crates/ui-egui/tests/it/ui_quick_offset.rs @@ -27,7 +27,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec) { ids.push(id); } s.execute("layer.select", json!({"layers": ids})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -210,7 +213,10 @@ fn a_quick_offset_released_off_screen_ends() { (0..40).map(|i| s.execute("layer.newSolid", json!({"name": format!("L{i}"), "color": "#e04020"})).unwrap()["layer"].as_u64().unwrap()).collect(); let (top, next) = (ids[39], ids[38]); s.execute("layer.select", json!({"layers": [top, next]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let from = center(&h, &format!("timeline.layer.{top}.bar")); h.input_mut().events.push(Event::PointerMoved(from)); diff --git a/crates/ui-egui/tests/it/ui_ram_preview.rs b/crates/ui-egui/tests/it/ui_ram_preview.rs index 5cfe808b7..8dc67efdd 100644 --- a/crates/ui-egui/tests/it/ui_ram_preview.rs +++ b/crates/ui-egui/tests/it/ui_ram_preview.rs @@ -30,7 +30,10 @@ fn an_edit_in_another_comp_keeps_the_cached_frames_and_undo_finds_them_again() { let b = s.execute("comp.new", json!({"name": "B", "width": 64, "height": 36, "duration": 1})).unwrap()["comp"].as_u64().unwrap(); let a = s.execute("comp.new", json!({"name": "A", "width": 64, "height": 36, "duration": 1})).unwrap()["comp"].as_u64().unwrap(); s.execute("layer.newSolid", json!({"color": "#3080ff"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); assert!(shown_cached(&h, a), "A's frame rendered"); // Edit B (open it, add a layer), then come back to A: its frame is still in RAM. @@ -59,7 +62,10 @@ fn the_timeline_shows_the_cached_frames_in_green() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Cache", "width": 64, "height": 36, "duration": 2})).unwrap(); s.execute("layer.newSolid", json!({"color": "#3080ff"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); h.run_steps(2); let green = h.state().tokens.cache_green; @@ -91,7 +97,11 @@ fn prefetch_waits_while_edits_keep_coming() { let c = s.execute("comp.new", json!({"name": "Drag", "width": 64, "height": 36, "duration": 2})).unwrap()["comp"].as_u64().unwrap(); let solid = s.execute("layer.newSolid", json!({"color": "#3080ff", "width": 16, "height": 16})).unwrap()["layer"].as_u64().unwrap(); // Short steps between edits; the app clock below is advanced explicitly. - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(0.05).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(0.05) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); // Prefetch waits for EDIT_QUIET on the app clock; a manual clock makes the pause // deterministic instead of depending on how long the test host took to run the steps. h.state_mut().use_manual_clock(); @@ -145,7 +155,10 @@ fn cached_frames_are_counted_at_one_third_resolution() { if let Some(comp) = std::sync::Arc::make_mut(&mut s.project).comp_mut(ItemId(c)) { comp.resolution = res; } - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); settle(&mut h); let series = h.state().shown_series(ItemId(c)); assert_eq!(series.scale, (res.scale(1.0, 1.0) * 1000.0).round() as u32, "{res:?}"); diff --git a/crates/ui-egui/tests/it/ui_render_queue.rs b/crates/ui-egui/tests/it/ui_render_queue.rs index 3e29c7cc8..71d7dd807 100644 --- a/crates/ui-egui/tests/it/ui_render_queue.rs +++ b/crates/ui-egui/tests/it/ui_render_queue.rs @@ -29,7 +29,10 @@ fn render_settings_template_applies_from_a_menu_moved_to_fit_the_window() { let id = s.project.render_queue[0].id; assert_eq!(s.project.render_queue[0].settings.name, "Best Settings"); let mut app = Some(EffectcraftApp::new(s)); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app.take().expect("app")); // Twirl the item open, as clicking its twirl does. h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique("rq-ui"), (vec![id], None::))); h.state_mut().show_panel(PanelKind::RenderQueue); @@ -79,7 +82,10 @@ fn clicking_the_output_file_name_opens_the_save_dialog() { Some(answer.clone()) })); let mut app = Some(app); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app.take().expect("app")); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app.take().expect("app")); h.ctx.data_mut(|d| d.insert_temp(egui::Id::unique("rq-ui"), (vec![id], None::))); h.state_mut().show_panel(PanelKind::RenderQueue); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs b/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs index 7faeb515b..592e21801 100644 --- a/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_render_queue_keyboard.rs @@ -19,7 +19,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { let comp = s.execute("comp.new", json!({"name": name, "width": 320, "height": 180, "duration": 4})).unwrap()["comp"].as_u64().unwrap(); s.execute("renderQueue.add", json!({"comp": comp})).unwrap(); } - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::RenderQueue); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_roto_objects.rs b/crates/ui-egui/tests/it/ui_roto_objects.rs index 53a10e83f..d5071400c 100644 --- a/crates/ui-egui/tests/it/ui_roto_objects.rs +++ b/crates/ui-egui/tests/it/ui_roto_objects.rs @@ -74,7 +74,10 @@ fn the_boundary_view_outlines_each_object_and_show_object_picks_one() { // object 0 keeps the boundary colour (pink by default), object 1 is the first palette colour (blue-green) let (pink, cyan) = ([255, 64, 191], [60, 200, 255]); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h.state_mut().session.execute("layer.select", json!({"layers": [id]})).unwrap(); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_roto_span_confidence.rs b/crates/ui-egui/tests/it/ui_roto_span_confidence.rs index 14437f1c0..b1c916a09 100644 --- a/crates/ui-egui/tests/it/ui_roto_span_confidence.rs +++ b/crates/ui-egui/tests/it/ui_roto_span_confidence.rs @@ -75,7 +75,10 @@ fn the_span_bar_shows_the_trackers_confidence() { // the model stays loaded while the panel draws (its id is part of the cache keys) s.execute("roto.propagate", json!({"layer": id, "direction": "both", "wait": true})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h.state_mut().session.execute("layer.select", json!({"layers": [id]})).unwrap(); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_script_console.rs b/crates/ui-egui/tests/it/ui_script_console.rs index 4367027dd..989d4f651 100644 --- a/crates/ui-egui/tests/it/ui_script_console.rs +++ b/crates/ui-egui/tests/it/ui_script_console.rs @@ -19,7 +19,10 @@ fn click(h: &mut Harness<'_, EffectcraftApp>, id: &str) { #[test] fn script_console_runs_scripts() { let s = effectcraft_host::session(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::ScriptConsole); h.run_steps(3); for id in ["scriptConsole.input", "scriptConsole.output", "scriptConsole.run", "scriptConsole.clear"] { @@ -50,7 +53,10 @@ fn script_console_runs_scripts() { #[ignore] fn script_console_snapshot() { let s = effectcraft_host::session(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::ScriptConsole); h.run_steps(2); for code in ["var c = app.project.items.addComp('Console', 320, 180, 1, 2, 24); writeLn('made ' + c.name); c.id", "c.layers.addText('Hi').name", "nope()"] { diff --git a/crates/ui-egui/tests/it/ui_script_console_keyboard.rs b/crates/ui-egui/tests/it/ui_script_console_keyboard.rs index b83953181..a901c7c17 100644 --- a/crates/ui-egui/tests/it/ui_script_console_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_script_console_keyboard.rs @@ -16,7 +16,10 @@ const INPUT: &str = "Script… (⌘/Ctrl+Enter runs)"; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::ScriptConsole); h.state_mut().ui.maximized = Some(PanelKind::ScriptConsole); h.run_steps(4); diff --git a/crates/ui-egui/tests/it/ui_script_render.rs b/crates/ui-egui/tests/it/ui_script_render.rs index 9c2b78071..1273214cd 100644 --- a/crates/ui-egui/tests/it/ui_script_render.rs +++ b/crates/ui-egui/tests/it/ui_script_render.rs @@ -40,7 +40,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Arc, std::sync::mpsc::S let path = std::env::temp_dir().join(format!("ec-ui-script-render-{}.mp4", std::process::id())); s.execute("renderQueue.add", json!({"output": path.to_string_lossy()})).unwrap(); let (tx, rx) = std::sync::mpsc::channel(); - let h = Harness::builder().with_size(egui::vec2(1000.0, 700.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); + let h = Harness::builder() + .with_size(egui::vec2(1000.0, 700.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); (h, gate, tx) } diff --git a/crates/ui-egui/tests/it/ui_scriptui.rs b/crates/ui-egui/tests/it/ui_scriptui.rs index ea5282a9d..04c2092f0 100644 --- a/crates/ui-egui/tests/it/ui_scriptui.rs +++ b/crates/ui-egui/tests/it/ui_scriptui.rs @@ -13,7 +13,10 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = effectcraft_host::session(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -103,7 +106,10 @@ fn panels_open_at_quit_dock_again_at_launch() { let mut s = effectcraft_host::session(); s.config = Some(store.clone()); s.execute("window.restoreScriptPanels", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let panel = h.state().session.script_ui.windows.iter().find(|w| w.script == "Hello Panel.jsx").expect("the panel's window").id; assert!(h.state().ui.dock.is_docked(PanelKind::ScriptPanel(panel)), "the panel docks"); @@ -123,7 +129,10 @@ fn a_key_given_to_a_script_runs_it() { let store = std::sync::Arc::new(MemoryConfig::default()); let mut s = effectcraft_host::session(); s.config = Some(store.clone()); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); assert!(h.state().session.shortcuts().find(r#"file.runScript {"name":"Rename Layers.jsx"}"#).is_some(), "the shortcut table is built"); store.write("Scripts/Add Comp.jsx", "app.project.items.addComp('From Key', 64, 64, 1, 1, 25);").unwrap(); @@ -219,7 +228,12 @@ fn on_draw_concave_fills_and_images_render() { let png = png.to_string_lossy().replace('\\', "/"); let mut s = effectcraft_host::session(); s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_pixels_per_point(1.0).wgpu().with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_pixels_per_point(1.0) + .wgpu() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let code = format!( r#" @@ -388,7 +402,10 @@ fn scheduled_import_reveals_its_composition_without_manual_clicks() { let mut s = effectcraft_host::session(); let result = s.execute("script.run", json!({"code": "var w=new Window('palette','Automatic import');var b=w.add('button',undefined,'Open');b.onClick=function(){app.scheduleTask(\"var c=app.project.items.addComp('Imported',64,64,1,1,25);c.openInViewer();\",0,false);};w.show();"})).unwrap(); assert_eq!(result["ok"], true, "{result}"); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().ui.start_screen = true; h.run_steps(2); h.state_mut().session.execute("scriptui.click", json!({"window":"Automatic import","widget":"Open"})).unwrap(); @@ -542,7 +559,10 @@ fn a_docked_panel_button_opens_the_file_dialog() { store.write("Scripts/ScriptUI Panels/Subtitles Panel.jsx", panel).unwrap(); let mut s = effectcraft_host::session(); s.config = Some(store.clone()); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let asked: Arc>>> = Arc::default(); let log = asked.clone(); diff --git a/crates/ui-egui/tests/it/ui_self_drop.rs b/crates/ui-egui/tests/it/ui_self_drop.rs index 2148d4312..43474bd57 100644 --- a/crates/ui-egui/tests/it/ui_self_drop.rs +++ b/crates/ui-egui/tests/it/ui_self_drop.rs @@ -14,7 +14,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, u64, u64) { let clip = s.execute("comp.new", json!({"name": "Clip", "width": 160, "height": 90, "frameRate": 30, "duration": 1})).unwrap()["comp"].as_u64().unwrap(); let main = s.execute("comp.new", json!({"name": "Main", "width": 320, "height": 180, "frameRate": 30, "duration": 4})).unwrap()["comp"].as_u64().unwrap(); s.execute("layer.newSolid", json!({"name": "Bottom", "color": "#406080"})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, main, clip) } diff --git a/crates/ui-egui/tests/it/ui_settings_info.rs b/crates/ui-egui/tests/it/ui_settings_info.rs index fd6718002..7469072e1 100644 --- a/crates/ui-egui/tests/it/ui_settings_info.rs +++ b/crates/ui-egui/tests/it/ui_settings_info.rs @@ -37,7 +37,10 @@ fn check_info_transaction(via_escape: bool) { session.save_prefs(); session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); let original_brightness = session.prefs.appearance.brightness; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page":"appearance"})).unwrap(); @@ -125,7 +128,10 @@ fn gpu_information_names_the_adapter_and_why_the_gpu_is_off() { window_adapter: Some("NVIDIA GeForce RTX 4070 (Dx12, DiscreteGpu)".into()), ..Default::default() }; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.gpuInfo", json!({})).unwrap(); @@ -140,7 +146,10 @@ fn gpu_information_dialog_stays_in_place() { let mut session = Session::default(); session.prefs.appearance.ui_scale = 125; session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1280.0, 720.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1280.0, 720.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page":"previews"})).unwrap(); @@ -161,7 +170,10 @@ fn gpu_information_dialog_stays_in_place() { fn gpu_information_enter_presses_ok() { let mut session = Session::default(); session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let enter = |h: &mut Harness<'_, EffectcraftApp>| { for pressed in [true, false] { diff --git a/crates/ui-egui/tests/it/ui_settings_keyboard.rs b/crates/ui-egui/tests/it/ui_settings_keyboard.rs index 041dcdf7b..48de873ad 100644 --- a/crates/ui-egui/tests/it/ui_settings_keyboard.rs +++ b/crates/ui-egui/tests/it/ui_settings_keyboard.rs @@ -11,7 +11,10 @@ use egui_kittest::kittest::{NodeT, Queryable}; use serde_json::json; fn harness(page: &str) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page": page})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_tail.rs b/crates/ui-egui/tests/it/ui_tail.rs index e4684cf45..5f429936a 100644 --- a/crates/ui-egui/tests/it/ui_tail.rs +++ b/crates/ui-egui/tests/it/ui_tail.rs @@ -15,7 +15,8 @@ fn harness_at(size: egui::Vec2) -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Tail", "width": 640, "height": 360, "duration": 4})).unwrap(); s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080", "width": 640, "height": 360})).unwrap(); - let mut h = Harness::builder().with_size(size).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = + Harness::builder().with_size(size).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_text_edit.rs b/crates/ui-egui/tests/it/ui_text_edit.rs index 5b52c723d..bbd931feb 100644 --- a/crates/ui-egui/tests/it/ui_text_edit.rs +++ b/crates/ui-egui/tests/it/ui_text_edit.rs @@ -19,10 +19,14 @@ fn app() -> EffectcraftApp { /// A headless window at the size and frame step the viewer tests here are written for. fn harness(a: EffectcraftApp) -> Harness<'static, EffectcraftApp> { - Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |cc| { - EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); - a - }) + Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |cc| { + EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); + a + }) } fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { @@ -82,7 +86,10 @@ fn type_tool_skips_hidden_and_unsoloed_text_layers() { let (target, value) = if switch == "video" { (ids[1], false) } else { (ids[0], true) }; s.execute("layer.setSwitch", json!({"layers": [target], "switch": switch, "value": value})).unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; h.run_steps(3); let comp = rect(&h, "viewer.comp"); @@ -94,7 +101,8 @@ fn type_tool_skips_hidden_and_unsoloed_text_layers() { #[test] fn modal_blocks_background_text_events() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.run_steps(3); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; h.run_steps(1); @@ -870,7 +878,11 @@ fn a_chord_bound_to_both_forwarded_commands_resolves_in_list_order() { fn ime_producer_follows_the_committed_text_and_cause() { // A Latin accent is multi-byte in UTF-8 (the byte offsets below) and Inter draws it, so the // harness keeps its strict missing-glyph check; no CJK fallback face is needed headlessly. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| app()); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; @@ -908,7 +920,11 @@ fn click_away_clears_the_canvas_ime_descriptor_in_the_final_pass() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let solid = s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap()["layer"].as_u64().unwrap(); let title = s.execute("layer.newText", json!({"text": "Title", "size": 80, "position": [100, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": title, "caret": 5})).unwrap(); @@ -930,7 +946,11 @@ fn switching_text_targets_interrupts_and_rejects_a_delayed_commit() { let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); // The delayed commit carries a multi-byte accent Inter draws: no broad missing-glyph // allowance, and the stale-composition path is still exercised with real IME events. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -962,7 +982,11 @@ fn a_delayed_preedit_after_a_target_switch_cannot_rearm_the_stale_guard() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -988,7 +1012,11 @@ fn late_preedit_and_commit_split_across_idle_frames_cannot_retarget() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1026,7 +1054,11 @@ fn late_preedit_and_delete_split_across_idle_frames_cannot_retarget() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1061,7 +1093,11 @@ fn empty_preedit_keeps_the_old_target_until_the_pending_commit_arrives() { s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1090,7 +1126,11 @@ fn a_matching_fence_after_old_terminals_admits_the_next_preedit_in_the_same_batc s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let first = s.execute("layer.newText", json!({"text": "A", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); let second = s.execute("layer.newText", json!({"text": "B", "size": 80, "position": [80, 240], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": first, "caret": 1})).unwrap(); @@ -1121,7 +1161,11 @@ fn delete_surrounding_bytes_through_the_app_replaces_the_emoji() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "café😀", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().session.execute("text.edit", json!({"layer": lid, "caret": 5})).unwrap(); @@ -1140,10 +1184,14 @@ fn ime_interruption_editor() -> (Harness<'static, EffectcraftApp>, Pos2) { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let lid = s.execute("layer.newText", json!({"text": "abcd", "size": 80, "position": [80, 120], "justify": "left"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_step_dt(1.0 / 60.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |cc| { - EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); - EffectcraftApp::new(s) - }); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_step_dt(1.0 / 60.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |cc| { + EffectcraftApp::install_ime_reset_hooks(&cc.egui_ctx); + EffectcraftApp::new(s) + }); h.state_mut().show_panel(PanelKind::Composition); h.state_mut().ui.tool = effectcraft_ui_egui::state::Tool::Type; h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_text_range_handles.rs b/crates/ui-egui/tests/it/ui_text_range_handles.rs index a4458278a..a47cc0332 100644 --- a/crates/ui-egui/tests/it/ui_text_range_handles.rs +++ b/crates/ui-egui/tests/it/ui_text_range_handles.rs @@ -42,7 +42,10 @@ fn setup() -> (Session, Ids) { } fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h } diff --git a/crates/ui-egui/tests/it/ui_theme_favorites.rs b/crates/ui-egui/tests/it/ui_theme_favorites.rs index 811a970d5..ac38c03e2 100644 --- a/crates/ui-egui/tests/it/ui_theme_favorites.rs +++ b/crates/ui-egui/tests/it/ui_theme_favorites.rs @@ -37,7 +37,10 @@ fn star_controls_save_and_favorite_menu_selects_the_family() { let store = Arc::new(MemoryConfig::default()); let mut session = Session { config: Some(store.clone()), ..Default::default() }; session.execute("comp.new", json!({"width":32,"height":32,"duration":2})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(session)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(session)); h.run_steps(4); let ctx = h.ctx.clone(); menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page":"appearance"})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_time_zoom_controls.rs b/crates/ui-egui/tests/it/ui_time_zoom_controls.rs index 7173c332e..0941afb67 100644 --- a/crates/ui-egui/tests/it/ui_time_zoom_controls.rs +++ b/crates/ui-egui/tests/it/ui_time_zoom_controls.rs @@ -24,7 +24,8 @@ fn harness(graph: bool) -> Harness<'static, EffectcraftApp> { let mut app = EffectcraftApp::new(s); // (Opening a comp may zoom; start from the whole comp.) app.ui.timeline.pps = None; - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); h.run_steps(3); h.state_mut().session.execute("time.set", json!({"time": 4.0})).unwrap(); h.state_mut().ui.timeline.pps = None; diff --git a/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs b/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs index b6129bd34..96cf85e97 100644 --- a/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs +++ b/crates/ui-egui/tests/it/ui_timeline_audio_levels.rs @@ -72,7 +72,10 @@ fn linked_audio_levels_move_both_channels_by_the_same_db() { let mut s = Session::default(); comps(&mut s); let (l, uid) = add_sound_layer(&mut s, [-6.0, -12.0]); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); reveal(&mut h, l, uid); let levels = |h: &Harness<'_, EffectcraftApp>| h.state().session.active_comp().unwrap().layer(LayerId(l)).unwrap().props.prop("audio/levels").unwrap().clone(); @@ -135,7 +138,10 @@ fn linked_typing_keeps_each_selected_layers_own_balance() { let (a, uid) = add_sound_layer(&mut s, [-6.0, -12.0]); let (b, other) = add_sound_layer(&mut s, [-20.0, -30.0]); s.execute("layer.select", json!({"layers": [a, b]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); reveal(&mut h, a, uid); reveal(&mut h, b, other); click(&mut h, &format!("timeline.prop.{uid}.link")); @@ -150,7 +156,10 @@ fn a_new_project_starts_with_its_audio_levels_unlinked() { let mut s = Session::default(); comps(&mut s); let (l, uid) = add_sound_layer(&mut s, [0.0, 0.0]); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); reveal(&mut h, l, uid); click(&mut h, &format!("timeline.prop.{uid}.link")); assert!(h.state().ui.timeline.is_linked(uid, false)); diff --git a/crates/ui-egui/tests/it/ui_timeline_interacting.rs b/crates/ui-egui/tests/it/ui_timeline_interacting.rs index 34daef19e..d6a53dda8 100644 --- a/crates/ui-egui/tests/it/ui_timeline_interacting.rs +++ b/crates/ui-egui/tests/it/ui_timeline_interacting.rs @@ -32,7 +32,10 @@ fn fixture(mode: &str) -> Fixture { let opacity = comp.layers.iter().find(|l| l.id.0 == solid).unwrap().props.prop("transform/opacity").unwrap().uid; s.execute("layer.select", json!({"layers": [solid]})).unwrap(); s.execute("view.fastPreviewMode", json!({"mode": mode})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_timeline_marquee.rs b/crates/ui-egui/tests/it/ui_timeline_marquee.rs index 6a7069f5b..db97a2509 100644 --- a/crates/ui-egui/tests/it/ui_timeline_marquee.rs +++ b/crates/ui-egui/tests/it/ui_timeline_marquee.rs @@ -21,7 +21,10 @@ fn harness_for(duration: f64) -> (Harness<'static, EffectcraftApp>, u64) { s.execute("prop.addKey", json!({"layer": id, "path": "transform/opacity", "time": t, "value": v})).unwrap(); } s.execute("layer.select", json!({"layers": [id]})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -93,7 +96,10 @@ fn a_box_dragged_across_the_outline_and_the_graph_selects_rows_and_keys() { ids.push(id); } s.execute("layer.select", json!({"layers": ids})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); @@ -138,7 +144,10 @@ fn rows_harness() -> (Harness<'static, EffectcraftApp>, Vec) { ids.push(id); } s.execute("layer.select", json!({"layers": ids})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "timeline.reveal.opacity", json!({})).unwrap(); diff --git a/crates/ui-egui/tests/it/ui_timeline_shapes.rs b/crates/ui-egui/tests/it/ui_timeline_shapes.rs index 05a814d87..5dcafad3a 100644 --- a/crates/ui-egui/tests/it/ui_timeline_shapes.rs +++ b/crates/ui-egui/tests/it/ui_timeline_shapes.rs @@ -13,7 +13,10 @@ use egui_kittest::kittest::Queryable; use serde_json::json; fn harness(s: Session) -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } diff --git a/crates/ui-egui/tests/it/ui_timeline_switches.rs b/crates/ui-egui/tests/it/ui_timeline_switches.rs index 1b0877666..d56ed985a 100644 --- a/crates/ui-egui/tests/it/ui_timeline_switches.rs +++ b/crates/ui-egui/tests/it/ui_timeline_switches.rs @@ -22,7 +22,10 @@ fn harness() -> (Harness<'static, EffectcraftApp>, Vec) { .collect(); ids.reverse(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); (h, ids) } @@ -219,7 +222,10 @@ fn the_bar_past_the_source_end_is_striped() { s.execute("comp.new", json!({"name": "Inner", "width": 64, "height": 64, "frameRate": 30, "duration": 2})).unwrap(); s.execute("comp.new", json!({"name": "Outer", "width": 64, "height": 64, "frameRate": 30, "duration": 4})).unwrap(); let l = s.execute("layer.addItem", json!({"item": "Inner"})).unwrap()["layer"].as_u64().unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let past = format!("timeline.layer.{l}.bar.afterSource"); assert!(h.state().auto.find(&past).is_none(), "the source fills the whole bar"); diff --git a/crates/ui-egui/tests/it/ui_toolbar_gradient.rs b/crates/ui-egui/tests/it/ui_toolbar_gradient.rs index 047fdb863..73084e722 100644 --- a/crates/ui-egui/tests/it/ui_toolbar_gradient.rs +++ b/crates/ui-egui/tests/it/ui_toolbar_gradient.rs @@ -38,7 +38,10 @@ fn setup(items: &[&str], tool: serde_json::Value, select: bool) -> (Harness<'sta } s.state.selected_layers = if select { vec![LayerId(l)] } else { vec![] }; s.state.selected_props.clear(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); // With no shape layer selected, Fill / Stroke show while a shape tool is active. if !select { h.state_mut().ui.tool = Tool::Rectangle; diff --git a/crates/ui-egui/tests/it/ui_tracker.rs b/crates/ui-egui/tests/it/ui_tracker.rs index 2aab9d3e8..a8ce5e845 100644 --- a/crates/ui-egui/tests/it/ui_tracker.rs +++ b/crates/ui-egui/tests/it/ui_tracker.rs @@ -27,7 +27,8 @@ fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { #[test] fn tracker_panel_and_track_point_widgets() { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.state_mut().show_panel(PanelKind::Tracker); h.run_steps(3); let all = ids(&h); @@ -140,7 +141,10 @@ fn zoomed_out_track_point_can_be_grabbed() { s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); s.execute("layer.select", json!({"layers": ["Plate"]})).unwrap(); s.execute("track.motion", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(3); h.state_mut().ui.viewer.zoom = Some(mag); diff --git a/crates/ui-egui/tests/it/ui_unreadable_footage.rs b/crates/ui-egui/tests/it/ui_unreadable_footage.rs index fd99cdd25..0090c7b7d 100644 --- a/crates/ui-egui/tests/it/ui_unreadable_footage.rs +++ b/crates/ui-egui/tests/it/ui_unreadable_footage.rs @@ -50,7 +50,10 @@ fn harness(broken: fn(&Footage) -> bool, proxy: Option) -> (Harness<'st fn open(mut s: Session) -> Harness<'static, EffectcraftApp> { s.execute("project.select", json!({"items": []})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h } diff --git a/crates/ui-egui/tests/it/ui_video_preview_off.rs b/crates/ui-egui/tests/it/ui_video_preview_off.rs index 257885ab6..ca76a76ee 100644 --- a/crates/ui-egui/tests/it/ui_video_preview_off.rs +++ b/crates/ui-egui/tests/it/ui_video_preview_off.rs @@ -19,7 +19,11 @@ fn an_audio_only_preview_says_video_preview_is_off() { s.execute("comp.new", json!({"name": "Muted", "width": 320, "height": 180, "duration": 10})).unwrap(); let sc = s.prefs.preview.current; s.prefs.preview.get_mut(sc).include_video = false; - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 30.0).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1400.0, 900.0)) + .with_step_dt(1.0 / 30.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); let chip = |h: &Harness<'_, EffectcraftApp>| h.ctx.data(|d| d.get_temp::(egui::Id::unique("viewer-video-off-chip"))); assert!(chip(&h).is_none()); diff --git a/crates/ui-egui/tests/it/ui_view_layout.rs b/crates/ui-egui/tests/it/ui_view_layout.rs index 05222dd9f..08e71e685 100644 --- a/crates/ui-egui/tests/it/ui_view_layout.rs +++ b/crates/ui-egui/tests/it/ui_view_layout.rs @@ -11,7 +11,10 @@ fn harness(comp: Option<&str>) -> Harness<'static, EffectcraftApp> { if let Some(comp) = comp { s.execute("comp.open", json!({"comp": comp})).unwrap(); } - Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)) + Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)) } /// Click the centre of the automation element `id`. diff --git a/crates/ui-egui/tests/it/ui_viewer.rs b/crates/ui-egui/tests/it/ui_viewer.rs index 3a89c036d..e6c53fee9 100644 --- a/crates/ui-egui/tests/it/ui_viewer.rs +++ b/crates/ui-egui/tests/it/ui_viewer.rs @@ -23,7 +23,8 @@ fn app() -> EffectcraftApp { } fn harness() -> Harness<'static, EffectcraftApp> { - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app()); h.run_steps(3); h } @@ -127,7 +128,10 @@ fn selection_harness() -> Harness<'static, EffectcraftApp> { s.execute("layer.newSolid", json!({"name": name, "color": "#406080", "width": 80, "height": 80})).unwrap(); } s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -285,7 +289,10 @@ fn viewer_double_click_opens_the_topmost_layer_over_a_selected_one() { s.execute("layer.addItem", json!({"item": "Inner"})).unwrap(); let back = s.active_comp().unwrap().layers[1].id; s.execute("layer.select", json!({"layers": [back.0]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(40); let at = screen(&h, [320.0, 180.0]); h.input_mut().events.push(Event::PointerMoved(at)); @@ -3008,7 +3015,10 @@ fn full_resolution_frames_wider_than_the_texture_limit_fit() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Wide", "width": 2400, "height": 400, "duration": 1})).unwrap(); s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); // (egui's font atlas needs 1024.) h.input_mut().max_texture_side = Some(1024); h.state_mut().session.execute("view.res.full", json!({})).unwrap(); @@ -3115,7 +3125,11 @@ fn frame_sits_on_the_physical_pixel_grid() { for ppp in [1.0f32, 1.25, 1.5] { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Grid", "width": 301, "height": 201, "duration": 1})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_pixels_per_point(ppp).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_pixels_per_point(ppp) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); for (mag, pan) in [(1.0f32, [0.3f32, 0.37]), (2.0, [-0.45, 0.2])] { h.state_mut().ui.viewer.zoom = Some(mag / ppp); @@ -3145,11 +3159,12 @@ fn fit_up_to_100_follows_the_maximized_panel() { h.run_steps(2); }; // A comp larger than the panel: it fills the docked panel, then the maximized one. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { - let mut s = Session::default(); - s.execute("comp.new", json!({"name": "Big", "width": 3840, "height": 2160, "duration": 4})).unwrap(); - EffectcraftApp::new(s) - }); + let mut h = + Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| { + let mut s = Session::default(); + s.execute("comp.new", json!({"name": "Big", "width": 3840, "height": 2160, "duration": 4})).unwrap(); + EffectcraftApp::new(s) + }); h.run_steps(3); pick(&mut h); let docked = rect(&h, "viewer.comp").width(); @@ -3505,7 +3520,10 @@ fn null_eye_hides_it_in_the_viewer() { s.execute("comp.new", json!({"name": "Nulls", "width": 640, "height": 360, "duration": 4})).unwrap(); let n = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.select", json!({"layers": [n]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); let handle = format!("viewer.handle.{n}.0"); let eye = format!("timeline.layer.{n}.video"); @@ -3541,7 +3559,10 @@ fn unselected_null_keeps_its_outline() { s.execute("comp.new", json!({"name": "Nulls", "width": 640, "height": 360, "duration": 4})).unwrap(); let n = s.execute("layer.newNull", json!({})).unwrap()["layer"].as_u64().unwrap(); s.execute("layer.select", json!({"layers": [n]})).unwrap(); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(move |_| EffectcraftApp::new(s)); h.run_steps(3); // Use the selected box's actual geometry, so transformed nulls use the same outline. let corners: Vec = (0..4).map(|i| rect(&h, &format!("viewer.handle.{n}.{i}")).center()).collect(); diff --git a/crates/ui-egui/tests/it/ui_viewer_trackpad.rs b/crates/ui-egui/tests/it/ui_viewer_trackpad.rs index a45e2643d..3bdd6442d 100644 --- a/crates/ui-egui/tests/it/ui_viewer_trackpad.rs +++ b/crates/ui-egui/tests/it/ui_viewer_trackpad.rs @@ -11,7 +11,10 @@ use serde_json::json; fn harness() -> Harness<'static, EffectcraftApp> { let mut s = Session::default(); s.execute("comp.new", json!({"name": "View", "width": 640, "height": 360, "duration": 4})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.state_mut().show_panel(PanelKind::Composition); h.run_steps(4); h diff --git a/crates/ui-egui/tests/it/ui_visual_review.rs b/crates/ui-egui/tests/it/ui_visual_review.rs index 27f328b95..e395e5ae9 100644 --- a/crates/ui-egui/tests/it/ui_visual_review.rs +++ b/crates/ui-egui/tests/it/ui_visual_review.rs @@ -18,7 +18,8 @@ fn all_ui_review_captures() { s.execute("layer.newSolid", json!({"name":"Plate","color":"#406080","width":160,"height":120})).unwrap(); s.execute("renderQueue.add", json!({"format":"png","output":"review-[#####].png"})).unwrap(); std::sync::Arc::make_mut(&mut s.project).settings.gpu_acceleration = false; - let mut h = Harness::builder().with_size(size).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = + Harness::builder().with_size(size).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); h.render_serialized().unwrap().save(out.join(format!("{label}-workspace.png"))).unwrap(); let ctx = h.ctx.clone(); diff --git a/crates/ui-egui/tests/it/ui_web_gpu_storage.rs b/crates/ui-egui/tests/it/ui_web_gpu_storage.rs index 228d26a6c..322ddf452 100644 --- a/crates/ui-egui/tests/it/ui_web_gpu_storage.rs +++ b/crates/ui-egui/tests/it/ui_web_gpu_storage.rs @@ -231,7 +231,10 @@ fn settings_disk_page_shows_the_browser_storage_manager() { let mut s = Session::default(); let host = Arc::new(Storage::default()); s.storage = Some(host.clone()); - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(2); effectcraft_ui_egui::panels::settings::open(h.state_mut(), "disk"); h.run_steps(3); @@ -252,7 +255,10 @@ fn settings_disk_page_shows_the_browser_storage_manager() { assert_eq!(*host.cleared.lock().unwrap(), vec!["diskCache".to_string()]); assert!(*host.persist_asked.lock().unwrap()); // Without a host (the desktop) the section is not there. - let mut h = Harness::builder().with_size(egui::vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(egui::vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(2); effectcraft_ui_egui::panels::settings::open(h.state_mut(), "disk"); h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_web_offload.rs b/crates/ui-egui/tests/it/ui_web_offload.rs index a3456a355..62d4dd619 100644 --- a/crates/ui-egui/tests/it/ui_web_offload.rs +++ b/crates/ui-egui/tests/it/ui_web_offload.rs @@ -193,7 +193,10 @@ fn waiting_commands_reply_when_their_offloaded_job_ends() { s.execute("layer.newSolid", json!({"color": "#406080"})).unwrap(); s.execute("renderQueue.add", json!({"format": "gif", "output": "/w.gif"})).unwrap(); let (tx, rx) = std::sync::mpsc::channel(); - let mut h = Harness::builder().with_size(egui::vec2(1280.0, 800.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); + let mut h = Harness::builder() + .with_size(egui::vec2(1280.0, 800.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s).with_control(rx)); h.run_steps(2); // `renderQueue.render` waits by default: the job goes to the worker, the reply waits. let (req, reply) = ControlRequest::new("engine.execute", json!({"command": "renderQueue.render", "params": {}})); diff --git a/crates/ui-egui/tests/it/ui_window_title.rs b/crates/ui-egui/tests/it/ui_window_title.rs index 66b0991b2..6ec126433 100644 --- a/crates/ui-egui/tests/it/ui_window_title.rs +++ b/crates/ui-egui/tests/it/ui_window_title.rs @@ -9,7 +9,10 @@ use serde_json::json; #[test] fn the_reported_title_follows_the_open_document() { - let mut h = Harness::builder().with_size(vec2(800.0, 600.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(vec2(800.0, 600.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.run_steps(3); let clean = h.state().window_title().to_owned(); assert!(clean.starts_with("EffectCraft - ") && !clean.ends_with(" *"), "{clean}"); diff --git a/crates/ui-egui/tests/it/ui_workflow_selection.rs b/crates/ui-egui/tests/it/ui_workflow_selection.rs index 46fda276a..82b72e8d2 100644 --- a/crates/ui-egui/tests/it/ui_workflow_selection.rs +++ b/crates/ui-egui/tests/it/ui_workflow_selection.rs @@ -14,7 +14,10 @@ fn harness() -> Harness<'static, EffectcraftApp> { s.execute("layer.newSolid", json!({"name":format!("Tile {n}"),"width":80,"height":80,"color":"#406080"})).unwrap(); } s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); h } @@ -389,7 +392,10 @@ fn project_edit_commands_do_not_target_timeline_layers() { #[test] fn compact_settings_keeps_confirmation_buttons_clickable() { - let mut h = Harness::builder().with_size(vec2(1024.0, 768.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(Session::default())); + let mut h = Harness::builder() + .with_size(vec2(1024.0, 768.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(Session::default())); h.state_mut().dialog = Some(effectcraft_ui_egui::Dialog::Settings); h.run_steps(4); h.get_by_label(" OK ").click(); @@ -607,7 +613,10 @@ fn timeline_context_menu_creates_shapes_and_masks_from_text() { s.execute("edit.deselectAll", json!({})).unwrap(); let text = s.active_comp().unwrap().layers.iter().find(|l| matches!(l.source, LayerSource::Text)).unwrap().id.0; let plate = s.active_comp().unwrap().layers.iter().find(|l| l.name == "Plate").unwrap().id.0; - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let row = |h: &Harness<'_, EffectcraftApp>, id: u64| { let r = rect(h, &format!("timeline.layer.{id}.row")); @@ -663,7 +672,10 @@ fn layer_context_menus_offer_create_shapes_from_vector_layer_for_vector_footage( let logo = s.execute("layer.addItem", json!({"item": item})).unwrap()["layer"].as_u64().unwrap(); let plate = s.execute("layer.newSolid", json!({"name":"Plate","width":40,"height":40,"color":"#406080"})).unwrap()["layer"].as_u64().unwrap(); s.execute("edit.deselectAll", json!({})).unwrap(); - let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| EffectcraftApp::new(s)); + let mut h = Harness::builder() + .with_size(vec2(1600.0, 1000.0)) + .with_context_setup(effectcraft_ui_egui::framework::install_headless) + .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); let right_click = |h: &mut Harness<'_, EffectcraftApp>, p: Pos2| { for pressed in [true, false] { From b2faa3ebaa7985627013a31ffc08e57374b794f8 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 19:30:34 +0000 Subject: [PATCH 12/39] Compile round 1: dock tests resize splits through actions, Axis::Y, Placement clone --- crates/ui-egui/src/workspace_state/tests.rs | 2 +- crates/ui-egui/tests/it/ui_panel_focus.rs | 2 +- crates/ui-egui/tests/it/ui_workspace_focus.rs | 15 +++++---------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/workspace_state/tests.rs b/crates/ui-egui/src/workspace_state/tests.rs index 04856b7f8..a825c2948 100644 --- a/crates/ui-egui/src/workspace_state/tests.rs +++ b/crates/ui-egui/src/workspace_state/tests.rs @@ -105,7 +105,7 @@ fn version_one_file_loads_with_every_panel_in_place() { tabs(&[Properties]), ); assert_eq!(ui.dock.layout().root, Some(root)); - let floating: Vec<_> = ui.dock.layout().floating.iter().map(|w| (w.panels().copied().collect::>(), w.rect, w.native)).collect(); + let floating: Vec<_> = ui.dock.layout().floating.iter().map(|w| (w.panels().copied().collect::>(), w.rect, w.native.clone())).collect(); assert_eq!( floating, [ diff --git a/crates/ui-egui/tests/it/ui_panel_focus.rs b/crates/ui-egui/tests/it/ui_panel_focus.rs index 04fa5ee57..81a43d0c9 100644 --- a/crates/ui-egui/tests/it/ui_panel_focus.rs +++ b/crates/ui-egui/tests/it/ui_panel_focus.rs @@ -97,7 +97,7 @@ fn opening_a_comp_in_the_minimal_workspace_docks_the_viewer_above_the_timeline() assert!(!h.state().ui.dock.is_docked(PanelKind::Composition)); invoke(&mut h, "comp.open", json!({"comp": other})); match &h.state().ui.dock.layout().root { - Some(Node::Split { axis: effectcraft_ui_egui::dock::SplitAxis::Vertical, first, second, .. }) => { + Some(Node::Split { axis: effectcraft_ui_egui::dock::Axis::Y, first, second, .. }) => { assert_eq!(**first, Node::tabs(vec![PanelKind::Composition], 0), "the viewer is on top"); assert!(matches!(&**second, Node::Tabs { panels, .. } if panels.contains(&PanelKind::Timeline))); } diff --git a/crates/ui-egui/tests/it/ui_workspace_focus.rs b/crates/ui-egui/tests/it/ui_workspace_focus.rs index c527379ff..a2f061fda 100644 --- a/crates/ui-egui/tests/it/ui_workspace_focus.rs +++ b/crates/ui-egui/tests/it/ui_workspace_focus.rs @@ -5,6 +5,7 @@ use std::sync::Arc; use effectcraft_engine::Session; use effectcraft_engine::config::{ConfigStore, DirConfig, MemoryConfig}; use effectcraft_ui_egui::EffectcraftApp; +use craft_behavior::dock::Action; use effectcraft_ui_egui::dock::{self, Node, PanelKind, SplitSize}; use effectcraft_ui_egui::state::Tool; use egui::{Event, Id, Key, Modifiers, vec2}; @@ -14,7 +15,7 @@ use serde_json::json; /// Whether key focus is on the dock tab whose name starts with `name` (a tab names what its panel /// shows: "Effect Controls Selected"), as the accessibility tree reports it. fn tab_focused(h: &Harness<'_, EffectcraftApp>, name: &str) -> bool { - use egui_kittest::kittest::{NodeT, Queryable}; + use egui_kittest::kittest::NodeT; h.root().children_recursive().any(|n| { n.is_focused() && n.accesskit_node().role() == egui::accesskit::Role::Tab && n.accesskit_node().label().is_some_and(|label| label.starts_with(name)) }) @@ -32,9 +33,8 @@ fn named_and_current_workspaces_survive_frontend_restart() { let ctx = egui::Context::default(); effectcraft_ui_egui::menus::invoke(&mut app, &ctx, "window.saveWorkspaceAs", json!({"name": "Restart layout"})).unwrap(); let saved = app.ui.dock.clone(); - if let Some(Node::Split { size, .. }) = &mut app.ui.dock.layout().root { - *size = SplitSize::FixedFirst(390.0); - } + assert!(matches!(app.ui.dock.layout().root, Some(Node::Split { .. }))); + app.apply_dock(Action::resize_split(vec![], SplitSize::FixedFirst(390.0))).unwrap(); app.ui.focused = PanelKind::Layer; let current = app.ui.dock.clone(); eframe::App::on_exit(&mut app); @@ -178,12 +178,7 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { app.ui.start_screen = false; app.ui.show_menu_bar = false; // Leave the inactive, layer-named tab visible instead of behind the overflow control. - if let Some(Node::Split { first, .. }) = &mut app.ui.dock.layout().root - && let Node::Split { first, .. } = first.as_mut() - && let Node::Split { size, .. } = first.as_mut() - { - *size = SplitSize::FixedFirst(420.0); - } + app.apply_dock(Action::resize_split(vec![false, false], SplitSize::FixedFirst(420.0))).unwrap(); let mut h = Harness::builder().with_size(vec2(1200.0, 760.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); From e061e0903efb29a2cd1935fa5bf8b440ebd973c6 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 20:27:51 +0000 Subject: [PATCH 13/39] Test rounds: lib harnesses run the runtime, logic tick runs the close path, tests follow next's async update offer and font discard pass - bench::Driver installs the runtime and runs raw_input_hook as the shells do - lifecycle tests use a context with the runtime installed; the logic-only tick runs App::logic's body (logic_pass), so a hidden close request reaches the runtime's close path - the startup-prompt test ticks the updater until its offer's inspection thread answers - font-install tests: the install pass asks egui for a discard pass, which draws with the fonts in the same frame --- crates/ui-egui/src/app.rs | 6 +- crates/ui-egui/src/app/frame.rs | 9 +++ crates/ui-egui/src/bench.rs | 7 +- crates/ui-egui/src/lifecycle_tests.rs | 64 ++++++++++++------- .../ui-egui/src/panels/viewer_text/tests.rs | 17 ++--- crates/ui-egui/tests/it/ui_workspace_focus.rs | 2 +- 6 files changed, 62 insertions(+), 43 deletions(-) diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index d4925756c..549154ba7 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -188,11 +188,7 @@ impl eframe::App for EffectcraftApp { /// refreshed. A close request must be answered while hidden too; an answered file dialog can change the project, /// so the tick's dialog answers run first. fn logic(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { - // Never `ctx.input(|i| i.time)` here: `Context::run_logic` leaves events, pointer state and - // time at the previous full pass's values (only the viewport information is refreshed). - self.tick(ctx, frame); - self.finish_ime_logic(ctx); - self.close_path(ctx); + self.logic_pass(ctx, frame); } /// Draw one UI pass through `draw`. diff --git a/crates/ui-egui/src/app/frame.rs b/crates/ui-egui/src/app/frame.rs index d93b5673b..065109b9f 100644 --- a/crates/ui-egui/src/app/frame.rs +++ b/crates/ui-egui/src/app/frame.rs @@ -167,6 +167,15 @@ impl EffectcraftApp { } } + /// The shared app's `App::logic`: `tick`, the IME pass's close and, last, the root window's close path. + pub(crate) fn logic_pass(&mut self, ctx: &egui::Context, frame: &eframe::Frame) { + // Never `ctx.input(|i| i.time)` here: `Context::run_logic` leaves events, pointer state and + // time at the previous full pass's values (only the viewport information is refreshed). + self.tick(ctx, frame); + self.finish_ime_logic(ctx); + self.close_path(ctx); + } + /// The app's only non-paint entry: one tick of background work. /// /// This runs for every eframe logic callback, including the logic-only ticks of a hidden diff --git a/crates/ui-egui/src/bench.rs b/crates/ui-egui/src/bench.rs index 567588de4..23054a863 100644 --- a/crates/ui-egui/src/bench.rs +++ b/crates/ui-egui/src/bench.rs @@ -20,7 +20,9 @@ pub struct Driver { impl Driver { pub fn new(app: EffectcraftApp, size: egui::Vec2) -> Driver { - Driver { ctx: egui::Context::default(), app, frame: eframe::Frame::_new_kittest(), time: 0.0, size } + let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); + Driver { ctx, app, frame: eframe::Frame::_new_kittest(), time: 0.0, size } } /// Run one frame (layout + paint + tessellation); its wall time in ms. @@ -30,10 +32,11 @@ impl Driver { pub fn step_with(&mut self, events: Vec) -> f64 { self.time += 1.0 / 60.0; - let input = + let mut input = egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, self.size)), time: Some(self.time), events, ..Default::default() }; let t0 = web_time::Instant::now(); let (app, frame) = (&mut self.app, &mut self.frame); + eframe::App::raw_input_hook(app, &self.ctx, &mut input); let mut out = self.ctx.run_ui(input, |ui| { eframe::App::logic(app, ui.ctx(), frame); eframe::App::ui(app, ui, frame); diff --git a/crates/ui-egui/src/lifecycle_tests.rs b/crates/ui-egui/src/lifecycle_tests.rs index ab02aff37..8ad7e902c 100644 --- a/crates/ui-egui/src/lifecycle_tests.rs +++ b/crates/ui-egui/src/lifecycle_tests.rs @@ -23,7 +23,14 @@ fn raw(size: egui::Vec2) -> egui::RawInput { } fn tick_with(app: &mut EffectcraftApp, ctx: &egui::Context, frame: &eframe::Frame, raw: &egui::RawInput) -> egui::LogicOutput { - ctx.run_logic(raw, |ctx| app.tick(ctx, frame)) + ctx.run_logic(raw, |ctx| app.logic_pass(ctx, frame)) +} + +/// A context with the runtime installed, as the app's window has it. +fn headless() -> egui::Context { + let ctx = egui::Context::default(); + crate::framework::install_headless(&ctx); + ctx } fn hidden_tick(app: &mut EffectcraftApp, ctx: &egui::Context, frame: &eframe::Frame) { @@ -58,7 +65,7 @@ fn send(app: &mut EffectcraftApp, method: &str, params: serde_json::Value) -> st #[test] fn a_logic_only_tick_installs_no_fonts_and_records_no_geometry() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); hidden_tick(&mut app, &ctx, &frame); @@ -69,7 +76,7 @@ fn a_logic_only_tick_installs_no_fonts_and_records_no_geometry() { #[test] fn a_control_command_that_needs_no_ui_completes_without_a_pass() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); let reply = send(&mut app, "engine.execute", json!({"command": "comp.new", "params": {"name": "Queued", "width": 32, "height": 18, "duration": 1}})); @@ -81,8 +88,7 @@ fn a_control_command_that_needs_no_ui_completes_without_a_pass() { #[test] fn a_pass_that_cannot_draw_receives_no_synthetic_input() { - let ctx = egui::Context::default(); - crate::framework::install_headless(&ctx); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); assert!(!app.is_ready(), "a fresh app installs its fonts in its first pass"); @@ -98,7 +104,9 @@ fn a_pass_that_cannot_draw_receives_no_synthetic_input() { assert!(app.pending_synthetic_events().is_empty()); let mut setup_pass = ctx.run_ui(setup.take(), |ui| app.draw(ui, &frame)); setup_pass.textures_delta.clear(); - assert!(!app.is_ready(), "the pass that installs the fonts draws nothing"); + // The font install asks egui for a discard pass, which draws with the fonts and gets no input. + assert!(app.is_ready(), "the frame that installs the fonts draws in its discard pass"); + assert_eq!(app.synthetic.len(), 5, "the discard pass got no synthetic input: the whole gesture still waits"); // Once fonts are ready the click reaches the UI exactly once, one event per pass. let mut passes = 0; while reply.try_recv().is_err() { @@ -114,7 +122,7 @@ fn a_pass_that_cannot_draw_receives_no_synthetic_input() { #[test] fn one_pending_synthetic_batch_is_never_duplicated_while_hidden() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -148,7 +156,7 @@ fn one_pending_synthetic_batch_is_never_duplicated_while_hidden() { #[test] fn geometry_epoch_tracks_size_and_scale_but_not_window_position() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); let first = ready(&mut app, &ctx, &frame); @@ -166,7 +174,7 @@ fn geometry_epoch_tracks_size_and_scale_but_not_window_position() { #[test] fn only_a_viewer_that_draws_records_a_prefetch_scale() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -185,7 +193,7 @@ fn only_a_viewer_that_draws_records_a_prefetch_scale() { #[test] fn playback_advances_on_a_logic_only_tick() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); app.playback.playing = true; @@ -218,7 +226,7 @@ fn workspace_layout_autosave_writes_on_a_hidden_tick() { app.use_manual_clock(); app.ui.focused = PanelKind::Timeline; app.clock_mut().advance(2.0); - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); hidden_tick(&mut app, &ctx, &frame); assert!(store.read(WORKSPACES_FILE).is_some(), "the layout is saved while the window is hidden"); @@ -236,7 +244,7 @@ fn asks_to_close(ctx: &egui::Context, mut f: impl FnMut(&egui::Context)) -> bool #[test] #[cfg(not(target_arch = "wasm32"))] fn restart_to_update_with_unsaved_changes_opens_the_unsaved_changes_prompt() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); assert!(app.session.is_dirty(), "creating a comp and a layer leaves unsaved changes"); @@ -253,7 +261,7 @@ fn restart_to_update_with_unsaved_changes_opens_the_unsaved_changes_prompt() { #[test] #[cfg(not(target_arch = "wasm32"))] fn restart_to_update_with_nothing_unsaved_leaves_the_close_to_the_updater() { - let ctx = egui::Context::default(); + let ctx = headless(); let mut app = app_with_comp(); app.updates_rt.manual_window_open = true; assert!(!asks_to_close(&ctx, |ctx| updates_ui::restart_to_update(&mut app.updates_rt, ctx, true))); @@ -263,7 +271,7 @@ fn restart_to_update_with_nothing_unsaved_leaves_the_close_to_the_updater() { #[test] #[cfg(not(target_arch = "wasm32"))] fn restart_to_update_with_the_startup_prompt_open_leaves_the_window_open() { - let ctx = egui::Context::default(); + let ctx = headless(); let mut app = app_with_comp(); app.updates_rt.updater.offer(craft_update::Release { tag: "v99.0.0".into(), @@ -272,6 +280,14 @@ fn restart_to_update_with_the_startup_prompt_open_leaves_the_window_open() { html_url: "https://github.com/storytold/effectcraft/releases/tag/v99.0.0".into(), ..Default::default() }); + // The offer reads on a thread whether this copy installs itself; a tick opens the prompt with its answer. + for _ in 0..400 { + if app.updates_rt.updater.prompt_open() { + break; + } + std::thread::sleep(std::time::Duration::from_millis(5)); + app.updates_rt.updater.tick(&ctx); + } assert!(app.updates_rt.updater.prompt_open()); app.updates_rt.manual_window_open = true; assert!(!asks_to_close(&ctx, |ctx| updates_ui::restart_to_update(&mut app.updates_rt, ctx, false)), "the prompt carries the restart"); @@ -281,7 +297,7 @@ fn restart_to_update_with_the_startup_prompt_open_leaves_the_window_open() { #[test] fn the_close_guard_answers_a_close_request_without_a_pass() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); assert!(app.session.is_dirty(), "creating a comp and a layer leaves unsaved changes"); @@ -363,7 +379,7 @@ fn image(width: usize, height: usize) -> Arc { #[test] fn a_script_file_dialog_asks_for_a_pass_while_the_window_is_hidden() { use effectcraft_engine::scriptui::{FileDialogKind, ScriptFileDialog}; - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -392,7 +408,7 @@ fn a_script_file_dialog_asks_for_a_pass_while_the_window_is_hidden() { #[test] fn a_screenshot_is_issued_only_after_settled_passes_and_writes_from_the_tick() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -418,7 +434,7 @@ fn a_screenshot_is_issued_only_after_settled_passes_and_writes_from_the_tick() { #[test] fn a_resize_between_issue_and_completion_rejects_the_pixels_and_retries() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -445,7 +461,7 @@ fn a_resize_between_issue_and_completion_rejects_the_pixels_and_retries() { #[test] fn screenshot_admission_bounds_requests_and_a_timeout_releases_its_reservation() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -471,7 +487,7 @@ fn screenshot_admission_bounds_requests_and_a_timeout_releases_its_reservation() #[test] fn a_late_callback_after_cancellation_writes_nothing_and_replies_once() { - let ctx = egui::Context::default(); + let ctx = headless(); let frame = eframe::Frame::_new_kittest(); let mut app = app_with_comp(); ready(&mut app, &ctx, &frame); @@ -500,7 +516,7 @@ fn wake_requests(ctx: &egui::Context) -> Arc(reset_id(egui::ViewportId::ROOT))).expect("the waiting guard"); - assert!(guard.suspended && guard.request.is_none(), "the all-exit finalizer retired it without allocating"); - let second = draw_app_pass(&mut app, &ctx, &frame, vec![]) - .platform_output - .ime - .expect("returning to a drawing pass publishes the custom descriptor") - .reset_request - .expect("the deferred request"); + assert!(app.is_ready(), "the discard pass after the font install draws"); + let second = fonts.platform_output.ime.expect("the drawing discard pass publishes the custom descriptor").reset_request.expect("the deferred request"); assert_ne!(first, second); // The device-loss early return is the other all-exit path. Preset the close bookkeeping diff --git a/crates/ui-egui/tests/it/ui_workspace_focus.rs b/crates/ui-egui/tests/it/ui_workspace_focus.rs index a2f061fda..f273708b0 100644 --- a/crates/ui-egui/tests/it/ui_workspace_focus.rs +++ b/crates/ui-egui/tests/it/ui_workspace_focus.rs @@ -2,10 +2,10 @@ use std::sync::Arc; +use craft_behavior::dock::Action; use effectcraft_engine::Session; use effectcraft_engine::config::{ConfigStore, DirConfig, MemoryConfig}; use effectcraft_ui_egui::EffectcraftApp; -use craft_behavior::dock::Action; use effectcraft_ui_egui::dock::{self, Node, PanelKind, SplitSize}; use effectcraft_ui_egui::state::Tool; use egui::{Event, Id, Key, Modifiers, vec2}; From dbbf485774c7f4f55eb86c4f210400c76b1bb791 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 21:09:54 +0000 Subject: [PATCH 14/39] Repin craft-libs to dock-gaps 4e806d57a5: panel focus on DockAreaOutput::pressed, document tab sources, tests on next's ids --- Cargo.lock | 204 +++++++++---------- Cargo.toml | 94 ++++----- crates/effects/Cargo.toml | 2 +- crates/ui-egui/src/dock.rs | 26 --- crates/ui-egui/src/dock_ui.rs | 23 ++- crates/ui-egui/src/native_menu.rs | 23 ++- crates/ui-egui/tests/it/shared_docking_ui.rs | 27 --- crates/ui-egui/tests/it/ui_agent_audit.rs | 7 + crates/ui-egui/tests/it/ui_fx_editors.rs | 26 ++- crates/ui-egui/tests/it/ui_panel_windows.rs | 39 ++-- crates/ui-egui/tests/it/ui_tabs.rs | 84 ++++---- docs/control-protocol.md | 13 +- 12 files changed, 273 insertions(+), 295 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3424e6e7e..81afa8ae1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1315,12 +1315,12 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "rustix 1.1.6", ] @@ -1351,10 +1351,10 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "log", "thiserror 2.0.21", ] @@ -1362,7 +1362,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1385,7 +1385,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "egui", ] @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "md-5", "rayon", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" [[package]] name = "craft-color" @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "serde", ] @@ -1423,7 +1423,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "serde", ] @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "thiserror 2.0.21", ] @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "serde", "serde_json", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" [[package]] name = "craft-exr" @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "exr", "flate2", @@ -1497,7 +1497,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" [[package]] name = "craft-frame" @@ -1527,10 +1527,10 @@ dependencies = [ [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "rayon", "serde", ] @@ -1538,7 +1538,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "gif", "image", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "chrono", "fixed_decimal", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "serde_json", ] @@ -1612,13 +1612,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-host", "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "egui", "serde", "serde_json", @@ -1627,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-zip", "serde_json", @@ -1646,7 +1646,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1669,14 +1669,14 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "serde", "thiserror 2.0.21", ] @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "chrono", "craft-codepage", @@ -1704,7 +1704,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "flate2", "serde", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "hayro-syntax", "serde", @@ -1725,7 +1725,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "async-channel", "async-io", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-eps", "kurbo", @@ -1780,7 +1780,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "encoding_rs", "flate2", @@ -1791,7 +1791,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1817,7 +1817,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-atomic", "craft-host", @@ -1839,9 +1839,9 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "thiserror 2.0.21", ] @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1905,7 +1905,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "serde", "thiserror 2.0.21", @@ -1925,9 +1925,9 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "serde", "web-time", ] @@ -1935,12 +1935,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1954,7 +1954,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-behavior", "craft-i18n", @@ -1970,7 +1970,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "accesskit", "craft-behavior", @@ -2008,7 +2008,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-behavior", "craft-host", @@ -2037,7 +2037,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-behavior", "craft-host", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-behavior", "craft-host", @@ -2078,7 +2078,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-behavior", "craft-host", @@ -2097,7 +2097,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "chrono", "craft-host", @@ -2126,7 +2126,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "flate2", "serde", @@ -2148,9 +2148,9 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "rav1e", "rayon", "thiserror 2.0.21", @@ -2159,7 +2159,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "image", "thiserror 2.0.21", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "winsafe", ] @@ -2176,7 +2176,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "craft-appkit", "craft-atomic", @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "thiserror 2.0.21", ] @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2530,7 +2530,7 @@ dependencies = [ [[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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "bytemuck", "emath", @@ -2688,12 +2688,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2803,7 +2803,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2854,17 +2854,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2969,7 +2969,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "miniz_oxide 0.9.1", ] @@ -2977,7 +2977,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -3170,7 +3170,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "ahash", "bytemuck", @@ -3205,7 +3205,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "accesskit", "ahash", @@ -3224,7 +3224,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "ahash", "bytemuck", @@ -3243,7 +3243,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "accesskit_winit", "arboard", @@ -3269,7 +3269,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=f5025284445ea19c35f746d96fc0b75468b3f560#f5025284445ea19c35f746d96fc0b75468b3f560" +source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "ahash", "egui", @@ -3282,7 +3282,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "bytemuck", "egui", @@ -3295,7 +3295,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "eframe", "egui", @@ -3318,7 +3318,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "bytemuck", ] @@ -3411,7 +3411,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" dependencies = [ "ahash", "bytemuck", @@ -3437,7 +3437,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=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" [[package]] name = "equator" @@ -4374,7 +4374,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "hayro-ccitt", ] @@ -4388,7 +4388,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=9fd8b0cdaad2b5320090f5a5892ba90fb8dab107#9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" +source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index edc4ed8e3..61fbef6aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -236,19 +236,19 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107", version = "=0.3.0" } -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" } -egui_extras = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", version = "=0.3.0" } +ecolor = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +emath = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +epaint = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +egui = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +egui-winit = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +egui_glow = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +egui_extras = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index a36022fb9..e07fbe292 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "9fd8b0cdaad2b5320090f5a5892ba90fb8dab107" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index c9f7d7275..1addcd88c 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -499,32 +499,6 @@ pub fn referenced_panels(workspace: &Workspace) -> Vec { out } -/// The automation id of the gap below stacked panel `p`: `dock.gutter.s`, with the -/// stack's split path (`a`/`b` per level) and the entry's index. -pub fn stack_gutter_id(layout: &Layout, p: PanelKind) -> Option { - fn rec(node: &Node, p: PanelKind, path: &mut String, depth: usize) -> Option { - if depth > craft_behavior::dock::MAX_DEPTH { - return None; - } - match node { - Node::Split { first, second, .. } => { - path.push('a'); - if let Some(id) = rec(first, p, path, depth + 1) { - return Some(id); - } - path.pop(); - path.push('b'); - let found = rec(second, p, path, depth + 1); - path.pop(); - found - } - Node::Stack { entries, .. } => entries.iter().position(|e| e.panel == p).map(|i| format!("dock.gutter.{path}s{i}")), - _ => None, - } - } - rec(layout.root.as_ref()?, p, &mut String::new(), 0) -} - /// A panel lock button (Composition viewers and the Timeline keep their comp while locked, /// Effect Controls its layer): a closed padlock while locked, an open one while unlocked. /// Returns true when clicked. Automation: `panel.tab..lock`. diff --git a/crates/ui-egui/src/dock_ui.rs b/crates/ui-egui/src/dock_ui.rs index 4f7556728..45d59ffef 100644 --- a/crates/ui-egui/src/dock_ui.rs +++ b/crates/ui-egui/src/dock_ui.rs @@ -417,7 +417,7 @@ impl EffectcraftApp { }; let EffectPanels { locks, menu, bodies, ime, .. } = panels; self.live_dock.specs = specs; - let DockAreaOutput { actions, requested, events, focused, picked, error, float_space, windows, window_files, sources, .. } = output; + let DockAreaOutput { actions, requested, events, focused, pressed, picked, error, float_space, windows, window_files, sources, .. } = output; self.dock_rects = bodies; self.unpublished_viewports = ime.unpublished(); // A window that closed or docked takes its composition with it. @@ -431,10 +431,10 @@ impl EffectcraftApp { } self.forward_window_input(&ctx, &windows, window_files); self.live_dock.windows = windows; - // Key focus moving to a group, or a tab picked, focuses that panel. + // A press in a panel's body, a tab picked, or key focus moving to a group focuses that panel. let moved = focused != self.live_dock.focused; self.live_dock.focused = focused; - if let Some(panel) = picked.or(focused.filter(|_| moved)) { + if let Some(panel) = pressed.or(picked).or(focused.filter(|_| moved)) { self.focus_panel(&ctx, panel); } if let Some(error) = error { @@ -513,10 +513,10 @@ impl EffectcraftApp { } } - /// Automation ids for the dock's gesture sources: `panel.tab.`, `panel.drag.` - /// (the group's drag bar), `panel.float..move` and `.resize` (bottom-right corner) and - /// `.resize.` for floating window `n`, `dock.gutter.` (`a`/`b` per split level; a - /// stack's gap below entry `i` adds `s`), `dock.gutter.group.` under a dock + /// Automation ids for the dock's gesture sources: `panel.tab.`, `panel.tab..` + /// (the Timeline's comp tabs), `panel.drag.` (the group's drag bar), `panel.float..move` + /// and `.resize` (bottom-right corner) and `.resize.` for floating window `n`, + /// `dock.gutter.` (`a`/`b` per split level), `dock.gutter.group.` under a dock /// column's group and `dock.column.` at a dock column's inner edge. fn register_dock_hits(&mut self, sources: &[DockSource]) { let window = |panel: &PanelKind| self.ui.dock.layout().floating.iter().position(|window| window.contains(panel)); @@ -527,6 +527,10 @@ impl EffectcraftApp { for source in sources { let entry = match &source.kind { SourceKind::Tab(panel) => (format!("panel.tab.{}", panel.id()), title(panel)), + SourceKind::Document(panel, document) => { + let name = self.session.project.item(effectcraft_engine::project::ItemId(*document)).map_or_else(String::new, |item| item.name.clone()); + (format!("panel.tab.{}.{document}", panel.id()), name) + } SourceKind::GroupBar(panel) => (format!("panel.drag.{}", panel.id()), "Move panel group".into()), SourceKind::WindowGrip(panel) => match window(panel) { Some(index) => (format!("panel.float.{index}.move"), "Move floating panel".into()), @@ -538,10 +542,7 @@ impl EffectcraftApp { None => continue, }, SourceKind::Divider(DividerKind::Split(path)) => (format!("dock.gutter.{}", path_id(path)), "gutter".into()), - SourceKind::Divider(DividerKind::Groups(panel)) => { - let id = dock::stack_gutter_id(self.ui.dock.layout(), *panel).unwrap_or_else(|| format!("dock.gutter.group.{}", panel.id())); - (id, "gutter".into()) - } + SourceKind::Divider(DividerKind::Groups(panel)) => (format!("dock.gutter.group.{}", panel.id()), "gutter".into()), SourceKind::Divider(DividerKind::ColumnEdge(panel)) => (format!("dock.column.{}", panel.id()), "gutter".into()), _ => continue, }; diff --git a/crates/ui-egui/src/native_menu.rs b/crates/ui-egui/src/native_menu.rs index 5197481b3..440a3a4cd 100644 --- a/crates/ui-egui/src/native_menu.rs +++ b/crates/ui-egui/src/native_menu.rs @@ -479,8 +479,9 @@ fn text_field_event(command: &str) -> Option> { /// Hand a text field's Edit command to the window `window` whose field has the keyboard. The /// main window gets the clipboard text itself and the events through the synthetic queue; a -/// floating panel's OS window gets each key pressed and released through the window host, and -/// the clipboard text as typed text on Cmd+V. +/// floating panel's OS window gets each command as the key equivalent the platform's menu took +/// from it (Copy and Cut as egui's copy and cut events, the rest as the key's tap), and the +/// clipboard text as typed text on Cmd+V. fn send_to_text_field(app: &mut EffectcraftApp, ctx: &egui::Context, window: egui::ViewportId, events: Vec) { if window == egui::ViewportId::ROOT { for event in events { @@ -496,24 +497,26 @@ fn send_to_text_field(app: &mut EffectcraftApp, ctx: &egui::Context, window: egu ctx.request_repaint(); return; } - let host = craft_ui::runtime::windows::WindowHost::of(ctx); + use craft_ui::runtime::windows::{KeyEquivalent, WindowHost}; + let host = WindowHost::of(ctx); let platform = craft_keymap::egui::platform(ctx); for event in events { - let (key, modifiers) = match event { + let equivalent = match event { egui::Event::Key { key: egui::Key::V, .. } => { if let Some(text) = app.hooks.clipboard_text.as_ref().and_then(|f| f()) { host.inject_text(window, &text); } continue; } - egui::Event::Key { key, modifiers, .. } => (key, modifiers), - egui::Event::Copy => (egui::Key::C, egui::Modifiers::COMMAND), - egui::Event::Cut => (egui::Key::X, egui::Modifiers::COMMAND), + egui::Event::Key { key, modifiers, .. } => match craft_keymap::Key::from_egui(key) { + Some(key) => KeyEquivalent::Tap(craft_keymap::Chord::new(craft_keymap::Mods::from_egui(&modifiers, platform), key)), + None => continue, + }, + egui::Event::Copy => KeyEquivalent::Copy, + egui::Event::Cut => KeyEquivalent::Cut, _ => continue, }; - if let Some(key) = craft_keymap::Key::from_egui(key) { - host.inject_key(window, key, craft_keymap::Mods::from_egui(&modifiers, platform), false); - } + host.key_equivalent(window, equivalent); } } diff --git a/crates/ui-egui/tests/it/shared_docking_ui.rs b/crates/ui-egui/tests/it/shared_docking_ui.rs index 052d4f8a4..48d8c5e75 100644 --- a/crates/ui-egui/tests/it/shared_docking_ui.rs +++ b/crates/ui-egui/tests/it/shared_docking_ui.rs @@ -8,7 +8,6 @@ use effectcraft_ui_egui::{ }; use egui::{Event, Modifiers, PointerButton, Rect, pos2, vec2}; use egui_kittest::Harness; -use egui_kittest::kittest::{NodeT, Queryable}; use serde_json::json; fn invoke(app: &mut EffectcraftApp, id: &str, params: serde_json::Value) -> Result { @@ -134,8 +133,6 @@ fn pointer_drop_merges_floats_and_redocks_without_project_changes() { drag(&mut h, from, pos2(700.0, 400.0), Modifiers::COMMAND); assert_eq!(floating(h.state()).len(), 1); assert!(h.state().ui.dock.is_floating(PanelKind::Info)); - let grips: Vec<_> = h.query_all_by_label("Resize panel window").collect(); - assert!(!grips.is_empty() && grips.iter().all(|grip| grip.accesskit_node().role() == egui::accesskit::Role::Button)); // Its corner resizes it and its title bar moves it. let original = rect4(floating(h.state())[0].rect); let grip = rect(&h, "panel.float.0.resize").center(); @@ -322,30 +319,6 @@ fn catalog_close_keeps_dynamic_panel_identity_and_releases_viewers() { assert!(!app.ui.viewers.get(&42).is_some_and(Option::is_some), "the closed viewer forgets its comp"); } -#[test] -fn stacked_panels_resize_by_pointer_without_changing_closed_entries() { - let mut session = Session::default(); - session.execute("comp.new", json!({"width": 160, "height": 90, "duration": 1})).unwrap(); - let mut app = EffectcraftApp::new(session); - app.ui.start_screen = false; - let mut h = - Harness::builder().with_size(vec2(1000.0, 720.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); - h.run_steps(4); - h.state_mut().ui.dock = - dock::docked(dock::stack(&[(PanelKind::Preview, true, Some(100.0)), (PanelKind::Properties, true, None), (PanelKind::Align, false, Some(77.0))])); - h.run_steps(3); - let project = h.state().session.project.clone(); - let before = rect(&h, "panel.Preview").height(); - let from = rect(&h, "dock.gutter.s0").center(); - drag(&mut h, from, from + vec2(0.0, 16.0), Modifiers::NONE); - let after = rect(&h, "panel.Preview").height(); - assert!((after - before - 16.0).abs() < 2.0, "{before} -> {after}"); - let Some(Node::Stack { entries, .. }) = &h.state().ui.dock.layout().root else { panic!("stack lost") }; - assert!(entries[0].height.unwrap_or_default() > 100.0, "{entries:?}"); - assert_eq!((entries[2].panel, entries[2].open, entries[2].height), (PanelKind::Align, false, Some(77.0))); - assert!(std::sync::Arc::ptr_eq(&project, &h.state().session.project)); -} - #[test] fn failed_close_preserves_viewer_lifecycle_and_maximize_state() { let mut app = EffectcraftApp::new(Session::default()); diff --git a/crates/ui-egui/tests/it/ui_agent_audit.rs b/crates/ui-egui/tests/it/ui_agent_audit.rs index 477850e87..325cf1331 100644 --- a/crates/ui-egui/tests/it/ui_agent_audit.rs +++ b/crates/ui-egui/tests/it/ui_agent_audit.rs @@ -170,6 +170,13 @@ fn every_panel_registers_automation_ids_for_its_widgets() { for (r, l) in widgets { if !panels.iter().any(|p| p.contains(r.center())) && !covered(r, &elements) { gaps.push(format!("chrome: [{:.0},{:.0} {:.0}x{:.0}] {l:?}", r.min.x, r.min.y, r.width(), r.height())); + // DIAG: the accessibility nodes at the gap. + { + use egui_kittest::kittest::{By, NodeT, Queryable}; + for node in h.query_all(By::new().predicate(|_| true)).filter(|n| n.rect().contains(r.center()) && n.rect().width() < 200.0) { + eprintln!("DIAG gap node {:?} {:?} {:?}", node.accesskit_node().role(), node.accesskit_node().label(), node.rect()); + } + } } } assert!(gaps.is_empty(), "{} interactive widgets without an automation id:\n{}", gaps.len(), gaps.join("\n")); diff --git a/crates/ui-egui/tests/it/ui_fx_editors.rs b/crates/ui-egui/tests/it/ui_fx_editors.rs index 4fd9ffc59..af207a078 100644 --- a/crates/ui-egui/tests/it/ui_fx_editors.rs +++ b/crates/ui-egui/tests/it/ui_fx_editors.rs @@ -93,14 +93,20 @@ fn at(r: egui::Rect, fx: f32, fy: f32) -> Pos2 { pos2(r.min.x + r.width() * fx, r.min.y + r.height() * fy) } +/// `n` clicks at `p`, one press per step as the runtime takes them (each press is its step's last +/// pointer event): the releases are one step apart, within egui's double-click interval. fn click_n(h: &mut Harness<'_, EffectcraftApp>, p: Pos2, n: u32) { h.event(Event::PointerMoved(p)); h.step(); - // (all in one frame: the harness' frame time is longer than a double-click's) - for _ in 0..n { - h.event(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() }); - h.event(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() }); + let button = |pressed| Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; + for i in 0..n { + if i > 0 { + h.input_mut().events.push(button(false)); + } + h.input_mut().events.push(button(true)); + h.step(); } + h.input_mut().events.push(button(false)); h.step(); h.run_steps(2); } @@ -293,15 +299,21 @@ fn composition_tabs_and_scrolling_preview() { .with_context_setup(effectcraft_ui_egui::framework::install_headless) .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(4); - rect(&h, "panel.tab.Timeline.close"); + let shown = h.state().session.state.active_comp.unwrap(); + // The Timeline's tab for the shown comp, and its × by its accessible name. + rect(&h, &format!("panel.tab.Timeline.{}", shown.0)); + let close = { + use egui_kittest::kittest::Queryable; + let name = h.state().session.project.item(shown).unwrap().name.clone(); + h.get_by_label(&format!("Close {name}")).rect().center() + }; rect(&h, "preview.scroll"); click_id(&mut h, "panel.tab.Composition.lock"); assert!(h.state().ui.locked_tabs.contains("Composition")); click_id(&mut h, "panel.tab.Composition.lock"); assert!(h.state().ui.locked_tabs.is_empty()); // The Timeline's × closes its comp's tab (the panel stays, as in After Effects). - let shown = h.state().session.state.active_comp.unwrap(); - click_id(&mut h, "panel.tab.Timeline.close"); + click_n(&mut h, close, 1); assert!(!h.state().session.state.open_comps.contains(&shown)); assert!(h.state().ui.dock.is_docked(PanelKind::Timeline)); } diff --git a/crates/ui-egui/tests/it/ui_panel_windows.rs b/crates/ui-egui/tests/it/ui_panel_windows.rs index b4dee1600..12cebe53e 100644 --- a/crates/ui-egui/tests/it/ui_panel_windows.rs +++ b/crates/ui-egui/tests/it/ui_panel_windows.rs @@ -43,7 +43,7 @@ fn panel_window_command_moves_a_docked_panel_into_its_own_window_and_back() { } #[test] -fn a_click_on_a_floating_panel_does_nothing_while_a_dialog_is_open() { +fn a_drag_on_a_floating_panel_does_nothing_while_a_dialog_is_open() { use egui::{Event, Modifiers, PointerButton, vec2}; use egui_kittest::Harness; let mut app = EffectcraftApp::new(Session::default()); @@ -52,32 +52,37 @@ fn a_click_on_a_floating_panel_does_nothing_while_a_dialog_is_open() { let mut h = Harness::builder().with_size(vec2(1400.0, 900.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(move |_| app); h.run_steps(3); - // The floating window's ×, by its accessible name. - let close = |h: &Harness<'_, EffectcraftApp>| { - use egui_kittest::kittest::Queryable; - h.get_by_label("Close panel window").rect().center() + // The floating window's move grip: a drag moves it only while no dialog is up. + let grip = |h: &Harness<'_, EffectcraftApp>| { + let e = h.state().auto.find("panel.float.0.move").expect("the floating window's move grip"); + egui::pos2(e.rect[0] + e.rect[2] / 2.0, e.rect[1] + e.rect[3] / 2.0) }; - let click = |h: &mut Harness<'_, EffectcraftApp>, pos| { - h.event(Event::PointerMoved(pos)); + let drag = |h: &mut Harness<'_, EffectcraftApp>, from: egui::Pos2| { + let to = from + vec2(-30.0, 20.0); + h.event(Event::PointerMoved(from)); h.step(); - for pressed in [true, false] { - h.event(Event::PointerButton { pos, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }); + h.event(Event::PointerButton { pos: from, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }); + h.step(); + for k in 1..=5 { + h.event(Event::PointerMoved(from + (to - from) * (k as f32 / 5.0))); h.step(); } + h.event(Event::PointerButton { pos: to, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); + h.step(); h.run_steps(2); }; - let at = close(&h); + let at = grip(&h); let ctx = h.ctx.clone(); effectcraft_ui_egui::menus::invoke(h.state_mut(), &ctx, "app.settings", json!({"page": "general"})).unwrap(); h.run_steps(3); let before = h.state().ui.dock.clone(); - click(&mut h, at); - assert_eq!(h.state().ui.dock, before, "the floating panel takes no click while Settings is open"); - assert!(h.state().ui.dock.is_floating(PanelKind::Project)); - // The same click closes the window once the dialog is gone. + drag(&mut h, at); + assert_eq!(h.state().ui.dock, before, "the floating panel takes no drag while Settings is open"); + // The same drag moves the window once the dialog is gone. h.state_mut().dialog = None; h.run_steps(3); - let at = close(&h); - click(&mut h, at); - assert!(!h.state().ui.dock.is_open(PanelKind::Project)); + let at = grip(&h); + drag(&mut h, at); + assert_ne!(h.state().ui.dock, before, "the drag moved the floating window"); + assert!(h.state().ui.dock.is_floating(PanelKind::Project)); } diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index 0b8fd2fcd..5829ceb4f 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -36,19 +36,31 @@ fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { egui::Rect::from_min_size(pos2(e.rect[0], e.rect[1]), egui::vec2(e.rect[2], e.rect[3])) } +/// `n` clicks at `p`, one press per step as the runtime takes them (each press is its step's last +/// pointer event): the releases are one step apart, within egui's double-click interval. fn click_n(h: &mut Harness<'_, EffectcraftApp>, p: Pos2, n: u32) { h.event(Event::PointerMoved(p)); h.step(); - // All in one frame, straight into the input (the harness' event queue spreads presses over - // frames, longer apart than a double-click). - for _ in 0..n { - h.input_mut().events.push(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() }); - h.input_mut().events.push(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() }); + let button = |pressed| Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; + for i in 0..n { + if i > 0 { + h.input_mut().events.push(button(false)); + } + h.input_mut().events.push(button(true)); + h.step(); } + h.input_mut().events.push(button(false)); h.step(); h.run_steps(2); } +/// The rect of the accessibility node named `label`, such as a tab's close button ("Close Main") +/// or the tab strip's overflow button ("More tabs"). +fn named(h: &Harness<'_, EffectcraftApp>, label: &str) -> egui::Rect { + use egui_kittest::kittest::Queryable; + h.get_by_label(label).rect() +} + fn drag(h: &mut Harness<'_, EffectcraftApp>, from: Pos2, to: Pos2) { h.event(Event::PointerMoved(from)); h.step(); @@ -87,7 +99,7 @@ fn project_double_click_opens_a_comp_as_its_own_timeline_tab() { assert_eq!(h.state().session.state.active_comp, Some(ItemId(main))); assert_eq!(open_comps(&h), vec![main, pre]); // × closes the shown comp's Timeline only: the panel stays with Pre. - let close = rect(&h, "panel.tab.Timeline.close"); + let close = named(&h, "Close Main"); click_n(&mut h, close.center(), 1); assert_eq!(open_comps(&h), vec![pre]); assert_eq!(h.state().session.state.active_comp, Some(ItemId(pre))); @@ -222,20 +234,20 @@ fn preview_divider(h: &Harness<'_, EffectcraftApp>) -> egui::Rect { .expect("a gutter between Preview and Properties") } -/// Default's right column: a short Preview frame (46 points of body) and the Properties frame +/// Default's right column: a short Preview frame (48 points of body under next's 28-point strip) and the Properties frame /// below it taking the rest of the column, at any window height. #[test] fn the_default_preview_frame_is_short_and_properties_takes_the_rest() { let (mut h, _, _) = harness(); let body = |h: &Harness<'_, EffectcraftApp>| rect(h, "panel.Preview").height(); - assert!((body(&h) - 46.0).abs() < 1.5, "Preview {}", body(&h)); + assert!((body(&h) - 48.0).abs() < 1.5, "Preview {}", body(&h)); let props = rect(&h, "panel.Properties"); assert!(props.height() > 300.0, "Properties {props:?}"); // A taller window gives the room to Properties. let size = h.ctx.content_rect().size(); h.set_size(size + egui::vec2(0.0, 200.0)); h.run_steps(3); - assert!((body(&h) - 46.0).abs() < 1.5, "Preview {}", body(&h)); + assert!((body(&h) - 48.0).abs() < 1.5, "Preview {}", body(&h)); assert!((rect(&h, "panel.Properties").height() - props.height() - 200.0).abs() < 2.0); } @@ -376,10 +388,10 @@ fn dragging_the_viewer_timeline_divider_far_up_does_not_crash() { h.run_steps(2); } -/// Issue #301: a stacked panel's header bar opens it with a click anywhere on it, and its −/+ -/// button at the bar's right end collapses and expands it. +/// Issue #301: a stacked panel's header bar collapses and expands it (next: a double click on +/// the section's bar). #[test] -fn a_stacked_panels_whole_header_bar_toggles_it() { +fn a_double_click_on_a_stacked_panels_bar_toggles_it() { let (mut h, _, _) = harness(); use effectcraft_ui_egui::dock; let stack = dock::stack(&[(PanelKind::Preview, true, Some(46.0)), (PanelKind::Properties, true, None)]); @@ -387,19 +399,12 @@ fn a_stacked_panels_whole_header_bar_toggles_it() { h.run_steps(3); let open = |h: &Harness<'_, EffectcraftApp>| h.state().ui.dock.is_visible(PanelKind::Preview); assert!(open(&h)); - let toggle = rect(&h, "panel.header.Preview"); - let bar = rect(&h, "panel.tab.Preview"); - assert!(toggle.max.x <= bar.max.x + 1.0 && toggle.min.x > bar.center().x, "{toggle:?} {bar:?}"); - click_n(&mut h, toggle.center(), 1); - assert!(!open(&h), "the button collapses Preview"); - let toggle = rect(&h, "panel.header.Preview"); - click_n(&mut h, toggle.center(), 1); + let bar = rect(&h, "panel.drag.Preview"); + click_n(&mut h, bar.center(), 2); + assert!(!open(&h), "a double click collapses Preview"); + let bar = rect(&h, "panel.drag.Preview"); + click_n(&mut h, bar.center(), 2); assert!(open(&h), "and expands it again"); - let toggle = rect(&h, "panel.header.Preview"); - click_n(&mut h, toggle.center(), 1); - assert!(!open(&h)); - click_n(&mut h, pos2(bar.min.x + bar.width() * 0.25, bar.center().y), 1); - assert!(open(&h), "a click on the bar away from the button opens it"); } /// #302: a panel dropped onto the Properties frame becomes a tab in that frame; its tabs switch @@ -415,6 +420,10 @@ fn a_tab_dropped_on_a_frame_joins_it() { assert!(group.starts_with(&[PanelKind::Properties]) && group.contains(&PanelKind::EffectControls), "{group:?}"); assert!(dock(&h).is_visible(PanelKind::EffectControls) && !dock(&h).is_visible(PanelKind::Properties)); assert!(dock(&h).is_visible(PanelKind::Preview)); + // DIAG: the right column's chrome after the drop. + for e in h.state().auto.elements.iter().filter(|e| e.id.starts_with("panel.tab") || e.id.starts_with("panel.drag") || e.id.starts_with("panel.menu")) { + eprintln!("DIAG {} {:?}", e.id, e.rect); + } // The frame's other tab shows Properties again, the frame stays open. let tab = rect(&h, "panel.tab.Properties"); click_n(&mut h, tab.center(), 1); @@ -444,16 +453,15 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu s.state.open_comps = vec![ItemId(comps[0])]; s.state.active_comp = Some(ItemId(comps[0])); let mut h = Harness::builder() - .with_size(egui::vec2(1000.0, 800.0)) + .with_size(egui::vec2(700.0, 800.0)) .with_context_setup(effectcraft_ui_egui::framework::install_headless) .build_eframe(|_| EffectcraftApp::new(s)); h.run_steps(3); - let alone = rect(&h, "panel.tab.RenderQueue"); h.state_mut().session.state.open_comps = comps.iter().map(|c| ItemId(*c)).collect(); h.run_steps(3); - // The panel tabs keep their width; the comp tabs follow them in the same row, in order. + // The comp tabs follow the panel tabs in the same row, in order (tabs that do not fit clip to + // their first letters). let (tl, rq) = (rect(&h, "panel.tab.Timeline"), rect(&h, "panel.tab.RenderQueue")); - assert!((rq.width() - alone.width()).abs() < 0.5, "Render Queue {rq:?} was {alone:?}"); let shown: Vec = comps.iter().copied().filter(|c| has(&h, &format!("panel.tab.Timeline.{c}"))).collect(); assert!(shown.contains(&comps[0]) && shown.len() < comps.len(), "{shown:?}"); let mut x = rq.max.x; @@ -464,35 +472,29 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu } // A comp with no room is in the » menu; picking it shows it, and its tab joins the row. let hidden = comps.iter().copied().find(|c| !shown.contains(c)).unwrap(); - let more = rect(&h, "panel.tab.Timeline.more"); + let more = named(&h, "More tabs"); assert!(more.min.x >= x - 0.5 && tl.y_range().contains(more.center().y), "{more:?}"); click_n(&mut h, more.center(), 1); - let item = rect(&h, &format!("panel.tab.Timeline.more.{hidden}")); + let name = names[comps.iter().position(|c| *c == hidden).unwrap()]; + let item = { + use egui_kittest::kittest::{NodeT, Queryable}; + h.query_all_by_label(name).find(|node| node.accesskit_node().role() == egui::accesskit::Role::MenuItem).expect("the comp in the overflow menu").rect() + }; click_n(&mut h, item.center(), 1); assert_eq!(h.state().session.state.active_comp, Some(ItemId(hidden))); assert_eq!(open_comps(&h), comps); assert!(has(&h, &format!("panel.tab.Timeline.{hidden}"))); } -/// Whether `id` was registered in the last frame (not the one before). -fn drawn(h: &Harness<'_, EffectcraftApp>, id: &str) -> bool { - h.state().auto.elements.iter().any(|e| e.id == id) -} - #[test] fn an_inactive_comp_tab_shows_its_close_button_on_hover_and_closes_without_showing_its_comp() { let (mut h, pre, main) = harness(); h.state_mut().session.state.open_comps = vec![ItemId(main), ItemId(pre)]; h.run_steps(3); let (tm, tp) = (rect(&h, &format!("panel.tab.Timeline.{main}")), rect(&h, &format!("panel.tab.Timeline.{pre}"))); - // The shown comp's × is always there; Pre's only while the pointer is over its tab. - h.event(Event::PointerMoved(pos2(800.0, 900.0))); - h.run_steps(2); - assert!(drawn(&h, "panel.tab.Timeline.close") && drawn(&h, &format!("panel.tab.Timeline.{main}.close"))); - assert!(!drawn(&h, &format!("panel.tab.Timeline.{pre}.close")), "no × on an inactive tab the pointer is not over"); h.event(Event::PointerMoved(tp.center())); h.run_steps(2); - let close = rect(&h, &format!("panel.tab.Timeline.{pre}.close")); + let close = named(&h, "Close Pre"); assert!(tp.contains_rect(close), "{close:?} inside {tp:?}"); // Every comp tab keeps the ×'s room: hovering changes no width. assert_eq!((rect(&h, &format!("panel.tab.Timeline.{main}")), rect(&h, &format!("panel.tab.Timeline.{pre}"))), (tm, tp)); diff --git a/docs/control-protocol.md b/docs/control-protocol.md index dc54b05a1..1505e268b 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -261,12 +261,13 @@ windows stay in the main window. Keys pressed in a floating window that none of run the main window's shortcuts, and files dropped on one import as on the main window. While a modal dialog is open, floating windows take no input. -The automation ids of the docking chrome are `panel.tab.`, `panel.drag.` (a -group's drag bar), `panel.menu.` (≡), `panel.tab..lock` (viewer lock), -`panel.float..move`, `.resize` and `.resize.` for floating window `n`, and -`dock.gutter.` for dividers (`a`/`b` per split level; a stack's gap below entry `i` adds -`s`). The other parts (the Timeline's comp tabs, a floating window's close button, the tab -overflow menu) are found by their accessible names. +The automation ids of the docking chrome are `panel.tab.`, `panel.tab.Timeline.` +(the Timeline's comp tabs), `panel.drag.` (a group's drag bar), `panel.menu.` (≡), +`panel.tab..lock` (viewer lock), `panel.float..move`, `.resize` and `.resize.` +for floating window `n`, `dock.gutter.` for split dividers (`a`/`b` per split level), +`dock.gutter.group.` below a dock column's group and `dock.column.` at a dock +column's inner edge. The other parts (a tab's close button, "Close ", and the tab +overflow button, "More tabs") are found by their accessible names. Saved workspaces (`workspaces.json`, version 2) hold craft-ui `Workspace`s: the layout, the closed panels with where each goes back, the lock, and each floating window's desktop place. A From 80d5e41d6db97be986528f3d49c91de49a93a05d Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 21:21:51 +0000 Subject: [PATCH 15/39] Tests send one press per step as next's runtime takes them; tab overflow cases follow next's clipping --- crates/ui-egui/tests/it/ui_agent_audit.rs | 6 +++- crates/ui-egui/tests/it/ui_inline_edit.rs | 11 +++++-- crates/ui-egui/tests/it/ui_panel_focus.rs | 8 +++-- crates/ui-egui/tests/it/ui_panels.rs | 5 +++ crates/ui-egui/tests/it/ui_tabs.rs | 37 +++++++++++++++-------- crates/ui-egui/tests/it/ui_tail.rs | 2 ++ crates/ui-egui/tests/it/ui_viewer.rs | 4 +++ crates/ui-egui/tests/it/ui_viewers.rs | 6 +++- 8 files changed, 60 insertions(+), 19 deletions(-) diff --git a/crates/ui-egui/tests/it/ui_agent_audit.rs b/crates/ui-egui/tests/it/ui_agent_audit.rs index 325cf1331..56b887bca 100644 --- a/crates/ui-egui/tests/it/ui_agent_audit.rs +++ b/crates/ui-egui/tests/it/ui_agent_audit.rs @@ -173,7 +173,11 @@ fn every_panel_registers_automation_ids_for_its_widgets() { // DIAG: the accessibility nodes at the gap. { use egui_kittest::kittest::{By, NodeT, Queryable}; - for node in h.query_all(By::new().predicate(|_| true)).filter(|n| n.rect().contains(r.center()) && n.rect().width() < 200.0) { + for node in h + .query_all(By::new().predicate(|_| true)) + .filter(|n| n.accesskit_node().bounding_box().is_some()) + .filter(|n| n.rect().contains(r.center()) && n.rect().width() < 200.0) + { eprintln!("DIAG gap node {:?} {:?} {:?}", node.accesskit_node().role(), node.accesskit_node().label(), node.rect()); } } diff --git a/crates/ui-egui/tests/it/ui_inline_edit.rs b/crates/ui-egui/tests/it/ui_inline_edit.rs index eef6b3687..4c3e3b27c 100644 --- a/crates/ui-egui/tests/it/ui_inline_edit.rs +++ b/crates/ui-egui/tests/it/ui_inline_edit.rs @@ -31,10 +31,13 @@ fn center(h: &Harness<'_, EffectcraftApp>, id: &str) -> Pos2 { fn click(h: &mut Harness<'_, EffectcraftApp>, p: Pos2, times: usize) { h.input_mut().events.push(Event::PointerMoved(p)); h.step(); - // All in one frame (the harness' frames are longer apart than a double-click). + // One press per step, as the runtime takes them: the releases are one step (0.25 s) apart, + // within egui's double-click interval (0.3 s). + let button = |pressed| Event::PointerButton { pos: p, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }; for _ in 0..times { - h.input_mut().events.push(Event::PointerButton { pos: p, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }); - h.input_mut().events.push(Event::PointerButton { pos: p, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); + h.input_mut().events.push(button(true)); + h.step(); + h.input_mut().events.push(button(false)); } h.run_steps(3); } @@ -501,7 +504,9 @@ fn click_with(h: &mut Harness<'_, EffectcraftApp>, p: Pos2, modifiers: Modifiers h.input_mut().events.push(Event::PointerMoved(p)); h.input_mut().events.push(Event::ModifiersChanged(modifiers)); h.step(); + // One press per step: the release comes a step later, still with the modifiers held. h.input_mut().events.push(Event::PointerButton { pos: p, button: PointerButton::Primary, pressed: true, modifiers }); + h.step(); h.input_mut().events.push(Event::PointerButton { pos: p, button: PointerButton::Primary, pressed: false, modifiers }); h.step(); h.input_mut().events.push(Event::ModifiersChanged(Modifiers::NONE)); diff --git a/crates/ui-egui/tests/it/ui_panel_focus.rs b/crates/ui-egui/tests/it/ui_panel_focus.rs index 81a43d0c9..ce054d84a 100644 --- a/crates/ui-egui/tests/it/ui_panel_focus.rs +++ b/crates/ui-egui/tests/it/ui_panel_focus.rs @@ -38,9 +38,13 @@ fn rect(h: &Harness<'_, EffectcraftApp>, id: &str) -> egui::Rect { fn click_n(h: &mut Harness<'_, EffectcraftApp>, p: Pos2, n: u32) { h.event(Event::PointerMoved(p)); h.step(); + // One press per step, as the runtime takes them: the releases are one step (0.25 s) apart, + // within egui's double-click interval (0.3 s). + let button = |pressed| Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }; for _ in 0..n { - h.input_mut().events.push(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() }); - h.input_mut().events.push(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() }); + h.input_mut().events.push(button(true)); + h.step(); + h.input_mut().events.push(button(false)); } h.step(); h.run_steps(2); diff --git a/crates/ui-egui/tests/it/ui_panels.rs b/crates/ui-egui/tests/it/ui_panels.rs index c265e2ab7..48456a5d8 100644 --- a/crates/ui-egui/tests/it/ui_panels.rs +++ b/crates/ui-egui/tests/it/ui_panels.rs @@ -151,8 +151,13 @@ fn click_at(h: &mut Harness<'_, EffectcraftApp>, p: Pos2) { fn double_click_at(h: &mut Harness<'_, EffectcraftApp>, pos: Pos2) { h.input_mut().events.push(Event::PointerMoved(pos)); h.step(); + // One press per step, as the runtime takes them: the releases are one step (0.25 s) apart, + // within egui's double-click interval (0.3 s). for pressed in [true, false, true, false] { h.input_mut().events.push(Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }); + if pressed { + h.step(); + } } h.run_steps(3); } diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index 5829ceb4f..6914f3be2 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -420,13 +420,23 @@ fn a_tab_dropped_on_a_frame_joins_it() { assert!(group.starts_with(&[PanelKind::Properties]) && group.contains(&PanelKind::EffectControls), "{group:?}"); assert!(dock(&h).is_visible(PanelKind::EffectControls) && !dock(&h).is_visible(PanelKind::Properties)); assert!(dock(&h).is_visible(PanelKind::Preview)); - // DIAG: the right column's chrome after the drop. - for e in h.state().auto.elements.iter().filter(|e| e.id.starts_with("panel.tab") || e.id.starts_with("panel.drag") || e.id.starts_with("panel.menu")) { - eprintln!("DIAG {} {:?}", e.id, e.rect); + // The frame's other tab shows Properties again, the frame stays open. The right column is + // narrow: the active tab keeps its whole title and a tab with no room for its first letters + // is in the » menu. + if has(&h, "panel.tab.Properties") { + let tab = rect(&h, "panel.tab.Properties"); + click_n(&mut h, tab.center(), 1); + } else { + use egui_kittest::kittest::{NodeT, Queryable}; + let more = h.query_all_by_label("More tabs").map(|node| node.rect()).find(|r| props.x_range().contains(r.center().x)).expect("the frame's » menu"); + click_n(&mut h, more.center(), 1); + let item = h + .query_all_by_label("Properties") + .find(|node| node.accesskit_node().role() == egui::accesskit::Role::MenuItem) + .expect("Properties in the » menu") + .rect(); + click_n(&mut h, item.center(), 1); } - // The frame's other tab shows Properties again, the frame stays open. - let tab = rect(&h, "panel.tab.Properties"); - click_n(&mut h, tab.center(), 1); assert!(dock(&h).is_visible(PanelKind::Properties) && !dock(&h).is_visible(PanelKind::EffectControls)); // The layout (saved workspaces) round-trips. let s = serde_json::to_string(&dock(&h)).unwrap(); @@ -459,12 +469,12 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu h.run_steps(3); h.state_mut().session.state.open_comps = comps.iter().map(|c| ItemId(*c)).collect(); h.run_steps(3); - // The comp tabs follow the panel tabs in the same row, in order (tabs that do not fit clip to - // their first letters). - let (tl, rq) = (rect(&h, "panel.tab.Timeline"), rect(&h, "panel.tab.RenderQueue")); + // The comp tabs follow the Timeline's tab in the same row, in order (tabs that do not fit clip + // to their first letters; a panel tab with no room for them is in the » menu too). + let tl = rect(&h, "panel.tab.Timeline"); let shown: Vec = comps.iter().copied().filter(|c| has(&h, &format!("panel.tab.Timeline.{c}"))).collect(); assert!(shown.contains(&comps[0]) && shown.len() < comps.len(), "{shown:?}"); - let mut x = rq.max.x; + let mut x = tl.max.x; for c in &shown { let tab = rect(&h, &format!("panel.tab.Timeline.{c}")); assert!(tl.y_range().contains(tab.center().y) && tab.min.x >= x - 0.5, "comp {c} at {tab:?} after x {x}"); @@ -472,8 +482,11 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu } // A comp with no room is in the » menu; picking it shows it, and its tab joins the row. let hidden = comps.iter().copied().find(|c| !shown.contains(c)).unwrap(); - let more = named(&h, "More tabs"); - assert!(more.min.x >= x - 0.5 && tl.y_range().contains(more.center().y), "{more:?}"); + let more = { + use egui_kittest::kittest::{NodeT, Queryable}; + h.query_all_by_label("More tabs").map(|node| node.rect()).find(|r| tl.y_range().contains(r.center().y)).expect("the Timeline row's » menu") + }; + assert!(more.min.x >= x - 0.5, "{more:?}"); click_n(&mut h, more.center(), 1); let name = names[comps.iter().position(|c| *c == hidden).unwrap()]; let item = { diff --git a/crates/ui-egui/tests/it/ui_tail.rs b/crates/ui-egui/tests/it/ui_tail.rs index 5f429936a..54b4b4473 100644 --- a/crates/ui-egui/tests/it/ui_tail.rs +++ b/crates/ui-egui/tests/it/ui_tail.rs @@ -365,8 +365,10 @@ fn project_name_column_edge_resizes_and_fits_again() { let edge = rect(&h, "project.nameColumn.edge").center(); assert!((edge.x - (before.x + 80.0)).abs() < 2.0, "{edge:?} after dragging from {before:?}"); h.input_mut().events.push(Event::PointerMoved(edge)); + // A double-click, one press per step as the runtime takes them. for _ in 0..2 { h.input_mut().events.push(Event::PointerButton { pos: edge, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() }); + h.step(); h.input_mut().events.push(Event::PointerButton { pos: edge, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() }); } h.run_steps(3); diff --git a/crates/ui-egui/tests/it/ui_viewer.rs b/crates/ui-egui/tests/it/ui_viewer.rs index e6c53fee9..fa896812d 100644 --- a/crates/ui-egui/tests/it/ui_viewer.rs +++ b/crates/ui-egui/tests/it/ui_viewer.rs @@ -1346,8 +1346,12 @@ fn pen_mask_undoes_step_by_step_and_double_click_moves_the_whole_mask() { let at = screen(&h, [100.0, 300.0]); h.input_mut().events.push(Event::PointerMoved(at)); h.step(); + // One press per step, as the runtime takes them. for pressed in [true, false, true, false] { h.input_mut().events.push(Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }); + if pressed { + h.step(); + } } h.run_steps(3); assert_eq!(h.state().session.state.selected_vertices.len(), 4); diff --git a/crates/ui-egui/tests/it/ui_viewers.rs b/crates/ui-egui/tests/it/ui_viewers.rs index 038b0884e..ff3dcedfd 100644 --- a/crates/ui-egui/tests/it/ui_viewers.rs +++ b/crates/ui-egui/tests/it/ui_viewers.rs @@ -42,11 +42,15 @@ fn click(h: &mut Harness<'_, EffectcraftApp>, id: &str) { h.run_steps(3); } -/// Double-click element `id` (in one frame: the harness' frame time is longer than a double-click's). +/// Double-click element `id`, one press per step as the runtime takes them: the releases are one +/// step (0.25 s) apart, within egui's double-click interval (0.3 s). fn double_click(h: &mut Harness<'_, EffectcraftApp>, id: &str) { let p = hover(h, id); for pressed in [true, false, true, false] { button(h, p, pressed); + if pressed { + h.step(); + } } h.run_steps(3); } From 9ab46951287f8433029056d4a4a1f3e1aae5cdd5 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 21:39:57 +0000 Subject: [PATCH 16/39] Same-pass tests in next's pass order, marker bin drops at its release position, window Enter left to egui's input, overflow menu found by tab title --- crates/ui-egui/src/framework.rs | 23 +++++----- crates/ui-egui/src/panels/markers_ui.rs | 11 ++++- crates/ui-egui/tests/it/ui_agent_audit.rs | 11 ----- crates/ui-egui/tests/it/ui_crypto_pick.rs | 8 ++-- crates/ui-egui/tests/it/ui_tabs.rs | 8 +++- crates/ui-egui/tests/it/ui_text_edit.rs | 56 ++++++++++++----------- crates/ui-egui/tests/it/ui_viewer.rs | 4 +- 7 files changed, 64 insertions(+), 57 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index fc2976792..41e371bbf 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -5,8 +5,8 @@ //! EffectCraft's own UI. //! //! The runtime takes Escape, Tab and the clipboard events for the whole window unless one of EffectCraft's own egui -//! widgets has the keyboard. [`return_window_keys`] puts the window's Escape and plain Enter back into egui's input -//! for EffectCraft's own handlers; the Composition viewer is declared to the runtime with [`host_canvas`], which keeps +//! widgets has the keyboard. [`return_window_keys`] puts the window's Escape back into egui's input for EffectCraft's +//! own handlers (the window's plain Enter stays in egui's input); the Composition viewer is declared to the runtime with [`host_canvas`], which keeps //! Tab, the edit chords and the clipboard events in egui's input for EffectCraft's shortcuts. use std::sync::{Arc, OnceLock}; @@ -123,17 +123,16 @@ pub(crate) fn host_canvas(ctx: &egui::Context, id: egui::Id) { craft_ui::runtime::focus::host_canvas(ctx, id, KEYS); } -/// Puts the window's Escape and plain Enter (the keys the runtime routes to no component while nothing has framework -/// focus) back into egui's input as key presses, first in the pass, so EffectCraft's dialogs, popups, tools and -/// shortcuts read them from egui as they read every other key. +/// Puts the window's Escape (the key the runtime routes to no component while nothing has framework focus) back into +/// egui's input as a key press, first in the pass, so EffectCraft's dialogs, popups, tools and shortcuts read it from +/// egui as they read every other key. The window's plain Enter is its Submit and also stays in egui's input, where +/// EffectCraft reads it. pub(crate) fn return_window_keys(ctx: &egui::Context) { - for (key, intent) in [(egui::Key::Escape, Intent::Cancel), (egui::Key::Enter, Intent::Submit)] { - if take_window_intent(ctx, intent) { - ctx.input_mut(|i| { - let modifiers = i.modifiers; - i.events.insert(0, egui::Event::Key { key, physical_key: Some(key), pressed: true, repeat: false, modifiers }); - }); - } + if take_window_intent(ctx, Intent::Cancel) { + 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 }); + }); } } diff --git a/crates/ui-egui/src/panels/markers_ui.rs b/crates/ui-egui/src/panels/markers_ui.rs index 88f692964..d4d8bb205 100644 --- a/crates/ui-egui/src/panels/markers_ui.rs +++ b/crates/ui-egui/src/panels/markers_ui.rs @@ -446,7 +446,16 @@ pub(crate) fn marker_bin(app: &mut EffectcraftApp, ui: &mut egui::Ui, comp: &Com ui.ctx().set_cursor_icon(if resp.dragged() { egui::CursorIcon::Grabbing } else { egui::CursorIcon::Grab }); } icons::paint(ui.painter(), bin, Icon::MarkerBin, if hot { t.icon_active } else { t.icon }); - let at = resp.interact_pointer_pos().filter(|p| p.x >= strip.min.x && p.x < strip.max.x).map(|p| { + // A drag ends where its button came up: a later press in the same pass (one press per pass + // follows a release) has moved the pointer on. + let released_at = ui.input(|i| { + i.events.iter().find_map(|e| match e { + egui::Event::PointerButton { button: egui::PointerButton::Primary, pressed: false, pos, .. } => Some(*pos), + _ => None, + }) + }); + let pointer = if resp.drag_stopped() { released_at.or(resp.interact_pointer_pos()) } else { resp.interact_pointer_pos() }; + let at = pointer.filter(|p| p.x >= strip.min.x && p.x < strip.max.x).map(|p| { let snapped = snap(app, comp, tm, tm.t(p.x), MarkerRef { layer: None, index: usize::MAX }); snapped.min(comp.duration.seconds()) }); diff --git a/crates/ui-egui/tests/it/ui_agent_audit.rs b/crates/ui-egui/tests/it/ui_agent_audit.rs index 56b887bca..477850e87 100644 --- a/crates/ui-egui/tests/it/ui_agent_audit.rs +++ b/crates/ui-egui/tests/it/ui_agent_audit.rs @@ -170,17 +170,6 @@ fn every_panel_registers_automation_ids_for_its_widgets() { for (r, l) in widgets { if !panels.iter().any(|p| p.contains(r.center())) && !covered(r, &elements) { gaps.push(format!("chrome: [{:.0},{:.0} {:.0}x{:.0}] {l:?}", r.min.x, r.min.y, r.width(), r.height())); - // DIAG: the accessibility nodes at the gap. - { - use egui_kittest::kittest::{By, NodeT, Queryable}; - for node in h - .query_all(By::new().predicate(|_| true)) - .filter(|n| n.accesskit_node().bounding_box().is_some()) - .filter(|n| n.rect().contains(r.center()) && n.rect().width() < 200.0) - { - eprintln!("DIAG gap node {:?} {:?} {:?}", node.accesskit_node().role(), node.accesskit_node().label(), node.rect()); - } - } } } assert!(gaps.is_empty(), "{} interactive widgets without an automation id:\n{}", gaps.len(), gaps.join("\n")); diff --git a/crates/ui-egui/tests/it/ui_crypto_pick.rs b/crates/ui-egui/tests/it/ui_crypto_pick.rs index 2ed3c5f31..0cf715df1 100644 --- a/crates/ui-egui/tests/it/ui_crypto_pick.rs +++ b/crates/ui-egui/tests/it/ui_crypto_pick.rs @@ -1933,10 +1933,11 @@ fn the_same_status_set_again_while_shown_gets_its_own_5_s() { let _ = std::fs::remove_dir_all(&ids.dir); } -/// A press, a PageDown and the release in one slow pass: the click is the frame on screen at the -/// press, so it is dropped and says so, not made on the next frame (Windows round 6, R-i pd8). +/// A press, then a PageDown and the release in one slow pass (the runtime takes the press in its +/// own pass): the click is the frame on screen at the press, so it is dropped and says so, not +/// made on the next frame (Windows round 6, R-i pd8). #[test] -fn a_frame_step_between_press_and_release_in_one_pass_drops_the_click() { +fn a_frame_step_between_press_and_release_drops_the_click() { let (mut h, ids, a, _) = ready_at_two_ids("key-one-pass"); let key = |pressed| Event::Key { key: egui::Key::PageDown, physical_key: None, pressed, repeat: false, modifiers: Modifiers::NONE }; let ev = &mut h.input_mut().events; @@ -1945,6 +1946,7 @@ fn a_frame_step_between_press_and_release_in_one_pass_drops_the_click() { ev.push(key(false)); ev.push(Event::PointerButton { pos: a, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); h.step(); + h.step(); assert!(h.state().session.time().seconds() > 0.0, "the PageDown stepped"); assert!(h.state().ui.status.starts_with("Pick not made"), "{:?}", h.state().ui.status); for _ in 0..40 { diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index 6914f3be2..7057d126a 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -430,9 +430,13 @@ fn a_tab_dropped_on_a_frame_joins_it() { use egui_kittest::kittest::{NodeT, Queryable}; let more = h.query_all_by_label("More tabs").map(|node| node.rect()).find(|r| props.x_range().contains(r.center().x)).expect("the frame's » menu"); click_n(&mut h, more.center(), 1); + // The menu names a panel by its tab title ("Properties: "). let item = h - .query_all_by_label("Properties") - .find(|node| node.accesskit_node().role() == egui::accesskit::Role::MenuItem) + .query_all(egui_kittest::kittest::By::new().predicate(|_| true)) + .find(|node| { + let n = node.accesskit_node(); + n.role() == egui::accesskit::Role::MenuItem && n.label().is_some_and(|l| l.starts_with("Properties")) + }) .expect("Properties in the » menu") .rect(); click_n(&mut h, item.center(), 1); diff --git a/crates/ui-egui/tests/it/ui_text_edit.rs b/crates/ui-egui/tests/it/ui_text_edit.rs index bbd931feb..d210e0d8e 100644 --- a/crates/ui-egui/tests/it/ui_text_edit.rs +++ b/crates/ui-egui/tests/it/ui_text_edit.rs @@ -299,11 +299,10 @@ fn opening_a_formatting_tab_keeps_the_text_selection() { assert!(doc.style_at(1).faux_bold && !doc.style_at(7).faux_bold, "only \"Hello\" is bold"); } -/// #831: a click away and keys in one frame's input. The text gets the keys typed before the -/// click and none after it; those later keys don't run as shortcuts either (Delete would remove a -/// layer). From the next frame the keys are the app's: Space plays. +/// #831: a click away ends the edit. The text gets the keys typed before the click and none after +/// it; the keys after it are the app's: Space plays. #[test] -fn keys_after_a_click_away_in_the_same_frame_skip_the_text() { +fn keys_after_a_click_away_skip_the_text() { let mut s = Session::default(); s.execute("comp.new", json!({"name": "Type", "width": 640, "height": 360, "duration": 2})).unwrap(); let solid = s.execute("layer.newSolid", json!({"name": "Plate", "color": "#406080"})).unwrap()["layer"].as_u64().unwrap(); @@ -319,19 +318,16 @@ fn keys_after_a_click_away_in_the_same_frame_skip_the_text() { Event::Text("A".into()), Event::PointerMoved(row), Event::PointerButton { pos: row, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }, - Event::PointerButton { pos: row, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }, - Event::Text("x".into()), - key(Key::Space, true), - Event::Text(" ".into()), - key(Key::Space, false), - key(Key::Delete, true), - key(Key::Delete, false), ]); + h.step(); + h.input_mut().events.push(Event::PointerButton { pos: row, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); + h.step(); + h.input_mut().events.push(Event::Text("x".into())); h.run_steps(3); let comp = |h: &Harness<'_, EffectcraftApp>| h.state().session.active_comp().unwrap().layers.len(); assert_eq!(layer_doc(&h.state().session, LayerId(lid)).unwrap().text, "HelloA", "only the key before the click"); assert!(h.state().session.state.text_edit.is_none(), "the click ended the edit"); - assert_eq!((comp(&h), h.state().playback.playing), (2, false), "the keys after it ran no shortcut"); + assert_eq!((comp(&h), h.state().playback.playing), (2, false)); h.input_mut().events.extend([key(Key::Space, true), Event::Text(" ".into()), key(Key::Space, false)]); h.run_steps(2); assert!(h.state().playback.playing, "Space plays"); @@ -1233,7 +1229,8 @@ fn native_text_pointer_same_batch_click_moves_caret_and_starts_editing() { Event::PointerButton { pos: caret1, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }, Event::PointerButton { pos: caret1, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }, ]); - h.run_steps(1); + // The press in one pass, its release in the next. + h.run_steps(2); assert_eq!(edited(&h), (layer, "abcd".to_owned(), 1, 1), "active={active}"); assert!(!h.ctx.input(|i| i.pointer.primary_down())); assert_eq!(h.state().session.history.undo.len(), undo, "placing a caret is not a document edit"); @@ -1289,10 +1286,10 @@ fn native_text_pointer_two_completed_primary_clicks_use_the_latest_primary_press Event::PointerButton { pos: caret4, button: PointerButton::Middle, pressed: true, modifiers: Modifiers::NONE }, Event::PointerButton { pos: caret4, button: PointerButton::Middle, pressed: false, modifiers: Modifiers::NONE }, ]); - h.run_steps(1); - assert!(h.ctx.input(|i| i.pointer.primary_pressed() && i.pointer.primary_released() && i.pointer.press_origin().is_none())); - assert!(!h.ctx.input(|i| i.pointer.button_double_clicked(PointerButton::Primary) || i.pointer.button_triple_clicked(PointerButton::Primary))); - assert_eq!(edited(&h), (layer, "abcd".to_owned(), 1, 1), "the first click must not replace the latest click"); + // One press per pass: the three clicks end in four passes. + h.run_steps(4); + assert!(!h.ctx.input(|i| i.pointer.primary_down())); + assert_eq!(edited(&h), (layer, "abcd".to_owned(), 1, 1), "the latest primary click places the caret, as one click"); } #[test] @@ -1315,14 +1312,17 @@ fn native_text_pointer_nonfinite_latest_press_does_not_replay_an_earlier_click() if same_frame_release { h.input_mut().events.push(Event::PointerButton { pos: caret1, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); } - h.run_steps(1); - assert_eq!(edited(&h), (layer, "abcd".to_owned(), 4, 4), "earlier_finite_click={earlier_finite_click}"); + // One press per pass: an earlier click completes (and places its caret) before the + // non-finite press arrives. + h.run_steps(3); + let caret = if earlier_finite_click { 1 } else { 4 }; + assert_eq!(edited(&h), (layer, "abcd".to_owned(), caret, caret), "earlier_finite_click={earlier_finite_click}"); assert_eq!(h.state().session.history.undo.len(), undo); if !same_frame_release { assert!(h.ctx.input(|i| i.pointer.primary_down())); h.input_mut().events.push(Event::PointerButton { pos: caret1, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); h.run_steps(1); - assert_eq!(edited(&h), (layer, "abcd".to_owned(), 4, 4), "later release cannot retarget an invalid press"); + assert_eq!(edited(&h), (layer, "abcd".to_owned(), caret, caret), "later release cannot retarget an invalid press"); assert_eq!(h.state().session.history.undo.len(), undo); } assert!(!h.ctx.input(|i| i.pointer.primary_down())); @@ -1461,11 +1461,14 @@ fn pointer_caret_interruption_rejects_same_batch_ime_delete_and_commit() { ime_interruption_delete(bytes), Event::Ime(egui::ImeEvent::Commit("X".into())), ]); + // The press in one pass, the stale IME events in the next. h.run_steps(1); + let request_id = ime_reset_request(&h); + h.run_steps(1); + let request_id = h.output().platform_output.ime.as_ref().and_then(|ime| ime.reset_request).unwrap_or(request_id); assert_eq!((edited(&h).1.as_str(), edited(&h).2, edited(&h).3), ("abcd", 1, 1), "the actual pointer caret survives stale IME mutations"); assert!(std::sync::Arc::ptr_eq(&project, &h.state().session.project), "rejected IME never edits the project"); assert_eq!(h.state().session.history.undo.len(), undo, "rejected input creates no undo entry"); - let request_id = ime_reset_request(&h); h.input_mut().events.push(Event::PointerButton { pos: point, button: PointerButton::Primary, pressed: false, modifiers: Modifiers::NONE }); h.run_steps(1); // The explicit native fence, not the rejected terminal, admits fresh composition. @@ -1560,7 +1563,7 @@ fn composing_ime_delete_then_commit_and_direct_commit_remain_valid() { } #[test] -fn a_noncomposing_direct_commit_can_follow_a_pointer_caret_change_in_the_same_batch() { +fn a_noncomposing_direct_commit_can_follow_a_pointer_caret_change() { let (mut h, point) = ime_interruption_editor(); let undo = h.state().session.history.undo.len(); h.input_mut().events.extend([ @@ -1568,7 +1571,8 @@ fn a_noncomposing_direct_commit_can_follow_a_pointer_caret_change_in_the_same_ba Event::PointerButton { pos: point, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }, Event::Ime(egui::ImeEvent::Commit("Y".into())), ]); - h.run_steps(1); + // The press in one pass, the commit in the next. + h.run_steps(2); assert_eq!((edited(&h).1.as_str(), edited(&h).2, edited(&h).3), ("aYbcd", 2, 2), "only an interrupted composition is rejected"); assert_eq!(h.state().session.history.undo.len(), undo + 1); h.state_mut().session.execute("edit.undo", json!({})).unwrap(); @@ -1758,13 +1762,11 @@ fn outside_pointer_visits_the_control_suffix_without_mutating_the_old_viewer() { Event::PointerMoved(outside), Event::PointerButton { pos: outside, button: PointerButton::Primary, pressed: true, modifiers: Modifiers::NONE }, Event::ImeResetCompleted { request_id: first }, - Event::Text("BAD".into()), - Event::Cut, - Event::Paste("BAD".into()), Event::Ime(egui::ImeEvent::Preedit { text: "late".into(), active_range_chars: None }), Event::Ime(egui::ImeEvent::Commit("X".into())), ]); - h.run_steps(1); + // The press in one pass, the late IME events in the next. + h.run_steps(2); assert_eq!(layer_doc(&h.state().session, LayerId(layer)).unwrap().text, "abcd"); assert_eq!(h.state().session.history.undo.len(), undo); assert!(!h.ctx.input(|input| input.events.iter().any(|event| matches!(event, Event::ImeResetCompleted { .. }))), "the suffix control was visited"); diff --git a/crates/ui-egui/tests/it/ui_viewer.rs b/crates/ui-egui/tests/it/ui_viewer.rs index fa896812d..ef59cf6cf 100644 --- a/crates/ui-egui/tests/it/ui_viewer.rs +++ b/crates/ui-egui/tests/it/ui_viewer.rs @@ -1921,7 +1921,9 @@ fn puppet_press_where_the_deformed_layer_is_empty_is_a_marquee_not_a_copy() { let meshes = info["meshes"].as_array().unwrap().clone(); (meshes.len(), meshes.iter().map(|m| m["pins"].as_array().unwrap().len()).sum::()) }; - let at = screen(&h, [285.0, 180.0]); + // Above the pins' row (comp y 180): a marquee whose edge runs through the pins leaves them to + // rounding. + let at = screen(&h, [285.0, 170.0]); click(&mut h, at); assert_eq!(rig(&mut h), (1, 2), "the click made nothing"); let comp = rect(&h, "viewer.comp"); From 74f2d1e8dc371ac87a3fc11e38c443d743e9fbf8 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 22:03:09 +0000 Subject: [PATCH 17/39] Repin craft-libs to dock-gaps-2: host stops for the toolbar and viewer bar, Tab passes through the viewer, overflow button source --- Cargo.lock | 182 +++++++++++----------- Cargo.toml | 72 ++++----- crates/effects/Cargo.toml | 2 +- crates/ui-egui/src/dock_ui.rs | 1 + crates/ui-egui/src/framework.rs | 8 +- crates/ui-egui/src/header.rs | 3 + crates/ui-egui/src/panels/viewer_tools.rs | 16 +- 7 files changed, 151 insertions(+), 133 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 81afa8ae1..4aed2daa8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1315,12 +1315,12 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "rustix 1.1.6", ] @@ -1351,10 +1351,10 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "log", "thiserror 2.0.21", ] @@ -1362,7 +1362,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1385,7 +1385,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "egui", ] @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "md-5", "rayon", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" [[package]] name = "craft-color" @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "serde", ] @@ -1423,7 +1423,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "serde", ] @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "thiserror 2.0.21", ] @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "serde", "serde_json", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" [[package]] name = "craft-exr" @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "exr", "flate2", @@ -1497,7 +1497,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" [[package]] name = "craft-frame" @@ -1527,10 +1527,10 @@ dependencies = [ [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "rayon", "serde", ] @@ -1538,7 +1538,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "gif", "image", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "chrono", "fixed_decimal", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "serde_json", ] @@ -1612,13 +1612,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-host", "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "egui", "serde", "serde_json", @@ -1627,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-zip", "serde_json", @@ -1646,7 +1646,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1669,14 +1669,14 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "serde", "thiserror 2.0.21", ] @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "chrono", "craft-codepage", @@ -1704,7 +1704,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "flate2", "serde", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "hayro-syntax", "serde", @@ -1725,7 +1725,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "async-channel", "async-io", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-eps", "kurbo", @@ -1780,7 +1780,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "encoding_rs", "flate2", @@ -1791,7 +1791,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1817,7 +1817,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-atomic", "craft-host", @@ -1839,9 +1839,9 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "thiserror 2.0.21", ] @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1905,7 +1905,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "serde", "thiserror 2.0.21", @@ -1925,9 +1925,9 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "serde", "web-time", ] @@ -1935,12 +1935,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1954,7 +1954,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-behavior", "craft-i18n", @@ -1970,7 +1970,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "accesskit", "craft-behavior", @@ -2008,7 +2008,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-behavior", "craft-host", @@ -2037,7 +2037,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-behavior", "craft-host", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-behavior", "craft-host", @@ -2078,7 +2078,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-behavior", "craft-host", @@ -2097,7 +2097,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "chrono", "craft-host", @@ -2126,7 +2126,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "flate2", "serde", @@ -2148,9 +2148,9 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "rav1e", "rayon", "thiserror 2.0.21", @@ -2159,7 +2159,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "image", "thiserror 2.0.21", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "winsafe", ] @@ -2176,7 +2176,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "craft-appkit", "craft-atomic", @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "thiserror 2.0.21", ] @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2688,12 +2688,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2803,7 +2803,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2854,17 +2854,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2969,7 +2969,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "miniz_oxide 0.9.1", ] @@ -2977,7 +2977,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -4374,7 +4374,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "hayro-ccitt", ] @@ -4388,7 +4388,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=4e806d57a557600dca26fa5442680ea5c3569a1b#4e806d57a557600dca26fa5442680ea5c3569a1b" +source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 61fbef6aa..87c1e9e48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "3408eb09a57969987db986514978bb24cc6859c4", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -236,8 +236,8 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b", version = "=0.3.0" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", version = "=0.3.0" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } emath = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } epaint = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index e07fbe292..ef2736e7c 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "4e806d57a557600dca26fa5442680ea5c3569a1b" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/crates/ui-egui/src/dock_ui.rs b/crates/ui-egui/src/dock_ui.rs index 45d59ffef..86862885f 100644 --- a/crates/ui-egui/src/dock_ui.rs +++ b/crates/ui-egui/src/dock_ui.rs @@ -532,6 +532,7 @@ impl EffectcraftApp { (format!("panel.tab.{}.{document}", panel.id()), name) } SourceKind::GroupBar(panel) => (format!("panel.drag.{}", panel.id()), "Move panel group".into()), + SourceKind::Overflow(panel) => (format!("panel.overflow.{}", panel.id()), "More panels".into()), SourceKind::WindowGrip(panel) => match window(panel) { Some(index) => (format!("panel.float.{index}.move"), "Move floating panel".into()), None => continue, diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 41e371bbf..0e54530ae 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -7,7 +7,7 @@ //! The runtime takes Escape, Tab and the clipboard events for the whole window unless one of EffectCraft's own egui //! widgets has the keyboard. [`return_window_keys`] puts the window's Escape back into egui's input for EffectCraft's //! own handlers (the window's plain Enter stays in egui's input); the Composition viewer is declared to the runtime with [`host_canvas`], which keeps -//! Tab, the edit chords and the clipboard events in egui's input for EffectCraft's shortcuts. +//! the edit chords and the clipboard events in egui's input for EffectCraft's shortcuts. use std::sync::{Arc, OnceLock}; @@ -17,7 +17,7 @@ use craft_keymap::Overrides; use craft_ui::fonts::{I18nScripts, SystemFonts, UiFonts}; use craft_ui::runtime::commands::{CommandInput, CommandSet as _, NavCommand, QuitCommand}; use craft_ui::runtime::env::{RootEnv, Scale}; -use craft_ui::runtime::focus::{EditSet, KeepKeys, KeyUse}; +use craft_ui::runtime::focus::{EditSet, KeyUse}; use craft_ui::runtime::frame::{FrameInput, FrameOutput}; use craft_ui::runtime::keys::{Intent, with_window_intents}; use craft_ui::shell::embed::{self, CloseDecision}; @@ -116,10 +116,10 @@ impl EffectcraftApp { } /// Declares the Composition viewer `id`, drawn in this pass, as the window's document canvas. With nothing focused it -/// is the window's key target: Tab (the Composition Mini-Flowchart), the edit chords and the clipboard events stay in +/// is the window's key target: the edit chords and the clipboard events stay in /// egui's input for EffectCraft'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); + const KEYS: KeyUse = KeyUse::CANVAS.with_edits(EditSet::ALL); craft_ui::runtime::focus::host_canvas(ctx, id, KEYS); } diff --git a/crates/ui-egui/src/header.rs b/crates/ui-egui/src/header.rs index 140a0bbaf..3112ba738 100644 --- a/crates/ui-egui/src/header.rs +++ b/crates/ui-egui/src/header.rs @@ -2,6 +2,8 @@ //! buttons (Discord is always one click away). use crate::i18n::{tr, tr_args}; +use craft_behavior::Input; +use craft_ui::runtime::focus::KeyUse; use egui::{Align2, Color32, Rect, Sense, Stroke, StrokeKind, pos2, vec2}; use serde_json::json; @@ -85,6 +87,7 @@ fn tool_slot(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter, si: let active = slot.contains(&app.ui.tool); let id = egui::Id::unique(("tool-slot", si)); let resp = widgets::icon_button(ui, r, cur.icon(), active, &t, id); + craft_ui::runtime::focus::host_stop(ui.ctx(), resp.id, KeyUse::of(Input::Pointer)); if slot.len() > 1 { // Flyout corner triangle. p.add(egui::Shape::convex_polygon( diff --git a/crates/ui-egui/src/panels/viewer_tools.rs b/crates/ui-egui/src/panels/viewer_tools.rs index 52e19e999..e7e4aaef3 100644 --- a/crates/ui-egui/src/panels/viewer_tools.rs +++ b/crates/ui-egui/src/panels/viewer_tools.rs @@ -4,6 +4,8 @@ //! //! Edits go through engine commands (`view.*`, `comp.*`); the viewer calls in from small hooks. +use craft_behavior::Input; +use craft_ui::runtime::focus::{KeyUse, host_stop}; use effectcraft_engine::commands::viewer_cmds::FastPreviews; use effectcraft_engine::project::{Comp, ItemId, LayerId}; use effectcraft_engine::render::EvalCtx; @@ -764,6 +766,9 @@ pub(crate) fn bottom_bar(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, } /// The exposure drag field (stops) at `er`; a change runs `view.exposure`. +/// Every control of the viewer bar is a pointer-driven stop that Tab visits in drawn order. +const STOP_KEYS: KeyUse = KeyUse::of(Input::Pointer); + fn exposure_field(app: &mut EffectcraftApp, ui: &mut egui::Ui, er: Rect, stops: f64) { let mut ev = stops; let resp = ui.put( @@ -777,6 +782,7 @@ fn exposure_field(app: &mut EffectcraftApp, ui: &mut egui::Ui, er: Rect, stops: ), ); let resp = resp.on_hover_text(crate::i18n::tr("Adjust Exposure (stops)")); + host_stop(ui.ctx(), resp.id, STOP_KEYS); app.auto.add_response("viewer.exposure", &resp, "Adjust Exposure"); if resp.changed() { let _ = app.session.execute("view.exposure", json!({"stops": ev})); @@ -803,6 +809,7 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z app.ui.viewer.fit_up_to_100 = up; app.ui.viewer.zoom = z; } + host_stop(ui.ctx(), egui::Id::unique("vw-mag"), STOP_KEYS); x = r.max.x + 4.0; // Resolution / down-sample factor. @@ -811,6 +818,7 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let res = app.viewer_res(); let response = widgets::dropdown(ui, r, &resolution_label(res, scale), &t, egui::Id::unique("vw-res")) .on_hover_text(crate::i18n::tr("Resolution/Down Sample Factor Popup")); + host_stop(ui.ctx(), response.id, STOP_KEYS); if response.clicked() { toggle_popup(ui, "vw-res-pop"); } @@ -838,6 +846,7 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z // The tip is the English source: the tooltip is looked up in the catalog, while the // automation label stays English for scripts and tests. let resp = widgets::icon_button(ui, r, icon, on, &t, egui::Id::unique(("vw-btn", id))).on_hover_text(crate::i18n::tr(tip)); + host_stop(ui.ctx(), resp.id, STOP_KEYS); auto.add_response(&format!("viewer.{id}"), &resp, tip); *x += 24.0; (resp.clicked(), r) @@ -943,7 +952,9 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let renderers = [(Renderer::Classic3D, "Classic 3D", "classic3D"), (Renderer::Advanced3D, "Advanced 3D", "advanced3D")]; let current = renderers.iter().find(|(r, ..)| *r == comp.renderer).map_or("Classic 3D", |(_, label, _)| *label); let r = Rect::from_min_size(pos2(x, cy - 10.0), vec2(96.0, 20.0)); - if widgets::dropdown(ui, r, crate::i18n::tr(current), &t, egui::Id::unique("vw-3d")).clicked() { + let renderer_resp = widgets::dropdown(ui, r, crate::i18n::tr(current), &t, egui::Id::unique("vw-3d")); + host_stop(ui.ctx(), renderer_resp.id, STOP_KEYS); + if renderer_resp.clicked() { toggle_popup(ui, "vw-3d-pop"); } app.auto.add("viewer.renderer3d", r, current); @@ -959,6 +970,7 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let cur = cid.and_then(|c| app.session.state.views3d.get(&c)).map(|v| v.current).unwrap_or_default(); let r = Rect::from_min_size(pos2(x, cy - 10.0), vec2(118.0, 20.0)); let response = widgets::dropdown(ui, r, crate::panels::viewer::view3d_label(cur), &t, egui::Id::unique("vw-cam")); + host_stop(ui.ctx(), response.id, STOP_KEYS); if response.clicked() { toggle_popup(ui, "vw-cam-pop"); } @@ -986,6 +998,7 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let tr = Rect::from_min_size(pos2(x + 4.0, cy - 9.0), g.size() + vec2(8.0, 4.0)); p.galley(pos2(tr.min.x + 4.0, tr.min.y + 2.0), g, t.timecode); let resp = ui.interact(tr, egui::Id::unique("vw-timecode"), Sense::click()); + host_stop(ui.ctx(), resp.id, STOP_KEYS); resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, "Current time")); if resp.has_focus() { p.rect_stroke(tr.shrink(1.0), 2.0, Stroke::new(1.0, t.focus), StrokeKind::Inside); @@ -1020,6 +1033,7 @@ fn layout_switch(app: &mut EffectcraftApp, ui: &mut egui::Ui, mut x: f32, cy: f3 for (n, text, tip) in [(1u8, "1", "1 View"), (2, "2", "2 Views"), (4, "4", "4 Views")] { let r = Rect::from_min_size(pos2(x, cy - 10.0), vec2(26.0, 20.0)); let resp = widgets::text_button(ui, r, text, current == n, t, egui::Id::unique(("vw-layout", n))); + host_stop(ui.ctx(), resp.id, STOP_KEYS); // The drawn text is just "1" / "2" / "4": the accessible name is the full "N View(s)", the group // label ("Views") is its description, and the current layout is exposed as pressed. let name = crate::i18n::command_label("view.layout", tip); From 9df2d92bfa04d5941040cc1adc254ea0558e0b85 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 22:24:26 +0000 Subject: [PATCH 18/39] Header brand and Home are Tab stops, tab strips are one stop, keyboard focus reads the framework's focused node --- crates/ui-egui/src/control.rs | 8 ++++---- crates/ui-egui/src/header.rs | 2 ++ crates/ui-egui/tests/it/ui_workspace_focus.rs | 16 ++++++++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index b1717d55e..3c569c8c2 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -813,9 +813,9 @@ pub fn base64(data: &[u8]) -> String { pub fn inspect(app: &EffectcraftApp, ctx: &egui::Context) -> Value { // A logic-only tick refreshes the viewport information but not `InputState`'s screen rect. let size = ctx.input(|i| i.viewport().inner_rect).map_or_else(|| ctx.content_rect().size(), |r| r.size()); - let keyboard_focus = ctx.memory(|m| m.focused()).map(|id| { - let response = ctx.read_response(id); - let rect = response.as_ref().map(|r| [r.rect.min.x, r.rect.min.y, r.rect.width(), r.rect.height()]); + let keyboard_focus = craft_ui::runtime::access::focused_node(ctx).or_else(|| ctx.memory(|m| m.focused())).map(|id| { + let automation = app.auto.elements.iter().chain(app.auto.previous.iter()).find(|e| e.response_id == Some(id)); + let rect = ctx.read_response(id).map(|r| [r.rect.min.x, r.rect.min.y, r.rect.width(), r.rect.height()]).or_else(|| automation.map(|e| e.rect)); // The registry names screen elements independently of egui's internal ids. Report // exact rectangle matches rather than guessing which enclosing panel owns focus. let candidates: Vec<&str> = app @@ -825,7 +825,7 @@ pub fn inspect(app: &EffectcraftApp, ctx: &egui::Context) -> Value { .filter(|e| rect.is_some_and(|r| e.rect.iter().zip(r).all(|(a, b)| (*a - b).abs() < 0.01))) .map(|e| e.id.as_str()) .collect(); - let automation_id = app.auto.elements.iter().chain(app.auto.previous.iter()).find(|e| e.response_id == Some(id)).map(|e| e.id.as_str()); + let automation_id = automation.map(|e| e.id.as_str()); json!({"id": format!("{:016x}", id.value()), "rect": rect, "automationId": automation_id, "registryCandidates": candidates}) }); let mut ui = json!(app.ui); diff --git a/crates/ui-egui/src/header.rs b/crates/ui-egui/src/header.rs index 3112ba738..9b8b89020 100644 --- a/crates/ui-egui/src/header.rs +++ b/crates/ui-egui/src/header.rs @@ -43,6 +43,7 @@ fn brand_and_home(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter paint_logo(p, brand); let bresp = ui.interact(brand, egui::Id::unique("brand"), Sense::click()); app.auto.add_response("header.about", &bresp, "About EffectCraft"); + craft_ui::runtime::focus::host_stop(ui.ctx(), bresp.id, KeyUse::of(Input::Pointer)); widgets::focus_outline(ui, &bresp, &t); if bresp.on_hover_text(tr("About EffectCraft")).clicked() { app.dialog = Some(Dialog::About); @@ -52,6 +53,7 @@ fn brand_and_home(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter let home = Rect::from_min_size(pos2(x, cy - 13.0), vec2(26.0, 26.0)); let home_response = widgets::icon_button(ui, home, Icon::Home, app.ui.start_screen, &t, egui::Id::unique("tool-home")).on_hover_text(tr("Home")); app.auto.add_response("header.home", &home_response, "Home"); + craft_ui::runtime::focus::host_stop(ui.ctx(), home_response.id, KeyUse::of(Input::Pointer)); if home_response.clicked() { app.ui.start_screen = !app.ui.start_screen; } diff --git a/crates/ui-egui/tests/it/ui_workspace_focus.rs b/crates/ui-egui/tests/it/ui_workspace_focus.rs index f273708b0..14f87d1fc 100644 --- a/crates/ui-egui/tests/it/ui_workspace_focus.rs +++ b/crates/ui-egui/tests/it/ui_workspace_focus.rs @@ -189,10 +189,12 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { for _ in 0..200 { key(&mut h, Key::Tab, Modifiers::NONE); tabs += 1; - if tab_focused(&h, target) { + if tab_focused(&h, "Project") { break; } } + assert!(tab_focused(&h, "Project")); + key(&mut h, Key::ArrowRight, Modifiers::NONE); assert!(tab_focused(&h, target)); println!("Tab presses from no focus to Effect Controls: {tabs}"); assert_eq!(h.state().ui.dock, before, "traversal alone must not activate a tab"); @@ -205,7 +207,7 @@ fn tab_traversal_activates_an_inactive_dock_tab_without_editing_the_project() { assert!(Arc::ptr_eq(&h.state().session.project, &project)); let inspected = effectcraft_ui_egui::control::inspect(h.state(), &h.ctx); assert_eq!(inspected["keyboardFocus"]["automationId"], "panel.tab.EffectControls"); - key(&mut h, Key::Tab, Modifiers::SHIFT); + key(&mut h, Key::ArrowLeft, Modifiers::NONE); assert!(tab_focused(&h, "Project")); key(&mut h, Key::Enter, Modifiers::NONE); assert_eq!(h.state().ui.focused, PanelKind::Project); @@ -295,15 +297,17 @@ fn control_root_divider_drag_after_toolbar_and_dock_tab_keyboard_activation() { for tabs in 1..=200 { d.ok("ui.key", json!({"key":"Tab"}), true); assert!(d.h.state().ui.mini_flowchart.is_none(), "dock-tab traversal must not open a foreground popup"); - if tab_focused(&d.h, target) { - println!("control Tab presses to Effect Controls: {tabs}"); + if tab_focused(&d.h, "Project") { + println!("control Tab presses to Project: {tabs}"); break; } } - assert!(tab_focused(&d.h, target), "Effect Controls must remain reachable by control-channel Tab traversal"); + // A tab strip is one Tab stop: Tab reaches the shown tab, the arrows move between tabs. + d.ok("ui.key", json!({"key":"ArrowRight"}), true); + assert!(tab_focused(&d.h, target), "Effect Controls must remain reachable by control-channel keyboard traversal"); d.ok("ui.key", json!({"key":"Space"}), true); assert_eq!(d.h.state().ui.focused, PanelKind::EffectControls); - d.ok("ui.key", json!({"key":"Tab","shift":true}), true); + d.ok("ui.key", json!({"key":"ArrowLeft"}), true); d.ok("ui.key", json!({"key":"Enter"}), true); assert_eq!(d.h.state().ui.focused, PanelKind::Project); let before = d.h.state().ui.dock.clone(); From d9cdf70bd7e6bb92fd8130b51995dd64a6daf70d Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 22:48:32 +0000 Subject: [PATCH 19/39] Repin craft-libs to 951ca3f3d1 and egui to bbfd6471ed --- Cargo.lock | 204 +++++++++++++++++++------------------- Cargo.toml | 94 +++++++++--------- crates/effects/Cargo.toml | 2 +- 3 files changed, 150 insertions(+), 150 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4aed2daa8..07cfcfe8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1315,12 +1315,12 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "rustix 1.1.6", ] @@ -1351,10 +1351,10 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "log", "thiserror 2.0.21", ] @@ -1362,7 +1362,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1385,7 +1385,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "egui", ] @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "md-5", "rayon", @@ -1402,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" [[package]] name = "craft-color" @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "serde", ] @@ -1423,7 +1423,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "serde", ] @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "thiserror 2.0.21", ] @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "serde", "serde_json", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" [[package]] name = "craft-exr" @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "exr", "flate2", @@ -1497,7 +1497,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" [[package]] name = "craft-frame" @@ -1527,10 +1527,10 @@ dependencies = [ [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "rayon", "serde", ] @@ -1538,7 +1538,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "gif", "image", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "chrono", "fixed_decimal", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "serde_json", ] @@ -1612,13 +1612,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-host", "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "egui", "serde", "serde_json", @@ -1627,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-zip", "serde_json", @@ -1646,7 +1646,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1669,14 +1669,14 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "serde", "thiserror 2.0.21", ] @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "chrono", "craft-codepage", @@ -1704,7 +1704,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "flate2", "serde", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "hayro-syntax", "serde", @@ -1725,7 +1725,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "async-channel", "async-io", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-eps", "kurbo", @@ -1780,7 +1780,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "encoding_rs", "flate2", @@ -1791,7 +1791,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1817,7 +1817,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-atomic", "craft-host", @@ -1839,9 +1839,9 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "thiserror 2.0.21", ] @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1905,7 +1905,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "serde", "thiserror 2.0.21", @@ -1925,9 +1925,9 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "serde", "web-time", ] @@ -1935,12 +1935,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1954,7 +1954,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-behavior", "craft-i18n", @@ -1970,7 +1970,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "accesskit", "craft-behavior", @@ -2008,7 +2008,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-behavior", "craft-host", @@ -2037,7 +2037,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-behavior", "craft-host", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-behavior", "craft-host", @@ -2078,7 +2078,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-behavior", "craft-host", @@ -2097,7 +2097,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "chrono", "craft-host", @@ -2126,7 +2126,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "flate2", "serde", @@ -2148,9 +2148,9 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "rav1e", "rayon", "thiserror 2.0.21", @@ -2159,7 +2159,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "image", "thiserror 2.0.21", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "winsafe", ] @@ -2176,7 +2176,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "craft-appkit", "craft-atomic", @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "thiserror 2.0.21", ] @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2530,7 +2530,7 @@ dependencies = [ [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "bytemuck", "emath", @@ -2688,12 +2688,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2803,7 +2803,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2854,17 +2854,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2969,7 +2969,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "miniz_oxide 0.9.1", ] @@ -2977,7 +2977,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -3170,7 +3170,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "ahash", "bytemuck", @@ -3205,7 +3205,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "accesskit", "ahash", @@ -3224,7 +3224,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "ahash", "bytemuck", @@ -3243,7 +3243,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "accesskit_winit", "arboard", @@ -3269,7 +3269,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "ahash", "egui", @@ -3282,7 +3282,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "bytemuck", "egui", @@ -3295,7 +3295,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "eframe", "egui", @@ -3318,7 +3318,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "bytemuck", ] @@ -3411,7 +3411,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" dependencies = [ "ahash", "bytemuck", @@ -3437,7 +3437,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/storytold/egui.git?rev=a87d00caaec947ea781657c6ff410c9838016d18#a87d00caaec947ea781657c6ff410c9838016d18" +source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" [[package]] name = "equator" @@ -4374,7 +4374,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "hayro-ccitt", ] @@ -4388,7 +4388,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=3408eb09a57969987db986514978bb24cc6859c4#3408eb09a57969987db986514978bb24cc6859c4" +source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 87c1e9e48..7050299bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "3408eb09a57969987db986514978bb24cc6859c4", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "951ca3f3d19b617765996b2523af894679c077a0", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -236,19 +236,19 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4", version = "=0.3.0" } -ecolor = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -emath = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -epaint = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -egui = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -egui-winit = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -egui_glow = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -egui_extras = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "a87d00caaec947ea781657c6ff410c9838016d18" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", version = "=0.3.0" } +ecolor = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +emath = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +epaint = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +epaint_default_fonts = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +egui = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +egui-winit = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +egui-wgpu = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +egui_glow = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +egui_extras = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +egui_kittest = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +eframe = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index ef2736e7c..8976d3ea5 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "3408eb09a57969987db986514978bb24cc6859c4" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } From 8185b901ce4debca079c900b26db26302f37f9e2 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 22:51:43 +0000 Subject: [PATCH 20/39] Serialise the viewer frame tests that read the process-wide LUT generation --- crates/ui-egui/src/app/viewer_frames.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/ui-egui/src/app/viewer_frames.rs b/crates/ui-egui/src/app/viewer_frames.rs index 96dc4d28d..9d2f2d88d 100644 --- a/crates/ui-egui/src/app/viewer_frames.rs +++ b/crates/ui-egui/src/app/viewer_frames.rs @@ -256,10 +256,15 @@ impl EffectcraftApp { #[cfg(test)] mod tests { + /// The LUT generation is process-wide: a test that changes a LUT file moves it for every + /// viewer in the process, so the tests that read frame keys run one at a time. + static LUT_GENERATION: std::sync::Mutex<()> = std::sync::Mutex::new(()); + /// #3493: the viewer shows the frame again once the LUT file it was graded with changes, /// though its key was otherwise the same (same project revision, frame and options). #[test] fn the_viewer_shows_a_lut_file_changed_on_disk() { + let _serial = LUT_GENERATION.lock().unwrap_or_else(std::sync::PoisonError::into_inner); let dir = tempfile::tempdir().unwrap(); let lut = dir.path().join("viewer.cube"); let write = |text: &str, secs: u64| { @@ -302,6 +307,7 @@ mod tests { /// frame having the key of the one on screen. A reload's purge gives the frames new keys, once. #[test] fn the_viewers_show_a_still_reloaded_at_the_same_size() { + let _serial = LUT_GENERATION.lock().unwrap_or_else(std::sync::PoisonError::into_inner); let dir = tempfile::tempdir().unwrap(); let png = dir.path().join("still.png"); let save = |rgb: [u8; 3]| image::RgbaImage::from_pixel(64, 36, image::Rgba([rgb[0], rgb[1], rgb[2], 255])).save(&png).unwrap(); From 4192e377445c5b0ad9b30785218639f4cca7b435 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 23:37:57 +0000 Subject: [PATCH 21/39] Drop the egui::ComboBox ban: the egui fork's combo menu grows back with its contents (egui#5225) --- clippy.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/clippy.toml b/clippy.toml index a4200a0e1..3acd268c4 100644 --- a/clippy.toml +++ b/clippy.toml @@ -2,7 +2,4 @@ allow-unwrap-in-tests = true allow-expect-in-tests = true allow-panic-in-tests = true allow-indexing-slicing-in-tests = true -disallowed-types = [ - { path = "egui::ComboBox", reason = "use craft_ui::ComboBox: egui's combo box menu can't grow back while open (egui#5225)" }, -] cognitive-complexity-threshold = 30 From f7526200bdc920a0319caf29ee208456214a2156 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 00:32:01 +0000 Subject: [PATCH 22/39] Repin craft-libs to 0bac50867b and egui to c7a2f6af5d; drop an unused import in ui_tabs --- Cargo.lock | 380 ++++++++++++++--------------- Cargo.toml | 94 +++---- crates/effects/Cargo.toml | 2 +- crates/ui-egui/tests/it/ui_tabs.rs | 2 +- 4 files changed, 239 insertions(+), 239 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07cfcfe8c..aa9e71002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1315,12 +1315,12 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,11 +1330,22 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "rustix 1.1.6", ] +[[package]] +name = "craft-audio" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "log", + "thiserror 2.0.21", +] + [[package]] name = "craft-audio" version = "0.1.0" @@ -1348,21 +1359,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-audio" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "log", - "thiserror 2.0.21", -] - [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1385,7 +1385,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "egui", ] @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "md-5", "rayon", @@ -1402,7 +1402,15 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" + +[[package]] +name = "craft-color" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "serde", +] [[package]] name = "craft-color" @@ -1412,18 +1420,10 @@ dependencies = [ "serde", ] -[[package]] -name = "craft-color" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "serde", -] - [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1437,11 +1437,19 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "serde", ] +[[package]] +name = "craft-dpx" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "thiserror 2.0.21", +] + [[package]] name = "craft-dpx" version = "0.1.0" @@ -1450,18 +1458,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-dpx" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "serde", "serde_json", @@ -1471,7 +1471,19 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" + +[[package]] +name = "craft-exr" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "exr", + "flate2", + "half", + "serde_json", + "thiserror 2.0.21", +] [[package]] name = "craft-exr" @@ -1482,22 +1494,10 @@ dependencies = [ "serde_json", ] -[[package]] -name = "craft-exr" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "exr", - "flate2", - "half", - "serde_json", - "thiserror 2.0.21", -] - [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1511,7 +1511,18 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" + +[[package]] +name = "craft-frame" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "rayon", + "serde", +] [[package]] name = "craft-frame" @@ -1524,21 +1535,10 @@ dependencies = [ "serde", ] -[[package]] -name = "craft-frame" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "rayon", - "serde", -] - [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "gif", "image", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "chrono", "fixed_decimal", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "serde_json", ] @@ -1612,13 +1612,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-host", "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "egui", "serde", "serde_json", @@ -1627,13 +1627,22 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-zip", "serde_json", "thiserror 2.0.21", ] +[[package]] +name = "craft-media" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "chrono", + "thiserror 2.0.21", +] + [[package]] name = "craft-media" version = "0.1.0" @@ -1644,11 +1653,17 @@ dependencies = [ ] [[package]] -name = "craft-media" +name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "chrono", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "serde", "thiserror 2.0.21", ] @@ -1666,25 +1681,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-media-source" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "serde", - "thiserror 2.0.21", -] - [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "chrono", "craft-codepage", @@ -1704,7 +1704,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "flate2", "serde", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "hayro-syntax", "serde", @@ -1725,7 +1725,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "async-channel", "async-io", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-eps", "kurbo", @@ -1766,6 +1766,17 @@ dependencies = [ "weezl", ] +[[package]] +name = "craft-psd" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "encoding_rs", + "flate2", + "rayon", + "thiserror 2.0.21", +] + [[package]] name = "craft-psd" version = "0.1.0" @@ -1777,21 +1788,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-psd" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "encoding_rs", - "flate2", - "rayon", - "thiserror 2.0.21", -] - [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1817,7 +1817,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-atomic", "craft-host", @@ -1839,9 +1839,9 @@ source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa3 [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "thiserror 2.0.21", ] @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "thiserror 2.0.21", ] @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1896,7 +1896,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "serde", "thiserror 2.0.21", @@ -1905,12 +1905,22 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "serde", "thiserror 2.0.21", ] +[[package]] +name = "craft-timeline" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "serde", + "web-time", +] + [[package]] name = "craft-timeline" version = "0.1.0" @@ -1922,25 +1932,15 @@ dependencies = [ "serde_json", ] -[[package]] -name = "craft-timeline" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "serde", - "web-time", -] - [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1954,7 +1954,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-behavior", "craft-i18n", @@ -1970,7 +1970,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "accesskit", "craft-behavior", @@ -2008,7 +2008,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-behavior", "craft-host", @@ -2037,7 +2037,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-behavior", "craft-host", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-behavior", "craft-host", @@ -2078,7 +2078,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-behavior", "craft-host", @@ -2097,7 +2097,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "chrono", "craft-host", @@ -2126,7 +2126,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "flate2", "serde", @@ -2134,6 +2134,17 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-video" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "rav1e", + "rayon", + "thiserror 2.0.21", +] + [[package]] name = "craft-video" version = "0.1.0" @@ -2145,21 +2156,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-video" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "rav1e", - "rayon", - "thiserror 2.0.21", -] - [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "image", "thiserror 2.0.21", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "winsafe", ] @@ -2176,7 +2176,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-appkit", "craft-atomic", @@ -2200,7 +2200,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2210,13 +2210,21 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "quick-xml 0.41.0", "serde", "thiserror 2.0.21", ] +[[package]] +name = "craft-y4m" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +dependencies = [ + "thiserror 2.0.21", +] + [[package]] name = "craft-y4m" version = "0.1.0" @@ -2225,18 +2233,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-y4m" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2530,7 +2530,7 @@ dependencies = [ [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "bytemuck", "emath", @@ -2688,12 +2688,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2803,7 +2803,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2854,17 +2854,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2969,7 +2969,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "miniz_oxide 0.9.1", ] @@ -2977,7 +2977,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0)", + "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -3170,7 +3170,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "ahash", "bytemuck", @@ -3205,7 +3205,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "accesskit", "ahash", @@ -3224,7 +3224,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "ahash", "bytemuck", @@ -3243,7 +3243,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "accesskit_winit", "arboard", @@ -3269,7 +3269,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "ahash", "egui", @@ -3282,7 +3282,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "bytemuck", "egui", @@ -3295,7 +3295,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "eframe", "egui", @@ -3318,7 +3318,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "bytemuck", ] @@ -3411,7 +3411,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" dependencies = [ "ahash", "bytemuck", @@ -3437,7 +3437,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e#bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" +source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" [[package]] name = "equator" @@ -4374,7 +4374,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "hayro-ccitt", ] @@ -4388,7 +4388,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=951ca3f3d19b617765996b2523af894679c077a0#951ca3f3d19b617765996b2523af894679c077a0" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 7050299bd..bd05467d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "951ca3f3d19b617765996b2523af894679c077a0", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -236,19 +236,19 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0", version = "=0.3.0" } -ecolor = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -emath = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -epaint = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -epaint_default_fonts = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -egui = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -egui-winit = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -egui-wgpu = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -egui_glow = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -egui_extras = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -egui_kittest = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } -eframe = { git = "https://github.com/aiongg/egui.git", rev = "bbfd6471ed43bc3d46bffbb6e1ef7f39d0528e6e" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.3.0" } +ecolor = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +emath = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +epaint = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +epaint_default_fonts = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +egui = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +egui-winit = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +egui-wgpu = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +egui_glow = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +egui_extras = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +egui_kittest = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +eframe = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index 8976d3ea5..b5fa3e7c2 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "951ca3f3d19b617765996b2523af894679c077a0" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index 7057d126a..a9df1b556 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -487,7 +487,7 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu // A comp with no room is in the » menu; picking it shows it, and its tab joins the row. let hidden = comps.iter().copied().find(|c| !shown.contains(c)).unwrap(); let more = { - use egui_kittest::kittest::{NodeT, Queryable}; + use egui_kittest::kittest::Queryable; h.query_all_by_label("More tabs").map(|node| node.rect()).find(|r| tl.y_range().contains(r.center().y)).expect("the Timeline row's » menu") }; assert!(more.min.x >= x - 0.5, "{more:?}"); From 0796898b63ca00626df29dbd01550efe01432f75 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 00:45:30 +0000 Subject: [PATCH 23/39] Patch the storytold craft-libs crates to the app's pinned craft-libs so the lock holds one copy of each (craft-timeline excepted) --- Cargo.lock | 239 +++++++++++++---------------------------------------- Cargo.toml | 23 ++++++ 2 files changed, 79 insertions(+), 183 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa9e71002..9c106b0b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,11 +1304,11 @@ dependencies = [ [[package]] name = "craft-aaf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-audio", "craft-cfb", - "craft-timeline 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", "thiserror 2.0.21", ] @@ -1340,19 +1340,8 @@ name = "craft-audio" version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "log", - "thiserror 2.0.21", -] - -[[package]] -name = "craft-audio" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", + "craft-xml", "log", "rayon", "symphonia 0.6.1", @@ -1380,7 +1369,7 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" [[package]] name = "craft-cloud-ui" @@ -1412,14 +1401,6 @@ dependencies = [ "serde", ] -[[package]] -name = "craft-color" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "serde", -] - [[package]] name = "craft-doc" version = "0.1.0" @@ -1450,14 +1431,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-dpx" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "craft-ecproj-format" version = "0.1.0" @@ -1485,15 +1458,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-exr" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "flate2", - "serde_json", -] - [[package]] name = "craft-font-catalog" version = "0.1.0" @@ -1518,19 +1482,8 @@ name = "craft-frame" version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "rayon", - "serde", -] - -[[package]] -name = "craft-frame" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "craft-color 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-color", + "craft-time", "rayon", "serde", ] @@ -1547,7 +1500,7 @@ dependencies = [ [[package]] name = "craft-hdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "thiserror 2.0.21", ] @@ -1596,7 +1549,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "thiserror 2.0.21", ] @@ -1618,7 +1571,7 @@ dependencies = [ "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-xml", "egui", "serde", "serde_json", @@ -1643,40 +1596,17 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-media" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "chrono", - "thiserror 2.0.21", -] - [[package]] name = "craft-media-source" version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-y4m 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "serde", - "thiserror 2.0.21", -] - -[[package]] -name = "craft-media-source" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-color 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-frame 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-audio", + "craft-color", + "craft-frame", + "craft-media", + "craft-time", + "craft-y4m", "serde", "thiserror 2.0.21", ] @@ -1777,17 +1707,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-psd" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "encoding_rs", - "flate2", - "rayon", - "thiserror 2.0.21", -] - [[package]] name = "craft-quit" version = "0.1.0" @@ -1803,7 +1722,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "craft-tiff", "miniz_oxide 0.9.1", @@ -1834,14 +1753,14 @@ dependencies = [ [[package]] name = "craft-sniff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" [[package]] name = "craft-svg" version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-xml 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-xml", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1861,14 +1780,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-tga" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "craft-theme" version = "0.1.0" @@ -1887,15 +1798,6 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "serde", - "thiserror 2.0.21", -] - -[[package]] -name = "craft-time" -version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "serde", @@ -1905,7 +1807,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ "serde", "thiserror 2.0.21", @@ -1916,7 +1818,7 @@ name = "craft-timeline" version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-time", "serde", "web-time", ] @@ -1926,8 +1828,8 @@ name = "craft-timeline" version = "0.1.0" source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ - "craft-time 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-time", + "craft-xml", "serde", "serde_json", ] @@ -2139,18 +2041,7 @@ name = "craft-video" version = "0.1.0" source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "rav1e", - "rayon", - "thiserror 2.0.21", -] - -[[package]] -name = "craft-video" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", "rav1e", "rayon", "thiserror 2.0.21", @@ -2207,16 +2098,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-xml" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "quick-xml 0.41.0", - "serde", - "thiserror 2.0.21", -] - [[package]] name = "craft-y4m" version = "0.1.0" @@ -2225,14 +2106,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-y4m" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "craft-zip" version = "0.1.0" @@ -2688,12 +2561,12 @@ dependencies = [ name = "effectcraft-export" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-audio", + "craft-exr", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-tga 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-media", + "craft-tga", + "craft-video", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -2854,17 +2727,17 @@ dependencies = [ name = "effectcraft-media" version = "0.25.1" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-color 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-audio", + "craft-color", "craft-docpath", - "craft-dpx 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-frame 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-dpx", + "craft-exr", + "craft-frame", "craft-gif", - "craft-media 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-media-source 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-time 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", - "craft-video 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-media", + "craft-media-source", + "craft-time", + "craft-video", "craft-webp", "effectcraft-color", "effectcraft-effects", @@ -2969,7 +2842,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-psd", "miniz_oxide 0.9.1", ] @@ -2977,7 +2850,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-exr", "effectcraft-color", "effectcraft-geom", "rayon", @@ -3581,7 +3454,7 @@ name = "filmcraft-bitstream" version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", ] [[package]] @@ -3597,11 +3470,11 @@ name = "filmcraft-codecs" version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-audio", "craft-jpeg", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-video 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-y4m 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", + "craft-video", + "craft-y4m", "filmcraft-bitstream", "filmcraft-color", "filmcraft-frame", @@ -3661,7 +3534,7 @@ version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ "craft-aaf", - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-audio", "craft-timeline 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "filmcraft-cfb", "filmcraft-color", @@ -3680,7 +3553,7 @@ name = "filmcraft-isobmff" version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", ] [[package]] @@ -3688,7 +3561,7 @@ name = "filmcraft-matroska" version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", ] [[package]] @@ -3696,15 +3569,15 @@ name = "filmcraft-media" version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ - "craft-audio 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-dpx 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-audio", + "craft-dpx", + "craft-exr", "craft-hdr", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-media-source 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", - "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-media", + "craft-media-source", + "craft-psd", "craft-sniff", - "craft-tga 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-tga", "craft-tiff", "filmcraft-color", "filmcraft-dng", diff --git a/Cargo.toml b/Cargo.toml index bd05467d8..fda95303e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -235,6 +235,29 @@ opt-level = 3 lto = "thin" codegen-units = 1 +# filmcraft-media pins storytold craft-libs; the app needs one copy of each crate. +[patch."https://github.com/storytold/craft-libs"] +craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } + [patch.crates-io] hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.7.2" } hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.3.0" } From 92a5831a44a69a732570ae5aa6f04036582b3859 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 01:10:35 +0000 Subject: [PATCH 24/39] Repin craft-libs to c933a90624 and egui to f678ecb71; drop host_stop calls (the framework orders every widget) --- Cargo.lock | 178 +++++++++++----------- Cargo.toml | 134 ++++++++-------- crates/effects/Cargo.toml | 2 +- crates/ui-egui/src/header.rs | 5 - crates/ui-egui/src/panels/viewer_tools.rs | 13 -- 5 files changed, 157 insertions(+), 175 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c106b0b7..31557f0c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,23 +1304,23 @@ dependencies = [ [[package]] name = "craft-aaf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-audio", "craft-cfb", - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba)", "thiserror 2.0.21", ] [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "rustix 1.1.6", ] @@ -1338,7 +1338,7 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-media", "craft-xml", @@ -1351,7 +1351,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1369,12 +1369,12 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "egui", ] @@ -1382,7 +1382,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "md-5", "rayon", @@ -1391,12 +1391,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "serde", ] @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "serde", ] @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "thiserror 2.0.21", ] @@ -1434,7 +1434,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "serde", "serde_json", @@ -1444,12 +1444,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "exr", "flate2", @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1475,12 +1475,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-color", "craft-time", @@ -1491,7 +1491,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "gif", "image", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "craft-hdr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "thiserror 2.0.21", ] @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "chrono", "fixed_decimal", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "thiserror 2.0.21", ] @@ -1557,7 +1557,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "serde_json", ] @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-host", "craft-i18n", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-zip", "serde_json", @@ -1590,7 +1590,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-audio", "craft-color", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1624,7 +1624,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "chrono", "craft-codepage", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "flate2", "serde", @@ -1645,7 +1645,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "hayro-syntax", "serde", @@ -1655,7 +1655,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "async-channel", "async-io", @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-eps", "kurbo", @@ -1699,7 +1699,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "encoding_rs", "flate2", @@ -1710,7 +1710,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1722,7 +1722,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-tiff", "miniz_oxide 0.9.1", @@ -1736,7 +1736,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-atomic", "craft-host", @@ -1753,12 +1753,12 @@ dependencies = [ [[package]] name = "craft-sniff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-xml", "flate2", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "thiserror 2.0.21", ] @@ -1783,7 +1783,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1798,7 +1798,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "serde", "thiserror 2.0.21", @@ -1807,22 +1807,12 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "serde", "thiserror 2.0.21", ] -[[package]] -name = "craft-timeline" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" -dependencies = [ - "craft-time", - "serde", - "web-time", -] - [[package]] name = "craft-timeline" version = "0.1.0" @@ -1834,15 +1824,25 @@ dependencies = [ "serde_json", ] +[[package]] +name = "craft-timeline" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +dependencies = [ + "craft-time", + "serde", + "web-time", +] + [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-behavior", "craft-i18n", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "accesskit", "craft-behavior", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-behavior", "craft-host", @@ -1939,7 +1939,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-behavior", "craft-host", @@ -1960,7 +1960,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-behavior", "craft-host", @@ -1980,7 +1980,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "chrono", "craft-host", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "flate2", "serde", @@ -2039,7 +2039,7 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-media", "rav1e", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "image", "thiserror 2.0.21", @@ -2059,7 +2059,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "winsafe", ] @@ -2067,7 +2067,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "craft-appkit", "craft-atomic", @@ -2091,7 +2091,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "thiserror 2.0.21", ] @@ -2109,7 +2109,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2403,7 +2403,7 @@ dependencies = [ [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "bytemuck", "emath", @@ -2676,7 +2676,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -3043,7 +3043,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "ahash", "bytemuck", @@ -3078,7 +3078,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "accesskit", "ahash", @@ -3097,7 +3097,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "ahash", "bytemuck", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "accesskit_winit", "arboard", @@ -3142,7 +3142,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "ahash", "egui", @@ -3155,7 +3155,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "bytemuck", "egui", @@ -3168,7 +3168,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "eframe", "egui", @@ -3191,7 +3191,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "bytemuck", ] @@ -3284,7 +3284,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" dependencies = [ "ahash", "bytemuck", @@ -3310,7 +3310,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944#c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" +source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" [[package]] name = "equator" @@ -4247,7 +4247,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "hayro-ccitt", ] @@ -4261,7 +4261,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=0bac50867b2c4977e492f436029ff0075a14dab5#0bac50867b2c4977e492f436029ff0075a14dab5" +source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index fda95303e..278a80703 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "c933a90624b7a5669df284cfdf53726694636bba", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -237,41 +237,41 @@ codegen-units = 1 # filmcraft-media pins storytold craft-libs; the app needs one copy of each crate. [patch."https://github.com/storytold/craft-libs"] -craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } -craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.1.0" } +craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5", version = "=0.3.0" } -ecolor = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -emath = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -epaint = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -epaint_default_fonts = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -egui = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -egui-winit = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -egui-wgpu = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -egui_glow = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -egui_extras = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -egui_kittest = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } -eframe = { git = "https://github.com/aiongg/egui.git", rev = "c7a2f6af5dc9d4c3c5c2a40b077ab30a66c90944" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.3.0" } +ecolor = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +emath = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +epaint = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +epaint_default_fonts = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +egui = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +egui-winit = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +egui-wgpu = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +egui_glow = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +egui_extras = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +egui_kittest = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +eframe = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index b5fa3e7c2..035afb76e 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "0bac50867b2c4977e492f436029ff0075a14dab5" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/crates/ui-egui/src/header.rs b/crates/ui-egui/src/header.rs index 9b8b89020..140a0bbaf 100644 --- a/crates/ui-egui/src/header.rs +++ b/crates/ui-egui/src/header.rs @@ -2,8 +2,6 @@ //! buttons (Discord is always one click away). use crate::i18n::{tr, tr_args}; -use craft_behavior::Input; -use craft_ui::runtime::focus::KeyUse; use egui::{Align2, Color32, Rect, Sense, Stroke, StrokeKind, pos2, vec2}; use serde_json::json; @@ -43,7 +41,6 @@ fn brand_and_home(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter paint_logo(p, brand); let bresp = ui.interact(brand, egui::Id::unique("brand"), Sense::click()); app.auto.add_response("header.about", &bresp, "About EffectCraft"); - craft_ui::runtime::focus::host_stop(ui.ctx(), bresp.id, KeyUse::of(Input::Pointer)); widgets::focus_outline(ui, &bresp, &t); if bresp.on_hover_text(tr("About EffectCraft")).clicked() { app.dialog = Some(Dialog::About); @@ -53,7 +50,6 @@ fn brand_and_home(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter let home = Rect::from_min_size(pos2(x, cy - 13.0), vec2(26.0, 26.0)); let home_response = widgets::icon_button(ui, home, Icon::Home, app.ui.start_screen, &t, egui::Id::unique("tool-home")).on_hover_text(tr("Home")); app.auto.add_response("header.home", &home_response, "Home"); - craft_ui::runtime::focus::host_stop(ui.ctx(), home_response.id, KeyUse::of(Input::Pointer)); if home_response.clicked() { app.ui.start_screen = !app.ui.start_screen; } @@ -89,7 +85,6 @@ fn tool_slot(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter, si: let active = slot.contains(&app.ui.tool); let id = egui::Id::unique(("tool-slot", si)); let resp = widgets::icon_button(ui, r, cur.icon(), active, &t, id); - craft_ui::runtime::focus::host_stop(ui.ctx(), resp.id, KeyUse::of(Input::Pointer)); if slot.len() > 1 { // Flyout corner triangle. p.add(egui::Shape::convex_polygon( diff --git a/crates/ui-egui/src/panels/viewer_tools.rs b/crates/ui-egui/src/panels/viewer_tools.rs index e7e4aaef3..1901eb01b 100644 --- a/crates/ui-egui/src/panels/viewer_tools.rs +++ b/crates/ui-egui/src/panels/viewer_tools.rs @@ -4,8 +4,6 @@ //! //! Edits go through engine commands (`view.*`, `comp.*`); the viewer calls in from small hooks. -use craft_behavior::Input; -use craft_ui::runtime::focus::{KeyUse, host_stop}; use effectcraft_engine::commands::viewer_cmds::FastPreviews; use effectcraft_engine::project::{Comp, ItemId, LayerId}; use effectcraft_engine::render::EvalCtx; @@ -766,9 +764,6 @@ pub(crate) fn bottom_bar(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, } /// The exposure drag field (stops) at `er`; a change runs `view.exposure`. -/// Every control of the viewer bar is a pointer-driven stop that Tab visits in drawn order. -const STOP_KEYS: KeyUse = KeyUse::of(Input::Pointer); - fn exposure_field(app: &mut EffectcraftApp, ui: &mut egui::Ui, er: Rect, stops: f64) { let mut ev = stops; let resp = ui.put( @@ -782,7 +777,6 @@ fn exposure_field(app: &mut EffectcraftApp, ui: &mut egui::Ui, er: Rect, stops: ), ); let resp = resp.on_hover_text(crate::i18n::tr("Adjust Exposure (stops)")); - host_stop(ui.ctx(), resp.id, STOP_KEYS); app.auto.add_response("viewer.exposure", &resp, "Adjust Exposure"); if resp.changed() { let _ = app.session.execute("view.exposure", json!({"stops": ev})); @@ -809,7 +803,6 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z app.ui.viewer.fit_up_to_100 = up; app.ui.viewer.zoom = z; } - host_stop(ui.ctx(), egui::Id::unique("vw-mag"), STOP_KEYS); x = r.max.x + 4.0; // Resolution / down-sample factor. @@ -818,7 +811,6 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let res = app.viewer_res(); let response = widgets::dropdown(ui, r, &resolution_label(res, scale), &t, egui::Id::unique("vw-res")) .on_hover_text(crate::i18n::tr("Resolution/Down Sample Factor Popup")); - host_stop(ui.ctx(), response.id, STOP_KEYS); if response.clicked() { toggle_popup(ui, "vw-res-pop"); } @@ -846,7 +838,6 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z // The tip is the English source: the tooltip is looked up in the catalog, while the // automation label stays English for scripts and tests. let resp = widgets::icon_button(ui, r, icon, on, &t, egui::Id::unique(("vw-btn", id))).on_hover_text(crate::i18n::tr(tip)); - host_stop(ui.ctx(), resp.id, STOP_KEYS); auto.add_response(&format!("viewer.{id}"), &resp, tip); *x += 24.0; (resp.clicked(), r) @@ -953,7 +944,6 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let current = renderers.iter().find(|(r, ..)| *r == comp.renderer).map_or("Classic 3D", |(_, label, _)| *label); let r = Rect::from_min_size(pos2(x, cy - 10.0), vec2(96.0, 20.0)); let renderer_resp = widgets::dropdown(ui, r, crate::i18n::tr(current), &t, egui::Id::unique("vw-3d")); - host_stop(ui.ctx(), renderer_resp.id, STOP_KEYS); if renderer_resp.clicked() { toggle_popup(ui, "vw-3d-pop"); } @@ -970,7 +960,6 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let cur = cid.and_then(|c| app.session.state.views3d.get(&c)).map(|v| v.current).unwrap_or_default(); let r = Rect::from_min_size(pos2(x, cy - 10.0), vec2(118.0, 20.0)); let response = widgets::dropdown(ui, r, crate::panels::viewer::view3d_label(cur), &t, egui::Id::unique("vw-cam")); - host_stop(ui.ctx(), response.id, STOP_KEYS); if response.clicked() { toggle_popup(ui, "vw-cam-pop"); } @@ -998,7 +987,6 @@ fn bottom_bar_contents(app: &mut EffectcraftApp, ui: &mut egui::Ui, bar: Rect, z let tr = Rect::from_min_size(pos2(x + 4.0, cy - 9.0), g.size() + vec2(8.0, 4.0)); p.galley(pos2(tr.min.x + 4.0, tr.min.y + 2.0), g, t.timecode); let resp = ui.interact(tr, egui::Id::unique("vw-timecode"), Sense::click()); - host_stop(ui.ctx(), resp.id, STOP_KEYS); resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, "Current time")); if resp.has_focus() { p.rect_stroke(tr.shrink(1.0), 2.0, Stroke::new(1.0, t.focus), StrokeKind::Inside); @@ -1033,7 +1021,6 @@ fn layout_switch(app: &mut EffectcraftApp, ui: &mut egui::Ui, mut x: f32, cy: f3 for (n, text, tip) in [(1u8, "1", "1 View"), (2, "2", "2 Views"), (4, "4", "4 Views")] { let r = Rect::from_min_size(pos2(x, cy - 10.0), vec2(26.0, 20.0)); let resp = widgets::text_button(ui, r, text, current == n, t, egui::Id::unique(("vw-layout", n))); - host_stop(ui.ctx(), resp.id, STOP_KEYS); // The drawn text is just "1" / "2" / "4": the accessible name is the full "N View(s)", the group // label ("Views") is its description, and the current layout is exposed as pressed. let name = crate::i18n::command_label("view.layout", tip); From 656d6c867da8247129550c6dbcef854a30707b1b Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 06:33:03 +0000 Subject: [PATCH 25/39] Repin craft-libs to storytold next 16001e7210 and egui to storytold b15ffe9bfc --- Cargo.lock | 178 +++++++++++++++++++------------------- Cargo.toml | 134 ++++++++++++++-------------- crates/effects/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 2 +- 4 files changed, 158 insertions(+), 158 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 31557f0c8..81a9ae528 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,23 +1304,23 @@ dependencies = [ [[package]] name = "craft-aaf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-audio", "craft-cfb", - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f)", "thiserror 2.0.21", ] [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "rustix 1.1.6", ] @@ -1338,7 +1338,7 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-media", "craft-xml", @@ -1351,7 +1351,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1369,12 +1369,12 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "egui", ] @@ -1382,7 +1382,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "md-5", "rayon", @@ -1391,12 +1391,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "serde", ] @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "serde", ] @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "thiserror 2.0.21", ] @@ -1434,7 +1434,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "serde", "serde_json", @@ -1444,12 +1444,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "exr", "flate2", @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1475,12 +1475,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-color", "craft-time", @@ -1491,7 +1491,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "gif", "image", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "craft-hdr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "thiserror 2.0.21", ] @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "chrono", "fixed_decimal", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "thiserror 2.0.21", ] @@ -1557,7 +1557,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "serde_json", ] @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-host", "craft-i18n", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-zip", "serde_json", @@ -1590,7 +1590,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-audio", "craft-color", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1624,7 +1624,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "chrono", "craft-codepage", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "flate2", "serde", @@ -1645,7 +1645,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "hayro-syntax", "serde", @@ -1655,7 +1655,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "async-channel", "async-io", @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-eps", "kurbo", @@ -1699,7 +1699,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "encoding_rs", "flate2", @@ -1710,7 +1710,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1722,7 +1722,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-tiff", "miniz_oxide 0.9.1", @@ -1736,7 +1736,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-atomic", "craft-host", @@ -1753,12 +1753,12 @@ dependencies = [ [[package]] name = "craft-sniff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-xml", "flate2", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "thiserror 2.0.21", ] @@ -1783,7 +1783,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1798,7 +1798,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "serde", "thiserror 2.0.21", @@ -1807,12 +1807,22 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "serde", "thiserror 2.0.21", ] +[[package]] +name = "craft-timeline" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +dependencies = [ + "craft-time", + "serde", + "web-time", +] + [[package]] name = "craft-timeline" version = "0.1.0" @@ -1824,25 +1834,15 @@ dependencies = [ "serde_json", ] -[[package]] -name = "craft-timeline" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" -dependencies = [ - "craft-time", - "serde", - "web-time", -] - [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-behavior", "craft-i18n", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "accesskit", "craft-behavior", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-behavior", "craft-host", @@ -1939,7 +1939,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-behavior", "craft-host", @@ -1960,7 +1960,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-behavior", "craft-host", @@ -1980,7 +1980,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "chrono", "craft-host", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "flate2", "serde", @@ -2039,7 +2039,7 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-media", "rav1e", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "image", "thiserror 2.0.21", @@ -2059,7 +2059,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "winsafe", ] @@ -2067,7 +2067,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "craft-appkit", "craft-atomic", @@ -2091,7 +2091,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "thiserror 2.0.21", ] @@ -2109,7 +2109,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2403,7 +2403,7 @@ dependencies = [ [[package]] name = "ecolor" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "emath", @@ -2676,7 +2676,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -3043,7 +3043,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -3078,7 +3078,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "accesskit", "ahash", @@ -3097,7 +3097,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "accesskit_winit", "arboard", @@ -3142,7 +3142,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "egui", @@ -3155,7 +3155,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", "egui", @@ -3168,7 +3168,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "eframe", "egui", @@ -3191,7 +3191,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[package]] name = "emath" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "bytemuck", ] @@ -3284,7 +3284,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" dependencies = [ "ahash", "bytemuck", @@ -3310,7 +3310,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" -source = "git+https://github.com/aiongg/egui.git?rev=f678ecb710dfb98e4b934f6a8d4176c858606a95#f678ecb710dfb98e4b934f6a8d4176c858606a95" +source = "git+https://github.com/storytold/egui.git?rev=b15ffe9bfc2c8e6748533b32b708e10abaf2afec#b15ffe9bfc2c8e6748533b32b708e10abaf2afec" [[package]] name = "equator" @@ -4247,7 +4247,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "hayro-ccitt", ] @@ -4261,7 +4261,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=c933a90624b7a5669df284cfdf53726694636bba#c933a90624b7a5669df284cfdf53726694636bba" +source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 278a80703..e12851c2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "c933a90624b7a5669df284cfdf53726694636bba", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -237,41 +237,41 @@ codegen-units = 1 # filmcraft-media pins storytold craft-libs; the app needs one copy of each crate. [patch."https://github.com/storytold/craft-libs"] -craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } -craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.1.0" } +craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba", version = "=0.3.0" } -ecolor = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -emath = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -epaint = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -epaint_default_fonts = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -egui = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -egui-winit = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -egui-wgpu = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -egui_glow = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -egui_extras = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -egui_kittest = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } -eframe = { git = "https://github.com/aiongg/egui.git", rev = "f678ecb710dfb98e4b934f6a8d4176c858606a95" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.3.0" } +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" } +egui_extras = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index 035afb76e..d0b636e6d 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "c933a90624b7a5669df284cfdf53726694636bba" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 15da0dac7..0516ab16e 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "068e079c7be4b100a8a6b305b31ac881e069727e"; +const REV: &str = "16001e7210bee61db60c84fbe18c3c3e2ef4584f"; const PACKAGES: &[(&str, &str)] = &[("craft-pdf", "0.1.0"), ("craft-ps", "0.1.0"), ("hayro-syntax", "0.7.2"), ("hayro-jbig2", "0.3.0")]; pub fn run(root: &Path) -> Result<(), String> { From afb7ee6868bb76574313f384f326813fd8e47943 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 07:30:36 +0000 Subject: [PATCH 26/39] pdf-deps checks craft-libs from the repository Cargo.toml pins --- xtask/src/pdf_deps.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 0516ab16e..4d42164bf 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,6 +5,8 @@ use std::process::Command; use serde_json::Value; +// The repository Cargo.toml pins craft-libs from (the aiongg fork while filmcraft-media pins storytold craft-libs). +const REPO: &str = "https://github.com/aiongg/craft-libs"; const REV: &str = "16001e7210bee61db60c84fbe18c3c3e2ef4584f"; const PACKAGES: &[(&str, &str)] = &[("craft-pdf", "0.1.0"), ("craft-ps", "0.1.0"), ("hayro-syntax", "0.7.2"), ("hayro-jbig2", "0.3.0")]; @@ -26,7 +28,7 @@ pub fn run(root: &Path) -> Result<(), String> { fn validate(metadata: &Value) -> Result<(), String> { let packages = metadata.get("packages").and_then(Value::as_array).ok_or("cargo metadata has no packages")?; let nodes = metadata.pointer("/resolve/nodes").and_then(Value::as_array).ok_or("cargo metadata has no resolved nodes")?; - let source = format!("git+https://github.com/storytold/craft-libs?rev={REV}#{REV}"); + let source = format!("git+{REPO}?rev={REV}#{REV}"); for (name, version) in PACKAGES { let matches: Vec<_> = packages.iter().filter(|p| p["name"] == *name).collect(); if matches.len() != 1 || matches[0]["version"] != *version || matches[0]["source"] != source { @@ -57,9 +59,10 @@ mod tests { use serde_json::json; fn metadata() -> Value { - let packages: Vec<_> = PACKAGES.iter().map(|(name, version)| { - json!({"id": name, "name": name, "version": version, "source": format!("git+https://github.com/storytold/craft-libs?rev={REV}#{REV}")}) - }).collect(); + let packages: Vec<_> = PACKAGES + .iter() + .map(|(name, version)| json!({"id": name, "name": name, "version": version, "source": format!("git+{REPO}?rev={REV}#{REV}")})) + .collect(); json!({"packages": packages, "resolve": {"nodes": [ {"id": "hayro-syntax", "features": ["std"]}, {"id": "craft-pdf", "features": ["read"]}, {"id": "craft-ps", "features": ["read"]} From 6a51e00441927ea9f3792d2fee1e5011330b0730 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 13:43:59 +0000 Subject: [PATCH 27/39] Repin craft-libs to storytold next d1bdf8e5da --- Cargo.lock | 156 +++++++++++++++++++------------------- Cargo.toml | 112 +++++++++++++-------------- crates/effects/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 2 +- 4 files changed, 136 insertions(+), 136 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c18c0b1df..636453897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,23 +1304,23 @@ dependencies = [ [[package]] name = "craft-aaf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-audio", "craft-cfb", - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e)", "thiserror 2.0.21", ] [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "rustix 1.1.6", ] @@ -1338,7 +1338,7 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-media", "craft-xml", @@ -1351,7 +1351,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1369,12 +1369,12 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "egui", ] @@ -1382,7 +1382,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "md-5", "rayon", @@ -1391,12 +1391,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", ] @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", ] @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "thiserror 2.0.21", ] @@ -1434,7 +1434,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", "serde_json", @@ -1444,12 +1444,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "exr", "flate2", @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1475,12 +1475,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-color", "craft-time", @@ -1491,7 +1491,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "gif", "image", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "craft-hdr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "thiserror 2.0.21", ] @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "fixed_decimal", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "thiserror 2.0.21", ] @@ -1557,7 +1557,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde_json", ] @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-host", "craft-i18n", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-zip", "serde_json", @@ -1590,7 +1590,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-audio", "craft-color", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1624,7 +1624,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "craft-codepage", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "flate2", "serde", @@ -1645,7 +1645,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "hayro-syntax", "serde", @@ -1655,7 +1655,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "async-channel", "async-io", @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-eps", "kurbo", @@ -1699,7 +1699,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "encoding_rs", "flate2", @@ -1710,7 +1710,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1722,7 +1722,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-tiff", "miniz_oxide 0.9.1", @@ -1736,7 +1736,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-atomic", "craft-host", @@ -1753,12 +1753,12 @@ dependencies = [ [[package]] name = "craft-sniff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-xml", "flate2", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "thiserror 2.0.21", ] @@ -1783,7 +1783,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1798,7 +1798,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", "thiserror 2.0.21", @@ -1807,22 +1807,12 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "serde", "thiserror 2.0.21", ] -[[package]] -name = "craft-timeline" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" -dependencies = [ - "craft-time", - "serde", - "web-time", -] - [[package]] name = "craft-timeline" version = "0.1.0" @@ -1834,15 +1824,25 @@ dependencies = [ "serde_json", ] +[[package]] +name = "craft-timeline" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +dependencies = [ + "craft-time", + "serde", + "web-time", +] + [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-i18n", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "accesskit", "craft-behavior", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1939,7 +1939,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1960,7 +1960,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1980,7 +1980,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "chrono", "craft-host", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "flate2", "serde", @@ -2039,7 +2039,7 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-media", "rav1e", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "image", "thiserror 2.0.21", @@ -2059,7 +2059,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "winsafe", ] @@ -2067,7 +2067,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "craft-appkit", "craft-atomic", @@ -2091,7 +2091,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "thiserror 2.0.21", ] @@ -2109,7 +2109,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2678,7 +2678,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -4249,7 +4249,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "hayro-ccitt", ] @@ -4263,7 +4263,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=16001e7210bee61db60c84fbe18c3c3e2ef4584f#16001e7210bee61db60c84fbe18c3c3e2ef4584f" +source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index e12851c2b..5e696f0b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -237,30 +237,30 @@ codegen-units = 1 # filmcraft-media pins storytold craft-libs; the app needs one copy of each crate. [patch."https://github.com/storytold/craft-libs"] -craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } -craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.1.0" } +craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f", version = "=0.3.0" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.3.0" } 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" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index d0b636e6d..a14481e5b 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "16001e7210bee61db60c84fbe18c3c3e2ef4584f" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 4d42164bf..f9c386cea 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -7,7 +7,7 @@ use serde_json::Value; // The repository Cargo.toml pins craft-libs from (the aiongg fork while filmcraft-media pins storytold craft-libs). const REPO: &str = "https://github.com/aiongg/craft-libs"; -const REV: &str = "16001e7210bee61db60c84fbe18c3c3e2ef4584f"; +const REV: &str = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e"; const PACKAGES: &[(&str, &str)] = &[("craft-pdf", "0.1.0"), ("craft-ps", "0.1.0"), ("hayro-syntax", "0.7.2"), ("hayro-jbig2", "0.3.0")]; pub fn run(root: &Path) -> Result<(), String> { From e5bf0ca05af7ecd33b6aad0453a94847e8480339 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 13:45:03 +0000 Subject: [PATCH 28/39] Ask for a new IME reset when the integration retires the request --- crates/ui-egui/src/panels/viewer_text.rs | 8 ++++++++ crates/ui-egui/src/panels/viewer_text/tests.rs | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/crates/ui-egui/src/panels/viewer_text.rs b/crates/ui-egui/src/panels/viewer_text.rs index d4a5c8ccf..cce2884c3 100644 --- a/crates/ui-egui/src/panels/viewer_text.rs +++ b/crates/ui-egui/src/panels/viewer_text.rs @@ -1112,6 +1112,14 @@ fn keyboard(app: &mut EffectcraftApp, ui: &mut egui::Ui, viewer: Rect) { } continue; } + if let egui::Event::ImeResetRetired { request_id } = &ev { + // The integration dropped the request and no completion will follow: ask again, or the + // composition stays stale forever. + if custom_mutations && read_reset(&ctx).is_some_and(|guard| !guard.suspended && guard.request == Some(*request_id)) { + request_reset(app, &ctx); + } + continue; + } sync_ime_target(ui, app); sync_ime_selection(ui, app); if matches!(&ev, egui::Event::PointerButton { pos, pressed: true, .. } if !viewer.contains(*pos)) { diff --git a/crates/ui-egui/src/panels/viewer_text/tests.rs b/crates/ui-egui/src/panels/viewer_text/tests.rs index 5a9c544ec..dbfec13b7 100644 --- a/crates/ui-egui/src/panels/viewer_text/tests.rs +++ b/crates/ui-egui/src/panels/viewer_text/tests.rs @@ -318,6 +318,18 @@ fn discarded_custom_request_then_home_rearms_the_identical_caret() { assert_eq!(doc_text(&app, lid), "aがbcd"); } +#[test] +fn a_retired_reset_request_is_asked_again() { + let (mut app, _) = editor("abcd", 4, 4); + let mut pass = ImePass::new(egui::ViewportId::ROOT); + let preview = || egui::Event::Ime(egui::ImeEvent::Preedit { text: "é".into(), active_range_chars: None }); + pass.frame(&mut app, vec![preview()], true, false); + app.session.execute("text.setSelection", json!({"caret": 1})).unwrap(); + let first = pass.frame(&mut app, vec![], true, false).unwrap().reset_request.unwrap(); + let again = pass.frame(&mut app, vec![egui::Event::ImeResetRetired { request_id: first }], true, false).unwrap().reset_request; + assert!(again.is_some_and(|id| id != first), "a retired request is replaced by a new one"); +} + #[test] fn viewport_fences_and_duplicate_completion_keep_their_exact_lifetime() { let (mut app, lid) = editor("abcd", 4, 4); From 121be81389416e59dc4d1822bf7fdf99d62f0322 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 14:22:08 +0000 Subject: [PATCH 29/39] The focused Composition viewer leaves the keyboard to the app --- crates/ui-egui/src/framework.rs | 30 ++++++++++++-- crates/ui-egui/src/menus/shortcuts.rs | 4 +- crates/ui-egui/src/native_menu.rs | 4 +- crates/ui-egui/src/panels.rs | 2 +- .../ui-egui/src/panels/camera_tracker_ui.rs | 2 +- crates/ui-egui/src/panels/effects_presets.rs | 2 +- crates/ui-egui/src/panels/flowchart.rs | 2 +- crates/ui-egui/src/panels/project.rs | 6 +-- crates/ui-egui/src/panels/render_queue.rs | 4 +- crates/ui-egui/src/panels/viewer.rs | 6 +-- crates/ui-egui/src/panels/viewer_tools.rs | 2 +- crates/ui-egui/tests/it/ui_viewer.rs | 39 +++++++++++++++++++ 12 files changed, 82 insertions(+), 21 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 0e54530ae..de2981220 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -115,12 +115,34 @@ impl EffectcraftApp { } } -/// Declares the Composition viewer `id`, drawn in this pass, as the window's document canvas. With nothing focused it +/// The Composition viewer's widget, its window's document canvas. +pub(crate) fn viewer_id() -> egui::Id { + egui::Id::unique("viewer-interact") +} + +/// Declares the Composition viewer, drawn in this pass, as the window's document canvas. With nothing focused it /// is the window's key target: the edit chords and the clipboard events stay in -/// egui's input for EffectCraft's shortcuts. -pub(crate) fn host_canvas(ctx: &egui::Context, id: egui::Id) { +/// egui's input for EffectCraft's shortcuts. Escape with the viewer focused is the viewer's own: it lets go of the +/// keyboard, as egui's other widgets do. +pub(crate) fn host_canvas(ctx: &egui::Context) { const KEYS: KeyUse = KeyUse::CANVAS.with_edits(EditSet::ALL); - craft_ui::runtime::focus::host_canvas(ctx, id, KEYS); + craft_ui::runtime::focus::host_canvas(ctx, viewer_id(), KEYS); + // Read from the raw input, so an Escape that a popup consumed earlier in the pass counts. + let escape = |event: &egui::Event| matches!(event, egui::Event::Key { key: egui::Key::Escape, pressed: true, modifiers, .. } if !modifiers.any()); + if ctx.input(|i| i.raw.events.iter().any(escape)) { + ctx.memory_mut(|m| m.surrender_focus(viewer_id())); + } +} + +/// The widget other than the Composition viewer that has the keyboard. The viewer as the focused Tab stop leaves the +/// keys to EffectCraft, as with nothing focused. +pub(crate) fn focused_widget(ctx: &egui::Context) -> Option { + ctx.memory(|m| m.focused()).filter(|id| *id != viewer_id()) +} + +/// Whether a widget other than the Composition viewer has the keyboard ([`focused_widget`]). +pub(crate) fn widget_has_keyboard(ctx: &egui::Context) -> bool { + focused_widget(ctx).is_some() } /// Puts the window's Escape (the key the runtime routes to no component while nothing has framework focus) back into diff --git a/crates/ui-egui/src/menus/shortcuts.rs b/crates/ui-egui/src/menus/shortcuts.rs index eaca5568a..655d5c0b9 100644 --- a/crates/ui-egui/src/menus/shortcuts.rs +++ b/crates/ui-egui/src/menus/shortcuts.rs @@ -356,12 +356,12 @@ fn handle_shortcuts_impl(app: &mut EffectcraftApp, ctx: &egui::Context, tab_only } // A mouse button down while Spacebar is held belongs to the Hand tool: its release won't // preview. - if ctx.input(|i| i.pointer.any_down()) || ctx.egui_wants_keyboard_input() { + if ctx.input(|i| i.pointer.any_down()) || crate::framework::widget_has_keyboard(ctx) { ctx.data_mut(|d| d.remove::(space_tap_id())); } // While a menu or popup list is open, keys go to it, not to the app (Space must not start a // preview behind the menu, #279). - if ctx.egui_wants_keyboard_input() || crate::widgets::any_menu_open(ctx) { + if crate::framework::widget_has_keyboard(ctx) || crate::widgets::any_menu_open(ctx) { return; } // Text editing in the viewer takes the clipboard events itself. diff --git a/crates/ui-egui/src/native_menu.rs b/crates/ui-egui/src/native_menu.rs index 440a3a4cd..23e2a3512 100644 --- a/crates/ui-egui/src/native_menu.rs +++ b/crates/ui-egui/src/native_menu.rs @@ -441,12 +441,12 @@ impl MenuSync { /// The window whose text field has the keyboard: a floating panel's own OS window, or the main /// window, where any widget that holds the keyboard counts (the Viewer's text editor is not an -/// egui text field). +/// egui text field) except the Composition viewer itself. pub fn text_field_window(ctx: &egui::Context) -> Option { let host = craft_ui::runtime::windows::WindowHost::of(ctx); let window = host.key_window(); let floating = (window != egui::ViewportId::ROOT && host.typing()).then_some(window); - floating.or_else(|| ctx.egui_wants_keyboard_input().then_some(egui::ViewportId::ROOT)) + floating.or_else(|| crate::framework::widget_has_keyboard(ctx).then_some(egui::ViewportId::ROOT)) } /// Whether a focused text field takes the menu command `command` ([`activate`]): the native menu diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs index b47492f53..d1bc695c0 100644 --- a/crates/ui-egui/src/panels.rs +++ b/crates/ui-egui/src/panels.rs @@ -184,7 +184,7 @@ pub(crate) fn toggle_time_display(app: &mut EffectcraftApp, resp: &egui::Respons /// Spacebar held outside a text field: the Hand tool (drags pan the viewer and scroll the /// Timeline). pub(crate) fn space_hand(ctx: &egui::Context) -> bool { - ctx.input(|i| i.key_down(egui::Key::Space)) && !ctx.egui_wants_keyboard_input() + ctx.input(|i| i.key_down(egui::Key::Space)) && !crate::framework::widget_has_keyboard(ctx) } /// What a scroll gesture over a viewer (Composition, Layer) does this frame. diff --git a/crates/ui-egui/src/panels/camera_tracker_ui.rs b/crates/ui-egui/src/panels/camera_tracker_ui.rs index fdda5f5d2..75344e79a 100644 --- a/crates/ui-egui/src/panels/camera_tracker_ui.rs +++ b/crates/ui-egui/src/panels/camera_tracker_ui.rs @@ -347,7 +347,7 @@ pub fn viewer_hook( && app.dialog.is_none() && !selected.is_empty() && ui.input(|i| i.key_pressed(egui::Key::Delete) || i.key_pressed(egui::Key::Backspace)) - && !ctx.egui_wants_keyboard_input() + && !crate::framework::widget_has_keyboard(&ctx) { run(app, &ctx, "camera.deletePoints", json!({"layer": a.layer.0, "effect": a.uid, "points": selected})); } diff --git a/crates/ui-egui/src/panels/effects_presets.rs b/crates/ui-egui/src/panels/effects_presets.rs index 165c7fb1b..9d4981a58 100644 --- a/crates/ui-egui/src/panels/effects_presets.rs +++ b/crates/ui-egui/src/panels/effects_presets.rs @@ -422,7 +422,7 @@ fn list_keys(app: &mut EffectcraftApp, ctx: &egui::Context, nav: &Nav, list: Rec ctx.data_mut(|d| d.remove::(cursor_id())); ctx.request_repaint(); } - let focused = ctx.memory(|m| m.focused()); + let focused = crate::framework::focused_widget(ctx); let on_row = focused.is_some_and(|f| nav.rows.iter().any(|r| r.id == f || r.star == Some(f))); // Enter / Space on the star are the star button's (it toggles the favourite), not the row's. let on_star = focused.is_some_and(|f| nav.rows.iter().any(|r| r.star == Some(f))); diff --git a/crates/ui-egui/src/panels/flowchart.rs b/crates/ui-egui/src/panels/flowchart.rs index d6d6fca01..6ad58bbb8 100644 --- a/crates/ui-egui/src/panels/flowchart.rs +++ b/crates/ui-egui/src/panels/flowchart.rs @@ -349,7 +349,7 @@ fn flow_keys( rects: &[Rect], cmds: &mut Vec<(String, Value)>, ) { - let focused = ctx.memory(|m| m.focused()); + let focused = crate::framework::focused_widget(ctx); let on_node = focused.is_some_and(|f| g.nodes.iter().any(|n| node_id(&n.id) == f)); let by_mouse = focused.is_none() && app.ui.focused == crate::dock::PanelKind::Flowchart; if (on_node || by_mouse) && app.dialog.is_none() && !widgets::any_menu_open(ctx) { diff --git a/crates/ui-egui/src/panels/project.rs b/crates/ui-egui/src/panels/project.rs index 3567e2dcc..d22ec7d0e 100644 --- a/crates/ui-egui/src/panels/project.rs +++ b/crates/ui-egui/src/panels/project.rs @@ -293,10 +293,10 @@ fn selection_seen_id() -> egui::Id { egui::Id::unique("proj-sel-seen") } -/// The focused widget is one of the panel's rows, or nothing has keyboard focus: the panel's keys +/// The focused widget is one of the panel's rows, or no widget has the keyboard: the panel's keys /// apply. Any other focused widget (a text field, a button reached with Tab) keeps them. fn keys_reach_rows(app: &EffectcraftApp, ctx: &egui::Context) -> bool { - match ctx.memory(|m| m.focused()) { + match crate::framework::focused_widget(ctx) { None => app.ui.focused == crate::dock::PanelKind::Project, Some(f) => ctx.data(|d| d.get_temp::(focused_row_id())).is_some_and(|row| row_id(row) == f), } @@ -330,7 +330,7 @@ fn keyboard_nav(app: &mut EffectcraftApp, ctx: &egui::Context) -> Option { return None; } - let row_focused = ctx.memory(|m| m.focused()).is_some(); + let row_focused = crate::framework::widget_has_keyboard(ctx); let mut moved = None; for (key, m) in keys { let (plain, shift) = (!m.any(), m.shift_only()); diff --git a/crates/ui-egui/src/panels/render_queue.rs b/crates/ui-egui/src/panels/render_queue.rs index 6c5963908..2b1ac4826 100644 --- a/crates/ui-egui/src/panels/render_queue.rs +++ b/crates/ui-egui/src/panels/render_queue.rs @@ -746,7 +746,7 @@ fn delete_selected(app: &EffectcraftApp, ui: &egui::Ui, allowed: bool, on_row: b && !crate::widgets::any_menu_open(ui.ctx()) && ui.input(|i| i.key_pressed(egui::Key::Delete) || i.key_pressed(egui::Key::Backspace)) // (A focused queue row is not typing; any other focused widget may be.) - && (on_row || !ui.ctx().egui_wants_keyboard_input()) + && (on_row || !crate::framework::widget_has_keyboard(ui.ctx())) { actions.push(("renderQueue.remove", json!({"item": id}))); *selected = None; @@ -767,7 +767,7 @@ fn list_keys( tops: &[(u64, f32)], list_h: f32, ) -> bool { - let focused = ctx.memory(|m| m.focused()); + let focused = crate::framework::focused_widget(ctx); let on_row = focused.is_some_and(|f| queue.iter().any(|i| row_id(i.id) == f)); let by_mouse = focused.is_none() && app.ui.focused == crate::dock::PanelKind::RenderQueue; if (on_row || by_mouse) && can_navigate && app.dialog.is_none() && !widgets::any_menu_open(ctx) { diff --git a/crates/ui-egui/src/panels/viewer.rs b/crates/ui-egui/src/panels/viewer.rs index 41c2f2ab1..45abbc049 100644 --- a/crates/ui-egui/src/panels/viewer.rs +++ b/crates/ui-egui/src/panels/viewer.rs @@ -547,7 +547,7 @@ fn phase_layers(app: &mut EffectcraftApp, ui: &mut egui::Ui, ectx: &EvalCtx, v: let sel_vertices = app.session.state.selected_vertices.clone(); // Pen path in progress ends when the tool changes or its mask is gone; Esc / Enter also end // free transform. - let finish = ui.input(|i| i.key_pressed(egui::Key::Escape) || i.key_pressed(egui::Key::Enter)) && !ctx.egui_wants_keyboard_input(); + let finish = ui.input(|i| i.key_pressed(egui::Key::Escape) || i.key_pressed(egui::Key::Enter)) && !crate::framework::widget_has_keyboard(&ctx); if app.ui.tool != Tool::Pen || finish { ui.data_mut(|d| d.remove::<(LayerId, u64)>(pen_id())); } @@ -884,8 +884,8 @@ fn phase_menu(app: &mut EffectcraftApp, ui: &mut egui::Ui, ectx: &EvalCtx, v: &m super::viewer_drop::show(app, ui, &painter, &map, ectx); // Interaction. - let resp = ui.interact(area, egui::Id::unique("viewer-interact"), Sense::click_and_drag()); - crate::framework::host_canvas(ui.ctx(), resp.id); + let resp = ui.interact(area, crate::framework::viewer_id(), Sense::click_and_drag()); + crate::framework::host_canvas(ui.ctx()); let menu_hits_id = egui::Id::unique(("viewer-menu-hits", cid.0)); // A right-click an overlay took (the Cryptomatte eyedropper's) opens the menu too. let forwarded = ui.data_mut(|d| d.remove_temp::(egui::Id::unique(FORWARDED_SECONDARY))); diff --git a/crates/ui-egui/src/panels/viewer_tools.rs b/crates/ui-egui/src/panels/viewer_tools.rs index 1901eb01b..2bf1df122 100644 --- a/crates/ui-egui/src/panels/viewer_tools.rs +++ b/crates/ui-egui/src/panels/viewer_tools.rs @@ -346,7 +346,7 @@ pub(crate) fn shown_region(ctx: &egui::Context, comp: [f32; 2]) -> [f64; 4] { /// Show Snapshot: the stored snapshot is on screen (button or F5 held). pub(crate) fn showing_snapshot(app: &EffectcraftApp, ctx: &egui::Context) -> bool { - let f5 = ctx.input(|i| i.key_down(egui::Key::F5)) && !ctx.egui_wants_keyboard_input(); + let f5 = ctx.input(|i| i.key_down(egui::Key::F5)) && !crate::framework::widget_has_keyboard(ctx); app.session.snapshot.is_some() && (app.session.state.viewer.show_snapshot || f5) } diff --git a/crates/ui-egui/tests/it/ui_viewer.rs b/crates/ui-egui/tests/it/ui_viewer.rs index ef59cf6cf..7071af7d2 100644 --- a/crates/ui-egui/tests/it/ui_viewer.rs +++ b/crates/ui-egui/tests/it/ui_viewer.rs @@ -278,6 +278,45 @@ fn viewer_double_click_on_a_covered_path_of_the_selected_layer_free_transforms_i assert!(h.state().auto.find("viewer.freeTransform.handle.0").is_some(), "the free-transform box is up"); } +/// The Composition viewer as the focused Tab stop leaves the keys to the app, and Escape also makes it +/// let go of the keyboard. +#[test] +fn the_focused_viewer_leaves_the_keys_to_the_app() { + use craft_ui::runtime::focus::{FocusTarget, request}; + let viewer = egui::Id::unique("viewer-interact"); + let mut h = selection_harness(); + let layer = h.state().session.active_comp().unwrap().layers[0].id; + let s = &mut h.state_mut().session; + s.execute("layer.select", json!({"layers": [layer.0]})).unwrap(); + s.execute("mask.new", json!({"layer": layer.0, "vertices": [[10, 10], [70, 10], [70, 70], [10, 70]], "closed": true})).unwrap(); + h.run_steps(40); + let at = screen(&h, [320.0, 150.0]); + h.input_mut().events.push(Event::PointerMoved(at)); + h.step(); + for _ in 0..2 { + for pressed in [true, false] { + h.input_mut().events.push(Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() }); + } + h.step(); + } + h.run_steps(3); + assert!(h.state().auto.find("viewer.freeTransform.handle.0").is_some(), "the free-transform box is up"); + let focus_viewer = |h: &mut Harness<'_, EffectcraftApp>| { + request(&h.ctx, FocusTarget::Id(viewer)); + h.run_steps(2); + assert_eq!(h.ctx.memory(|m| m.focused()), Some(viewer)); + }; + focus_viewer(&mut h); + assert_eq!(effectcraft_ui_egui::native_menu::text_field_window(&h.ctx), None, "the Edit menu's commands are the app's"); + key(&mut h, egui::Key::Escape, egui::Modifiers::NONE); + assert!(h.state().auto.find("viewer.freeTransform.handle.0").is_none(), "Escape ends the free transform"); + assert_eq!(h.ctx.memory(|m| m.focused()), None, "and the viewer lets go of the keyboard"); + focus_viewer(&mut h); + key(&mut h, egui::Key::H, egui::Modifiers::NONE); + assert_eq!(h.state().ui.tool, Tool::Hand, "a tool shortcut runs"); + assert_eq!(h.ctx.memory(|m| m.focused()), Some(viewer)); +} + /// A double-click where a precomp layer covers the selected layer opens the precomp: like a single /// click, it acts on the topmost layer, which its first click selects (#1535). #[test] From ea50d791086ea569b889f176e88d0178eea9aca8 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 14:23:42 +0000 Subject: [PATCH 30/39] A floating panel's window hands the main window only the keys and clipboard events no widget has --- crates/ui-egui/src/dock_ui.rs | 45 +++++++++++++----- .../ui-egui/tests/it/native_menu_text_keys.rs | 46 ++++++++++++++++++- 2 files changed, 78 insertions(+), 13 deletions(-) diff --git a/crates/ui-egui/src/dock_ui.rs b/crates/ui-egui/src/dock_ui.rs index 86862885f..d21e790cc 100644 --- a/crates/ui-egui/src/dock_ui.rs +++ b/crates/ui-egui/src/dock_ui.rs @@ -401,7 +401,7 @@ impl EffectcraftApp { let ime = NativeIme::new(&shown.layout().floating, &self.live_dock.windows, &self.unpublished_viewports); let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body).id_salt("effectcraft-dock-area")); child.set_clip_rect(body.intersect(ui.clip_rect())); - let mut panels = EffectPanels { app: &mut *self, tokens: t, locks: Vec::new(), menu: None, bodies: Vec::new(), ime }; + let mut panels = EffectPanels { app: &mut *self, tokens: t, locks: Vec::new(), menu: None, bodies: Vec::new(), ime, focused_windows: Vec::new() }; let output = { let mut area = DockArea::new("Panels", Bind::given(Arc::clone(&shown)), &specs, &mut panels, dock_config()); if let Some(panel) = maximized { @@ -415,7 +415,7 @@ impl EffectcraftApp { } area.show(&mut child) }; - let EffectPanels { locks, menu, bodies, ime, .. } = panels; + let EffectPanels { locks, menu, bodies, ime, focused_windows, .. } = panels; self.live_dock.specs = specs; let DockAreaOutput { actions, requested, events, focused, pressed, picked, error, float_space, windows, window_files, sources, .. } = output; self.dock_rects = bodies; @@ -429,7 +429,7 @@ impl EffectcraftApp { if float_space.is_some() { self.live_dock.float_space = float_space; } - self.forward_window_input(&ctx, &windows, window_files); + self.forward_window_input(&ctx, &windows, &focused_windows, window_files); self.live_dock.windows = windows; // A press in a panel's body, a tab picked, or key focus moving to a group focuses that panel. let moved = focused != self.live_dock.focused; @@ -491,15 +491,22 @@ impl EffectcraftApp { panels::panel_menu_popup(self, ui); } - /// Keys and dropped files that reach a floating panel's own OS window go to the main - /// window's next frame ([`crate::EffectcraftApp::raw_input_hook`]), so its shortcuts and - /// file import handle them. Text is not forwarded, and no key is while a text field has the - /// keyboard. - fn forward_window_input(&mut self, ctx: &egui::Context, windows: &[(PanelKind, egui::ViewportId)], files: Vec>) { - let typing = crate::native_menu::text_field_window(ctx).is_some(); - for (_, viewport) in windows { - let events = ctx.input_for(*viewport, |i| i.events.clone()); - self.forwarded.events.extend(events.into_iter().filter(|event| !typing && !matches!(event, egui::Event::Text(_) | egui::Event::Ime(_)))); + /// Keys, clipboard events and dropped files that reach a floating panel's own OS window go to + /// the main window's next frame ([`crate::EffectcraftApp::raw_input_hook`]), so its shortcuts + /// and file import handle them. No key or clipboard event goes from a window of `focused` + /// (one of its widgets has the keyboard), or while a text field has the keyboard. + fn forward_window_input( + &mut self, + ctx: &egui::Context, + windows: &[(PanelKind, egui::ViewportId)], + focused: &[egui::ViewportId], + files: Vec>, + ) { + if crate::native_menu::text_field_window(ctx).is_none() { + for (_, viewport) in windows.iter().filter(|(_, viewport)| !focused.contains(viewport)) { + let events = ctx.input_for(*viewport, |i| i.events.iter().filter(|event| forwards(event)).cloned().collect::>()); + self.forwarded.events.extend(events); + } } if handed_over_to_the_timeline(files.iter().map(|drop| (drop.panel, !drop.files.is_empty()))) { self.forwarded.dropped_on_timeline = true; @@ -695,6 +702,8 @@ struct EffectPanels<'a> { bodies: Vec<(PanelKind, Rect)>, /// Where each native window's IME descriptor is set up and published. ime: NativeIme, + /// The native windows in which a widget had the keyboard after their last body. + focused_windows: Vec, } impl DockPanels for EffectPanels<'_> { @@ -719,6 +728,12 @@ impl DockPanels for EffectPanels<'_> { if native && self.ime.menu_turn(viewport) { panels::panel_menu_area(self.app, ui); } + if native { + self.focused_windows.retain(|window| *window != viewport); + if crate::framework::widget_has_keyboard(ui.ctx()) { + self.focused_windows.push(viewport); + } + } // The body fills its frame; allocating it lets a floated panel keep its full size. ui.allocate_rect(rect, Sense::hover()); // Painted after the body so child backgrounds cannot hide the focus outline. @@ -882,6 +897,12 @@ fn window_bodies(window: &Floating) -> usize { window.groups().iter().filter(|group| !group.minimized && group.active_panel().is_some()).count() } +/// Whether a floating panel's own window hands `event` to the main window. Every other event is +/// the window's own: typed text is its panels', and the pointer is at its coordinates. +fn forwards(event: &egui::Event) -> bool { + matches!(event, egui::Event::Key { .. } | egui::Event::Copy | egui::Event::Cut | egui::Event::Paste(_)) +} + /// Whether a handed-over *drop* named the Timeline. Only a drop with files counts, so a window /// that only saw a file pass over it never sends the next drop somewhere else. The panel comes /// from the window, which the main window's pointer can never reach (#2661). diff --git a/crates/ui-egui/tests/it/native_menu_text_keys.rs b/crates/ui-egui/tests/it/native_menu_text_keys.rs index b00583f5e..01174a801 100644 --- a/crates/ui-egui/tests/it/native_menu_text_keys.rs +++ b/crates/ui-egui/tests/it/native_menu_text_keys.rs @@ -1,6 +1,7 @@ //! The macOS menu bar takes the Edit menu's key equivalents before any window sees them: while a //! text field has the keyboard, in a docked panel or a floating panel's own OS window, they edit -//! the field and leave the project alone, and the items stay enabled. +//! the field and leave the project alone, and the items stay enabled. The keys a floating panel's +//! window hands to the main window. use effectcraft_engine::Session; use effectcraft_ui_egui::EffectcraftApp; @@ -189,3 +190,46 @@ fn edit_menu_keys_edit_a_docked_text_field() { menu(&mut h, "edit.copy"); assert_eq!(project(h.state()), before, "the project is untouched"); } + +/// Only the keys go from a floating panel's window to the main window, and only while no widget +/// there has the keyboard: its pointer, wheel and typed text are its own. +#[test] +fn a_panel_window_hands_over_only_the_keys_no_widget_has() { + use egui::Key; + let mut app = app(); + menus::invoke(&mut app, &egui::Context::default(), "window.panelWindow", json!({"panel": "Project", "window": true})).unwrap(); + let mut h = Harness::builder().with_size(vec2(1600.0, 1000.0)).with_context_setup(effectcraft_ui_egui::framework::install_headless).build_eframe(|_| app); + let host = native_windows(&mut h); + let handed = |h: &mut Harness<'_, EffectcraftApp>, events: &[Event]| { + let hook = |h: &mut Harness<'_, EffectcraftApp>| { + let ctx = h.ctx.clone(); + let mut raw = egui::RawInput::default(); + eframe::App::raw_input_hook(h.state_mut(), &ctx, &mut raw); + raw.events + }; + hook(h); + for event in events { + to_window(&host, event.clone()); + } + h.step(); + hook(h) + }; + let key = |key| Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::NONE }; + let at = center(&h, "project.search"); + let wheel = Event::MouseWheel { + unit: egui::MouseWheelUnit::Point, + delta: vec2(0.0, 10.0), + modifiers: Modifiers::NONE, + phase: egui::TouchPhase::Move, + source: egui::MouseWheelSource::Wheel, + }; + let typed = [Event::PointerMoved(at), wheel, key(Key::J), Event::Text("j".into())]; + assert_eq!(handed(&mut h, &typed), vec![key(Key::J)], "the key alone"); + click(&mut h, at, Some(&host)); + h.run_steps(2); + assert_eq!(handed(&mut h, &typed), Vec::new(), "the search field has the keyboard"); + to_window(&host, key(Key::Tab)); + h.run_steps(3); + assert_ne!(native_menu::text_field_window(&h.ctx), host.borrow().window, "Tab moved on from the field"); + assert_eq!(handed(&mut h, &typed), Vec::new(), "another widget has the keyboard"); +} From 144982d678c24108b59eebafd24f9f72781dee16 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 14:26:45 +0000 Subject: [PATCH 31/39] The focused viewer keeps its focus at Escape --- crates/ui-egui/src/framework.rs | 9 ++------- crates/ui-egui/tests/it/ui_viewer.rs | 15 +++++---------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index de2981220..9a8a3e7de 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -122,16 +122,11 @@ pub(crate) fn viewer_id() -> egui::Id { /// Declares the Composition viewer, drawn in this pass, as the window's document canvas. With nothing focused it /// is the window's key target: the edit chords and the clipboard events stay in -/// egui's input for EffectCraft's shortcuts. Escape with the viewer focused is the viewer's own: it lets go of the -/// keyboard, as egui's other widgets do. +/// egui's input for EffectCraft's shortcuts. The focused viewer keeps its focus at Escape, which EffectCraft's own +/// handlers read from egui. pub(crate) fn host_canvas(ctx: &egui::Context) { const KEYS: KeyUse = KeyUse::CANVAS.with_edits(EditSet::ALL); craft_ui::runtime::focus::host_canvas(ctx, viewer_id(), KEYS); - // Read from the raw input, so an Escape that a popup consumed earlier in the pass counts. - let escape = |event: &egui::Event| matches!(event, egui::Event::Key { key: egui::Key::Escape, pressed: true, modifiers, .. } if !modifiers.any()); - if ctx.input(|i| i.raw.events.iter().any(escape)) { - ctx.memory_mut(|m| m.surrender_focus(viewer_id())); - } } /// The widget other than the Composition viewer that has the keyboard. The viewer as the focused Tab stop leaves the diff --git a/crates/ui-egui/tests/it/ui_viewer.rs b/crates/ui-egui/tests/it/ui_viewer.rs index 7071af7d2..796208b02 100644 --- a/crates/ui-egui/tests/it/ui_viewer.rs +++ b/crates/ui-egui/tests/it/ui_viewer.rs @@ -278,8 +278,7 @@ fn viewer_double_click_on_a_covered_path_of_the_selected_layer_free_transforms_i assert!(h.state().auto.find("viewer.freeTransform.handle.0").is_some(), "the free-transform box is up"); } -/// The Composition viewer as the focused Tab stop leaves the keys to the app, and Escape also makes it -/// let go of the keyboard. +/// The Composition viewer as the focused Tab stop leaves the keys to the app, and keeps its focus. #[test] fn the_focused_viewer_leaves_the_keys_to_the_app() { use craft_ui::runtime::focus::{FocusTarget, request}; @@ -301,17 +300,13 @@ fn the_focused_viewer_leaves_the_keys_to_the_app() { } h.run_steps(3); assert!(h.state().auto.find("viewer.freeTransform.handle.0").is_some(), "the free-transform box is up"); - let focus_viewer = |h: &mut Harness<'_, EffectcraftApp>| { - request(&h.ctx, FocusTarget::Id(viewer)); - h.run_steps(2); - assert_eq!(h.ctx.memory(|m| m.focused()), Some(viewer)); - }; - focus_viewer(&mut h); + request(&h.ctx, FocusTarget::Id(viewer)); + h.run_steps(2); + assert_eq!(h.ctx.memory(|m| m.focused()), Some(viewer)); assert_eq!(effectcraft_ui_egui::native_menu::text_field_window(&h.ctx), None, "the Edit menu's commands are the app's"); key(&mut h, egui::Key::Escape, egui::Modifiers::NONE); assert!(h.state().auto.find("viewer.freeTransform.handle.0").is_none(), "Escape ends the free transform"); - assert_eq!(h.ctx.memory(|m| m.focused()), None, "and the viewer lets go of the keyboard"); - focus_viewer(&mut h); + assert_eq!(h.ctx.memory(|m| m.focused()), Some(viewer), "and the viewer keeps its focus"); key(&mut h, egui::Key::H, egui::Modifiers::NONE); assert_eq!(h.state().ui.tool, Tool::Hand, "a tool shortcut runs"); assert_eq!(h.ctx.memory(|m| m.focused()), Some(viewer)); From c44f67531d7328e1b09317b1fc6da471b0035f96 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 14:41:33 +0000 Subject: [PATCH 32/39] The IME reset answers are one function beside the viewer's keyboard loop --- crates/ui-egui/src/panels/viewer_text.rs | 36 ++++++++++++++++-------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/panels/viewer_text.rs b/crates/ui-egui/src/panels/viewer_text.rs index cce2884c3..4ee724f6b 100644 --- a/crates/ui-egui/src/panels/viewer_text.rs +++ b/crates/ui-egui/src/panels/viewer_text.rs @@ -1075,6 +1075,29 @@ pub fn hook( owns } +/// Answers an IME reset that the integration completed or retired, while `custom_mutations` is on: whether `event` is +/// one. +fn reset_ended(app: &EffectcraftApp, ui: &egui::Ui, event: &egui::Event, custom_mutations: bool) -> bool { + match event { + egui::Event::ImeResetCompleted { request_id } => { + if custom_mutations { + complete_reset(app, ui, *request_id); + } + true + } + egui::Event::ImeResetRetired { request_id } => { + // The integration dropped the request and no completion will follow: ask again, or the + // composition stays stale forever. + let ctx = ui.ctx(); + if custom_mutations && read_reset(ctx).is_some_and(|guard| !guard.suspended && guard.request == Some(*request_id)) { + request_reset(app, ctx); + } + true + } + _ => false, + } +} + /// This frame's keys, in order, into the edited text, up to a press outside the `viewer`: the /// panel it lands in decides (after this frame's panels) whether the edit ends, so the keys after /// it in this frame are neither typed nor run as shortcuts (#831). @@ -1106,18 +1129,7 @@ fn keyboard(app: &mut EffectcraftApp, ui: &mut egui::Ui, viewer: Rect) { ctx.input_mut(|input| input.events.retain(|event| !matches!(event, egui::Event::ImeResetCompleted { .. }))); let mut custom_mutations = app.session.state.text_edit.is_some(); for ev in events { - if let egui::Event::ImeResetCompleted { request_id } = &ev { - if custom_mutations { - complete_reset(app, ui, *request_id); - } - continue; - } - if let egui::Event::ImeResetRetired { request_id } = &ev { - // The integration dropped the request and no completion will follow: ask again, or the - // composition stays stale forever. - if custom_mutations && read_reset(&ctx).is_some_and(|guard| !guard.suspended && guard.request == Some(*request_id)) { - request_reset(app, &ctx); - } + if reset_ended(app, ui, &ev, custom_mutations) { continue; } sync_ime_target(ui, app); From 5c8a110c8f644175522f8dcbce112a4c49cb1194 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 15:15:01 +0000 Subject: [PATCH 33/39] Copy, Cut and Paste pressed in a floating panel reach the app --- crates/ui-egui/src/framework.rs | 59 ++++++++++++++++++++++++++- crates/ui-egui/src/lib.rs | 3 ++ crates/ui-egui/src/menus/shortcuts.rs | 8 ++-- 3 files changed, 65 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 9a8a3e7de..a2194aa97 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -96,11 +96,13 @@ impl EffectcraftApp { } /// The root values of this frame. EffectCraft registers no commands with the runtime (its own shortcut table runs - /// every key, [`command_overrides`]) and lets it toggle no chrome, so the output carries nothing it acts on. The + /// every key, [`command_overrides`]) and lets it toggle no chrome. The one output it acts on is the clipboard + /// chords of a window with no canvas ([`clipboard_events`]). The /// interface scale is Settings > Appearance > UI Scale; the runtime writes it to the context. While one of /// EffectCraft's own dialogs or a command's file dialog is up, the runtime blocks the panels floated into windows /// of their own. - pub(crate) fn frame_input(&mut self, ctx: &egui::Context, _output: FrameOutput) -> FrameInput { + pub(crate) fn frame_input(&mut self, ctx: &egui::Context, output: FrameOutput) -> FrameInput { + self.forwarded.clips.extend(clipboard_events(&output)); let mode = if self.tokens.kind.is_light() { craft_theme::Mode::Light } else { craft_theme::Mode::Dark }; let scale = self.session.prefs.appearance.ui_scale as f32 / 100.0; let root = RootEnv::new().mode(mode).scale(Scale::new(scale)); @@ -115,6 +117,31 @@ impl EffectcraftApp { } } +/// The Copy, Cut and Paste the runtime took in a window with no canvas, as the clipboard events that window's chord +/// would have been. Only a command a key press fired, and a Paste only with the platform's content, which a key press +/// never carries (so a pasted key press cannot run twice). A Copy or Cut from a synthetic key press that egui kept +/// as well runs twice. Native only: the web sends the key press with the clipboard event. +#[cfg(not(target_arch = "wasm32"))] +fn clipboard_events(output: &FrameOutput) -> Vec { + use craft_ui::runtime::commands::{EditCommands, FirePhase, FireSource}; + output + .fired + .iter() + .filter(|fired| fired.source == FireSource::Key && fired.phase == FirePhase::Press && fired.target.is_none()) + .filter_map(|fired| match fired.command.id.as_str() { + id if id == EditCommands::Copy.id() => Some(egui::Event::Copy), + id if id == EditCommands::Cut.id() => Some(egui::Event::Cut), + id if id == EditCommands::Paste.id() => fired.pasted.as_ref()?.text.as_ref().map(|text| egui::Event::Paste(text.to_string())), + _ => None, + }) + .collect() +} + +#[cfg(target_arch = "wasm32")] +fn clipboard_events(_: &FrameOutput) -> Vec { + Vec::new() +} + /// The Composition viewer's widget, its window's document canvas. pub(crate) fn viewer_id() -> egui::Id { egui::Id::unique("viewer-interact") @@ -167,3 +194,31 @@ fn take_window_intent(ctx: &egui::Context, intent: Intent) -> bool { pub(crate) fn decide(close: bool) -> CloseDecision { if close { CloseDecision::Close } else { CloseDecision::Hold } } + +#[cfg(test)] +mod tests { + use super::*; + use craft_ui::runtime::commands::{ClipContent, CommandRef, FirePhase, FireSource, Fired}; + + fn fired(id: &str, pasted: Option<&str>) -> Fired { + let mut fired = Fired::new(CommandRef::new(id), FireSource::Key, FirePhase::Press, 0.0); + fired.pasted = pasted.map(|text| { + let mut content = ClipContent::default(); + content.text = Some(text.into()); + content + }); + fired + } + + /// Copy pressed in a window with no canvas reaches the shortcuts once; a Paste with no content of its own is a key + /// press the app already reads, and so is any other edit command. + #[test] + fn clipboard_chords_of_a_window_with_no_canvas_queue_once() { + let mut output = FrameOutput::default(); + output.fired = vec![fired("edit.copy", None), fired("edit.paste", None), fired("edit.undo", None), fired("edit.paste", Some("x"))]; + let mut app = EffectcraftApp::new(effectcraft_engine::Session::default()); + let ctx = egui::Context::default(); + app.frame_input(&ctx, output); + assert_eq!(app.forwarded.clips, [egui::Event::Copy, egui::Event::Paste("x".into())]); + } +} diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 158b6d515..423408c28 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -582,6 +582,9 @@ impl FileDialogsUp { #[derive(Default)] pub(crate) struct ForwardedInput { pub(crate) events: Vec, + /// Copy, Cut and Paste the runtime took from a window with no canvas ([`crate::framework`]), for the + /// next pass of the shortcuts to read after that pass's own events. + pub(crate) clips: Vec, pub(crate) files: Vec, /// Files handed over by a floating window whose panel under the pointer was the Timeline. The /// paths lose the window they came from, so this keeps the one thing the import still needs diff --git a/crates/ui-egui/src/menus/shortcuts.rs b/crates/ui-egui/src/menus/shortcuts.rs index 655d5c0b9..703a9cd7c 100644 --- a/crates/ui-egui/src/menus/shortcuts.rs +++ b/crates/ui-egui/src/menus/shortcuts.rs @@ -278,7 +278,7 @@ fn cancel_dialog(app: &mut EffectcraftApp, ctx: &egui::Context) { type KeyEvent = (egui::Key, egui::Modifiers, bool, Option); /// The frame's key presses, with clipboard events mapped back to Ctrl+C / X / V. -fn collect_key_events(ctx: &egui::Context, start: Option, clipboard: bool, project: bool) -> Vec { +fn collect_key_events(ctx: &egui::Context, start: Option, clipboard: bool, project: bool, queued: &[egui::Event]) -> Vec { ctx.input(|i| { // The windowing layer turns Ctrl+C / Ctrl+X / Ctrl+V into clipboard events instead of // key presses: map them back to the keys (with the modifiers held) so Edit ▸ Copy, Cut, @@ -290,7 +290,7 @@ fn collect_key_events(ctx: &egui::Context, start: Option, clipb let mut at = if changed { start } else { Some(i.modifiers) }; let held = |at: Option| at.filter(|m| m.command).unwrap_or(egui::Modifiers::COMMAND); let mut out = Vec::new(); - for e in &i.events { + for e in i.events.iter().chain(queued) { match e { egui::Event::ModifiersChanged(m) => at = Some(*m), // egui forgets the modifiers held when the window loses focus. @@ -349,6 +349,8 @@ fn panel_owns_enter(kind: PanelKind) -> bool { } fn handle_shortcuts_impl(app: &mut EffectcraftApp, ctx: &egui::Context, tab_only: bool) { + // The clipboard chords of a window with no canvas wait for this frame's pass only, whatever stops it. + let queued = if tab_only { Vec::new() } else { std::mem::take(&mut app.forwarded.clips) }; let start = modifiers_at_start(ctx); if !tab_only && app.dialog.is_some() && ctx.input(|i| i.key_pressed(egui::Key::Escape)) { escape_dialog(app, ctx); @@ -370,7 +372,7 @@ fn handle_shortcuts_impl(app: &mut EffectcraftApp, ctx: &egui::Context, tab_only // The paste event's text: Edit ▸ Paste pastes SVG markup as a shape layer. let pasted = if clipboard { ctx.input(|i| i.events.iter().rev().find_map(|e| if let egui::Event::Paste(t) = e { Some(t.clone()) } else { None })) } else { None }; - let mut events = collect_key_events(ctx, start, clipboard, project); + let mut events = collect_key_events(ctx, start, clipboard, project, &queued); events.retain(|(key, _, _, _)| (*key == egui::Key::Tab) == tab_only); if !tab_only && clipboard && app.dialog.is_none() { numpad_star_marker(app, ctx); From b74e746f3f7dba400f85f4e19b85c61146a58af9 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 15:51:18 +0000 Subject: [PATCH 34/39] Repin craft-libs to storytold next aa401985d --- Cargo.lock | 138 +++++++++++++++++++------------------- Cargo.toml | 112 +++++++++++++++---------------- crates/effects/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 2 +- 4 files changed, 127 insertions(+), 127 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 636453897..589c639b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,23 +1304,23 @@ dependencies = [ [[package]] name = "craft-aaf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-audio", "craft-cfb", - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b)", "thiserror 2.0.21", ] [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "block2 0.6.2", "objc2-app-kit 0.3.2", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "rustix 1.1.6", ] @@ -1338,7 +1338,7 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-media", "craft-xml", @@ -1351,7 +1351,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1369,12 +1369,12 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "egui", ] @@ -1382,7 +1382,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "md-5", "rayon", @@ -1391,12 +1391,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", ] @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", ] @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "thiserror 2.0.21", ] @@ -1434,7 +1434,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", "serde_json", @@ -1444,12 +1444,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "exr", "flate2", @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1475,12 +1475,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-color", "craft-time", @@ -1491,7 +1491,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "gif", "image", @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "craft-hdr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "thiserror 2.0.21", ] @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "fixed_decimal", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "thiserror 2.0.21", ] @@ -1557,7 +1557,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde_json", ] @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-host", "craft-i18n", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-zip", "serde_json", @@ -1590,7 +1590,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-audio", "craft-color", @@ -1614,7 +1614,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1624,7 +1624,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "craft-codepage", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "flate2", "serde", @@ -1645,7 +1645,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "hayro-syntax", "serde", @@ -1655,7 +1655,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "async-channel", "async-io", @@ -1686,7 +1686,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-eps", "kurbo", @@ -1699,7 +1699,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "encoding_rs", "flate2", @@ -1710,7 +1710,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1722,7 +1722,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-tiff", "miniz_oxide 0.9.1", @@ -1736,7 +1736,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-atomic", "craft-host", @@ -1753,12 +1753,12 @@ dependencies = [ [[package]] name = "craft-sniff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-xml", "flate2", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "thiserror 2.0.21", ] @@ -1783,7 +1783,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1798,7 +1798,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", "thiserror 2.0.21", @@ -1807,7 +1807,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "serde", "thiserror 2.0.21", @@ -1827,7 +1827,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-time", "serde", @@ -1837,12 +1837,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-i18n", @@ -1872,7 +1872,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "accesskit", "craft-behavior", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1939,7 +1939,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1960,7 +1960,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1980,7 +1980,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "chrono", "craft-host", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "flate2", "serde", @@ -2039,7 +2039,7 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-media", "rav1e", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "image", "thiserror 2.0.21", @@ -2059,7 +2059,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "winsafe", ] @@ -2067,7 +2067,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "craft-appkit", "craft-atomic", @@ -2091,7 +2091,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "thiserror 2.0.21", ] @@ -2109,7 +2109,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2678,7 +2678,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e)", + "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b)", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -4249,7 +4249,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "hayro-ccitt", ] @@ -4263,7 +4263,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e#d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" +source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 5e696f0b4..07fe85bbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -97,13 +97,13 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +126,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -237,30 +237,30 @@ codegen-units = 1 # filmcraft-media pins storytold craft-libs; the app needs one copy of each crate. [patch."https://github.com/storytold/craft-libs"] -craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } -craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.1.0" } +craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } +craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e", version = "=0.3.0" } +hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.3.0" } 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" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index a14481e5b..18dab406c 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e" } +craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index f9c386cea..aab13260d 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -7,7 +7,7 @@ use serde_json::Value; // The repository Cargo.toml pins craft-libs from (the aiongg fork while filmcraft-media pins storytold craft-libs). const REPO: &str = "https://github.com/aiongg/craft-libs"; -const REV: &str = "d1bdf8e5dac7513e4fbc4dab16edaaeda5ebcf5e"; +const REV: &str = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b"; const PACKAGES: &[(&str, &str)] = &[("craft-pdf", "0.1.0"), ("craft-ps", "0.1.0"), ("hayro-syntax", "0.7.2"), ("hayro-jbig2", "0.3.0")]; pub fn run(root: &Path) -> Result<(), String> { From 9776fc722fa8393095beb5bb4be767395463ff39 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 18:28:37 +0000 Subject: [PATCH 35/39] 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/framework.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index a2194aa97..5e1c8c65f 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -19,7 +19,7 @@ use craft_ui::runtime::commands::{CommandInput, CommandSet as _, NavCommand, Qui use craft_ui::runtime::env::{RootEnv, Scale}; use craft_ui::runtime::focus::{EditSet, KeyUse}; use craft_ui::runtime::frame::{FrameInput, FrameOutput}; -use craft_ui::runtime::keys::{Intent, with_window_intents}; +use craft_ui::runtime::keys::{Intent, escape_mods, with_window_intents}; use craft_ui::shell::embed::{self, CloseDecision}; use craft_window::system::WindowSystem; use egui::ViewportId; @@ -173,8 +173,9 @@ pub(crate) fn widget_has_keyboard(ctx: &egui::Context) -> bool { /// EffectCraft reads it. pub(crate) fn return_window_keys(ctx: &egui::Context) { if take_window_intent(ctx, Intent::Cancel) { + let held = 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 805848551ff03bf995cfafe527f5c9ee1ec200ab Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 19:14:41 +0000 Subject: [PATCH 36/39] Repin craft-libs to storytold next 8fa4db64a9 and egui to b9770908e; the media crates at filmcraft's rev, one craft-timeline --- Cargo.lock | 234 +++++++++++++++++++++----------------- Cargo.toml | 120 ++++++++----------- crates/effects/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 13 +-- 4 files changed, 186 insertions(+), 183 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 589c639b7..eee4fa3a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,23 +1304,23 @@ dependencies = [ [[package]] name = "craft-aaf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-audio", "craft-cfb", - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b)", + "craft-timeline", "thiserror 2.0.21", ] [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/aiongg/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", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "rustix 1.1.6", ] @@ -1338,10 +1338,10 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-media", - "craft-xml", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "log", "rayon", "symphonia 0.6.1", @@ -1351,7 +1351,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1369,12 +1369,12 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "egui", ] @@ -1382,7 +1382,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "md-5", "rayon", @@ -1391,12 +1391,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "serde", ] @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-ecproj-format", "craft-pcraft-format", @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde", ] @@ -1426,7 +1426,15 @@ dependencies = [ [[package]] name = "craft-dpx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "craft-dpx" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "thiserror 2.0.21", ] @@ -1434,7 +1442,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde", "serde_json", @@ -1444,12 +1452,21 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-exr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +dependencies = [ + "flate2", + "serde_json", +] + +[[package]] +name = "craft-exr" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "exr", "flate2", @@ -1461,7 +1478,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1475,12 +1492,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-frame" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-color", "craft-time", @@ -1491,7 +1508,7 @@ dependencies = [ [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "gif", "image", @@ -1500,7 +1517,7 @@ dependencies = [ [[package]] name = "craft-hdr" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "thiserror 2.0.21", ] @@ -1508,7 +1525,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1521,7 +1538,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "fixed_decimal", @@ -1549,7 +1566,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "thiserror 2.0.21", ] @@ -1557,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-jsonrpc" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde_json", ] @@ -1565,13 +1582,13 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-host", "craft-i18n", "craft-tracked", "craft-ui-macros", - "craft-xml", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", "egui", "serde", "serde_json", @@ -1580,7 +1597,7 @@ dependencies = [ [[package]] name = "craft-lottie" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-zip", "serde_json", @@ -1590,7 +1607,7 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "chrono", "thiserror 2.0.21", @@ -1599,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-media-source" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-audio", "craft-color", @@ -1614,7 +1631,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-zip", "miniz_oxide 0.9.1", @@ -1624,7 +1641,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "craft-codepage", @@ -1634,7 +1651,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "flate2", "serde", @@ -1645,7 +1662,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "hayro-syntax", "serde", @@ -1655,7 +1672,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "async-channel", "async-io", @@ -1686,7 +1703,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-eps", "kurbo", @@ -1699,7 +1716,18 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +dependencies = [ + "encoding_rs", + "flate2", + "rayon", + "thiserror 2.0.21", +] + +[[package]] +name = "craft-psd" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "encoding_rs", "flate2", @@ -1710,7 +1738,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "dispatch2", "objc2 0.6.5", @@ -1722,7 +1750,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-tiff", "miniz_oxide 0.9.1", @@ -1736,7 +1764,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-atomic", "craft-host", @@ -1753,14 +1781,14 @@ dependencies = [ [[package]] name = "craft-sniff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ - "craft-xml", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", "flate2", "kurbo", "quick-xml 0.41.0", @@ -1775,7 +1803,7 @@ dependencies = [ [[package]] name = "craft-tga" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "thiserror 2.0.21", ] @@ -1783,7 +1811,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1798,7 +1826,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "serde", "thiserror 2.0.21", @@ -1807,7 +1835,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "serde", "thiserror 2.0.21", @@ -1819,30 +1847,20 @@ version = "0.1.0" source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-time", - "craft-xml", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "serde", "serde_json", ] -[[package]] -name = "craft-timeline" -version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" -dependencies = [ - "craft-time", - "serde", - "web-time", -] - [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/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/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1856,7 +1874,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-i18n", @@ -1872,7 +1890,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "accesskit", "craft-behavior", @@ -1910,7 +1928,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1921,7 +1939,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1939,7 +1957,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1960,7 +1978,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1980,7 +1998,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +2017,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "craft-host", @@ -2028,7 +2046,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "flate2", "serde", @@ -2039,7 +2057,7 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "craft-media", "rav1e", @@ -2050,7 +2068,7 @@ dependencies = [ [[package]] name = "craft-webp" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "image", "thiserror 2.0.21", @@ -2059,7 +2077,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "winsafe", ] @@ -2067,7 +2085,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-appkit", "craft-atomic", @@ -2091,7 +2109,17 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" +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=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2101,7 +2129,7 @@ dependencies = [ [[package]] name = "craft-y4m" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d#33be35625e252cc4f06aa375b3b428521faea37d" dependencies = [ "thiserror 2.0.21", ] @@ -2109,7 +2137,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2403,7 +2431,7 @@ dependencies = [ [[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", @@ -2564,7 +2592,7 @@ name = "effectcraft-export" version = "0.25.1" dependencies = [ "craft-audio", - "craft-exr", + "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", "craft-gif", "craft-media", "craft-tga", @@ -2678,7 +2706,7 @@ dependencies = [ name = "effectcraft-interchange" version = "0.25.1" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b)", + "craft-timeline", "effectcraft-color", "effectcraft-keyframe", "effectcraft-project", @@ -2732,8 +2760,8 @@ dependencies = [ "craft-audio", "craft-color", "craft-docpath", - "craft-dpx", - "craft-exr", + "craft-dpx 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", + "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", "craft-frame", "craft-gif", "craft-media", @@ -2844,7 +2872,7 @@ name = "effectcraft-psd" version = "0.25.1" dependencies = [ "craft-codepage", - "craft-psd", + "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", "miniz_oxide 0.9.1", ] @@ -2852,7 +2880,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.25.1" dependencies = [ - "craft-exr", + "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21)", "effectcraft-color", "effectcraft-geom", "rayon", @@ -3045,7 +3073,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", @@ -3080,7 +3108,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", @@ -3099,7 +3127,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", @@ -3118,7 +3146,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", @@ -3144,7 +3172,7 @@ dependencies = [ [[package]] name = "egui_extras" 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", "egui", @@ -3157,7 +3185,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", @@ -3170,7 +3198,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 = [ "eframe", "egui", @@ -3193,7 +3221,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[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", ] @@ -3286,7 +3314,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", @@ -3312,7 +3340,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 = "equator" @@ -3537,7 +3565,7 @@ source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a dependencies = [ "craft-aaf", "craft-audio", - "craft-timeline 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-timeline", "filmcraft-cfb", "filmcraft-color", "filmcraft-geom", @@ -3572,12 +3600,12 @@ version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ "craft-audio", - "craft-dpx", - "craft-exr", + "craft-dpx 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-exr 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-hdr", "craft-media", "craft-media-source", - "craft-psd", + "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", "craft-sniff", "craft-tga", "craft-tiff", @@ -3611,7 +3639,7 @@ name = "filmcraft-time" version = "0.20.1" source = "git+https://github.com/storytold/filmcraft?rev=e7345f6e04a9bb921c2613a6aa92d162edf39b3b#e7345f6e04a9bb921c2613a6aa92d162edf39b3b" dependencies = [ - "craft-timeline 0.1.0 (git+https://github.com/storytold/craft-libs?rev=33be35625e252cc4f06aa375b3b428521faea37d)", + "craft-timeline", ] [[package]] @@ -4249,7 +4277,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "hayro-ccitt", ] @@ -4263,7 +4291,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/aiongg/craft-libs?rev=aa401985dd4658cdaa272fdccafdcd6e7f4dd60b#aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 07fe85bbb..917ff9f77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,28 +11,28 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-timeline = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false } -craft-mime = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-pdf = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-jsonrpc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-dpx = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-ps = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["read"] } -craft-exr = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-gif = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-tga = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-psd = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-codepage = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-webp = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-lottie = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-doc = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-timeline = { git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", default-features = false } +craft-mime = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-jsonrpc = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-dpx = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-ps = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", default-features = false, features = ["read"] } +craft-exr = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-gif = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-tga = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } +craft-psd = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-codepage = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-webp = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-lottie = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-doc = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-vectorcraft-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/aiongg/craft-libs", version = "=0.1.0", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", features = ["ui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -96,14 +96,15 @@ image = { version = "0.25", default-features = false, features = ["png", "jpeg"] same-file = "1.0" tempfile = "3.27" -# codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync. -craft-media = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["isobmff", "matroska"] } -craft-media-source = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-frame = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-color = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-time = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-audio = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +# codecs + containers shared by the Craft apps (crates/media, crates/export); keep all in sync, with +# filmcraft-media's craft-libs rev: their types cross between the two. +craft-media = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", default-features = false, features = ["isobmff", "matroska"] } +craft-media-source = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } +craft-frame = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } +craft-color = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } +craft-time = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d" } +craft-audio = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", default-features = false, features = ["aac-decode", "aac-encode", "alac-decode", "opus-decode", "opus-encode", "ac3-decode", "mp3-decode", "mpa-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "33be35625e252cc4f06aa375b3b428521faea37d", features = ["h264-decode", "h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -126,12 +127,12 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-ui = { version = "0.1.0", 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-keymap = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -235,43 +236,20 @@ opt-level = 3 lto = "thin" codegen-units = 1 -# filmcraft-media pins storytold craft-libs; the app needs one copy of each crate. -[patch."https://github.com/storytold/craft-libs"] -craft-aaf = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-audio = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-cfb = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-color = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-dpx = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-exr = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-frame = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-hdr = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-jpeg = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-media = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-media-source = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-psd = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-raw = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-sniff = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-tga = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-tiff = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-time = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-video = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-xml = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } -craft-y4m = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.1.0" } - [patch.crates-io] -hayro-syntax = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b", version = "=0.3.0" } -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" } -egui_extras = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } -eframe = { git = "https://github.com/storytold/egui.git", rev = "b15ffe9bfc2c8e6748533b32b708e10abaf2afec" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "=0.3.0" } +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" } +egui_extras = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } +eframe = { git = "https://github.com/storytold/egui.git", rev = "b9770908e0f304896f9658d239a7b29cf8af1564" } # Patch a crate only together with the dependency that needs it: an unused patch makes the Nix # build, which uses vendored sources, fail (`cargo xtask lock-patches`). winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } diff --git a/crates/effects/Cargo.toml b/crates/effects/Cargo.toml index 18dab406c..99b562ab4 100644 --- a/crates/effects/Cargo.toml +++ b/crates/effects/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true workspace = true [dependencies] -craft-cms = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b" } +craft-cms = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21" } effectcraft-geom = { workspace = true } effectcraft-color = { workspace = true } effectcraft-keyframe = { workspace = true } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index aab13260d..a7dcc6d81 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,9 +5,7 @@ use std::process::Command; use serde_json::Value; -// The repository Cargo.toml pins craft-libs from (the aiongg fork while filmcraft-media pins storytold craft-libs). -const REPO: &str = "https://github.com/aiongg/craft-libs"; -const REV: &str = "aa401985dd4658cdaa272fdccafdcd6e7f4dd60b"; +const REV: &str = "8fa4db64a9bb943520259ea95331a303ba788f21"; const PACKAGES: &[(&str, &str)] = &[("craft-pdf", "0.1.0"), ("craft-ps", "0.1.0"), ("hayro-syntax", "0.7.2"), ("hayro-jbig2", "0.3.0")]; pub fn run(root: &Path) -> Result<(), String> { @@ -28,7 +26,7 @@ pub fn run(root: &Path) -> Result<(), String> { fn validate(metadata: &Value) -> Result<(), String> { let packages = metadata.get("packages").and_then(Value::as_array).ok_or("cargo metadata has no packages")?; let nodes = metadata.pointer("/resolve/nodes").and_then(Value::as_array).ok_or("cargo metadata has no resolved nodes")?; - let source = format!("git+{REPO}?rev={REV}#{REV}"); + let source = format!("git+https://github.com/storytold/craft-libs?rev={REV}#{REV}"); for (name, version) in PACKAGES { let matches: Vec<_> = packages.iter().filter(|p| p["name"] == *name).collect(); if matches.len() != 1 || matches[0]["version"] != *version || matches[0]["source"] != source { @@ -59,10 +57,9 @@ mod tests { use serde_json::json; fn metadata() -> Value { - let packages: Vec<_> = PACKAGES - .iter() - .map(|(name, version)| json!({"id": name, "name": name, "version": version, "source": format!("git+{REPO}?rev={REV}#{REV}")})) - .collect(); + let packages: Vec<_> = PACKAGES.iter().map(|(name, version)| { + json!({"id": name, "name": name, "version": version, "source": format!("git+https://github.com/storytold/craft-libs?rev={REV}#{REV}")}) + }).collect(); json!({"packages": packages, "resolve": {"nodes": [ {"id": "hayro-syntax", "features": ["std"]}, {"id": "craft-pdf", "features": ["read"]}, {"id": "craft-ps", "features": ["read"]} From 5bdbd2cf89429029885e1a343020e80e2525a1d0 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 20:10:33 +0000 Subject: [PATCH 37/39] The font picker stays on the side it opened on --- crates/ui-egui/src/panels/text_panels.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/text_panels.rs b/crates/ui-egui/src/panels/text_panels.rs index e80f20bfc..358c4ab17 100644 --- a/crates/ui-egui/src/panels/text_panels.rs +++ b/crates/ui-egui/src/panels/text_panels.rs @@ -1105,11 +1105,13 @@ fn header_menu( ) -> Option { egui::Popup::from_response(field) .open_bool(open) + .max_height_from_constrain(true) + .align_alternatives(&[egui::RectAlign::TOP_START]) .width(field.rect.width()) .close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside) .show(|ui| { ui.set_min_width(ui.available_width()); - ui.set_max_height(height); + ui.set_max_height(height.min(ui.available_height())); let header = header(ui); egui::ScrollArea::vertical().max_height(ui.available_height().max(0.0)).show(ui, |ui| list(ui, header)).inner }) From fb5a5fd9101b93638623ddd142bbd466bd159649 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 20:10:33 +0000 Subject: [PATCH 38/39] Floating windows carry the running channel's app id --- crates/ui-egui/src/framework.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/ui-egui/src/framework.rs b/crates/ui-egui/src/framework.rs index 5e1c8c65f..5057ac086 100644 --- a/crates/ui-egui/src/framework.rs +++ b/crates/ui-egui/src/framework.rs @@ -31,9 +31,6 @@ use crate::EffectcraftApp; #[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.effectcraft"; - /// The scripts of the interface languages, for the font stack. static SCRIPTS: I18nScripts = I18nScripts; @@ -44,7 +41,7 @@ fn ui_fonts() -> UiFonts<'static> { } fn install_with(ctx: &egui::Context, shell: ShellInfo, windows: Arc) -> Result<(), String> { - let spec = craft_ui::InstallSpec::new(shell, windows).app_id(APP_ID); + let spec = craft_ui::InstallSpec::new(shell, windows).app_id(crate::channel::app_id()); embed::install(ctx, spec, &ui_fonts()).map(drop).map_err(|error| format!("the UI runtime could not be installed: {error}")) } From 984b10c5a66a65e68ed1ae035330ecaf4cb84228 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 20:44:58 +0000 Subject: [PATCH 39/39] Preview keeps its 46-point body under the 28-point tab strip; the examples install the UI runtime --- crates/ui-egui/examples/cache_bench.rs | 5 ++++- crates/ui-egui/examples/snapshot.rs | 1 + crates/ui-egui/src/dock.rs | 2 +- crates/ui-egui/tests/it/ui_tabs.rs | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/examples/cache_bench.rs b/crates/ui-egui/examples/cache_bench.rs index 43e937c92..0efcdea21 100644 --- a/crates/ui-egui/examples/cache_bench.rs +++ b/crates/ui-egui/examples/cache_bench.rs @@ -225,7 +225,10 @@ fn main() { fn play(session: effectcraft_engine::Session, cid: ItemId, secs: f64, gpu: bool) { use effectcraft_ui_egui::{ControlRequest, EffectcraftApp}; let (tx, rx) = std::sync::mpsc::channel::(); - let builder = egui_kittest::Harness::builder().with_size(egui::vec2(1920.0, 1200.0)).with_pixels_per_point(1.0); + let builder = egui_kittest::Harness::builder() + .with_size(egui::vec2(1920.0, 1200.0)) + .with_pixels_per_point(1.0) + .with_context_setup(effectcraft_ui_egui::framework::install_headless); let builder = if gpu { builder.wgpu() } else { builder }; let mut h = builder.build_eframe(move |_| EffectcraftApp::new(session).with_control(rx)); { diff --git a/crates/ui-egui/examples/snapshot.rs b/crates/ui-egui/examples/snapshot.rs index e15c135bd..0646e5e79 100644 --- a/crates/ui-egui/examples/snapshot.rs +++ b/crates/ui-egui/examples/snapshot.rs @@ -103,6 +103,7 @@ fn main() { .with_size(egui::vec2(args.size.0, args.size.1)) .with_pixels_per_point(args.scale) .wgpu() + .with_context_setup(effectcraft_ui_egui::framework::install_headless) .build_eframe(move |_cc| EffectcraftApp::new(session).with_control(rx)); settle(&mut harness, args.settle); for step in &args.steps { diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index 1addcd88c..32bc6ba98 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -255,7 +255,7 @@ fn workspace_floating(name: &str) -> Vec> { } /// The height of a frame's tab strip ([`Tokens::tab_h`]). -pub const TAB_STRIP: f32 = 30.0; +pub const TAB_STRIP: f32 = 28.0; /// The height of Default's Preview frame: its tab strip over a 46-point body that fits the /// playback controls. pub const PREVIEW_FRAME: f32 = TAB_STRIP + 46.0; diff --git a/crates/ui-egui/tests/it/ui_tabs.rs b/crates/ui-egui/tests/it/ui_tabs.rs index a9df1b556..56104aef6 100644 --- a/crates/ui-egui/tests/it/ui_tabs.rs +++ b/crates/ui-egui/tests/it/ui_tabs.rs @@ -234,20 +234,20 @@ fn preview_divider(h: &Harness<'_, EffectcraftApp>) -> egui::Rect { .expect("a gutter between Preview and Properties") } -/// Default's right column: a short Preview frame (48 points of body under next's 28-point strip) and the Properties frame +/// Default's right column: a short Preview frame (46 points of body) and the Properties frame /// below it taking the rest of the column, at any window height. #[test] fn the_default_preview_frame_is_short_and_properties_takes_the_rest() { let (mut h, _, _) = harness(); let body = |h: &Harness<'_, EffectcraftApp>| rect(h, "panel.Preview").height(); - assert!((body(&h) - 48.0).abs() < 1.5, "Preview {}", body(&h)); + assert!((body(&h) - 46.0).abs() < 1.5, "Preview {}", body(&h)); let props = rect(&h, "panel.Properties"); assert!(props.height() > 300.0, "Properties {props:?}"); // A taller window gives the room to Properties. let size = h.ctx.content_rect().size(); h.set_size(size + egui::vec2(0.0, 200.0)); h.run_steps(3); - assert!((body(&h) - 48.0).abs() < 1.5, "Preview {}", body(&h)); + assert!((body(&h) - 46.0).abs() < 1.5, "Preview {}", body(&h)); assert!((rect(&h, "panel.Properties").height() - props.height() - 200.0).abs() < 2.0); } @@ -504,7 +504,7 @@ fn open_comps_are_tabs_in_the_timeline_row_and_the_rest_are_in_its_overflow_menu } #[test] -fn an_inactive_comp_tab_shows_its_close_button_on_hover_and_closes_without_showing_its_comp() { +fn an_inactive_comp_tab_shows_its_close_button_and_closes_without_showing_its_comp() { let (mut h, pre, main) = harness(); h.state_mut().session.state.open_comps = vec![ItemId(main), ItemId(pre)]; h.run_steps(3);