Skip to content

Zenith 0.0.12

Choose a tag to compare

@github-actions github-actions released this 11 Oct 22:37
· 14 commits to main since this release

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_schema over MCP has every CLI surface. It adds write, ports, brand, block, style, and defaults.
  • zenith new --starter titles the document like zenith new. Without --name the title is Untitled and the ids come from the file name, not the starter's sample person or event. --landscape makes the wider side the width, so deck and card stay 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 of page, frame, text, rect, ellipse, line, and image. Types and defaults come from the live schema, and a test validates and renders the example. --help, bare zenith schema, and the zenith new --starter output point to it. In a 4-brief build run it cut schema node calls from 27 to 3 and the first write from turn 8–12 to turn 6–9.
  • zenith new --starter prints a ready tx --ops command with every single-span text slot id, and zenith --help lists the starter first.
  • zenith perceive page — renders pages as zenith render --png does, 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 N or --all-pages. --json prints a zenith-perceive-page-v1 envelope with every number rounded to 4 decimal places and no tool version.
    • clearspace reads the page margins and grid_conformance reads the construction guides. A metric reports not_applicable when the page declares no such input.
    • zenith-cli/tests/perceive_hashes.json pins the output of every example on every CI target.
  • zenith_perceive MCP tool — the same envelope over MCP, read-only and confined to the server root.
  • Per-child margin in auto layout — margin, margin-x, margin-y, margin-top, margin-right, margin-bottom, and margin-left on a child of a row or column frame. Margins add outer space around that child and never collapse, so one child moves without changing the frame's gap.
    • Precedence is side, then axis, then margin. A negative value is node.invalid_value.
    • Cross axis: align start, center, and end place the margin box. align=stretch shrinks 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.
    • tx set_layout takes the seven fields, and null clears one. The tx.layout_managed rejection names margin_top as the way to offset a child in the flow.
    • A document without margins renders byte-identically.
  • 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 --ops is 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, or report. 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 one set_span_text transaction that fills them, so a design is adapted in one call. A blank zenith new and zenith schema point at the starters.
    • The layout uses the theme contract (color.*, size.*, radius.*, ui.* styles, defaults), so --theme restyles it.
    • --format, --width, --height, and --landscape resize it. Type, spacing, margins, and the page box scale to fit the new page. --pages conflicts, because the page count comes from the starter.
    • The file gets a minted doc-id and a first history version. --name sets the project name, the title, and the ids.
    • zenith-cli/tests/starter_hashes.json pins the PNG, SVG, and PDF output of every starter on every CI target.

Changed

  • zenith inspect prints 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 a text node 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 MCP zenith_inspect summary gain text, spans, and layout on the nodes that have them. zenith new --starter reads the same data for its text-slot list.
  • set_fill, set_stroke, and set_stroke_width accept a frame. They rejected it with tx.unsupported_property although a frame paints a fill and stroke, so a button built as a frame could not be recolored by tx.
  • zenith tx reports what an edit introduces. The result lists each Error and Warning that zenith validate shows on the result and did not show on the input, such as text.overflow or layout.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 printed diagnostics: (none). A new Warning gives accepted (with warnings). A new Error, such as text.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.overflow in a row or column frame names the flow. When the fix resizes an in-flow child along the frame's main axis (h in a column, w in a row), the message adds that a taller or wider box moves the siblings after it and a smaller font-size does not. The advice to set h reflowed the whole stack. A fix on the other axis gets no note.
  • zenith schema node <kind> prints a brief by default. Attribute families such as padding-x and margin-top fold into their base row, and prose past about 600 characters is cut at a sentence, with a line naming --notes. --notes prints every row and the full text. --json is unchanged. schema node text drops from 9.0 KB to 4.4 KB and frame from 6.8 KB to 5.3 KB.
  • zenith tx --help lists 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. --op works as an alias of --ops.
  • zenith tx says whether it wrote the file. The output gains applied. A dry run prints applied: false (dry run, nothing written; add --apply to write the file), and --json carries "applied": false. Before, a dry run printed changed: true and a diff, which agents read as done. The MCP zenith_tx result carries applied too.
  • zenith inspect rounds boxes to 0.01 px. The box= and bounds= values no longer print float noise such as 52.829999923706055.

Full diff: v0.0.11...v0.0.12