import { BlockManager } from '@core/utils' ; export function ancestorOf ( type , targetType ) { let level = - 1 ; const paths = BlockManager . getAutoCompletePath ( type , targetType ) ; if ( paths ) { return paths . length + 1 ; } return level ; }