[dotenv@17.2.3] injecting env (0) from .env -- tip:
{ "728:17674": { "x": 23100, "y": 18765, "w": 1440, "h": 102 }, "728:17675": { "x": 23100, "y": 18867, "w": 1440, "h": 708, "children": { "728:17676": { "x": 21300, "y": 18690, "w": 3600, "h": 1770 }, "728:17679": { "x": 23892, "y": 18961.1875, "w": 720, "h": 720 }, "728:17682": { "x": 23277, "y": 18990.375, "w": 1086, "h": 461.25, "children": { "728:17683": { "x": 23277, "y": 18990.375, "w": 633.5, "h": 461.25, "children": { "728:17684": { "x": 23292, "y": 19001.75, "w": 603.5, "h": 150, "children": { "728:17685": { "x": 23292, "y": 19001.75, "w": 595.2000122070312, "h": 150 } } }, "728:17686": { "x": 23292, "y": 19199.75, "w": 603.5, "h": 90, "children": { "728:17687": { "x": 23292, "y": 19203.75, "w": 597.8875122070312, "h": 82 } } }, "728:17688": { "x": 23292, "y": 19289.75, "w": 603.5, "h": 150.5, "children": { "728:17689": { "x": 23292, "y": 19385.75, "w": 612.25, "h": 78.5, "children": { "728:17690": { "x": 23292, "y": 19385.75, "w": 268.65625, "h": 54.5, "children": { "728:17691": { "x": 23312, "y": 19401.75, "w": 196.65625, "h": 23, "children": { "728:17692": { "x": 23312, "y": 19401.75, "w": 192, "h": 23 }, "728:17693": { "x": 23520.65625, "y": 19406, "w": 20, "h": 14 } } } } }, "728:17696": { "x": 23608.65625, "y": 19385.75, "w": 247.59375, "h": 54.5, "children": { "728:17697": { "x": 23628.65625, "y": 19401.75, "w": 202, "h": 23 } } } } } } } } }, "728:17698": { "x": 23925.5, "y": 18990.375, "w": 241.5, "h": 461.25 } } } } }, "728:17700": { "x": 23100, "y": 19575, "w": 1440, "h": 4516.484375, "children": { "728:17701": { "x": 23100, "y": 19575, "w": 1440, "h": 802.984375, "children": { "728:17702": { "x": 23196, "y": 19658, "w": 609, "h": 91, "children": { "728:17703": { "x": 23196, "y": 19658, "w": 563.4187622070312, "h": 90 } } }, "728:17704": { "x": 23196, "y": 20198.984375, "w": 1248, "h": 95, "children": { "728:17705": { "x": 23196, "y": 20230.484375, "w": 129, "h": 30 }, "728:17706": { "x": 23398.25, "y": 20198.984375, "w": 1045.75, "h": 95 } } }, "728:17775": { "x": 22348, "y": 19821, "w": 2096, "h": 305.984375, "children": { "728:17776": { "x": 22348, "y": 19821, "w": 1248, "h": 305.984375, "children": { "728:17777": { "x": 22772, "y": 19821, "w": 400, "h": 305.984375, "children": { "728:17778": { "x": 22808, "y": 19906.984375, "w": 314.85626220703125, "h": 120 } } }, "728:17779": { "x": 23196, "y": 19821, "w": 400, "h": 305.984375, "children": { "728:17780": { "x": 23232, "y": 19857, "w": 328, "h": 25.984375 }, "728:17796": { "x": 23232, "y": 19906.984375, "w": 312.46563720703125, "h": 80 }, "728:17797": { "x": 23232, "y": 20010.984375, "w": 136, "h": 20 } } }, "728:17798": { "x": 23620, "y": 19821, "w": 400, "h": 305.984375, "children": { "728:17799": { "x": 23656, "y": 19857, "w": 328, "h": 25.984375 }, "728:17815": { "x": 23656, "y": 19906.984375, "w": 318.79376220703125, "h": 140 }, "728:17816": { "x": 23656, "y": 20070.984375, "w": 107, "h": 20 } } }, "728:17817": { "x": 24044, "y": 19821, "w": 400, "h": 305.984375, "children": { "728:17818": { "x": 24080, "y": 19857, "w": 328, "h": 25.984375 }, "728:17834": { "x": 24080, "y": 19906.984375, "w": 313.10626220703125, "h": 80 }, "728:17835": { "x": 24080, "y": 20010.984375, "w": 111, "h": 20 } } }, "728:17836": { "x": 24468, "y": 19821, "w": 400, "h": 305.984375, "children": { "728:17837": { "x": 24504, "y": 19857, "w": 328, "h": 25.984375 }, "728:17844": { "x": 24504, "y": 19906.984375, "w": 322.91876220703125, "h": 140 }, "728:17845": { "x": 24504, "y": 20070.984375, "w": 102, "h": 20 } } } } } } } } }, "728:17846": { "x": 23100, "y": 20377.984375, "w": 1440, "h": 664, "children": { "728:17847": { "x": 23232, "y": 20461.984375, "w": 1176, "h": 496, "children": { "728:17848": { "x": 23232, "y": 20461.984375, "w": 588, "h": 496, "children": { "728:17849": { "x": 23292, "y": 20463.984375, "w": 446.40313720703125, "h": 130 }, "728:17850": { "x": 23292, "y": 20636.984375, "w": 448.23126220703125, "h": 112 }, "728:17851": { "x": 23292, "y": 20824.984375, "w": 492, "h": 157, "children": { "728:17852": { "x": 23292, "y": 20824.984375, "w": 268.65625, "h": 54.5, "children": { "728:17853": { "x": 23312, "y": 20840.984375, "w": 196.65625, "h": 23, "children": { "728:17854": { "x": 23312, "y": 20840.984375, "w": 192, "h": 23 }, "728:17855": { "x": 23520.65625, "y": 20845.234375, "w": 20, "h": 14 } } } } }, "728:17858": { "x": 23292, "y": 20903.484375, "w": 247.59375, "h": 54.5, "children": { "728:17859": { "x": 23312, "y": 20919.484375, "w": 202, "h": 23 } } } } } } }, "728:17860": { "x": 23880, "y": 20475.984375, "w": 468, "h": 468 } } } } }, "728:17863": { "x": 23100, "y": 21041.984375, "w": 1440, "h": 1202.5, "children": { "728:17864": { "x": 23400, "y": 21125.984375, "w": 840, "h": 1034.5, "children": { "728:17865": { "x": 23400, "y": 21124.984375, "w": 840, "h": 91, "children": { "728:17866": { "x": 23450.5, "y": 21124.984375, "w": 739.1843872070312, "h": 90 } } }, "728:17867": { "x": 23400, "y": 21287.984375, "w": 840, "h": 872.5, "children": { "728:17868": { "x": 23472, "y": 21359.984375, "w": 696, "h": 602, "children": { "728:17869": { "x": 23472, "y": 21359.984375, "w": 200, "h": 265, "children": { "728:17870": { "x": 23533.5, "y": 21359.984375, "w": 77, "h": 72 }, "728:17872": { "x": 23486.71875, "y": 21455.984375, "w": 171, "h": 25 }, "728:17873": { "x": 23473.859375, "y": 21504.984375, "w": 196.4812469482422, "h": 120 } } }, "728:17874": { "x": 23720, "y": 21359.984375, "w": 200, "h": 265, "children": { "728:17875": { "x": 23781.5, "y": 21359.984375, "w": 77, "h": 72 }, "728:17877": { "x": 23727.921875, "y": 21455.984375, "w": 184, "h": 25 }, "728:17878": { "x": 23727.828125, "y": 21504.984375, "w": 184.5437469482422, "h": 120 } } }, "728:17879": { "x": 23968, "y": 21359.984375, "w": 200, "h": 265, "children": { "728:17880": { "x": 24029.5, "y": 21359.984375, "w": 77, "h": 72 }, "728:17882": { "x": 23985.03125, "y": 21455.984375, "w": 167, "h": 25 }, "728:17883": { "x": 23969.28125, "y": 21504.984375, "w": 197.6218719482422, "h": 120 } } }, "728:17884": { "x": 23472, "y": 21696.984375, "w": 200, "h": 265, "children": { "728:17885": { "x": 23533.5, "y": 21696.984375, "w": 77, "h": 72 }, "728:17887": { "x": 23487.40625, "y": 21792.984375, "w": 168, "h": 25 }, "728:17888": { "x": 23475.515625, "y": 21841.984375, "w": 193.1531219482422, "h": 120 } } }, "728:17889": { "x": 23720, "y": 21696.984375, "w": 200, "h": 265, "children": { "728:17890": { "x": 23781.5, "y": 21696.984375, "w": 77, "h": 72 }, "728:17892": { "x": 23751.46875, "y": 21792.984375, "w": 137, "h": 25 }, "728:17893": { "x": 23720.859375, "y": 21841.984375, "w": 198.4812469482422, "h": 96 } } }, "728:17894": { "x": 23968, "y": 21696.984375, "w": 200, "h": 265, "children": { "728:17895": { "x": 24029.5, "y": 21696.984375, "w": 77, "h": 72 }, "728:17897": { "x": 24018.921875, "y": 21792.984375, "w": 98, "h": 25 }, "728:17898": { "x": 23968.984375, "y": 21841.984375, "w": 198.2156219482422, "h": 96 } } } } }, "728:17899": { "x": 23549.875, "y": 22033.984375, "w": 564.25, "h": 78.5, "children": { "728:17900": { "x": 23549.875, "y": 22033.984375, "w": 268.65625, "h": 54.5, "children": { "728:17901": { "x": 23569.875, "y": 22049.984375, "w": 196.65625, "h": 23, "children": { "728:17902": { "x": 23571.875, "y": 22049.984375, "w": 192, "h": 23 }, "728:17903": { "x": 23778.53125, "y": 22054.234375, "w": 20, "h": 14 } } } } }, "728:17906": { "x": 23842.53125, "y": 22033.984375, "w": 247.59375, "h": 54.5, "children": { "728:17907": { "x": 23864.53125, "y": 22049.984375, "w": 202, "h": 23 } } } } } } } } } } }, "728:17908": { "x": 23100, "y": 22244.484375, "w": 1440, "h": 464, "children": { "728:17909": { "x": 23364, "y": 22328.484375, "w": 912, "h": 296, "children": { "728:17910": { "x": 23400, "y": 22328.484375, "w": 460, "h": 296, "children": { "728:17911": { "x": 23448, "y": 22375.484375, "w": 364, "h": 31, "children": { "728:17912": { "x": 23448, "y": 22375.484375, "w": 160, "h": 30 } } }, "728:17913": { "x": 23448, "y": 22430.484375, "w": 364, "h": 48, "children": { "728:17914": { "x": 23448, "y": 22430.484375, "w": 358.82501220703125, "h": 48 } } }, "728:17915": { "x": 23448, "y": 22478.484375, "w": 364, "h": 98, "children": { "728:17916": { "x": 23448, "y": 22526.484375, "w": 132.671875, "h": 50, "children": { "728:17917": { "x": 23468, "y": 22542.484375, "w": 68.671875, "h": 18, "children": { "728:17918": { "x": 23468, "y": 22542.484375, "w": 68, "h": 18 }, "728:17919": { "x": 23544.671875, "y": 22545.984375, "w": 16, "h": 11 } } } } } } } } }, "728:17922": { "x": 23932, "y": 22328.484375, "w": 308, "h": 296, "children": { "728:17923": { "x": 23980, "y": 22375.484375, "w": 212, "h": 31, "children": { "728:17924": { "x": 23980, "y": 22375.484375, "w": 131, "h": 30 } } }, "728:17925": { "x": 23980, "y": 22430.484375, "w": 212, "h": 48, "children": { "728:17926": { "x": 23980, "y": 22430.484375, "w": 196.0281219482422, "h": 48 } } }, "728:17927": { "x": 23980, "y": 22478.484375, "w": 212, "h": 98, "children": { "728:17928": { "x": 23980, "y": 22526.484375, "w": 236, "h": 74, "children": { "728:17929": { "x": 23980, "y": 22526.484375, "w": 164.875, "h": 50, "children": { "728:17930": { "x": 24000, "y": 22542.484375, "w": 123, "h": 18 } } } } } } } } } } } } }, "728:17931": { "x": 23100, "y": 22708.484375, "w": 1440, "h": 407.5, "children": { "728:17932": { "x": 23445, "y": 22792.484375, "w": 750, "h": 239.5, "children": { "728:17933": { "x": 23460, "y": 22792.484375, "w": 720, "h": 125, "children": { "728:17934": { "x": 23540.34375, "y": 22792.484375, "w": 559, "h": 45 }, "728:17935": { "x": 23737.171875, "y": 22887.484375, "w": 164, "h": 30 } } }, "728:17936": { "x": 23460, "y": 22977.484375, "w": 744, "h": 78.5, "children": { "728:17937": { "x": 23549.875, "y": 22977.484375, "w": 268.65625, "h": 54.5, "children": { "728:17938": { "x": 23569.875, "y": 22993.484375, "w": 196.65625, "h": 23, "children": { "728:17939": { "x": 23569.875, "y": 22993.484375, "w": 192, "h": 23 }, "728:17940": { "x": 23778.53125, "y": 22997.734375, "w": 20, "h": 14 } } } } }, "728:17943": { "x": 23842.53125, "y": 22977.484375, "w": 247.59375, "h": 54.5, "children": { "728:17944": { "x": 23862.53125, "y": 22993.484375, "w": 202, "h": 23 } } } } } } } } }, "728:17945": { "x": 23100, "y": 23115.984375, "w": 1440, "h": 975.5, "children": { "728:17946": { "x": 23292, "y": 23199.984375, "w": 1056, "h": 807.5, "children": { "728:17947": { "x": 23292, "y": 23199.984375, "w": 1056, "h": 75, "children": { "728:17948": { "x": 23622.078125, "y": 23199.984375, "w": 396, "h": 75 } } }, "728:17949": { "x": 23277, "y": 23952.984375, "w": 1086, "h": 54.5, "children": { "728:17950": { "x": 23694.96875, "y": 23952.984375, "w": 226.0625, "h": 54.5, "children": { "728:17951": { "x": 23714.96875, "y": 23968.984375, "w": 155, "h": 23, "children": { "728:17952": { "x": 23714.96875, "y": 23968.984375, "w": 155, "h": 23 }, "728:17953": { "x": 23881.03125, "y": 23973.234375, "w": 20, "h": 14 } } } } } } }, "728:17956": { "x": 23292, "y": 23346.984375, "w": 1056, "h": 534, "children": { "728:17957": { "x": 23292, "y": 23346.984375, "w": 1056, "h": 534, "children": { "728:17958": { "x": 23292, "y": 23346.984375, "w": 320, "h": 534 }, "728:17965": { "x": 24028, "y": 23346.984375, "w": 320, "h": 534 }, "728:17972": { "x": 23660, "y": 23346.984375, "w": 320, "h": 534 } } } } } } } } } } }, "728:17979": { "x": 23100, "y": 24091.484375, "w": 1440, "h": 776, "children": { "728:17980": { "x": 23292, "y": 24187.484375, "w": 1056, "h": 584, "children": { "728:17981": { "x": 23292, "y": 24187.484375, "w": 312, "h": 182, "children": { "728:17982": { "x": 23292, "y": 24186.484375, "w": 254, "h": 30 }, "728:17983": { "x": 23292, "y": 24265.484375, "w": 348, "h": 72 }, "728:17993": { "x": 23292, "y": 24349.484375, "w": 336, "h": 32, "children": { "728:17994": { "x": 23292, "y": 24353.484375, "w": 73, "h": 15 }, "728:17995": { "x": 23390.5625, "y": 24353.484375, "w": 88, "h": 15 } } } } }, "728:17996": { "x": 23292, "y": 24417.484375, "w": 312, "h": 63, "children": { "728:17997": { "x": 23292, "y": 24417.484375, "w": 306.05938720703125, "h": 30 }, "728:17998": { "x": 23292, "y": 24465.484375, "w": 209, "h": 15 } } }, "728:17999": { "x": 23664, "y": 24187.484375, "w": 188, "h": 351, "children": { "728:18000": { "x": 23664, "y": 24187.484375, "w": 188, "h": 70, "children": { "728:18001": { "x": 23664, "y": 24187.484375, "w": 99, "h": 45 } } }, "728:18002": { "x": 23664, "y": 24317.484375, "w": 188, "h": 221, "children": { "728:18003": { "x": 23664, "y": 24317.484375, "w": 188, "h": 25, "children": { "728:18004": { "x": 23664, "y": 24319.984375, "w": 20, "h": 20 }, "728:18007": { "x": 23708, "y": 24317.484375, "w": 64, "h": 25 } } }, "728:18008": { "x": 23664, "y": 24366.484375, "w": 188, "h": 25, "children": { "728:18009": { "x": 23664, "y": 24368.984375, "w": 20, "h": 20 }, "728:18012": { "x": 23708, "y": 24366.484375, "w": 74, "h": 25 } } }, "728:18013": { "x": 23664, "y": 24415.484375, "w": 188, "h": 25, "children": { "728:18014": { "x": 23664, "y": 24417.984375, "w": 20, "h": 20 }, "728:18017": { "x": 23708, "y": 24415.484375, "w": 43, "h": 25 } } }, "728:18018": { "x": 23664, "y": 24464.484375, "w": 188, "h": 25, "children": { "728:18019": { "x": 23664, "y": 24466.984375, "w": 20, "h": 20 }, "728:18022": { "x": 23708, "y": 24464.484375, "w": 57, "h": 25 } } }, "728:18023": { "x": 23664, "y": 24513.484375, "w": 188, "h": 25, "children": { "728:18024": { "x": 23664, "y": 24515.984375, "w": 20, "h": 20 }, "728:18027": { "x": 23708, "y": 24513.484375, "w": 70, "h": 25 } } } } } } }, "728:18028": { "x": 23912, "y": 24187.484375, "w": 436, "h": 351, "children": { "728:18029": { "x": 23912, "y": 24187.484375, "w": 436, "h": 232.390625, "children": { "728:18030": { "x": 23912, "y": 24187.484375, "w": 436, "h": 232.390625 }, "728:18033": { "x": 23948, "y": 24222.484375, "w": 364, "h": 161.390625, "children": { "728:18034": { "x": 23948, "y": 24222.484375, "w": 364, "h": 91, "children": { "728:18035": { "x": 23948, "y": 24222.484375, "w": 274, "h": 30 }, "728:18036": { "x": 23948, "y": 24273.484375, "w": 358.15313720703125, "h": 40 } } }, "728:18037": { "x": 23948, "y": 24349.484375, "w": 364, "h": 34.390625, "children": { "728:18038": { "x": 23948, "y": 24349.484375, "w": 254.796875, "h": 34.390625, "children": { "728:18039": { "x": 23964, "y": 24357.484375, "w": 222.796875, "h": 18, "children": { "728:18040": { "x": 23964, "y": 24357.484375, "w": 99, "h": 18 } } } } }, "728:18041": { "x": 24202.796875, "y": 24349.484375, "w": 109.1875, "h": 34.390625, "children": { "728:18042": { "x": 24230.03125, "y": 24357.484375, "w": 54.91875076293945, "h": 18 } } } } } } } } } } }, "728:18043": { "x": 24032.03125, "y": 24574.484375, "w": 315.96875, "h": 104 }, "728:18044": { "x": 23292, "y": 24726.484375, "w": 549.8562622070312, "h": 45 } } } } }, "728:18045": { "x": 23100, "y": 18765, "w": 1440, "h": 102, "children": { "728:18046": { "x": 23100, "y": 18816, "w": 1440, "h": 51 }, "728:18047": { "x": 23220, "y": 18789, "w": 157, "h": 54 }, "728:18057": { "x": 23787.8125, "y": 18789, "w": 632.1875, "h": 54, "children": { "728:18058": { "x": 23787.8125, "y": 18789, "w": 492.234375, "h": 54, "children": { "728:18059": { "x": 23787.8125, "y": 18803.5, "w": 66, "h": 25 }, "728:18060": { "x": 23902.125, "y": 18803.5, "w": 76, "h": 25 }, "728:18061": { "x": 24027.375, "y": 18803.5, "w": 44, "h": 25 }, "728:18062": { "x": 24119.9375, "y": 18789, "w": 112.109375, "h": 54, "children": { "728:18063": { "x": 24119.9375, "y": 18803.5, "w": 112.109375, "h": 25, "children": { "728:18064": { "x": 24119.9375, "y": 18803.5, "w": 91, "h": 25 }, "728:18065": { "x": 24220.046875, "y": 18812.5, "w": 12, "h": 7 } } } } } } }, "728:18068": { "x": 24328.046875, "y": 18791, "w": 91.953125, "h": 50, "children": { "728:18069": { "x": 24348.046875, "y": 18807, "w": 51, "h": 18 } } } } } } } } 1440px Refer to the attached image for hierarchy and grouping.
1. Compare 'positions_json' nesting with visual grouping. 2. If data contradicts visual layout, IGNORE data nesting and restructure based on VISUAL proximity.
<rule name="Pattern Recognition (CRITICAL)">
1. **Semantic Grouping**: Group by function (e.g., "PricingCard", "UserProfile").
2. **Grid/List Detection**:
- Detect repeating identical siblings (e.g., 6 Cards).
- Create a SINGLE container (e.g., "CardGrid") instead of "Card1", "Card2".
- **MERGE IDs**: The container's `elementIds` MUST include ALL children IDs of all items in the grid to ensure complete style extraction.
- **Reusable Instances with `data.componentName`**:
- For each visually repeated item, keep a unique `id` / `data.name` (e.g., "TaskCard1", "TaskCard2", ...).
- Set the SAME `data.componentName` for all these items (e.g., "TaskCard") to mark them as instances of one reusable component.
- Example: 12 task cards → each child has different `id` / `data.name` ("TaskCard1"... "TaskCard12"), but the SAME `data.componentName`: "TaskCard".
3. **Fragmentation**: Avoid creating components for single atoms (Text/Icon) unless reusable (Button/Chip).
4. **Monoliths**: Split sections >1000px height.
</rule>
<rule name="Component Granularity (CRITICAL - Prevent Over-Fragmentation)">
1. **Maximum Depth = 2**:
- Component tree should NOT exceed 2 levels deep (root -> children -> grandchildren is the MAX).
- If you find yourself creating a 3rd level, STOP and merge it into the parent instead.
2. **Minimum Element Threshold**:
- Each component MUST contain at least 5+ elements in its `elementIds`.
- If a potential component has fewer than 5 elements, MERGE it into its parent or sibling.
- This prevents creating tiny components like "LegalLinks" (3 links) or "CommunityLinks" (2 links).
3. **Component Count Limit**:
- For a single section, create at most 2-3 child components.
- Example: Footer → FooterTop, FooterBottom (2 children, NOT 4-5 like "Logos", "Links", "QRCode", etc.)
4. **DO NOT Create Separate Components For**:
- A group of links (merge into parent section's elementIds)
- A group of logos or icons (merge into parent section's elementIds)
- Single text, image, icon, divider, link
- Any group with < 5 elements
These should ALL be included in parent's `elementIds`.
5. **Merge by Visual Region, NOT by Function**:
- Divide by visual position (Top/Bottom, Left/Right), NOT by element type (Links/Logos/QRCode).
- Example: FooterTop contains logos + links + icons together (all elements in that visual area).
</rule>
<rule name="Naming & ID">
- `id` MUST match `data.name` (PascalCase, Unique).
- **Containers**: `elementIds` = container background/frame IDs only.
- **Leaves**: `elementIds` = component's direct IDs + ALL nested children IDs.
- **Integrity**: Every input ID must be assigned to exactly one component.
</rule>
<rule name="Layout Data">
For EACH node, calculate:
- `boundingBox`: {top, left, width, height} (Absolute)
- `relativeBoundingBox`: {top, left, width, height} (Relative to parent)
- `spacing`: {next: number} (Distance to next sibling)
- `layoutDirection`: "VERTICAL" | "HORIZONTAL" | "NONE"
**HOW TO DETERMINE layoutDirection (ESPECIALLY FOR ROOT NODE)**:
1. Look at ALL direct children's `boundingBox.left` values
2. **If children have 2+ DIFFERENT `left` values** (difference > 50px):
→ Set `layoutDirection = "HORIZONTAL"`
→ Example: Sidebar at left=0, Content at left=240 → HORIZONTAL
3. **If ALL children have SAME `left` value** (within ±50px tolerance):
→ Set `layoutDirection = "VERTICAL"`
→ Example: Header at left=0, Content at left=0, Footer at left=0 → VERTICAL
4. Common patterns:
- **Sidebar Layout**: Sidebar (left=0) + Main Content (left=240+) → ROOT is HORIZONTAL
- **Stacked Layout**: All sections at same left position → ROOT is VERTICAL
</rule>
Return ONLY a single valid JSON object (no markdown code blocks). Output MUST be COMPACT (no pretty-printing): avoid indentation/newlines as much as possible. Follow this schema exactly: { "id": "ComponentName", "data": { "name": "ComponentName", "componentName": "OptionalReusableComponentName", "purpose": "string", "elementIds": ["id1", "..."], "layout": { "boundingBox": { "top": 0, "left": 0, "width": 0, "height": 0 }, "relativeBoundingBox": { "top": 0, "left": 0, "width": 0, "height": 0 }, "spacing": { "next": 0 }, "layoutDirection": "VERTICAL" } }, "children": [] }
layoutDirection MUST be one of: "VERTICAL" | "HORIZONTAL" | "NONE"
**Layout Groups**:
- Do NOT generate `layoutGroups` field in your output
- This field will be automatically added by post-processing if needed
**CRITICAL: 2-Level Maximum Structure**
Your output MUST follow a maximum 2-level structure. Level 2 nodes should have `children: []`.
All primitive elements (single text, links, logos, icons, dividers) go into `elementIds`, NOT as child components.
Example for ANY section:
{
"id": "SectionName",
"data": {
"name": "SectionName",
"purpose": "Main section description",
"elementIds": ["container-id"],
"layout": {...}
},
"children": [
{
"id": "SubSectionA",
"data": {
"name": "SubSectionA",
"purpose": "Visual area with links, logos, text",
"elementIds": ["all", "element", "ids", "including", "links", "logos", "text"],
"layout": {...}
},
"children": [] // MUST be empty - all elements via elementIds
},
{
"id": "SubSectionB",
"data": {
"name": "SubSectionB",
"purpose": "Another visual area",
"elementIds": ["all", "element", "ids", "in", "this", "area"],
"layout": {...}
},
"children": [] // MUST be empty
}
]
}
For reusable component instances that share the same `data.componentName` but have different `id` and `data.name`, an additional expected example is:
{
"id": "TaskCardGrid",
"data": {
"name": "TaskCardGrid",
"purpose": "Grid container for task cards",
"elementIds": ["..."],
"layout": {
"boundingBox": { "top": 0, "left": 0, "width": 0, "height": 0 },
"relativeBoundingBox": { "top": 0, "left": 0, "width": 0, "height": 0 },
"spacing": { "next": 0 },
"layoutDirection": "VERTICAL"
}
},
"children": [
{
"id": "TaskCard1",
"data": {
"name": "TaskCard1",
"componentName": "TaskCard",
"purpose": "Single task card",
"elementIds": ["id1", "..."],
"layout": {
"boundingBox": { "top": 0, "left": 0, "width": 0, "height": 0 },
"relativeBoundingBox": { "top": 0, "left": 0, "width": 0, "height": 0 },
"spacing": { "next": 0 },
"layoutDirection": "VERTICAL"
}
},
"children": []
}
]
}