@namespace DeepDrftPublic.Client.Controls @using DeepDrftShared.Client.Common @* The single controls affordance, placed by an icon anywhere (Phase 12 §3d-revised). Closed state is just the lava-lamp icon; clicking it floats the eight-knob WaveformVisualizerControls panel over the surface. One panel, one popover host, reused on every host (Mix, Cut, Session, NowPlaying card) — the SOLID seam: variance is the per-host anchor (§8e), never a forked popover. Anchoring follows the SharePopover precedent: Fixed so the panel reads the trigger's bounding rect rather than fighting CSS container tricks. AnchorOrigin/TransformOrigin are per-host parameters (§8e) defaulted to bottom-right open-down — the cleanest case (Mix's TopRightAction corner); tight hosts (the NowPlaying card) override to open away from the card body. The popover owns NO control state and NO JS interop. The hosted WaveformVisualizerControls panel mutates the shared WaveformVisualizerControlState and raises Changed; the visualizer bridge subscribes. This host only toggles open/closed and places the panel — it stays purely presentational. *@ @* Backdrop dismissal mirrors SharePopover: a viewport overlay closes on outside click. AutoClose stays off so a knob drag (which can land pointer-up outside the panel's DOM subtree) does not dismiss. *@ @* Activator and popover share this wrapper so MudPopover anchors off the trigger's bounding rect. *@
@code { /// /// Where the panel anchors relative to the trigger icon (§8e). Defaults to opening down-from the /// icon's bottom-right — fits Mix's top-right corner and the ambient hosts. Tight hosts (the /// NowPlaying card) override to open away from the card body. /// [Parameter] public Origin AnchorOrigin { get; set; } = Origin.BottomRight; /// The panel's own corner that pins to (§8e). [Parameter] public Origin TransformOrigin { get; set; } = Origin.TopRight; /// Trigger-icon size. Defaults Large to match the Phase 10 Mix lava-lamp button. [Parameter] public Size IconSize { get; set; } = Size.Large; private bool _open; private void Toggle() => _open = !_open; private void Close() => _open = false; }