import { is , merge } from '../../common/utils' ; type EL1 = ( tagName : string , style : object ) => HTMLElement ; type EL2 = ( style : object ) => HTMLElement ; export const makel = ( ... args ) => { const styleObject = args . find ( is . object ) ; const el = document . createElement ( args . find ( is . string ) || 'div' ) ; styleObject && merge ( el . style , styleObject ) ; return el ; } ; export const onElementResize = ( el , fn ) => { const r = new ( window as any ) . ResizeObserver ( ( [ { contentRect : e } ] ) => fn ( e . width , e . height ) ) ; r . observe ( el ) ; } ;