Add material color services, plugin DTOs, and tests

Introduce IPC wire-format appearance DTOs (PluginIsolation.Contracts) and clarify they are distinct from the runtime PluginSdk snapshot. Update PluginSdk comments to document the runtime-facing snapshot shape. Change ComponentColorSchemeHelper to use the HostMaterialColorProvider and add an overload that accepts a MaterialColorSnapshot. Add new services and pipelines (MaterialColorService, MaterialSurfaceService, WindowMaterialService, WallpaperColorPipeline) and refactor AppearanceThemeService to depend on MaterialColorService while removing legacy internal implementations. Add multiple unit tests (ComponentColorSchemeHelper, PluginAppearanceBoundary, SettingsCatalogService, WallpaperSettingsPageViewModel) and update localization resources with new material_color and wallpaper keys.
This commit is contained in:
lincube
2026-05-06 19:33:08 +08:00
parent f8a4bb888c
commit 6b1c738d8c
30 changed files with 2402 additions and 1577 deletions

View File

@@ -1,5 +1,9 @@
namespace LanMountainDesktop.PluginIsolation.Contracts;
/// <summary>
/// Wire request for the IPC appearance snapshot payload. This request targets the
/// isolation-contract DTOs, not the runtime SDK snapshot with the same type name.
/// </summary>
public sealed record PluginAppearanceSnapshotRequest(string SessionId);
public sealed record PluginMaterialSurfaceSnapshot(
@@ -8,6 +12,10 @@ public sealed record PluginMaterialSurfaceSnapshot(
double BlurRadius,
double Opacity);
/// <summary>
/// Wire-format appearance snapshot exchanged over IPC.
/// Do not treat this as the same type as <c>LanMountainDesktop.PluginSdk.PluginAppearanceSnapshot</c>.
/// </summary>
public sealed record PluginAppearanceSnapshot(
string ThemeVariant,
string? AccentColor = null,
@@ -21,4 +29,7 @@ public sealed record PluginAppearanceSnapshot(
IReadOnlyDictionary<string, PluginMaterialSurfaceSnapshot>? MaterialSurfaces = null,
IReadOnlyList<string>? WallpaperSeedCandidates = null);
/// <summary>
/// Wire notification carrying the IPC appearance snapshot.
/// </summary>
public sealed record PluginAppearanceChangedNotification(PluginAppearanceSnapshot Snapshot);