import { Observable , combineLatest , map , shareReplay } from "rxjs" ; import { ViewportOffset , watchViewportOffset } from "../offset" ; import { ViewportSize , watchViewportSize } from "../size" ; /**
 * Viewport
 */ export interface Viewport { offset : ViewportOffset ; size : ViewportSize ; } returns export function watchViewport ( ) { return combineLatest ( [ watchViewportOffset ( ) , watchViewportSize ( ) ] ) . pipe ( map ( ( [ offset , size ] ) => ( { offset , size } ) ) , shareReplay ( 1 ) ) ; }