import { Observable , fromEvent , map , startWith } from "rxjs" ; /**
 * Viewport size
 */ export interface ViewportSize { width : number ; height : number ; } returns export function getViewportSize ( ) { return { width : innerWidth , height : innerHeight } ; } returns export function watchViewportSize ( ) { return fromEvent ( window , "resize" , { passive : true } ) . pipe ( map ( getViewportSize ) , startWith ( getViewportSize ( ) ) ) ; }