feat(public): scrolling Canvas 2D Mix visualizer — windowed, playback-coupled, zoomable, read-only (8.K W2)

This commit is contained in:
daniel-c-harvey
2026-06-14 18:20:32 -04:00
parent c608fa345a
commit 2d0a565765
8 changed files with 698 additions and 132 deletions
@@ -0,0 +1,20 @@
namespace DeepDrftPublic.Client.Services;
/// <summary>
/// Holds the Mix visualizer's zoom (visible time-span in seconds) for the lifetime of the WASM app
/// instance. Scoped in DI, so it lives across SPA navigations within one listening session — open a
/// second mix and the slider keeps where you left it — but a fresh page load (F5) constructs a new
/// instance, resetting to the default. That matches the spec's "persist within session, reset on
/// fresh load" without any cookie/localStorage round-trip (see phase-9-mix-visualizer-redesign §B).
/// </summary>
public sealed class MixVisualizerZoomState
{
/// <summary>
/// Default opening window. Mirrors <c>DEFAULT_VISIBLE_SECONDS</c> in MixVisualizer.ts; keep the
/// two in sync (the TS owns the rendering anchors, this owns the C#-side session default).
/// </summary>
public const double DefaultVisibleSeconds = 10.0;
/// <summary>Visible time-span in seconds. Survives navigation; resets on fresh page load.</summary>
public double VisibleSeconds { get; set; } = DefaultVisibleSeconds;
}