Spaces:
Running
Running
Commit History
-
feat(vocabulary): record the element names that are proven, name none that are not
The builder knew six elements it could construct and nothing about the rest. YOOtheme publishes 39 — verified against the live docs, 16 basic + 16 multiple-items + 7 system, exact — so the catalog now carries all of them. What it will not do is claim their prop keys. The developer reference is explicit about where those live: the `fields` array in each element's element.php, inside the theme. Not the database, not the API — nothing here can read it. So a key is recorded when a real layout has been seen using it, and an element the docs name but no layout has confirmed is listed as documented with its slug marked unverified. A wrong key raises nothing: YOOtheme renders the element without it and the setting silently does nothing, which is the worst kind of wrong to ship. learn_elements closes the gap from the other end — read a live page and the types and keys it actually uses are folded in, so the vocabulary completes itself from the sites in front of it rather than from transcriptio…113e711 -
feat(builder): the editor can now make layout, not only rewrite it
Until now a new section was a clone of an existing one and there was no way to add an element at all — the half of a builder that composes was missing. Ported from the joocodx YOO builder agent, in this codebase's idiom rather than by copying it: element constructors for headline, text, button, image, panel and divider, an even-splitting grid, sibling moves inside a section or column, and 25 preset sections plus 3 whole-page templates lifted whole from sites that shipped. The nesting contract is enforced before the write because YOOtheme does not report it: an element with no column around it renders as an empty band, and nothing in any log says why. add_element therefore builds the row and column when it is not given one, rather than refusing an ordinary request. Two rules came from the presets rather than from theory, which is why they were imported before the code was trusted: a column may hold a nested row (three shipped heroes use one for their buttons), and composite elements —…d4e79f6