Skip to content

Commit 4bd6ca8

Browse files
committed
feat: add Section layout component with width validation and runtime support
This commit introduces the new Section layout component to the agent-html DSL: - Add Section to layout tag types and allowed attributes - Implement width validation for Section (supports full, content, reader) - Add Section runtime component with responsive width styling - Add test fixtures and validation tests for Section - Update documentation and examples to include Section usage - Add local workspace file system access support for project management - Refactor example dashboard to use Section components
1 parent 3a9054e commit 4bd6ca8

30 files changed

Lines changed: 1229 additions & 399 deletions

.agents/skills/agent-html/references/examples.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@ Use the closest valid fixture before inventing new structure.
1515
- `icon-basic.xml`
1616
- `image-basic.xml`
1717
- `minimal-page.xml`
18+
- `section-width.xml`
1819
- `text-basic.xml`
1920

2021
## Invalid Patterns
2122

2223
- `bare-text-under-grid.xml`
24+
- `bare-text-under-section.xml`
2325
- `carousel-missing-content.xml`
2426
- `chart-missing-series.xml`
2527
- `image-invalid-fit.xml`
2628
- `image-invalid-src.xml`
2729
- `image-with-child.xml`
2830
- `layout-gap-not-allowed.xml`
2931
- `missing-tabs-trigger-value.xml`
32+
- `section-invalid-width.xml`
3033
- `text-with-child.xml`
3134
- `unknown-icon-name.xml`
3235
- `unknown-tag.xml`

.agents/skills/agent-html/references/grammar.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
- `Cluster justify="start" wrap="true"`
2020
- `Grid columns="2"`
21+
- `Section width="content"`
2122
- `Alert variant="default"`
2223
- `Card size="default"`
2324
- `Carousel orientation="horizontal"`
@@ -28,6 +29,7 @@
2829
## Layout
2930

3031
- `Page:title=string -> Layout | UI`
32+
- `Section:width?="full|content|reader" -> Layout | UI`
3133
- `Stack -> Layout | UI`
3234
- `Cluster:justify?="start|center|end|between", wrap?="true|false" -> Layout | UI`
3335
- `Grid:columns?="1|2|3|4" -> Layout | UI`
@@ -92,9 +94,13 @@
9294

9395
```xml
9496
<Page title="Gallery Preview">
95-
<Stack>
96-
<Text variant="muted">Use Text for standalone copy inside layout nodes.</Text>
97+
<Section width="reader">
98+
<Stack>
99+
<Text variant="muted">Use Text for standalone copy inside layout nodes.</Text>
100+
</Stack>
101+
</Section>
97102

103+
<Section>
98104
<Card>
99105
<CardHeader>
100106
<CardTitle>Controls</CardTitle>
@@ -121,7 +127,9 @@
121127
</Tabs>
122128
</CardContent>
123129
</Card>
130+
</Section>
124131

132+
<Section>
125133
<Grid columns="2">
126134
<Card>
127135
<CardContent>
@@ -155,7 +163,7 @@
155163
</CardContent>
156164
</Card>
157165
</Grid>
158-
</Stack>
166+
</Section>
159167
</Page>
160168
```
161169

Lines changed: 23 additions & 0 deletions
Loading
Lines changed: 23 additions & 0 deletions
Loading
Lines changed: 28 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)