ac0347ae5f19e702ca72dd9171b745eca266f070
treeToState() was setting isCanvas:true on every node, including leaf components (Heading, TextBlock, ButtonLink, Spacer, ImageBlock). Craft.js then renders those as empty drop-canvas wrappers instead of their actual content, so the canvas appears blank after applying an AI-generated 'replace' response. Now uses a CANVAS_TYPES set matching the apply-ai-response utility: only the layout wrappers (Container, Section, ColumnLayout, Hero/Features/ CTA sections, FormContainer, Navbar, Footer, etc.) are canvases. ROOT is forced to be a canvas regardless of source type so children render. Also defensively normalizes props.style: AI sometimes emits an empty array instead of an object, which can confuse downstream consumers.
Description
Visual drag-and-drop website builder using GrapesJS
Languages
TypeScript
52%
HTML
21.7%
JavaScript
21.5%
CSS
3.4%
PHP
1%
Other
0.4%