diff --git a/src/Artemis.Core/Artemis.Core.csproj b/src/Artemis.Core/Artemis.Core.csproj index fff601c10..5d0134f28 100644 --- a/src/Artemis.Core/Artemis.Core.csproj +++ b/src/Artemis.Core/Artemis.Core.csproj @@ -51,7 +51,7 @@ - + diff --git a/src/Artemis.Core/packages.lock.json b/src/Artemis.Core/packages.lock.json index 9e603e0af..2dec380d8 100644 --- a/src/Artemis.Core/packages.lock.json +++ b/src/Artemis.Core/packages.lock.json @@ -105,9 +105,9 @@ }, "Serilog.Sinks.Console": { "type": "Direct", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "requested": "[4.0.1, )", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } diff --git a/src/Artemis.UI.Shared/packages.lock.json b/src/Artemis.UI.Shared/packages.lock.json index b5ae7d0c7..e164c6b35 100644 --- a/src/Artemis.UI.Shared/packages.lock.json +++ b/src/Artemis.UI.Shared/packages.lock.json @@ -402,8 +402,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -1341,7 +1341,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", diff --git a/src/Artemis.UI/packages.lock.json b/src/Artemis.UI/packages.lock.json index 58c5e7fe0..e822fc292 100644 --- a/src/Artemis.UI/packages.lock.json +++ b/src/Artemis.UI/packages.lock.json @@ -527,8 +527,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -1488,7 +1488,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", diff --git a/src/Artemis.VisualScripting/packages.lock.json b/src/Artemis.VisualScripting/packages.lock.json index 9ec35e3be..a3304ead0 100644 --- a/src/Artemis.VisualScripting/packages.lock.json +++ b/src/Artemis.VisualScripting/packages.lock.json @@ -383,8 +383,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -1346,7 +1346,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", diff --git a/src/Avalonia/Artemis.UI.Linux/Artemis.UI.Linux.csproj b/src/Avalonia/Artemis.UI.Linux/Artemis.UI.Linux.csproj index 522d3d795..40039f1d5 100644 --- a/src/Avalonia/Artemis.UI.Linux/Artemis.UI.Linux.csproj +++ b/src/Avalonia/Artemis.UI.Linux/Artemis.UI.Linux.csproj @@ -10,12 +10,12 @@ - - + + - - - + + + diff --git a/src/Avalonia/Artemis.UI.Linux/packages.lock.json b/src/Avalonia/Artemis.UI.Linux/packages.lock.json index 9cda5ffc1..2ea08bb81 100644 --- a/src/Avalonia/Artemis.UI.Linux/packages.lock.json +++ b/src/Avalonia/Artemis.UI.Linux/packages.lock.json @@ -4,11 +4,11 @@ "net6.0": { "Avalonia": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "ftI5uGBFvWJpizGc6PT6lOb6FiO8AWcSYS9N4FWvXgOvuqWuTgmjwURPUkvajpeaQLKOOea6AbgotSyhV8NNoQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "7st8nMai1C1nqw1a2H+zXiVYTnnfFwZz7JGziEzJK4sF6+x/W77XkdcDgDHyihcK3clQZJexYr4f+PzK4BJhSQ==", "dependencies": { - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.ComponentModel.Annotations": "4.5.0", "System.Memory": "4.5.3", @@ -19,48 +19,48 @@ }, "Avalonia.Desktop": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "wy4k1uarrmZJSJENCe1hjNpdCJWhup0gt6KA2TtZILfGG7imj+an5IuQZUSXtA7cl7A+6tF6lPQLo82gESUlXQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "v+siRNQYvSZR9lt/bBgb81t6LGbSC7pUo+APgPmKYGLeYcMij1O6CWk7tCh9hihMxNHYw/PEB06r8ZBQIg9YPg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Native": "0.10.12", - "Avalonia.Skia": "0.10.12", - "Avalonia.Win32": "0.10.12", - "Avalonia.X11": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.Native": "0.10.13", + "Avalonia.Skia": "0.10.13", + "Avalonia.Win32": "0.10.13", + "Avalonia.X11": "0.10.13" } }, "Avalonia.Diagnostics": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "Pf9DGiSwl3+gPrRSHKFzDG20I9QJ5P1g6BexLKfHQH9+Cmax+a/UEVYQq4hGn0xhrmpuLYOeGHb8wasjAT4EfQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "stIGj0Rv/p/Re0GqlXCc061paifG6wT0YvrTUV/fQloNctW8Y4sf1xZNzr9dxdSz6+LG2AZjdZcSUhUGOCe6Zg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Controls.DataGrid": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Controls.DataGrid": "0.10.13", "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", "System.Reactive": "5.0.0" } }, "Avalonia.ReactiveUI": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "dOszpMtBKEACAFWtjwNibXMF2SBolJ3cV8ffDEOy2uuwjKBJqbSmHH+WSnui9KfbSF2igVpam4TqO6drJuEvjw==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "s5UUJ/MG97Jv9i+kxlgNSKx8Q6uJkgYMJ/LdOR3VM+7T32IRyhuxrNNCYygqk6avuJ4QqvMLU02T6v3GhI7WWA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "ReactiveUI": "13.2.10", "System.Reactive": "5.0.0" } }, "ReactiveUI": { "type": "Direct", - "requested": "[17.1.17, )", - "resolved": "17.1.17", - "contentHash": "0DLq44k4CVvfXcWHE4uigQa/wySOzxOTnWg50j2qZDpWzl9OP7QfIDJo39X3ffEjaVcCUFcbF9xAmm7fRX/q2g==", + "requested": "[17.1.50, )", + "resolved": "17.1.50", + "contentHash": "UofZH1WMwWNLvFkK2SH+gsYTkUmhFFJO0Pix9YG2RzdHQ92mRFCzHzPO1abeU8/cxzyc9hJHX7sBChzUj53Ulg==", "dependencies": { - "DynamicData": "7.4.9", - "Splat": "14.1.17" + "DynamicData": "7.5.2", + "Splat": "14.1.45" } }, "Avalonia.Angle.Windows.Natives": { @@ -70,11 +70,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "i3zM3P8PUY4FNhATZoFWkto3H66FcIrnJNMyOsl1fN0FPS6meysAwCKQwuou/oapyzZEODeAmCVdqB0AgjNHVw==", + "resolved": "0.10.13", + "contentHash": "51xcaYtJN41vX/4xUu8rNyoISTO4bdswpfZmTPjeBTdofrhZ6mzOqbxVk6tqT4gt88MPihbaPil4jsD4X4Aixw==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -89,32 +89,32 @@ }, "Avalonia.FreeDesktop": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "j42uWCWkAfZchYPrdRccr4mjB0kppSby3TEMCuNrp9GcQi+JhEPEbBAohU7FpR4bkv5FF2KAlDX5WiG2T+04kg==", + "resolved": "0.10.13", + "contentHash": "/bKzscse/kY4RNMFk8r/jqLY/kS0fSkwp4TpqEF4UJeI8sHUvwe4yecnzNb1qDP9tCX4S6ML38LklAIqAk8gIQ==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Tmds.DBus": "0.9.0" } }, "Avalonia.Native": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "JnZc0zF7DcLcSX+SdnKQGzFa9mcKxawhTN8S3aiN8Eh3MZAKxa45LRrHFVTcHcy2jU4kOw+yPfONUmHpRcC0gw==", + "resolved": "0.10.13", + "contentHash": "pq3WiiOyFyhJHnYdxP/fOlcG9DfqhJ0W5CCfPX48QyOdODbPgMF5LY6BU+McDpeAJTwQ4LqVfznHZoCeHH12gg==", "dependencies": { - "Avalonia": "0.10.12" + "Avalonia": "0.10.13" } }, "Avalonia.Remote.Protocol": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "ArrxniR8iShzMvXCS3vt5FXg9Fv3qK1UKzJwsSsY9iCuC8wKo2eevRj42qOhMCS98POTH5v8aUZBeoLlENa0vA==" + "resolved": "0.10.13", + "contentHash": "hnklCHyLCMrzWjMc3T0mYkRKdfUqpw2qCkf9HBRzyqnI6uG5tLw2QIlRF9zYC4BGOpx/B/647IcIjgq6H1ypzQ==" }, "Avalonia.Skia": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "3TGo8RLHaLqmU3chlyAqLkpw6vImfDMC30T18abpeYf1PIsNckRB+UFp12GDil9t/J9YB17zn4H6N+2plF4gZA==", + "resolved": "0.10.13", + "contentHash": "aG0JlUhCpwGM/QsN/+rRak7XlPy0Jtd5HaiCdYKtuBOc+ISGs6hmCJDKjklNANp9gZR/TUUgXkqk5VFMQUJkTA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "HarfBuzzSharp": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.Linux": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.WebAssembly": "2.8.2-preview.178", @@ -136,10 +136,10 @@ }, "Avalonia.Win32": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "CnC65T8ScMK23BB+qJuiMicWQ5QIEiinnRzPqvAGUGyQbjIGpA5uOCKwzsOjUmzkhGqt31iDR0/Y3ZFbi5Mjog==", + "resolved": "0.10.13", + "contentHash": "CNUGWafAonBYYbHMliujDrs4JH2giH435GxU+O1q/nGyO5Mm+PXCG4NYsg+0zwp8yQBapFK7eYwzamU+re+cDw==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Angle.Windows.Natives": "2.1.0.2020091801", "System.Drawing.Common": "4.5.0", "System.Numerics.Vectors": "4.5.0" @@ -147,37 +147,37 @@ }, "Avalonia.X11": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "mUY1cF1p86/UgLl1cbSmY3nVIatKQsSCDOH4avssL07xmKlRfB2G7Gi8jlhWNkLJTLL7iQp/u3X6bv7bs+0zNQ==", + "resolved": "0.10.13", + "contentHash": "kXxn79KVB0ZfeZqQL7c2Dlvl96GBlRT8rzAh6g/j0hcgykQ55/e0be8Te6+Ny7hI+tFrob6lxvYdxYVUUCjHYg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.FreeDesktop": "0.10.12", - "Avalonia.Skia": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.FreeDesktop": "0.10.13", + "Avalonia.Skia": "0.10.13" } }, "Avalonia.Xaml.Behaviors": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "upv7v1gZ31tCukw/KA1bB5+z29QuEWiZJ4KnW10daHlia1ru7q4lUJ/vCYKOy5L+zyi1MQg98SNYjRp5C64ZhQ==", + "resolved": "0.10.12.2", + "contentHash": "EqfzwstvqQcWnTJnaBvezxKwBSddozXpkFi5WrzVe976zedE+A1NruFgnC19aG7Vvy0mTQdlWFTtbAInv6IQyg==", "dependencies": { "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" + "Avalonia.Xaml.Interactions": "0.10.12.2", + "Avalonia.Xaml.Interactivity": "0.10.12.2" } }, "Avalonia.Xaml.Interactions": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "PSohbY4aQGiJVWfvLKkuUE71ZxvZ0/FuTc3Y5GJgTC41kCgeaiJTczkC2FjW5sZ8exPDabSp+ZukSsnm/z6y7A==", + "resolved": "0.10.12.2", + "contentHash": "01NGXHMbvpg1JcZ4tFAZXD6i55vHIQnJl3+HFi7RSP1jevkjkSaVM8qjwLsTSfREsJ2OoiWxx2LcyUQJvO5Kjw==", "dependencies": { "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" + "Avalonia.Xaml.Interactivity": "0.10.12.2" } }, "Avalonia.Xaml.Interactivity": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "uey4LjyIds78igMe7AZ072RI6GpO16sd6+6XF6LG0oE07De7ei0So14oOs4wLS4WJyaKDRSUK6PuhLaY1zIZdQ==", + "resolved": "0.10.12.2", + "contentHash": "AGAbT1I6XW1+9tweLHDMGX8+SijE111vNNIQy2gI3bpbLfPYTirLPyK0do2s9V6l7hHfQnNmiX2NA6JHC4WG4Q==", "dependencies": { "Avalonia": "0.10.12" } @@ -201,8 +201,8 @@ }, "DynamicData": { "type": "Transitive", - "resolved": "7.4.9", - "contentHash": "bzw9n1WgfflkhsScIaC7tzPlKFTJkfWVTOg2pjJjqzVqxF63ztaJ7HH306Iyx6bs+pC77fQbtE53UoPTpt+8dQ==", + "resolved": "7.5.4", + "contentHash": "1OpHPoyQGzHREiP6JXnPaBBx4KWVQZW7zBAZpKXc9kl4rcbEK4fo2/T3bDXZbHWKhDqVAISW9pE4Ug9+ms3RoA==", "dependencies": { "System.Reactive": "5.0.0" } @@ -222,12 +222,12 @@ }, "FluentAvaloniaUI": { "type": "Transitive", - "resolved": "1.2.1", - "contentHash": "IH9eei7CrOUkUdxL2E/HZYKFgNupSVO+ju74CnVqmV7u7iolyz3g1cTHELqVgatEb+IqXw7KyeLr2459nUxYSw==", + "resolved": "1.3.0", + "contentHash": "xzcsuOswakMpz/EdA59NEOgaCtZ/9zsd5QWTB0YYQqSv1GF95Uk2aMVtO5gtfNrCT4lZvGNWVf3HGjYz9cHovQ==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", "MicroCom.CodeGenerator.MSBuild": "0.10.4", "MicroCom.Runtime": "0.10.4" } @@ -687,8 +687,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -758,16 +758,16 @@ }, "Splat": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "orBlJcQS4b1VZUlT+sJIensH0MsTYyCJlStT6bRwt71OFqNYD6V1SpkoIt6vKSf8YXgDT7QH/LuwWdLfTyHPrw==" + "resolved": "14.1.45", + "contentHash": "ayHdfTUklD5ci0s9m4uYMccjtkKVjZ9fVPT5q3PN+SnvyD6bjQVRozOfUHwdwh4LAz9ETZjR/tAgrm+IapXKrw==" }, "Splat.Ninject": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "HPekZ89SfxHEX9NK+//w5JLBJmI8KLnUfh5yR/OVGTGRBSZVhHarAKgj/Ih3xJsqyl5L7l719C9RFo3qZBKn1A==", + "resolved": "14.1.45", + "contentHash": "aU851Yb7i4kLzzrpo3KxFZg/U0vd36ORza9nk51pvL/QE+Jkm3ROqoPMf+BPfugEub2J1hHDEuLKJtxU7TAt0w==", "dependencies": { "Ninject": "3.3.4", - "Splat": "14.1.17" + "Splat": "14.1.45" } }, "Svg.Custom": { @@ -1735,7 +1735,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", @@ -1758,40 +1758,40 @@ "dependencies": { "Artemis.Core": "1.0.0", "Artemis.UI.Shared": "1.0.0", - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Controls.PanAndZoom": "10.12.0", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", - "Avalonia.ReactiveUI": "0.10.12", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", + "Avalonia.ReactiveUI": "0.10.13", "Avalonia.Svg.Skia": "0.10.12", - "DynamicData": "7.4.9", - "FluentAvaloniaUI": "1.2.1", + "Avalonia.Xaml.Behaviors": "0.10.12.2", + "Avalonia.Xaml.Interactions": "0.10.12.2", + "Avalonia.Xaml.Interactivity": "0.10.12.2", + "DynamicData": "7.5.4", + "FluentAvaloniaUI": "1.3.0", "Flurl.Http": "3.2.0", "Live.Avalonia": "1.3.1", "Material.Icons.Avalonia": "1.0.2", "RGB.NET.Core": "1.0.0-prerelease7", "RGB.NET.Layout": "1.0.0-prerelease7", - "ReactiveUI": "17.1.17", + "ReactiveUI": "17.1.50", "ReactiveUI.Validation": "2.2.1", "SkiaSharp": "2.88.0-preview.178", - "Splat.Ninject": "14.1.17" + "Splat.Ninject": "14.1.45" } }, "artemis.ui.shared": { "type": "Project", "dependencies": { "Artemis.Core": "1.0.0", - "Avalonia": "0.10.12", - "Avalonia.ReactiveUI": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.ReactiveUI": "0.10.13", "Avalonia.Svg.Skia": "0.10.12", - "Avalonia.Xaml.Behaviors": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12", - "DynamicData": "7.4.9", - "FluentAvaloniaUI": "1.2.1", + "DynamicData": "7.5.4", + "FluentAvaloniaUI": "1.3.0", "Material.Icons.Avalonia": "1.0.2", "RGB.NET.Core": "1.0.0-prerelease7", - "ReactiveUI": "17.1.17", + "ReactiveUI": "17.1.50", "ReactiveUI.Validation": "2.2.1", "SkiaSharp": "2.88.0-preview.178" } diff --git a/src/Avalonia/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj b/src/Avalonia/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj index 522d3d795..40039f1d5 100644 --- a/src/Avalonia/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj +++ b/src/Avalonia/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj @@ -10,12 +10,12 @@ - - + + - - - + + + diff --git a/src/Avalonia/Artemis.UI.MacOS/packages.lock.json b/src/Avalonia/Artemis.UI.MacOS/packages.lock.json index 9cda5ffc1..2ea08bb81 100644 --- a/src/Avalonia/Artemis.UI.MacOS/packages.lock.json +++ b/src/Avalonia/Artemis.UI.MacOS/packages.lock.json @@ -4,11 +4,11 @@ "net6.0": { "Avalonia": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "ftI5uGBFvWJpizGc6PT6lOb6FiO8AWcSYS9N4FWvXgOvuqWuTgmjwURPUkvajpeaQLKOOea6AbgotSyhV8NNoQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "7st8nMai1C1nqw1a2H+zXiVYTnnfFwZz7JGziEzJK4sF6+x/W77XkdcDgDHyihcK3clQZJexYr4f+PzK4BJhSQ==", "dependencies": { - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.ComponentModel.Annotations": "4.5.0", "System.Memory": "4.5.3", @@ -19,48 +19,48 @@ }, "Avalonia.Desktop": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "wy4k1uarrmZJSJENCe1hjNpdCJWhup0gt6KA2TtZILfGG7imj+an5IuQZUSXtA7cl7A+6tF6lPQLo82gESUlXQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "v+siRNQYvSZR9lt/bBgb81t6LGbSC7pUo+APgPmKYGLeYcMij1O6CWk7tCh9hihMxNHYw/PEB06r8ZBQIg9YPg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Native": "0.10.12", - "Avalonia.Skia": "0.10.12", - "Avalonia.Win32": "0.10.12", - "Avalonia.X11": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.Native": "0.10.13", + "Avalonia.Skia": "0.10.13", + "Avalonia.Win32": "0.10.13", + "Avalonia.X11": "0.10.13" } }, "Avalonia.Diagnostics": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "Pf9DGiSwl3+gPrRSHKFzDG20I9QJ5P1g6BexLKfHQH9+Cmax+a/UEVYQq4hGn0xhrmpuLYOeGHb8wasjAT4EfQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "stIGj0Rv/p/Re0GqlXCc061paifG6wT0YvrTUV/fQloNctW8Y4sf1xZNzr9dxdSz6+LG2AZjdZcSUhUGOCe6Zg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Controls.DataGrid": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Controls.DataGrid": "0.10.13", "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", "System.Reactive": "5.0.0" } }, "Avalonia.ReactiveUI": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "dOszpMtBKEACAFWtjwNibXMF2SBolJ3cV8ffDEOy2uuwjKBJqbSmHH+WSnui9KfbSF2igVpam4TqO6drJuEvjw==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "s5UUJ/MG97Jv9i+kxlgNSKx8Q6uJkgYMJ/LdOR3VM+7T32IRyhuxrNNCYygqk6avuJ4QqvMLU02T6v3GhI7WWA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "ReactiveUI": "13.2.10", "System.Reactive": "5.0.0" } }, "ReactiveUI": { "type": "Direct", - "requested": "[17.1.17, )", - "resolved": "17.1.17", - "contentHash": "0DLq44k4CVvfXcWHE4uigQa/wySOzxOTnWg50j2qZDpWzl9OP7QfIDJo39X3ffEjaVcCUFcbF9xAmm7fRX/q2g==", + "requested": "[17.1.50, )", + "resolved": "17.1.50", + "contentHash": "UofZH1WMwWNLvFkK2SH+gsYTkUmhFFJO0Pix9YG2RzdHQ92mRFCzHzPO1abeU8/cxzyc9hJHX7sBChzUj53Ulg==", "dependencies": { - "DynamicData": "7.4.9", - "Splat": "14.1.17" + "DynamicData": "7.5.2", + "Splat": "14.1.45" } }, "Avalonia.Angle.Windows.Natives": { @@ -70,11 +70,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "i3zM3P8PUY4FNhATZoFWkto3H66FcIrnJNMyOsl1fN0FPS6meysAwCKQwuou/oapyzZEODeAmCVdqB0AgjNHVw==", + "resolved": "0.10.13", + "contentHash": "51xcaYtJN41vX/4xUu8rNyoISTO4bdswpfZmTPjeBTdofrhZ6mzOqbxVk6tqT4gt88MPihbaPil4jsD4X4Aixw==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -89,32 +89,32 @@ }, "Avalonia.FreeDesktop": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "j42uWCWkAfZchYPrdRccr4mjB0kppSby3TEMCuNrp9GcQi+JhEPEbBAohU7FpR4bkv5FF2KAlDX5WiG2T+04kg==", + "resolved": "0.10.13", + "contentHash": "/bKzscse/kY4RNMFk8r/jqLY/kS0fSkwp4TpqEF4UJeI8sHUvwe4yecnzNb1qDP9tCX4S6ML38LklAIqAk8gIQ==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Tmds.DBus": "0.9.0" } }, "Avalonia.Native": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "JnZc0zF7DcLcSX+SdnKQGzFa9mcKxawhTN8S3aiN8Eh3MZAKxa45LRrHFVTcHcy2jU4kOw+yPfONUmHpRcC0gw==", + "resolved": "0.10.13", + "contentHash": "pq3WiiOyFyhJHnYdxP/fOlcG9DfqhJ0W5CCfPX48QyOdODbPgMF5LY6BU+McDpeAJTwQ4LqVfznHZoCeHH12gg==", "dependencies": { - "Avalonia": "0.10.12" + "Avalonia": "0.10.13" } }, "Avalonia.Remote.Protocol": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "ArrxniR8iShzMvXCS3vt5FXg9Fv3qK1UKzJwsSsY9iCuC8wKo2eevRj42qOhMCS98POTH5v8aUZBeoLlENa0vA==" + "resolved": "0.10.13", + "contentHash": "hnklCHyLCMrzWjMc3T0mYkRKdfUqpw2qCkf9HBRzyqnI6uG5tLw2QIlRF9zYC4BGOpx/B/647IcIjgq6H1ypzQ==" }, "Avalonia.Skia": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "3TGo8RLHaLqmU3chlyAqLkpw6vImfDMC30T18abpeYf1PIsNckRB+UFp12GDil9t/J9YB17zn4H6N+2plF4gZA==", + "resolved": "0.10.13", + "contentHash": "aG0JlUhCpwGM/QsN/+rRak7XlPy0Jtd5HaiCdYKtuBOc+ISGs6hmCJDKjklNANp9gZR/TUUgXkqk5VFMQUJkTA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "HarfBuzzSharp": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.Linux": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.WebAssembly": "2.8.2-preview.178", @@ -136,10 +136,10 @@ }, "Avalonia.Win32": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "CnC65T8ScMK23BB+qJuiMicWQ5QIEiinnRzPqvAGUGyQbjIGpA5uOCKwzsOjUmzkhGqt31iDR0/Y3ZFbi5Mjog==", + "resolved": "0.10.13", + "contentHash": "CNUGWafAonBYYbHMliujDrs4JH2giH435GxU+O1q/nGyO5Mm+PXCG4NYsg+0zwp8yQBapFK7eYwzamU+re+cDw==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Angle.Windows.Natives": "2.1.0.2020091801", "System.Drawing.Common": "4.5.0", "System.Numerics.Vectors": "4.5.0" @@ -147,37 +147,37 @@ }, "Avalonia.X11": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "mUY1cF1p86/UgLl1cbSmY3nVIatKQsSCDOH4avssL07xmKlRfB2G7Gi8jlhWNkLJTLL7iQp/u3X6bv7bs+0zNQ==", + "resolved": "0.10.13", + "contentHash": "kXxn79KVB0ZfeZqQL7c2Dlvl96GBlRT8rzAh6g/j0hcgykQ55/e0be8Te6+Ny7hI+tFrob6lxvYdxYVUUCjHYg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.FreeDesktop": "0.10.12", - "Avalonia.Skia": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.FreeDesktop": "0.10.13", + "Avalonia.Skia": "0.10.13" } }, "Avalonia.Xaml.Behaviors": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "upv7v1gZ31tCukw/KA1bB5+z29QuEWiZJ4KnW10daHlia1ru7q4lUJ/vCYKOy5L+zyi1MQg98SNYjRp5C64ZhQ==", + "resolved": "0.10.12.2", + "contentHash": "EqfzwstvqQcWnTJnaBvezxKwBSddozXpkFi5WrzVe976zedE+A1NruFgnC19aG7Vvy0mTQdlWFTtbAInv6IQyg==", "dependencies": { "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" + "Avalonia.Xaml.Interactions": "0.10.12.2", + "Avalonia.Xaml.Interactivity": "0.10.12.2" } }, "Avalonia.Xaml.Interactions": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "PSohbY4aQGiJVWfvLKkuUE71ZxvZ0/FuTc3Y5GJgTC41kCgeaiJTczkC2FjW5sZ8exPDabSp+ZukSsnm/z6y7A==", + "resolved": "0.10.12.2", + "contentHash": "01NGXHMbvpg1JcZ4tFAZXD6i55vHIQnJl3+HFi7RSP1jevkjkSaVM8qjwLsTSfREsJ2OoiWxx2LcyUQJvO5Kjw==", "dependencies": { "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" + "Avalonia.Xaml.Interactivity": "0.10.12.2" } }, "Avalonia.Xaml.Interactivity": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "uey4LjyIds78igMe7AZ072RI6GpO16sd6+6XF6LG0oE07De7ei0So14oOs4wLS4WJyaKDRSUK6PuhLaY1zIZdQ==", + "resolved": "0.10.12.2", + "contentHash": "AGAbT1I6XW1+9tweLHDMGX8+SijE111vNNIQy2gI3bpbLfPYTirLPyK0do2s9V6l7hHfQnNmiX2NA6JHC4WG4Q==", "dependencies": { "Avalonia": "0.10.12" } @@ -201,8 +201,8 @@ }, "DynamicData": { "type": "Transitive", - "resolved": "7.4.9", - "contentHash": "bzw9n1WgfflkhsScIaC7tzPlKFTJkfWVTOg2pjJjqzVqxF63ztaJ7HH306Iyx6bs+pC77fQbtE53UoPTpt+8dQ==", + "resolved": "7.5.4", + "contentHash": "1OpHPoyQGzHREiP6JXnPaBBx4KWVQZW7zBAZpKXc9kl4rcbEK4fo2/T3bDXZbHWKhDqVAISW9pE4Ug9+ms3RoA==", "dependencies": { "System.Reactive": "5.0.0" } @@ -222,12 +222,12 @@ }, "FluentAvaloniaUI": { "type": "Transitive", - "resolved": "1.2.1", - "contentHash": "IH9eei7CrOUkUdxL2E/HZYKFgNupSVO+ju74CnVqmV7u7iolyz3g1cTHELqVgatEb+IqXw7KyeLr2459nUxYSw==", + "resolved": "1.3.0", + "contentHash": "xzcsuOswakMpz/EdA59NEOgaCtZ/9zsd5QWTB0YYQqSv1GF95Uk2aMVtO5gtfNrCT4lZvGNWVf3HGjYz9cHovQ==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", "MicroCom.CodeGenerator.MSBuild": "0.10.4", "MicroCom.Runtime": "0.10.4" } @@ -687,8 +687,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -758,16 +758,16 @@ }, "Splat": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "orBlJcQS4b1VZUlT+sJIensH0MsTYyCJlStT6bRwt71OFqNYD6V1SpkoIt6vKSf8YXgDT7QH/LuwWdLfTyHPrw==" + "resolved": "14.1.45", + "contentHash": "ayHdfTUklD5ci0s9m4uYMccjtkKVjZ9fVPT5q3PN+SnvyD6bjQVRozOfUHwdwh4LAz9ETZjR/tAgrm+IapXKrw==" }, "Splat.Ninject": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "HPekZ89SfxHEX9NK+//w5JLBJmI8KLnUfh5yR/OVGTGRBSZVhHarAKgj/Ih3xJsqyl5L7l719C9RFo3qZBKn1A==", + "resolved": "14.1.45", + "contentHash": "aU851Yb7i4kLzzrpo3KxFZg/U0vd36ORza9nk51pvL/QE+Jkm3ROqoPMf+BPfugEub2J1hHDEuLKJtxU7TAt0w==", "dependencies": { "Ninject": "3.3.4", - "Splat": "14.1.17" + "Splat": "14.1.45" } }, "Svg.Custom": { @@ -1735,7 +1735,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", @@ -1758,40 +1758,40 @@ "dependencies": { "Artemis.Core": "1.0.0", "Artemis.UI.Shared": "1.0.0", - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Controls.PanAndZoom": "10.12.0", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", - "Avalonia.ReactiveUI": "0.10.12", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", + "Avalonia.ReactiveUI": "0.10.13", "Avalonia.Svg.Skia": "0.10.12", - "DynamicData": "7.4.9", - "FluentAvaloniaUI": "1.2.1", + "Avalonia.Xaml.Behaviors": "0.10.12.2", + "Avalonia.Xaml.Interactions": "0.10.12.2", + "Avalonia.Xaml.Interactivity": "0.10.12.2", + "DynamicData": "7.5.4", + "FluentAvaloniaUI": "1.3.0", "Flurl.Http": "3.2.0", "Live.Avalonia": "1.3.1", "Material.Icons.Avalonia": "1.0.2", "RGB.NET.Core": "1.0.0-prerelease7", "RGB.NET.Layout": "1.0.0-prerelease7", - "ReactiveUI": "17.1.17", + "ReactiveUI": "17.1.50", "ReactiveUI.Validation": "2.2.1", "SkiaSharp": "2.88.0-preview.178", - "Splat.Ninject": "14.1.17" + "Splat.Ninject": "14.1.45" } }, "artemis.ui.shared": { "type": "Project", "dependencies": { "Artemis.Core": "1.0.0", - "Avalonia": "0.10.12", - "Avalonia.ReactiveUI": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.ReactiveUI": "0.10.13", "Avalonia.Svg.Skia": "0.10.12", - "Avalonia.Xaml.Behaviors": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12", - "DynamicData": "7.4.9", - "FluentAvaloniaUI": "1.2.1", + "DynamicData": "7.5.4", + "FluentAvaloniaUI": "1.3.0", "Material.Icons.Avalonia": "1.0.2", "RGB.NET.Core": "1.0.0-prerelease7", - "ReactiveUI": "17.1.17", + "ReactiveUI": "17.1.50", "ReactiveUI.Validation": "2.2.1", "SkiaSharp": "2.88.0-preview.178" } diff --git a/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj b/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj index c47029bb7..e9e9bd769 100644 --- a/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj +++ b/src/Avalonia/Artemis.UI.Shared/Artemis.UI.Shared.csproj @@ -17,16 +17,13 @@ - - + + - - - - - + + - + diff --git a/src/Avalonia/Artemis.UI.Shared/Services/ProfileEditor/Commands/MoveProfileEElement.cs b/src/Avalonia/Artemis.UI.Shared/Services/ProfileEditor/Commands/MoveProfileEElement.cs new file mode 100644 index 000000000..69d67bd08 --- /dev/null +++ b/src/Avalonia/Artemis.UI.Shared/Services/ProfileEditor/Commands/MoveProfileEElement.cs @@ -0,0 +1,57 @@ +using Artemis.Core; + +namespace Artemis.UI.Shared.Services.ProfileEditor.Commands; + +/// +/// Represents a profile editor command that can be used to move a profile element. +/// +public class MoveProfileElement : IProfileEditorCommand +{ + private readonly int _originalIndex; + + private readonly ProfileElement? _originalParent; + private readonly ProfileElement _subject; + private readonly ProfileElement _target; + private readonly int _targetIndex; + + /// + /// Creates a new instance of the class. + /// + public MoveProfileElement(ProfileElement target, ProfileElement subject, int targetIndex) + { + _target = target; + _subject = subject; + _targetIndex = targetIndex; + + if (_subject.Parent != null) + { + _originalParent = _subject.Parent; + _originalIndex = _subject.Parent.Children.IndexOf(_subject); + } + + if (subject is Folder) + DisplayName = "Move folder"; + DisplayName = "Move layer"; + } + + #region Implementation of IProfileEditorCommand + + /// + public string DisplayName { get; } + + /// + public void Execute() + { + _subject.Parent?.RemoveChild(_subject); + _target.AddChild(_subject, _targetIndex); + } + + /// + public void Undo() + { + _target.RemoveChild(_subject); + _originalParent?.AddChild(_subject, _originalIndex); + } + + #endregion +} \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI.Shared/packages.lock.json b/src/Avalonia/Artemis.UI.Shared/packages.lock.json index 7994e8935..cb93e25fb 100644 --- a/src/Avalonia/Artemis.UI.Shared/packages.lock.json +++ b/src/Avalonia/Artemis.UI.Shared/packages.lock.json @@ -4,11 +4,11 @@ "net6.0": { "Avalonia": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "ftI5uGBFvWJpizGc6PT6lOb6FiO8AWcSYS9N4FWvXgOvuqWuTgmjwURPUkvajpeaQLKOOea6AbgotSyhV8NNoQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "7st8nMai1C1nqw1a2H+zXiVYTnnfFwZz7JGziEzJK4sF6+x/W77XkdcDgDHyihcK3clQZJexYr4f+PzK4BJhSQ==", "dependencies": { - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.ComponentModel.Annotations": "4.5.0", "System.Memory": "4.5.3", @@ -19,11 +19,11 @@ }, "Avalonia.ReactiveUI": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "dOszpMtBKEACAFWtjwNibXMF2SBolJ3cV8ffDEOy2uuwjKBJqbSmHH+WSnui9KfbSF2igVpam4TqO6drJuEvjw==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "s5UUJ/MG97Jv9i+kxlgNSKx8Q6uJkgYMJ/LdOR3VM+7T32IRyhuxrNNCYygqk6avuJ4QqvMLU02T6v3GhI7WWA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "ReactiveUI": "13.2.10", "System.Reactive": "5.0.0" } @@ -40,54 +40,24 @@ "Svg.Skia": "0.5.12" } }, - "Avalonia.Xaml.Behaviors": { - "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "upv7v1gZ31tCukw/KA1bB5+z29QuEWiZJ4KnW10daHlia1ru7q4lUJ/vCYKOy5L+zyi1MQg98SNYjRp5C64ZhQ==", - "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" - } - }, - "Avalonia.Xaml.Interactions": { - "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "PSohbY4aQGiJVWfvLKkuUE71ZxvZ0/FuTc3Y5GJgTC41kCgeaiJTczkC2FjW5sZ8exPDabSp+ZukSsnm/z6y7A==", - "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" - } - }, - "Avalonia.Xaml.Interactivity": { - "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "uey4LjyIds78igMe7AZ072RI6GpO16sd6+6XF6LG0oE07De7ei0So14oOs4wLS4WJyaKDRSUK6PuhLaY1zIZdQ==", - "dependencies": { - "Avalonia": "0.10.12" - } - }, "DynamicData": { "type": "Direct", - "requested": "[7.4.9, )", - "resolved": "7.4.9", - "contentHash": "bzw9n1WgfflkhsScIaC7tzPlKFTJkfWVTOg2pjJjqzVqxF63ztaJ7HH306Iyx6bs+pC77fQbtE53UoPTpt+8dQ==", + "requested": "[7.5.4, )", + "resolved": "7.5.4", + "contentHash": "1OpHPoyQGzHREiP6JXnPaBBx4KWVQZW7zBAZpKXc9kl4rcbEK4fo2/T3bDXZbHWKhDqVAISW9pE4Ug9+ms3RoA==", "dependencies": { "System.Reactive": "5.0.0" } }, "FluentAvaloniaUI": { "type": "Direct", - "requested": "[1.2.1, )", - "resolved": "1.2.1", - "contentHash": "IH9eei7CrOUkUdxL2E/HZYKFgNupSVO+ju74CnVqmV7u7iolyz3g1cTHELqVgatEb+IqXw7KyeLr2459nUxYSw==", + "requested": "[1.3.0, )", + "resolved": "1.3.0", + "contentHash": "xzcsuOswakMpz/EdA59NEOgaCtZ/9zsd5QWTB0YYQqSv1GF95Uk2aMVtO5gtfNrCT4lZvGNWVf3HGjYz9cHovQ==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", "MicroCom.CodeGenerator.MSBuild": "0.10.4", "MicroCom.Runtime": "0.10.4" } @@ -104,12 +74,12 @@ }, "ReactiveUI": { "type": "Direct", - "requested": "[17.1.17, )", - "resolved": "17.1.17", - "contentHash": "0DLq44k4CVvfXcWHE4uigQa/wySOzxOTnWg50j2qZDpWzl9OP7QfIDJo39X3ffEjaVcCUFcbF9xAmm7fRX/q2g==", + "requested": "[17.1.50, )", + "resolved": "17.1.50", + "contentHash": "UofZH1WMwWNLvFkK2SH+gsYTkUmhFFJO0Pix9YG2RzdHQ92mRFCzHzPO1abeU8/cxzyc9hJHX7sBChzUj53Ulg==", "dependencies": { - "DynamicData": "7.4.9", - "Splat": "14.1.17" + "DynamicData": "7.5.2", + "Splat": "14.1.45" } }, "ReactiveUI.Validation": { @@ -145,66 +115,66 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "i3zM3P8PUY4FNhATZoFWkto3H66FcIrnJNMyOsl1fN0FPS6meysAwCKQwuou/oapyzZEODeAmCVdqB0AgjNHVw==", + "resolved": "0.10.13", + "contentHash": "51xcaYtJN41vX/4xUu8rNyoISTO4bdswpfZmTPjeBTdofrhZ6mzOqbxVk6tqT4gt88MPihbaPil4jsD4X4Aixw==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } }, "Avalonia.Desktop": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "wy4k1uarrmZJSJENCe1hjNpdCJWhup0gt6KA2TtZILfGG7imj+an5IuQZUSXtA7cl7A+6tF6lPQLo82gESUlXQ==", + "resolved": "0.10.13", + "contentHash": "v+siRNQYvSZR9lt/bBgb81t6LGbSC7pUo+APgPmKYGLeYcMij1O6CWk7tCh9hihMxNHYw/PEB06r8ZBQIg9YPg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Native": "0.10.12", - "Avalonia.Skia": "0.10.12", - "Avalonia.Win32": "0.10.12", - "Avalonia.X11": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.Native": "0.10.13", + "Avalonia.Skia": "0.10.13", + "Avalonia.Win32": "0.10.13", + "Avalonia.X11": "0.10.13" } }, "Avalonia.Diagnostics": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "Pf9DGiSwl3+gPrRSHKFzDG20I9QJ5P1g6BexLKfHQH9+Cmax+a/UEVYQq4hGn0xhrmpuLYOeGHb8wasjAT4EfQ==", + "resolved": "0.10.13", + "contentHash": "stIGj0Rv/p/Re0GqlXCc061paifG6wT0YvrTUV/fQloNctW8Y4sf1xZNzr9dxdSz6+LG2AZjdZcSUhUGOCe6Zg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Controls.DataGrid": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Controls.DataGrid": "0.10.13", "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", "System.Reactive": "5.0.0" } }, "Avalonia.FreeDesktop": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "j42uWCWkAfZchYPrdRccr4mjB0kppSby3TEMCuNrp9GcQi+JhEPEbBAohU7FpR4bkv5FF2KAlDX5WiG2T+04kg==", + "resolved": "0.10.13", + "contentHash": "/bKzscse/kY4RNMFk8r/jqLY/kS0fSkwp4TpqEF4UJeI8sHUvwe4yecnzNb1qDP9tCX4S6ML38LklAIqAk8gIQ==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Tmds.DBus": "0.9.0" } }, "Avalonia.Native": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "JnZc0zF7DcLcSX+SdnKQGzFa9mcKxawhTN8S3aiN8Eh3MZAKxa45LRrHFVTcHcy2jU4kOw+yPfONUmHpRcC0gw==", + "resolved": "0.10.13", + "contentHash": "pq3WiiOyFyhJHnYdxP/fOlcG9DfqhJ0W5CCfPX48QyOdODbPgMF5LY6BU+McDpeAJTwQ4LqVfznHZoCeHH12gg==", "dependencies": { - "Avalonia": "0.10.12" + "Avalonia": "0.10.13" } }, "Avalonia.Remote.Protocol": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "ArrxniR8iShzMvXCS3vt5FXg9Fv3qK1UKzJwsSsY9iCuC8wKo2eevRj42qOhMCS98POTH5v8aUZBeoLlENa0vA==" + "resolved": "0.10.13", + "contentHash": "hnklCHyLCMrzWjMc3T0mYkRKdfUqpw2qCkf9HBRzyqnI6uG5tLw2QIlRF9zYC4BGOpx/B/647IcIjgq6H1ypzQ==" }, "Avalonia.Skia": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "3TGo8RLHaLqmU3chlyAqLkpw6vImfDMC30T18abpeYf1PIsNckRB+UFp12GDil9t/J9YB17zn4H6N+2plF4gZA==", + "resolved": "0.10.13", + "contentHash": "aG0JlUhCpwGM/QsN/+rRak7XlPy0Jtd5HaiCdYKtuBOc+ISGs6hmCJDKjklNANp9gZR/TUUgXkqk5VFMQUJkTA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "HarfBuzzSharp": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.Linux": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.WebAssembly": "2.8.2-preview.178", @@ -215,10 +185,10 @@ }, "Avalonia.Win32": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "CnC65T8ScMK23BB+qJuiMicWQ5QIEiinnRzPqvAGUGyQbjIGpA5uOCKwzsOjUmzkhGqt31iDR0/Y3ZFbi5Mjog==", + "resolved": "0.10.13", + "contentHash": "CNUGWafAonBYYbHMliujDrs4JH2giH435GxU+O1q/nGyO5Mm+PXCG4NYsg+0zwp8yQBapFK7eYwzamU+re+cDw==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Angle.Windows.Natives": "2.1.0.2020091801", "System.Drawing.Common": "4.5.0", "System.Numerics.Vectors": "4.5.0" @@ -226,12 +196,12 @@ }, "Avalonia.X11": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "mUY1cF1p86/UgLl1cbSmY3nVIatKQsSCDOH4avssL07xmKlRfB2G7Gi8jlhWNkLJTLL7iQp/u3X6bv7bs+0zNQ==", + "resolved": "0.10.13", + "contentHash": "kXxn79KVB0ZfeZqQL7c2Dlvl96GBlRT8rzAh6g/j0hcgykQ55/e0be8Te6+Ny7hI+tFrob6lxvYdxYVUUCjHYg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.FreeDesktop": "0.10.12", - "Avalonia.Skia": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.FreeDesktop": "0.10.13", + "Avalonia.Skia": "0.10.13" } }, "Castle.Core": { @@ -674,8 +644,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -735,8 +705,8 @@ }, "Splat": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "orBlJcQS4b1VZUlT+sJIensH0MsTYyCJlStT6bRwt71OFqNYD6V1SpkoIt6vKSf8YXgDT7QH/LuwWdLfTyHPrw==" + "resolved": "14.1.45", + "contentHash": "ayHdfTUklD5ci0s9m4uYMccjtkKVjZ9fVPT5q3PN+SnvyD6bjQVRozOfUHwdwh4LAz9ETZjR/tAgrm+IapXKrw==" }, "Svg.Custom": { "type": "Transitive", @@ -1703,7 +1673,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", diff --git a/src/Avalonia/Artemis.UI.Windows/Artemis.UI.Windows.csproj b/src/Avalonia/Artemis.UI.Windows/Artemis.UI.Windows.csproj index 436ab8302..98d69b4cc 100644 --- a/src/Avalonia/Artemis.UI.Windows/Artemis.UI.Windows.csproj +++ b/src/Avalonia/Artemis.UI.Windows/Artemis.UI.Windows.csproj @@ -23,15 +23,15 @@ - - + + - - - + + + - + diff --git a/src/Avalonia/Artemis.UI.Windows/packages.lock.json b/src/Avalonia/Artemis.UI.Windows/packages.lock.json index 107f6cd1c..b7a683c5b 100644 --- a/src/Avalonia/Artemis.UI.Windows/packages.lock.json +++ b/src/Avalonia/Artemis.UI.Windows/packages.lock.json @@ -4,11 +4,11 @@ "net6.0-windows7.0": { "Avalonia": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "ftI5uGBFvWJpizGc6PT6lOb6FiO8AWcSYS9N4FWvXgOvuqWuTgmjwURPUkvajpeaQLKOOea6AbgotSyhV8NNoQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "7st8nMai1C1nqw1a2H+zXiVYTnnfFwZz7JGziEzJK4sF6+x/W77XkdcDgDHyihcK3clQZJexYr4f+PzK4BJhSQ==", "dependencies": { - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.ComponentModel.Annotations": "4.5.0", "System.Memory": "4.5.3", @@ -19,47 +19,47 @@ }, "Avalonia.Desktop": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "wy4k1uarrmZJSJENCe1hjNpdCJWhup0gt6KA2TtZILfGG7imj+an5IuQZUSXtA7cl7A+6tF6lPQLo82gESUlXQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "v+siRNQYvSZR9lt/bBgb81t6LGbSC7pUo+APgPmKYGLeYcMij1O6CWk7tCh9hihMxNHYw/PEB06r8ZBQIg9YPg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Native": "0.10.12", - "Avalonia.Skia": "0.10.12", - "Avalonia.Win32": "0.10.12", - "Avalonia.X11": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.Native": "0.10.13", + "Avalonia.Skia": "0.10.13", + "Avalonia.Win32": "0.10.13", + "Avalonia.X11": "0.10.13" } }, "Avalonia.Diagnostics": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "Pf9DGiSwl3+gPrRSHKFzDG20I9QJ5P1g6BexLKfHQH9+Cmax+a/UEVYQq4hGn0xhrmpuLYOeGHb8wasjAT4EfQ==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "stIGj0Rv/p/Re0GqlXCc061paifG6wT0YvrTUV/fQloNctW8Y4sf1xZNzr9dxdSz6+LG2AZjdZcSUhUGOCe6Zg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Controls.DataGrid": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Controls.DataGrid": "0.10.13", "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", "System.Reactive": "5.0.0" } }, "Avalonia.ReactiveUI": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "dOszpMtBKEACAFWtjwNibXMF2SBolJ3cV8ffDEOy2uuwjKBJqbSmHH+WSnui9KfbSF2igVpam4TqO6drJuEvjw==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "s5UUJ/MG97Jv9i+kxlgNSKx8Q6uJkgYMJ/LdOR3VM+7T32IRyhuxrNNCYygqk6avuJ4QqvMLU02T6v3GhI7WWA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "ReactiveUI": "13.2.10", "System.Reactive": "5.0.0" } }, "Avalonia.Win32": { "type": "Direct", - "requested": "[0.10.12, )", - "resolved": "0.10.12", - "contentHash": "CnC65T8ScMK23BB+qJuiMicWQ5QIEiinnRzPqvAGUGyQbjIGpA5uOCKwzsOjUmzkhGqt31iDR0/Y3ZFbi5Mjog==", + "requested": "[0.10.13, )", + "resolved": "0.10.13", + "contentHash": "CNUGWafAonBYYbHMliujDrs4JH2giH435GxU+O1q/nGyO5Mm+PXCG4NYsg+0zwp8yQBapFK7eYwzamU+re+cDw==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Angle.Windows.Natives": "2.1.0.2020091801", "System.Drawing.Common": "4.5.0", "System.Numerics.Vectors": "4.5.0" @@ -82,12 +82,12 @@ }, "ReactiveUI": { "type": "Direct", - "requested": "[17.1.17, )", - "resolved": "17.1.17", - "contentHash": "0DLq44k4CVvfXcWHE4uigQa/wySOzxOTnWg50j2qZDpWzl9OP7QfIDJo39X3ffEjaVcCUFcbF9xAmm7fRX/q2g==", + "requested": "[17.1.50, )", + "resolved": "17.1.50", + "contentHash": "UofZH1WMwWNLvFkK2SH+gsYTkUmhFFJO0Pix9YG2RzdHQ92mRFCzHzPO1abeU8/cxzyc9hJHX7sBChzUj53Ulg==", "dependencies": { - "DynamicData": "7.4.9", - "Splat": "14.1.17" + "DynamicData": "7.5.2", + "Splat": "14.1.45" } }, "Avalonia.Angle.Windows.Natives": { @@ -97,11 +97,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "i3zM3P8PUY4FNhATZoFWkto3H66FcIrnJNMyOsl1fN0FPS6meysAwCKQwuou/oapyzZEODeAmCVdqB0AgjNHVw==", + "resolved": "0.10.13", + "contentHash": "51xcaYtJN41vX/4xUu8rNyoISTO4bdswpfZmTPjeBTdofrhZ6mzOqbxVk6tqT4gt88MPihbaPil4jsD4X4Aixw==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Remote.Protocol": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Remote.Protocol": "0.10.13", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -116,32 +116,32 @@ }, "Avalonia.FreeDesktop": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "j42uWCWkAfZchYPrdRccr4mjB0kppSby3TEMCuNrp9GcQi+JhEPEbBAohU7FpR4bkv5FF2KAlDX5WiG2T+04kg==", + "resolved": "0.10.13", + "contentHash": "/bKzscse/kY4RNMFk8r/jqLY/kS0fSkwp4TpqEF4UJeI8sHUvwe4yecnzNb1qDP9tCX4S6ML38LklAIqAk8gIQ==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Tmds.DBus": "0.9.0" } }, "Avalonia.Native": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "JnZc0zF7DcLcSX+SdnKQGzFa9mcKxawhTN8S3aiN8Eh3MZAKxa45LRrHFVTcHcy2jU4kOw+yPfONUmHpRcC0gw==", + "resolved": "0.10.13", + "contentHash": "pq3WiiOyFyhJHnYdxP/fOlcG9DfqhJ0W5CCfPX48QyOdODbPgMF5LY6BU+McDpeAJTwQ4LqVfznHZoCeHH12gg==", "dependencies": { - "Avalonia": "0.10.12" + "Avalonia": "0.10.13" } }, "Avalonia.Remote.Protocol": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "ArrxniR8iShzMvXCS3vt5FXg9Fv3qK1UKzJwsSsY9iCuC8wKo2eevRj42qOhMCS98POTH5v8aUZBeoLlENa0vA==" + "resolved": "0.10.13", + "contentHash": "hnklCHyLCMrzWjMc3T0mYkRKdfUqpw2qCkf9HBRzyqnI6uG5tLw2QIlRF9zYC4BGOpx/B/647IcIjgq6H1ypzQ==" }, "Avalonia.Skia": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "3TGo8RLHaLqmU3chlyAqLkpw6vImfDMC30T18abpeYf1PIsNckRB+UFp12GDil9t/J9YB17zn4H6N+2plF4gZA==", + "resolved": "0.10.13", + "contentHash": "aG0JlUhCpwGM/QsN/+rRak7XlPy0Jtd5HaiCdYKtuBOc+ISGs6hmCJDKjklNANp9gZR/TUUgXkqk5VFMQUJkTA==", "dependencies": { - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "HarfBuzzSharp": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.Linux": "2.8.2-preview.178", "HarfBuzzSharp.NativeAssets.WebAssembly": "2.8.2-preview.178", @@ -163,37 +163,37 @@ }, "Avalonia.X11": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "mUY1cF1p86/UgLl1cbSmY3nVIatKQsSCDOH4avssL07xmKlRfB2G7Gi8jlhWNkLJTLL7iQp/u3X6bv7bs+0zNQ==", + "resolved": "0.10.13", + "contentHash": "kXxn79KVB0ZfeZqQL7c2Dlvl96GBlRT8rzAh6g/j0hcgykQ55/e0be8Te6+Ny7hI+tFrob6lxvYdxYVUUCjHYg==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.FreeDesktop": "0.10.12", - "Avalonia.Skia": "0.10.12" + "Avalonia": "0.10.13", + "Avalonia.FreeDesktop": "0.10.13", + "Avalonia.Skia": "0.10.13" } }, "Avalonia.Xaml.Behaviors": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "upv7v1gZ31tCukw/KA1bB5+z29QuEWiZJ4KnW10daHlia1ru7q4lUJ/vCYKOy5L+zyi1MQg98SNYjRp5C64ZhQ==", + "resolved": "0.10.12.2", + "contentHash": "EqfzwstvqQcWnTJnaBvezxKwBSddozXpkFi5WrzVe976zedE+A1NruFgnC19aG7Vvy0mTQdlWFTtbAInv6IQyg==", "dependencies": { "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" + "Avalonia.Xaml.Interactions": "0.10.12.2", + "Avalonia.Xaml.Interactivity": "0.10.12.2" } }, "Avalonia.Xaml.Interactions": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "PSohbY4aQGiJVWfvLKkuUE71ZxvZ0/FuTc3Y5GJgTC41kCgeaiJTczkC2FjW5sZ8exPDabSp+ZukSsnm/z6y7A==", + "resolved": "0.10.12.2", + "contentHash": "01NGXHMbvpg1JcZ4tFAZXD6i55vHIQnJl3+HFi7RSP1jevkjkSaVM8qjwLsTSfREsJ2OoiWxx2LcyUQJvO5Kjw==", "dependencies": { "Avalonia": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12" + "Avalonia.Xaml.Interactivity": "0.10.12.2" } }, "Avalonia.Xaml.Interactivity": { "type": "Transitive", - "resolved": "0.10.12", - "contentHash": "uey4LjyIds78igMe7AZ072RI6GpO16sd6+6XF6LG0oE07De7ei0So14oOs4wLS4WJyaKDRSUK6PuhLaY1zIZdQ==", + "resolved": "0.10.12.2", + "contentHash": "AGAbT1I6XW1+9tweLHDMGX8+SijE111vNNIQy2gI3bpbLfPYTirLPyK0do2s9V6l7hHfQnNmiX2NA6JHC4WG4Q==", "dependencies": { "Avalonia": "0.10.12" } @@ -217,8 +217,8 @@ }, "DynamicData": { "type": "Transitive", - "resolved": "7.4.9", - "contentHash": "bzw9n1WgfflkhsScIaC7tzPlKFTJkfWVTOg2pjJjqzVqxF63ztaJ7HH306Iyx6bs+pC77fQbtE53UoPTpt+8dQ==", + "resolved": "7.5.4", + "contentHash": "1OpHPoyQGzHREiP6JXnPaBBx4KWVQZW7zBAZpKXc9kl4rcbEK4fo2/T3bDXZbHWKhDqVAISW9pE4Ug9+ms3RoA==", "dependencies": { "System.Reactive": "5.0.0" } @@ -238,12 +238,12 @@ }, "FluentAvaloniaUI": { "type": "Transitive", - "resolved": "1.2.1", - "contentHash": "IH9eei7CrOUkUdxL2E/HZYKFgNupSVO+ju74CnVqmV7u7iolyz3g1cTHELqVgatEb+IqXw7KyeLr2459nUxYSw==", + "resolved": "1.3.0", + "contentHash": "xzcsuOswakMpz/EdA59NEOgaCtZ/9zsd5QWTB0YYQqSv1GF95Uk2aMVtO5gtfNrCT4lZvGNWVf3HGjYz9cHovQ==", "dependencies": { - "Avalonia": "0.10.12", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", "MicroCom.CodeGenerator.MSBuild": "0.10.4", "MicroCom.Runtime": "0.10.4" } @@ -703,8 +703,8 @@ }, "Serilog.Sinks.Console": { "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==", + "resolved": "4.0.1", + "contentHash": "apLOvSJQLlIbKlbx+Y2UDHSP05kJsV7mou+fvJoRGs/iR+jC22r8cuFVMjjfVxz/AD4B2UCltFhE1naRLXwKNw==", "dependencies": { "Serilog": "2.10.0" } @@ -774,16 +774,16 @@ }, "Splat": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "orBlJcQS4b1VZUlT+sJIensH0MsTYyCJlStT6bRwt71OFqNYD6V1SpkoIt6vKSf8YXgDT7QH/LuwWdLfTyHPrw==" + "resolved": "14.1.45", + "contentHash": "ayHdfTUklD5ci0s9m4uYMccjtkKVjZ9fVPT5q3PN+SnvyD6bjQVRozOfUHwdwh4LAz9ETZjR/tAgrm+IapXKrw==" }, "Splat.Ninject": { "type": "Transitive", - "resolved": "14.1.17", - "contentHash": "HPekZ89SfxHEX9NK+//w5JLBJmI8KLnUfh5yR/OVGTGRBSZVhHarAKgj/Ih3xJsqyl5L7l719C9RFo3qZBKn1A==", + "resolved": "14.1.45", + "contentHash": "aU851Yb7i4kLzzrpo3KxFZg/U0vd36ORza9nk51pvL/QE+Jkm3ROqoPMf+BPfugEub2J1hHDEuLKJtxU7TAt0w==", "dependencies": { "Ninject": "3.3.4", - "Splat": "14.1.17" + "Splat": "14.1.45" } }, "Svg.Custom": { @@ -1751,7 +1751,7 @@ "RGB.NET.Layout": "1.0.0-prerelease7", "RGB.NET.Presets": "1.0.0-prerelease7", "Serilog": "2.10.0", - "Serilog.Sinks.Console": "4.0.0", + "Serilog.Sinks.Console": "4.0.1", "Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.File": "5.0.0", "SkiaSharp": "2.88.0-preview.178", @@ -1774,40 +1774,40 @@ "dependencies": { "Artemis.Core": "1.0.0", "Artemis.UI.Shared": "1.0.0", - "Avalonia": "0.10.12", + "Avalonia": "0.10.13", "Avalonia.Controls.PanAndZoom": "10.12.0", - "Avalonia.Desktop": "0.10.12", - "Avalonia.Diagnostics": "0.10.12", - "Avalonia.ReactiveUI": "0.10.12", + "Avalonia.Desktop": "0.10.13", + "Avalonia.Diagnostics": "0.10.13", + "Avalonia.ReactiveUI": "0.10.13", "Avalonia.Svg.Skia": "0.10.12", - "DynamicData": "7.4.9", - "FluentAvaloniaUI": "1.2.1", + "Avalonia.Xaml.Behaviors": "0.10.12.2", + "Avalonia.Xaml.Interactions": "0.10.12.2", + "Avalonia.Xaml.Interactivity": "0.10.12.2", + "DynamicData": "7.5.4", + "FluentAvaloniaUI": "1.3.0", "Flurl.Http": "3.2.0", "Live.Avalonia": "1.3.1", "Material.Icons.Avalonia": "1.0.2", "RGB.NET.Core": "1.0.0-prerelease7", "RGB.NET.Layout": "1.0.0-prerelease7", - "ReactiveUI": "17.1.17", + "ReactiveUI": "17.1.50", "ReactiveUI.Validation": "2.2.1", "SkiaSharp": "2.88.0-preview.178", - "Splat.Ninject": "14.1.17" + "Splat.Ninject": "14.1.45" } }, "artemis.ui.shared": { "type": "Project", "dependencies": { "Artemis.Core": "1.0.0", - "Avalonia": "0.10.12", - "Avalonia.ReactiveUI": "0.10.12", + "Avalonia": "0.10.13", + "Avalonia.ReactiveUI": "0.10.13", "Avalonia.Svg.Skia": "0.10.12", - "Avalonia.Xaml.Behaviors": "0.10.12", - "Avalonia.Xaml.Interactions": "0.10.12", - "Avalonia.Xaml.Interactivity": "0.10.12", - "DynamicData": "7.4.9", - "FluentAvaloniaUI": "1.2.1", + "DynamicData": "7.5.4", + "FluentAvaloniaUI": "1.3.0", "Material.Icons.Avalonia": "1.0.2", "RGB.NET.Core": "1.0.0-prerelease7", - "ReactiveUI": "17.1.17", + "ReactiveUI": "17.1.50", "ReactiveUI.Validation": "2.2.1", "SkiaSharp": "2.88.0-preview.178" } diff --git a/src/Avalonia/Artemis.UI/Artemis.UI.csproj b/src/Avalonia/Artemis.UI/Artemis.UI.csproj index 4395c30f9..d0eb58247 100644 --- a/src/Avalonia/Artemis.UI/Artemis.UI.csproj +++ b/src/Avalonia/Artemis.UI/Artemis.UI.csproj @@ -1,4 +1,4 @@ - + Library net6.0 @@ -15,23 +15,26 @@ - + - - - + + + - - + + + + + - + - + diff --git a/src/Avalonia/Artemis.UI/Behaviors/SimpleContextDragBehavior.cs b/src/Avalonia/Artemis.UI/Behaviors/SimpleContextDragBehavior.cs new file mode 100644 index 000000000..b89c2c65b --- /dev/null +++ b/src/Avalonia/Artemis.UI/Behaviors/SimpleContextDragBehavior.cs @@ -0,0 +1,162 @@ +// Based on AvaloniaBehaviors +// https://github.com/wieslawsoltes/AvaloniaBehaviors/blob/2f972ebb0066a2a4235126da7e103f684de1c777/src/Avalonia.Xaml.Interactions/DragAndDrop/ContextDragBehavior.cs + +// The MIT License (MIT) +// +// Copyright(c) Wiesław Šoltés +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +using System; +using System.Threading.Tasks; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Data.Core.Plugins; +using Avalonia.Input; +using Avalonia.Interactivity; +using Avalonia.Xaml.Interactions.DragAndDrop; +using Avalonia.Xaml.Interactivity; + +namespace Artemis.UI.Behaviors; + +public class SimpleContextDragBehavior : Behavior +{ + public static readonly StyledProperty ContextProperty = + AvaloniaProperty.Register(nameof(Context)); + + public static readonly StyledProperty HandlerProperty = + AvaloniaProperty.Register(nameof(Handler)); + + public static readonly StyledProperty HorizontalDragThresholdProperty = + AvaloniaProperty.Register(nameof(HorizontalDragThreshold), 3); + + public static readonly StyledProperty VerticalDragThresholdProperty = + AvaloniaProperty.Register(nameof(VerticalDragThreshold), 3); + + private Point _dragStartPoint; + private bool _lock; + private PointerEventArgs? _triggerEvent; + + public object? Context + { + get => GetValue(ContextProperty); + set => SetValue(ContextProperty, value); + } + + public IDragHandler? Handler + { + get => GetValue(HandlerProperty); + set => SetValue(HandlerProperty, value); + } + + public double HorizontalDragThreshold + { + get => GetValue(HorizontalDragThresholdProperty); + set => SetValue(HorizontalDragThresholdProperty, value); + } + + public double VerticalDragThreshold + { + get => GetValue(VerticalDragThresholdProperty); + set => SetValue(VerticalDragThresholdProperty, value); + } + + protected override void OnAttached() + { + base.OnAttached(); + AssociatedObject?.AddHandler(InputElement.PointerPressedEvent, AssociatedObject_PointerPressed, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble); + AssociatedObject?.AddHandler(InputElement.PointerReleasedEvent, AssociatedObject_PointerReleased, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble); + AssociatedObject?.AddHandler(InputElement.PointerMovedEvent, AssociatedObject_PointerMoved, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble); + } + + protected override void OnDetaching() + { + base.OnDetaching(); + AssociatedObject?.RemoveHandler(InputElement.PointerPressedEvent, AssociatedObject_PointerPressed); + AssociatedObject?.RemoveHandler(InputElement.PointerReleasedEvent, AssociatedObject_PointerReleased); + AssociatedObject?.RemoveHandler(InputElement.PointerMovedEvent, AssociatedObject_PointerMoved); + } + + private async Task DoDragDrop(PointerEventArgs triggerEvent, object? value) + { + DataObject data = new(); + data.Set(ContextDropBehavior.DataFormat, value!); + + await DragDrop.DoDragDrop(triggerEvent, data, DragDropEffects.Move); + } + + private void AssociatedObject_PointerPressed(object? sender, PointerPressedEventArgs e) + { + PointerPointProperties properties = e.GetCurrentPoint(AssociatedObject).Properties; + if (!properties.IsLeftButtonPressed) + return; + if (e.Source is not IControl control || AssociatedObject?.DataContext != control.DataContext) + return; + + _dragStartPoint = e.GetPosition(null); + _triggerEvent = e; + _lock = true; + } + + private void AssociatedObject_PointerReleased(object? sender, PointerReleasedEventArgs e) + { + if (!Equals(e.Pointer.Captured, AssociatedObject)) + return; + + if (e.InitialPressMouseButton == MouseButton.Left && _triggerEvent is { }) + { + _triggerEvent = null; + _lock = false; + } + + e.Pointer.Capture(null); + } + + private async void AssociatedObject_PointerMoved(object? sender, PointerEventArgs e) + { + PointerPointProperties properties = e.GetCurrentPoint(AssociatedObject).Properties; + if (!properties.IsLeftButtonPressed) + return; + + if (_triggerEvent is null) + return; + + Point point = e.GetPosition(null); + Point diff = _dragStartPoint - point; + double horizontalDragThreshold = HorizontalDragThreshold; + double verticalDragThreshold = VerticalDragThreshold; + + if (!(Math.Abs(diff.X) > horizontalDragThreshold) && !(Math.Abs(diff.Y) > verticalDragThreshold)) + return; + + e.Pointer.Capture(AssociatedObject); + + if (_lock) + _lock = false; + else + return; + + object? context = Context ?? AssociatedObject?.DataContext; + + Handler?.BeforeDragDrop(sender, _triggerEvent, context); + await DoDragDrop(_triggerEvent, context); + Handler?.AfterDragDrop(sender, _triggerEvent, context); + } +} \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Behaviors/TreeItemDragBehavior.cs b/src/Avalonia/Artemis.UI/Behaviors/TreeItemDragBehavior.cs new file mode 100644 index 000000000..9fdb6f054 --- /dev/null +++ b/src/Avalonia/Artemis.UI/Behaviors/TreeItemDragBehavior.cs @@ -0,0 +1,337 @@ +using System; +using System.Collections; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Controls.Generators; +using Avalonia.Controls.Primitives; +using Avalonia.Input; +using Avalonia.Interactivity; +using Avalonia.Layout; +using Avalonia.Media.Transformation; +using Avalonia.Xaml.Interactivity; + +namespace Artemis.UI.Behaviors; + +/// +/// +public class TreeItemDragBehavior : Behavior +{ + /// + /// + public static readonly StyledProperty OrientationProperty = + AvaloniaProperty.Register(nameof(Orientation)); + + /// + /// + public static readonly StyledProperty HorizontalDragThresholdProperty = + AvaloniaProperty.Register(nameof(HorizontalDragThreshold), 3); + + /// + /// + public static readonly StyledProperty VerticalDragThresholdProperty = + AvaloniaProperty.Register(nameof(VerticalDragThreshold), 3); + + private IControl? _draggedContainer; + private int _draggedIndex; + private bool _dragStarted; + private bool _enableDrag; + private ItemsControl? _itemsControl; + private Point _start; + private int _targetIndex; + + /// + /// + public Orientation Orientation + { + get => GetValue(OrientationProperty); + set => SetValue(OrientationProperty, value); + } + + /// + /// + public double HorizontalDragThreshold + { + get => GetValue(HorizontalDragThresholdProperty); + set => SetValue(HorizontalDragThresholdProperty, value); + } + + /// + /// + public double VerticalDragThreshold + { + get => GetValue(VerticalDragThresholdProperty); + set => SetValue(VerticalDragThresholdProperty, value); + } + + /// + /// + protected override void OnAttached() + { + base.OnAttached(); + + if (AssociatedObject is { }) + { + AssociatedObject.AddHandler(InputElement.PointerReleasedEvent, Released, RoutingStrategies.Tunnel); + AssociatedObject.AddHandler(InputElement.PointerPressedEvent, Pressed, RoutingStrategies.Tunnel); + AssociatedObject.AddHandler(InputElement.PointerMovedEvent, Moved, RoutingStrategies.Tunnel); + AssociatedObject.AddHandler(InputElement.PointerCaptureLostEvent, CaptureLost, RoutingStrategies.Tunnel); + } + } + + /// + /// + protected override void OnDetaching() + { + base.OnDetaching(); + + if (AssociatedObject is { }) + { + AssociatedObject.RemoveHandler(InputElement.PointerReleasedEvent, Released); + AssociatedObject.RemoveHandler(InputElement.PointerPressedEvent, Pressed); + AssociatedObject.RemoveHandler(InputElement.PointerMovedEvent, Moved); + AssociatedObject.RemoveHandler(InputElement.PointerCaptureLostEvent, CaptureLost); + } + } + + private void Pressed(object? sender, PointerPressedEventArgs e) + { + PointerPointProperties properties = e.GetCurrentPoint(AssociatedObject).Properties; + if (properties.IsLeftButtonPressed + && AssociatedObject?.Parent is ItemsControl itemsControl) + { + _enableDrag = true; + _dragStarted = false; + _start = e.GetPosition(AssociatedObject.Parent); + _draggedIndex = -1; + _targetIndex = -1; + _itemsControl = itemsControl; + _draggedContainer = AssociatedObject; + + if (_draggedContainer is { }) + SetDraggingPseudoClasses(_draggedContainer, true); + + AddTransforms(_itemsControl); + } + } + + private void Released(object? sender, PointerReleasedEventArgs e) + { + if (_dragStarted) + { + if (e.InitialPressMouseButton == MouseButton.Left) + Released(); + + e.Pointer.Capture(null); + } + } + + private void CaptureLost(object? sender, PointerCaptureLostEventArgs e) + { + Released(); + } + + private void Released() + { + if (!_enableDrag) + return; + + RemoveTransforms(_itemsControl); + + if (_itemsControl is { }) + foreach (ItemContainerInfo? container in _itemsControl.ItemContainerGenerator.Containers) + SetDraggingPseudoClasses(container.ContainerControl, true); + + if (_dragStarted) + if (_draggedIndex >= 0 && _targetIndex >= 0 && _draggedIndex != _targetIndex) + MoveDraggedItem(_itemsControl, _draggedIndex, _targetIndex); + + if (_itemsControl is { }) + foreach (ItemContainerInfo? container in _itemsControl.ItemContainerGenerator.Containers) + SetDraggingPseudoClasses(container.ContainerControl, false); + + if (_draggedContainer is { }) + SetDraggingPseudoClasses(_draggedContainer, false); + + _draggedIndex = -1; + _targetIndex = -1; + _enableDrag = false; + _dragStarted = false; + _itemsControl = null; + + _draggedContainer = null; + } + + private void AddTransforms(ItemsControl? itemsControl) + { + if (itemsControl?.Items is null) + return; + + int i = 0; + + foreach (object? _ in itemsControl.Items) + { + IControl? container = itemsControl.ItemContainerGenerator.ContainerFromIndex(i); + if (container is not null) + SetTranslateTransform(container, 0, 0); + + i++; + } + } + + private void RemoveTransforms(ItemsControl? itemsControl) + { + if (itemsControl?.Items is null) + return; + + int i = 0; + + foreach (object? _ in itemsControl.Items) + { + IControl? container = itemsControl.ItemContainerGenerator.ContainerFromIndex(i); + if (container is not null) + SetTranslateTransform(container, 0, 0); + + i++; + } + } + + private void MoveDraggedItem(ItemsControl? itemsControl, int draggedIndex, int targetIndex) + { + if (itemsControl?.Items is not IList items) + return; + + object? draggedItem = items[draggedIndex]; + items.RemoveAt(draggedIndex); + items.Insert(targetIndex, draggedItem); + + if (itemsControl is SelectingItemsControl selectingItemsControl) + selectingItemsControl.SelectedIndex = targetIndex; + } + + private void Moved(object? sender, PointerEventArgs e) + { + PointerPointProperties properties = e.GetCurrentPoint(AssociatedObject).Properties; + if (properties.IsLeftButtonPressed) + { + if (_itemsControl?.Items is null || _draggedContainer?.RenderTransform is null || !_enableDrag) + return; + + Orientation orientation = Orientation; + Point position = e.GetPosition(_itemsControl); + double delta = orientation == Orientation.Horizontal ? position.X - _start.X : position.Y - _start.Y; + + if (!_dragStarted) + { + Point diff = _start - position; + double horizontalDragThreshold = HorizontalDragThreshold; + double verticalDragThreshold = VerticalDragThreshold; + + if (orientation == Orientation.Horizontal) + { + if (Math.Abs(diff.X) > horizontalDragThreshold) + _dragStarted = true; + else + return; + } + else + { + if (Math.Abs(diff.Y) > verticalDragThreshold) + _dragStarted = true; + else + return; + } + e.Pointer.Capture(AssociatedObject); + } + + if (orientation == Orientation.Horizontal) + SetTranslateTransform(_draggedContainer, delta, 0); + else + SetTranslateTransform(_draggedContainer, 0, delta); + + _draggedIndex = _itemsControl.ItemContainerGenerator.IndexFromContainer(_draggedContainer); + _targetIndex = -1; + + Rect draggedBounds = _draggedContainer.Bounds; + + double draggedStart = orientation == Orientation.Horizontal ? draggedBounds.X : draggedBounds.Y; + + double draggedDeltaStart = orientation == Orientation.Horizontal + ? draggedBounds.X + delta + : draggedBounds.Y + delta; + + double draggedDeltaEnd = orientation == Orientation.Horizontal + ? draggedBounds.X + delta + draggedBounds.Width + : draggedBounds.Y + delta + draggedBounds.Height; + + int i = 0; + + foreach (object? _ in _itemsControl.Items) + { + IControl? targetContainer = _itemsControl.ItemContainerGenerator.ContainerFromIndex(i); + if (targetContainer?.RenderTransform is null || ReferenceEquals(targetContainer, _draggedContainer)) + { + i++; + continue; + } + + // If the target container has children, there are two options + // Move into the top of the container + // Insert before or after a child in the container + + Rect targetBounds = targetContainer.Bounds; + double targetStart = orientation == Orientation.Horizontal ? targetBounds.X : targetBounds.Y; + + double targetMid = orientation == Orientation.Horizontal + ? targetBounds.X + targetBounds.Width / 2 + : targetBounds.Y + targetBounds.Height / 2; + + int targetIndex = _itemsControl.ItemContainerGenerator.IndexFromContainer(targetContainer); + + if (targetStart > draggedStart && draggedDeltaEnd >= targetMid) + { + if (orientation == Orientation.Horizontal) + SetTranslateTransform(targetContainer, -draggedBounds.Width, 0); + else + SetTranslateTransform(targetContainer, 0, -draggedBounds.Height); + + _targetIndex = _targetIndex == -1 ? targetIndex : + targetIndex > _targetIndex ? targetIndex : _targetIndex; + } + else if (targetStart < draggedStart && draggedDeltaStart <= targetMid) + { + if (orientation == Orientation.Horizontal) + SetTranslateTransform(targetContainer, draggedBounds.Width, 0); + else + SetTranslateTransform(targetContainer, 0, draggedBounds.Height); + + _targetIndex = _targetIndex == -1 ? targetIndex : + targetIndex < _targetIndex ? targetIndex : _targetIndex; + } + else + { + if (orientation == Orientation.Horizontal) + SetTranslateTransform(targetContainer, 0, 0); + else + SetTranslateTransform(targetContainer, 0, 0); + } + + i++; + } + } + } + + private void SetDraggingPseudoClasses(IControl control, bool isDragging) + { + if (isDragging) + ((IPseudoClasses) control.Classes).Add(":dragging"); + else + ((IPseudoClasses) control.Classes).Remove(":dragging"); + } + + private void SetTranslateTransform(IControl control, double x, double y) + { + TransformOperations.Builder transformBuilder = new(1); + transformBuilder.AppendTranslate(x, y); + control.RenderTransform = transformBuilder.Build(); + } +} \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Behaviors/ProfileTreeViewDropHandler.cs b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Behaviors/ProfileTreeViewDropHandler.cs new file mode 100644 index 000000000..42eb776f6 --- /dev/null +++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/Behaviors/ProfileTreeViewDropHandler.cs @@ -0,0 +1,183 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Controls.Generators; +using Avalonia.Controls.Primitives; +using Avalonia.Controls.Shapes; +using Avalonia.Input; +using Avalonia.Interactivity; +using Avalonia.Media; +using Avalonia.VisualTree; +using Avalonia.Xaml.Interactions.DragAndDrop; + +namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.Behaviors; + +public class ProfileTreeViewDropHandler : DropHandlerBase +{ + public override bool Validate(object? sender, DragEventArgs e, object? sourceContext, object? targetContext, object? state) + { + if (e.Source is IControl && sender is TreeView treeView) + return Validate(treeView, e, sourceContext, targetContext, false); + + return false; + } + + public override bool Execute(object? sender, DragEventArgs e, object? sourceContext, object? targetContext, object? state) + { + bool result = false; + if (e.Source is IControl && sender is TreeView treeView) + result = Validate(treeView, e, sourceContext, targetContext, true); + + if (sender is ItemsControl itemsControl) + { + foreach (TreeViewItem treeViewItem in GetFlattenedTreeView(itemsControl)) + SetDraggingPseudoClasses(treeViewItem, TreeDropType.After, false); + } + + return result; + } + + public override void Cancel(object? sender, RoutedEventArgs e) + { + if (e.Source is IControl control && control.FindAncestorOfType() != null) + SetDraggingPseudoClasses(control.FindAncestorOfType(), TreeDropType.After, false); + + base.Cancel(sender, e); + } + + private bool Validate(TreeView treeView, DragEventArgs e, object? sourceContext, object? targetContext, bool bExecute) where T : TreeItemViewModel + { + Point position = e.GetPosition(treeView); + IVisual? targetVisual = treeView.GetVisualAt(position).FindAncestorOfType(); + if (sourceContext is not T sourceNode || targetContext is not ProfileTreeViewModel vm || targetVisual is not IControl {DataContext: T targetNode}) + return false; + + TreeItemViewModel? sourceParent = sourceNode.Parent; + TreeItemViewModel? targetParent = targetNode.Parent; + ObservableCollection sourceNodes = sourceParent is { } ? sourceParent.Children : vm.Children; + ObservableCollection targetNodes = targetParent is { } ? targetParent.Children : vm.Children; + + int sourceIndex = sourceNodes.IndexOf(sourceNode); + int targetIndex = targetNodes.IndexOf(targetNode); + + // Update the target index according to the position + TreeDropType dropType = TreeDropType.Before; + if (!targetNode.SupportsChildren) + { + if (position.Y > targetVisual.Bounds.Top + targetVisual.Bounds.Height / 2) + dropType = TreeDropType.After; + } + else + { + IVisual? header = targetVisual.GetVisualDescendants().FirstOrDefault(d => d is Border b && b.Name == "PART_LayoutRoot"); + if (header != null) + { + double segments = header.Bounds.Height / 3.0; + if (position.Y > targetVisual.Bounds.Top + segments * 2) + dropType = TreeDropType.After; + else if (position.Y > targetVisual.Bounds.Top + segments) + dropType = TreeDropType.Into; + } + } + + if (dropType == TreeDropType.After) + targetIndex += 1; + else if (dropType == TreeDropType.Into) + targetIndex = 0; + + TreeItemViewModel? currentParent = targetNode.Parent; + while (currentParent != null) + { + if (currentParent == sourceNode) + return false; + currentParent = currentParent.Parent; + } + + if (sourceIndex < 0 || targetIndex < 0) + return false; + + if (e.DragEffects != DragDropEffects.Move) + return false; + + if (bExecute) + { + if (dropType == TreeDropType.Into) + { + targetNode.InsertElement(sourceNode, 0); + } + else + { + if (sourceParent == targetParent && sourceIndex < targetIndex) + targetIndex--; + if (targetNode.Parent != null) + targetNode.Parent.InsertElement(sourceNode, targetIndex); + } + } + else + { + SetDraggingPseudoClasses((IControl) targetVisual, dropType, true); + } + + return true; + } + + private List GetFlattenedTreeView(ItemsControl currentNode) + { + List result = new(); + + foreach (ItemContainerInfo containerInfo in currentNode.ItemContainerGenerator.Containers) + { + if (containerInfo.ContainerControl is TreeViewItem treeViewItem && containerInfo.Item is TreeItemViewModel viewModel) + { + result.Add(treeViewItem); + if (treeViewItem.ItemContainerGenerator.Containers.Any()) + result.AddRange(GetFlattenedTreeView(treeViewItem)); + } + } + + return result; + } + + private void SetDraggingPseudoClasses(IControl control, TreeDropType type, bool isDragging) + { + if (isDragging) + { + ((IPseudoClasses) control.Classes).Add(":dragging"); + if (type == TreeDropType.Before) + { + ((IPseudoClasses) control.Classes).Add(":dragging-before"); + ((IPseudoClasses) control.Classes).Remove(":dragging-after"); + ((IPseudoClasses) control.Classes).Remove(":dragging-into"); + } + else if (type == TreeDropType.After) + { + ((IPseudoClasses) control.Classes).Remove(":dragging-before"); + ((IPseudoClasses) control.Classes).Add(":dragging-after"); + ((IPseudoClasses) control.Classes).Remove(":dragging-into"); + } + else if (type == TreeDropType.Into) + { + ((IPseudoClasses) control.Classes).Remove(":dragging-before"); + ((IPseudoClasses) control.Classes).Remove(":dragging-after"); + ((IPseudoClasses) control.Classes).Add(":dragging-into"); + } + } + else + { + ((IPseudoClasses) control.Classes).Remove(":dragging"); + ((IPseudoClasses) control.Classes).Remove(":dragging-before"); + ((IPseudoClasses) control.Classes).Remove(":dragging-after"); + ((IPseudoClasses) control.Classes).Remove(":dragging-into"); + } + } + + private enum TreeDropType + { + Before, + After, + Into + } +} \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml.cs b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml.cs index 6644b2451..29cbab812 100644 --- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml.cs +++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml.cs @@ -6,36 +6,35 @@ using Avalonia.Markup.Xaml; using Avalonia.ReactiveUI; using ReactiveUI; -namespace Artemis.UI.Screens.ProfileEditor.ProfileTree +namespace Artemis.UI.Screens.ProfileEditor.ProfileTree; + +public class FolderTreeItemView : ReactiveUserControl { - public class FolderTreeItemView : ReactiveUserControl + public FolderTreeItemView() { - public FolderTreeItemView() - { - InitializeComponent(); - } + InitializeComponent(); + } - private void InitializeComponent() + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + this.WhenActivated(_ => ViewModel?.Rename.Subscribe(_ => { - AvaloniaXamlLoader.Load(this); - this.WhenActivated(_ => ViewModel?.Rename.Subscribe(_ => - { - this.Get("Input").Focus(); - this.Get("Input").SelectAll(); - })); - } + this.Get("Input").Focus(); + this.Get("Input").SelectAll(); + })); + } - private void InputElement_OnKeyUp(object? sender, KeyEventArgs e) - { - if (e.Key == Key.Enter) - ViewModel?.SubmitRename(); - else if (e.Key == Key.Escape) - ViewModel?.CancelRename(); - } - - private void InputElement_OnLostFocus(object? sender, RoutedEventArgs e) - { + private void InputElement_OnKeyUp(object? sender, KeyEventArgs e) + { + if (e.Key == Key.Enter) + ViewModel?.SubmitRename(); + else if (e.Key == Key.Escape) ViewModel?.CancelRename(); - } + } + + private void InputElement_OnLostFocus(object? sender, RoutedEventArgs e) + { + ViewModel?.CancelRename(); } } \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemViewModel.cs b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemViewModel.cs index cbb530f99..2ae36aae5 100644 --- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemViewModel.cs +++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemViewModel.cs @@ -16,6 +16,12 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree public Folder Folder { get; } - + + #region Overrides of TreeItemViewModel + + /// + public override bool SupportsChildren => true; + + #endregion } } \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemView.axaml.cs b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemView.axaml.cs index b903451ae..69f80d702 100644 --- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemView.axaml.cs +++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemView.axaml.cs @@ -6,36 +6,35 @@ using Avalonia.Markup.Xaml; using Avalonia.ReactiveUI; using ReactiveUI; -namespace Artemis.UI.Screens.ProfileEditor.ProfileTree +namespace Artemis.UI.Screens.ProfileEditor.ProfileTree; + +public class LayerTreeItemView : ReactiveUserControl { - public class LayerTreeItemView : ReactiveUserControl + public LayerTreeItemView() { - public LayerTreeItemView() - { - InitializeComponent(); - } + InitializeComponent(); + } - private void InitializeComponent() + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + this.WhenActivated(_ => ViewModel?.Rename.Subscribe(_ => { - AvaloniaXamlLoader.Load(this); - this.WhenActivated(_ => ViewModel?.Rename.Subscribe(_ => - { - this.Get("Input").Focus(); - this.Get("Input").SelectAll(); - })); - } + this.Get("Input").Focus(); + this.Get("Input").SelectAll(); + })); + } - private void InputElement_OnKeyUp(object? sender, KeyEventArgs e) - { - if (e.Key == Key.Enter) - ViewModel?.SubmitRename(); - else if (e.Key == Key.Escape) - ViewModel?.CancelRename(); - } - - private void InputElement_OnLostFocus(object? sender, RoutedEventArgs e) - { + private void InputElement_OnKeyUp(object? sender, KeyEventArgs e) + { + if (e.Key == Key.Enter) + ViewModel?.SubmitRename(); + else if (e.Key == Key.Escape) ViewModel?.CancelRename(); - } + } + + private void InputElement_OnLostFocus(object? sender, RoutedEventArgs e) + { + ViewModel?.CancelRename(); } } \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemViewModel.cs b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemViewModel.cs index ab577c3ce..e53af8eed 100644 --- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemViewModel.cs +++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/LayerTreeItemViewModel.cs @@ -15,5 +15,12 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree } public Layer Layer { get; } + + #region Overrides of TreeItemViewModel + + /// + public override bool SupportsChildren => false; + + #endregion } } \ No newline at end of file diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/ProfileTreeView.axaml b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/ProfileTreeView.axaml index d2eb3db4e..f52ed381e 100644 --- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/ProfileTreeView.axaml +++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/ProfileTreeView.axaml @@ -4,11 +4,49 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" xmlns:profileTree="clr-namespace:Artemis.UI.Screens.ProfileEditor.ProfileTree" + xmlns:profileBehaviors="clr-namespace:Artemis.UI.Screens.ProfileEditor.ProfileTree.Behaviors" + xmlns:behaviors="clr-namespace:Artemis.UI.Behaviors" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.UI.Screens.ProfileEditor.ProfileTree.ProfileTreeView" x:DataType="profileTree:ProfileTreeViewModel"> + + + + + + + + + + - + @@ -111,7 +112,7 @@ -