using Connected.Interop; using Microsoft.AspNetCore.Components; namespace Connected.Services; public delegate void SizeChanged(IDictionary changes); public interface IResizeObserver : IAsyncDisposable, IDisposable { Task Observe(ElementReference element); Task> Observe(IEnumerable elements); Task Unobserve(ElementReference element); double GetWidth(ElementReference reference); double GetHeight(ElementReference reference); BoundingClientRect GetSizeInfo(ElementReference reference); event SizeChanged OnResized; bool IsElementObserved(ElementReference reference); }