Repository navigation
Zenith 0.0.12
Added
- KDL parse errors name the faulty line. An unclosed block used to point at its opening
{, often far above the mistake. The error now adds the line before which a}is likely missing, or the first line that does not parse on its own (a stray)or"). zenith_schemaover MCP has every CLI surface. It addswrite,ports,brand,block,style, anddefaults.zenith new --startertitles the document likezenith new. Without--namethe title isUntitledand the ids come from the file name, not the starter's sample person or event.--landscapemakes the wider side the width, sodeckandcardstay wide. A starter's own tokens and styles replace a theme pack's with the same id. Printed commands quote a path with spaces.zenith schema write— one page with a working document, the layout rules, and the common attributes ofpage,frame,text,rect,ellipse,line, andimage. Types and defaults come from the live schema, and a test validates and renders the example.--help, barezenith schema, and thezenith new --starteroutput point to it. In a 4-brief build run it cutschema nodecalls from 27 to 3 and the first write from turn 8–12 to turn 6–9.zenith new --starterprints a readytx --opscommand with every single-span text slot id, andzenith --helplists the starter first.zenith perceive page— renders pages aszenith render --pngdoes, then measures deterministic signals: luminance histogram, value zones, density map, edge map, ink bounds, optical balance, clearspace, and grid conformance. These are signals, not a judgement of design quality.--page Nor--all-pages.--jsonprints azenith-perceive-page-v1envelope with every number rounded to 4 decimal places and no tool version.clearspacereads the page margins andgrid_conformancereads the construction guides. A metric reportsnot_applicablewhen the page declares no such input.zenith-cli/tests/perceive_hashes.jsonpins the output of every example on every CI target.
zenith_perceiveMCP tool — the same envelope over MCP, read-only and confined to the server root.- Per-child
marginin auto layout —margin,margin-x,margin-y,margin-top,margin-right,margin-bottom, andmargin-lefton a child of aroworcolumnframe. Margins add outer space around that child and never collapse, so one child moves without changing the frame'sgap.- Precedence is side, then axis, then
margin. A negative value isnode.invalid_value. - Cross axis:
alignstart, center, and end place the margin box.align=stretchshrinks the stretched size by the cross margins. A hugging frame includes its children's margins. - Margin on a grid child, an absolute child, or a child of an absolute frame has no effect and reports
layout.inert_attribute. txset_layouttakes the seven fields, andnullclears one. Thetx.layout_managedrejection namesmargin_topas the way to offset a child in the flow.- A document without margins renders byte-identically.
- Precedence is side, then axis, then
zenith tx --ops— takes the transaction inline, as a{"ops":[...]}object or a bare array, so an edit needs no separate file. A file path or--opsis required, and not both.zenith schema op <unknown>suggests ops. It lists up to 12 ops whose names or summaries share a word with the name you typed, in place of the list of all 69. It prints the full list only when nothing matches.zenith new --starter <kind>— writes a finished layout to read and adapt:flyer,letterhead,handout,deck,poster,menu,card, orreport. Each validates with no diagnostics at its own size and default theme. The command prints every text node's id and current text with the oneset_span_texttransaction that fills them, so a design is adapted in one call. A blankzenith newandzenith schemapoint at the starters.- The layout uses the theme contract (
color.*,size.*,radius.*,ui.*styles,defaults), so--themerestyles it. --format,--width,--height, and--landscaperesize it. Type, spacing, margins, and the page box scale to fit the new page.--pagesconflicts, because the page count comes from the starter.- The file gets a minted
doc-idand a first history version.--namesets the project name, the title, and the ids. zenith-cli/tests/starter_hashes.jsonpins the PNG, SVG, and PDF output of every starter on every CI target.
- The layout uses the theme contract (
Changed
zenith inspectprints a layout outline. The human output is one line per node: kind, id, final box rounded to 0.1 px,layout=for a row, column or grid frame, and the text of atextnode cut at 48 characters. It shows the final box of every compiled node, not only those that differ from the authored one, and no longer prints authored geometry or text ink bounds, which stay in--json. The JSON and the MCPzenith_inspectsummary gaintext,spans, andlayouton the nodes that have them.zenith new --starterreads the same data for its text-slot list.set_fill,set_stroke, andset_stroke_widthaccept aframe. They rejected it withtx.unsupported_propertyalthough a frame paints a fill and stroke, so a button built as a frame could not be recolored bytx.zenith txreports what an edit introduces. The result lists each Error and Warning thatzenith validateshows on the result and did not show on the input, such astext.overfloworlayout.block_overlap. A diagnostic counts as new by code and node, so an edit that only changes a measured value reports nothing. Before, a text edit that overflowed its box printeddiagnostics: (none). A new Warning givesaccepted (with warnings). A new Error, such astext.fit_failed, rejects the edit and writes nothing. A document that already has an error gives no baseline, so such an edit is never rejected for compile errors.text.overflowin a row or column frame names the flow. When the fix resizes an in-flow child along the frame's main axis (hin a column,win a row), the message adds that a taller or wider box moves the siblings after it and a smallerfont-sizedoes not. The advice to sethreflowed the whole stack. A fix on the other axis gets no note.zenith schema node <kind>prints a brief by default. Attribute families such aspadding-xandmargin-topfold into their base row, and prose past about 600 characters is cut at a sentence, with a line naming--notes.--notesprints every row and the full text.--jsonis unchanged.schema node textdrops from 9.0 KB to 4.4 KB andframefrom 6.8 KB to 5.3 KB.zenith tx --helplists common edits. Eight runnable one-line ops cover text, fill, token, geometry, margin, add, remove, and visibility. A test checks that every op in the list exists.--opworks as an alias of--ops.zenith txsays whether it wrote the file. The output gainsapplied. A dry run printsapplied: false (dry run, nothing written; add --apply to write the file), and--jsoncarries"applied": false. Before, a dry run printedchanged: trueand a diff, which agents read as done. The MCPzenith_txresult carriesappliedtoo.zenith inspectrounds boxes to 0.01 px. Thebox=andbounds=values no longer print float noise such as52.829999923706055.
Full diff: v0.0.11...v0.0.12