Skip to content

Commit 10b1f46

Browse files
committed
chore(repo): remove examples, point to docs 🍟
- Delete examples/README.md, examples/index.html, examples/index2.html - Remove examples/ from deno.json exclude list - Simplify README quick-start snippet and change documentation link from examples/ to docs/
1 parent d935b09 commit 10b1f46

File tree

5 files changed

+2
-590
lines changed

5 files changed

+2
-590
lines changed

README.md

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -53,75 +53,17 @@ Define a tree with `root` (array of nodes). Each node has `type` (HTML tag name)
5353
```typescript
5454
import { create, render } from '@neabyte/schema2ui'
5555

56-
// 1. Define the UI tree: root is an array of nodes
5756
const schema = create({
58-
root: [
59-
// 2. First node: header with layout, style, and a child (h1)
60-
{
61-
type: 'header',
62-
id: 'header',
63-
layout: { width: '100%', height: 56 },
64-
style: { fill: '#1a1a2e', stroke: '1px solid #16213e' },
65-
children: [
66-
{
67-
type: 'h1',
68-
id: 'title',
69-
content: 'Hello',
70-
style: { font: '20px sans-serif', fill: '#eee' }
71-
}
72-
]
73-
},
74-
// 3. Second node: main with a link and a table
75-
{
76-
type: 'main',
77-
layout: { width: '100%', flex: 1 },
78-
children: [
79-
{ type: 'a', attrs: { href: '/' }, content: 'Home' },
80-
{
81-
type: 'table',
82-
layout: { width: '100%' },
83-
children: [
84-
// 4. Table head: one row, two headers
85-
{
86-
type: 'thead',
87-
children: [
88-
{
89-
type: 'tr',
90-
children: [
91-
{ type: 'th', content: 'Name' },
92-
{ type: 'th', content: 'Value' }
93-
]
94-
}
95-
]
96-
},
97-
// 5. Table body: one row, two cells
98-
{
99-
type: 'tbody',
100-
children: [
101-
{
102-
type: 'tr',
103-
children: [
104-
{ type: 'td', content: 'Foo' },
105-
{ type: 'td', content: '1' }
106-
]
107-
}
108-
]
109-
}
110-
]
111-
}
112-
]
113-
}
114-
]
57+
root: [{ type: 'h1', content: 'Hello World' }]
11558
})
11659

117-
// 6. Validate (create) then render into a container
11860
render(schema, document.getElementById('app'))
11961
```
12062

12163
## Documentation
12264

12365
- **[USAGE.md](USAGE.md)** — API and type reference.
124-
- **[examples/](examples/)** — Browser demo: build then open `examples/index.html`.
66+
- **[docs/](docs/)** — Browser demo: build then open `docs/index.html`.
12567

12668
## Build & Test
12769

deno.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"coverage/",
8484
"dist/",
8585
"docs/",
86-
"examples/",
8786
"package-lock.json",
8887
"package.json",
8988
"preview/",

examples/README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)