diff --git a/Cargo.lock b/Cargo.lock index 9b99f0e2..8cad3527 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,7 +249,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "wl-clipboard-rs", "x11rb", ] @@ -681,7 +681,7 @@ dependencies = [ "maybe-owned", "rustix 1.1.6", "rustix-linux-procfs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "winx", ] @@ -969,10 +969,20 @@ dependencies = [ "libc", ] +[[package]] +name = "craft-appkit" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +dependencies = [ + "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=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "rustix 1.1.6", ] @@ -980,7 +990,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -998,7 +1008,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "egui", ] @@ -1006,12 +1016,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "rayon", ] @@ -1019,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "block2 0.6.2", "craft-atomic", @@ -1039,7 +1049,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "serde", ] @@ -1047,7 +1057,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "harfrust 0.13.3", "kurbo", @@ -1061,12 +1071,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1079,7 +1089,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "chrono", "fixed_decimal", @@ -1107,7 +1117,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-dds", "craft-jpeg", @@ -1134,7 +1144,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "thiserror 2.0.21", ] @@ -1142,7 +1152,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-host", "craft-i18n", @@ -1157,7 +1167,7 @@ dependencies = [ [[package]] name = "craft-materialx" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-xml", "thiserror 2.0.21", @@ -1166,7 +1176,7 @@ dependencies = [ [[package]] name = "craft-mcmat" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-zip", "serde", @@ -1177,7 +1187,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-behavior", "craft-host", @@ -1195,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-mesh" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "serde_json", ] @@ -1203,7 +1213,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "brotli-decompressor", "chrono", @@ -1215,7 +1225,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "chrono", "craft-codepage", @@ -1225,7 +1235,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "serde", ] @@ -1233,7 +1243,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "async-channel", "async-io", @@ -1261,10 +1271,19 @@ dependencies = [ "zbus", ] +[[package]] +name = "craft-png" +version = "0.1.0" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" +dependencies = [ + "png", + "thiserror 2.0.21", +] + [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "dispatch2", "egui", @@ -1277,7 +1296,7 @@ dependencies = [ [[package]] name = "craft-sbs" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "base64 0.23.1", "craft-mime", @@ -1290,7 +1309,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-atomic", "craft-host", @@ -1307,7 +1326,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1328,7 +1347,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "bytemuck", "dds", @@ -1339,7 +1358,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1354,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "serde", "thiserror 2.0.21", @@ -1364,12 +1383,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1383,7 +1402,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-behavior", "craft-i18n", @@ -1399,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "accesskit", "craft-behavior", @@ -1437,7 +1456,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1448,7 +1467,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-behavior", "craft-host", @@ -1466,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-behavior", "craft-host", @@ -1487,7 +1506,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-behavior", "craft-host", @@ -1507,7 +1526,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "craft-behavior", "craft-host", @@ -1526,7 +1545,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "chrono", "craft-host", @@ -1555,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "winsafe", ] @@ -1563,8 +1582,9 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ + "craft-appkit", "craft-atomic", "craft-behavior", "craft-host", @@ -1580,12 +1600,13 @@ dependencies = [ "serde_json", "wayland-client", "winsafe", + "x11rb", ] [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "quick-xml 0.41.0", "serde", @@ -1595,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/aiongg/craft-libs?rev=cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de#cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" +source = "git+https://github.com/aiongg/craft-libs?rev=2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414#2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1778,7 +1799,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -2181,7 +2202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -3761,6 +3782,7 @@ dependencies = [ "craft-i18n", "craft-keymap", "craft-platform", + "craft-png", "craft-theme", "craft-ui", "craft-update", @@ -3900,7 +3922,7 @@ dependencies = [ "objc2-foundation 0.3.2", "png", "thiserror 2.0.21", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -4602,7 +4624,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -5398,7 +5420,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -5465,7 +5487,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -5821,7 +5843,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -5960,7 +5982,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix 1.1.6", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -6281,7 +6303,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -6952,7 +6974,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.60.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index eed24250..9305eeb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,19 +39,19 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] # Standard Base64 output; strict SBS decoding remains app-local -craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", version = "0.1.0" } +craft-mime = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", version = "0.1.0" } # Read 3D meshes through craft-mesh; keep mesh processing app-local -craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", default-features = false, features = ["obj", "gltf"] } +craft-mesh = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", default-features = false, features = ["obj", "gltf"] } # Shared XML escaping and bounded XML parsing; SBS model and serialization policy stay app-local -craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-xml = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Shared SBS package/schema parsing, sniffing, embedded codec, and envelope writing (storytold/craft-libs#2496) -craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-sbs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Shared bounded ZIP archive reader and deterministic writer (storytold/craft-libs#2411) -craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-zip = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Bound SVG parsing and drawing through craft-svg -craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["tree-render"] } +craft-svg = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["tree-render"] } # Shared raster image codecs -craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-image-codecs = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # internal materialcraft-core = { path = "crates/core" } materialcraft-geom = { path = "crates/geom" } @@ -91,32 +91,33 @@ getrandom = "0.3" # Shared Craft egui components from storytold/craft-libs # MIT OR Apache-2.0 egui_kittest = "0.37" -craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-materialx = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # MCMAT v3 uses its merged archive revision and the matching ZIP crate -craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } -craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } -craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } -craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } -craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } -craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-mcmat = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-ui = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-behavior = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-host = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-theme = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-i18n = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Keyboard bindings (chords, dispatch and display text): storytold/craft-libs, MIT OR Apache-2.0 -craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["egui"] } +craft-keymap = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["egui"] } # Native dialogs that do not block the event loop: storytold/craft-libs, MIT OR Apache-2.0 -craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } -craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-dialogs = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-platform = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # The platform quit and the macOS Quit menu item: storytold/craft-libs, MIT OR Apache-2.0 -craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["ui"] } -craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-quit = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["ui"] } +craft-menu = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Who draws the window frame, and an app-drawn strip as the title bar: storytold/craft-libs, MIT OR Apache-2.0 -craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["ui"] } +craft-window = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["ui"] } # Release checks and self-updates for the desktop app: storytold/craft-libs, MIT OR Apache-2.0 -craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["ui"] } +craft-update = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["ui"] } # Atomic persistence, at the suite's current revision -craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-atomic = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } +craft-png = { version = "0.1.0", git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Parse the optional shared font catalog at build time; the font repository is not a dependency -craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de" } +craft-fonts-build = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414" } # Float image planes and texture sampling for node cooking: storytold/craft-libs, MIT OR Apache-2.0 -craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "cd87dc61f77d8470b2e9e6a1236f9a84ee0a64de", features = ["parallel"] } +craft-texture = { git = "https://github.com/aiongg/craft-libs", rev = "2f8d73e7cf93ec207c5b9e8d8f6630cda1eaa414", features = ["parallel"] } # egui 0.37 and winit: the suite's forks (storytold/egui, storytold/winit), as craft-libs pins them. [patch.crates-io] diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index d2341db0..90257bf0 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -30,6 +30,7 @@ zip = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] craft-atomic = { workspace = true } +craft-png = { workspace = true } sha2 = { workspace = true } sys-locale = "0.3" craft-update = { workspace = true } diff --git a/crates/ui-egui/src/preview_disk_cache.rs b/crates/ui-egui/src/preview_disk_cache.rs index f6a8eeea..d41d5dbf 100644 --- a/crates/ui-egui/src/preview_disk_cache.rs +++ b/crates/ui-egui/src/preview_disk_cache.rs @@ -7,7 +7,7 @@ use std::sync::OnceLock; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::{Duration, SystemTime}; -use image::{ImageDecoder, ImageEncoder}; +use image::ImageDecoder; use sha2::{Digest, Sha256}; use super::preview_cache_settings::{PreviewCacheLimits, PreviewCacheSettings, PreviewCacheState}; @@ -128,7 +128,7 @@ impl PreviewDiskCache { } let mut bytes = Vec::new(); - image::codecs::png::PngEncoder::new(&mut bytes).write_image(pixels, side, side, image::ExtendedColorType::Rgba8).map_err(io::Error::other)?; + craft_png::write_8bit(&mut bytes, side, side, craft_png::Layout::Rgba, pixels).map_err(io::Error::other)?; if bytes.len() as u64 > MAX_FILE_BYTES { return Ok(()); } diff --git a/crates/ui-egui/src/preview_disk_cache.test.rs b/crates/ui-egui/src/preview_disk_cache.test.rs index 269906ee..fbfbc5ef 100644 --- a/crates/ui-egui/src/preview_disk_cache.test.rs +++ b/crates/ui-egui/src/preview_disk_cache.test.rs @@ -192,6 +192,28 @@ fn cache_budget_evicts_old_files_and_preserves_unrelated_files() { assert!(!oversized.exists()); } +#[test] +fn encoded_preview_keeps_legacy_bytes_and_budget_boundary() { + let _serial = TESTS.lock().unwrap_or_else(std::sync::PoisonError::into_inner); + let root = tempfile::tempdir().unwrap(); + let cache = cache(root.path()); + let side = MAX_SIDE; + let pixels: Vec = (0..side * side * 4).map(|i| (i * 17 + i / 31) as u8).collect(); + let mut legacy = Vec::new(); + image::ImageEncoder::write_image(image::codecs::png::PngEncoder::new(&mut legacy), &pixels, side, side, image::ExtendedColorType::Rgba8).unwrap(); + let bytes = legacy.len() as u64; + let path = cache.path([1; 32], side); + + cache.settings.update(PreviewCacheLimits { budget_bytes: bytes - 1, max_entries: 1 }, false); + cache.write(&path, side, &pixels).unwrap(); + assert!(!path.exists()); + + cache.settings.update(PreviewCacheLimits { budget_bytes: bytes, max_entries: 1 }, false); + cache.write(&path, side, &pixels).unwrap(); + assert_eq!(fs::read(&path).unwrap(), legacy); + assert_eq!(cache.read(&path, side), Some(pixels)); +} + #[test] fn unavailable_or_busy_cache_still_returns_rendered_pixels() { let _serial = TESTS.lock().unwrap_or_else(std::sync::PoisonError::into_inner);