2026-03-20 22:37:37 +08:00
|
|
|
namespace LanMountainDesktop.PluginSdk;
|
|
|
|
|
|
2026-05-06 19:33:08 +08:00
|
|
|
/// <remarks>
|
|
|
|
|
/// This is the runtime snapshot shape consumed by plugins inside the host process.
|
|
|
|
|
/// It is intentionally distinct from the wire DTO with the same name in
|
|
|
|
|
/// <c>LanMountainDesktop.PluginIsolation.Contracts.PluginAppearanceSnapshot</c>.
|
|
|
|
|
/// </remarks>
|
Introduce render gate and chart caching
Replace UI DispatcherTimer polling with a StudySnapshotRenderGate across multiple widgets to queue and apply only the latest analytics snapshot; components updated include StudyDeductionReasonsWidget, StudyEnvironmentWidget, StudyInterruptDensityWidget, StudyNoiseCurveWidget. Add StudySnapshotRenderGate implementation to coordinate rendering and monitoring leases and update subscription/lease lifecycle handling (subscribe/unsubscribe, Acquire/Dispose leases, Clear/Dispose gate). Rewrite chart controls (StudyNoiseCurveChartControl and StudyNoiseDistributionScatterChartControl) to use stable logical-time origins, split series into static vs dynamic tails, add geometry/sample caching, stable jitter/coordinate mapping helpers, and expose internal helpers & counts for testing. Add unit tests (StudyComponentRenderingTests) covering the render gate and chart behaviors (layer counts, logical X mapping, stable jitter, cache rebuild). These changes improve rendering correctness and performance by avoiding redundant renders and enabling deterministic chart layout.
2026-05-06 16:00:45 +08:00
|
|
|
public sealed record PluginMaterialSurfaceSnapshot(
|
|
|
|
|
string BackgroundColor,
|
|
|
|
|
string BorderColor,
|
|
|
|
|
double BlurRadius,
|
|
|
|
|
double Opacity);
|
|
|
|
|
|
2026-05-06 19:33:08 +08:00
|
|
|
/// <remarks>
|
|
|
|
|
/// Runtime-facing appearance snapshot for plugins. This is not the same contract as the
|
|
|
|
|
/// wire-format snapshot in <c>LanMountainDesktop.PluginIsolation.Contracts</c>, even though the
|
|
|
|
|
/// type name matches.
|
|
|
|
|
/// </remarks>
|
2026-03-20 22:37:37 +08:00
|
|
|
public sealed record PluginAppearanceSnapshot(
|
|
|
|
|
PluginCornerRadiusTokens CornerRadiusTokens,
|
Introduce render gate and chart caching
Replace UI DispatcherTimer polling with a StudySnapshotRenderGate across multiple widgets to queue and apply only the latest analytics snapshot; components updated include StudyDeductionReasonsWidget, StudyEnvironmentWidget, StudyInterruptDensityWidget, StudyNoiseCurveWidget. Add StudySnapshotRenderGate implementation to coordinate rendering and monitoring leases and update subscription/lease lifecycle handling (subscribe/unsubscribe, Acquire/Dispose leases, Clear/Dispose gate). Rewrite chart controls (StudyNoiseCurveChartControl and StudyNoiseDistributionScatterChartControl) to use stable logical-time origins, split series into static vs dynamic tails, add geometry/sample caching, stable jitter/coordinate mapping helpers, and expose internal helpers & counts for testing. Add unit tests (StudyComponentRenderingTests) covering the render gate and chart behaviors (layer counts, logical X mapping, stable jitter, cache rebuild). These changes improve rendering correctness and performance by avoiding redundant renders and enabling deterministic chart layout.
2026-05-06 16:00:45 +08:00
|
|
|
string ThemeVariant,
|
|
|
|
|
string? AccentColor = null,
|
|
|
|
|
string? SeedColor = null,
|
|
|
|
|
string? ColorSource = null,
|
|
|
|
|
string? SystemMaterialMode = null,
|
|
|
|
|
IReadOnlyDictionary<string, string>? ColorRoles = null,
|
|
|
|
|
IReadOnlyDictionary<string, PluginMaterialSurfaceSnapshot>? MaterialSurfaces = null,
|
|
|
|
|
IReadOnlyList<string>? WallpaperSeedCandidates = null);
|