JavaScript library for optimal blocks layout