I've been wondering whether it would be possible to leverage ML/AI to "infer" a layout from a visual mockup. So like if two elements have the same X position, they're assumed to be left aligned with one another. If three elements are the same width and sit side-by-side with the same distance between them, they're assumed to be a 3-grid column. Etc etc.