agentgui 1.0.905 → 1.0.906

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/site/theme.mjs +94 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.905",
3
+ "version": "1.0.906",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
package/site/theme.mjs CHANGED
@@ -26,17 +26,17 @@ function Hero() {
26
26
  if (!home || !home.hero) return null;
27
27
  return C.Panel({
28
28
  style: 'margin:8px',
29
- children: [
29
+ children: h('div', { style: 'padding:24px 22px' },
30
30
  C.Heading({ level: 1, style: 'margin:0 0 8px 0', children: home.hero.heading || site.title }),
31
31
  home.hero.subheading ? C.Lede({ children: home.hero.subheading }) : null,
32
32
  home.hero.body ? h('p', { style: 'margin:8px 0 16px 0;color:var(--panel-text-2);max-width:64ch' }, home.hero.body) : null,
33
- (home.hero.badges && home.hero.badges.length) ? h('div', { style: 'display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px' },
33
+ (home.hero.badges && home.hero.badges.length) ? h('div', { style: 'display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px 0' },
34
34
  ...home.hero.badges.map((b, i) => C.Chip({ key: 'b'+i, children: b.label }))
35
35
  ) : null,
36
36
  (home.hero.ctas && home.hero.ctas.length) ? h('div', { style: 'display:flex;gap:8px;flex-wrap:wrap' },
37
37
  ...home.hero.ctas.map((c, i) => C.Btn({ key: 'c'+i, href: c.href, primary: c.primary, children: c.label }))
38
38
  ) : null
39
- ]
39
+ )
40
40
  });
41
41
  }
42
42
 
@@ -60,13 +60,102 @@ function Features() {
60
60
  function Quickstart() {
61
61
  if (!home || !home.quickstart || !home.quickstart.lines || !home.quickstart.lines.length) return null;
62
62
  const lineNodes = home.quickstart.lines.map((l, i) => h('div', { key: 'q'+i, class: 'cli' },
63
- h('span', { class: 'prompt' }, (l.kind === 'cmt' ? '#' : '$')),
63
+ h('span', { class: 'prompt' }, (l.kind === 'cmt' ? '#' : '
64
+
65
+ function Examples() {
66
+ if (!home || !home.examples || !home.examples.items || !home.examples.items.length) return null;
67
+ const rows = home.examples.items.map((it, i) => C.RowLink({
68
+ key: 'e'+i,
69
+ title: it.name,
70
+ sub: it.desc || '',
71
+ meta: it.cta || 'open',
72
+ href: it.href || '#'
73
+ }));
74
+ return C.Panel({
75
+ title: home.examples.heading || 'examples',
76
+ style: 'margin:8px',
77
+ children: rows
78
+ });
79
+ }
80
+
81
+ function Footer() {
82
+ return h('footer', { class: 'app-status' },
83
+ h('span', { class: 'item' }, 'styled with '),
84
+ h('a', { class: 'item', href: 'https://anentrypoint.github.io/design/' }, 'anentrypoint-design'),
85
+ h('span', { class: 'item' }, '·'),
86
+ h('a', { class: 'item', href: 'https://247420.xyz' }, '247420.xyz'),
87
+ h('span', { class: 'spread' }),
88
+ site.repo ? h('a', { class: 'item', href: site.repo }, 'source ↗') : null
89
+ );
90
+ }
91
+
92
+ const navItems = (nav && nav.links ? nav.links : []).map(l => [String(l.label || ''), l.href]);
93
+
94
+ const App = C.AppShell({
95
+ topbar: C.Topbar({
96
+ brand: '247420',
97
+ leaf: site.title || '',
98
+ items: navItems
99
+ }),
100
+ crumb: C.Crumb({
101
+ trail: ['247420'],
102
+ leaf: site.title || ''
103
+ }),
104
+ main: h('div', {},
105
+ Hero(),
106
+ Features(),
107
+ Quickstart(),
108
+ Examples()
109
+ ),
110
+ status: Footer()
111
+ });
112
+
113
+ applyDiff(document.getElementById('app'), [App]);
114
+ `;
115
+
116
+ const html = ({ site, nav, home }) => `<!DOCTYPE html>
117
+ <html lang="en" class="ds-247420">
118
+ <head>
119
+ <meta charset="UTF-8" />
120
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
121
+ <title>${escapeHtml(site.title)}${site.tagline ? ' — ' + escapeHtml(site.tagline) : ''}</title>
122
+ <meta name="description" content="${escapeHtml(site.description || site.tagline || site.title)}" />
123
+ <meta property="og:title" content="${escapeHtml(site.title)}" />
124
+ <meta property="og:description" content="${escapeHtml(site.description || site.tagline || '')}" />
125
+ <meta property="og:url" content="${escapeHtml(site.url || '')}" />
126
+ <link rel="canonical" href="${escapeHtml(site.url || '')}" />
127
+ <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctext y='26' font-size='26'%3E${encodeURIComponent(site.glyph || '◆')}%3C/text%3E%3C/svg%3E" />
128
+ <script type="importmap">{"imports":{"anentrypoint-design":"${SDK_URL}"}}</script>
129
+ <style>html,body{margin:0;padding:0}body{background:var(--app-bg,#FBF6EB);color:var(--ink,#1F1B16);font-family:var(--ff-ui,'Nunito',system-ui,sans-serif)}</style>
130
+ </head>
131
+ <body>
132
+ <div id="app"></div>
133
+ <script type="application/json" id="__site__">${escapeJson({ site, nav, home })}</script>
134
+ <script type="module">${clientScript}</script>
135
+ </body>
136
+ </html>
137
+ `;
138
+
139
+ export default {
140
+ render: async (ctx) => {
141
+ const site = ctx.readGlobal('site') || {};
142
+ const nav = ctx.readGlobal('navigation') || { links: [] };
143
+ const homeDoc = ctx.read('pages').docs.find(p => p.id === 'home');
144
+ if (!homeDoc) throw new Error('config/pages/home.yaml missing or has no id: home');
145
+
146
+ return [{
147
+ path: 'index.html',
148
+ html: html({ site, nav, home: homeDoc })
149
+ }];
150
+ }
151
+ };
152
+ )),
64
153
  h('span', { class: 'cmd' }, l.text)
65
154
  ));
66
155
  return C.Panel({
67
156
  title: home.quickstart.heading || 'quick start',
68
157
  style: 'margin:8px',
69
- children: lineNodes
158
+ children: h('div', { style: 'padding:16px 22px' }, ...lineNodes)
70
159
  });
71
160
  }
72
161