@@ -153,8 +153,9 @@ replays a stored capture with no debugger host present.
153153
154154## Presentation vocabulary
155155
156- Five types are published: ` CollectorInterface ` , ` Panel ` , ` PanelView ` , ` Tone ` , and ` ColumnStyle ` . Everything a panel can
157- display is a ` PanelView ` method, so there is no value class to import and no shape to build by hand.
156+ Five types are published for panel authors: ` CollectorInterface ` , ` Panel ` , ` PanelView ` , ` Tone ` , and ` ColumnStyle ` .
157+ Everything a panel can display is a ` PanelView ` method, so an extension imports no value class and builds nothing by
158+ hand.
158159
159160``` php
160161use PHPForge\Debug\{ColumnStyle, PanelView, Tone};
@@ -175,8 +176,24 @@ PanelView::create()
175176
176177Plain scalars and ` null ` become text. ` PanelView::text() ` , ` ::strong() ` , ` ::code() ` , ` ::preview() ` , ` ::badge() ` , and
177178` ::value() ` produce validated inline values accepted wherever a scalar is accepted. Every method validates its
178- arguments and rejects invalid input with an explicit ` InvalidArgumentException ` . The host reads the finished
179- description through ` summaryMetrics() ` , ` toolbarMetrics() ` , ` blocks() ` , and ` isActive() ` .
179+ arguments and rejects invalid input with an explicit ` InvalidArgumentException ` .
180+
181+ The host reads the finished description through ` summaryMetrics() ` , ` toolbarMetrics() ` , ` blocks() ` , and ` isActive() ` .
182+ Those accessors return ` PHPForge\Debug\Presenter ` value objects: ` SummaryMetric ` , ` ToolbarMetric ` , and the blocks,
183+ entries, and inline values behind them. A renderer narrows each value with ` instanceof ` over the sealed ` Block ` and
184+ ` Inline ` unions, which static analysis proves exhaustive, and reads its public properties. Inline text carries a
185+ ` TextStyle ` case and a table carries its ` ColumnStyle ` cases, so semantics reach the markup without parsing strings.
186+
187+ ``` php
188+ use PHPForge\Debug\Presenter\{HeadingBlock, ParagraphBlock, TableBlock};
189+
190+ $html = match (true) {
191+ $block instanceof HeadingBlock => $this->heading($block->title, $block->section),
192+ $block instanceof ParagraphBlock => $this->paragraph($block->content, $block->tone),
193+ $block instanceof TableBlock => $this->table($block->headers, $block->rows, $block->styles),
194+ // one arm per block; PHPStan reports a missing arm as an unhandled match value.
195+ };
196+ ```
180197
181198## Documentation
182199
0 commit comments