agentgui 1.0.908 → 1.0.910

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 +13 -100
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.908",
3
+ "version": "1.0.910",
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
@@ -1,8 +1,7 @@
1
1
  // AnEntrypoint design-system theme for flatspace.
2
2
  // Renders site chrome via anentrypoint-design SDK using REAL SDK components.
3
3
  // theme.mjs emits HTML shell + bootstrap that consumes YAML baked into <script id="__site__">.
4
- // The SDK provides ALL styling via installStyles(); no local <style> block that ensures
5
- // every portfolio site looks uniform.
4
+ // SDK provides ALL styling via installStyles(); plus a tiny inline body-margin reset.
6
5
 
7
6
  const escapeHtml = (s) => String(s ?? '')
8
7
  .replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
@@ -10,7 +9,7 @@ const escapeHtml = (s) => String(s ?? '')
10
9
 
11
10
  const escapeJson = (obj) => JSON.stringify(obj)
12
11
  .replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/&/g, '\\u0026')
13
- .replace(new RegExp('\\u2028','g'), '\\u2028').replace(new RegExp('\\u2029','g'), '\\u2029');
12
+ .replace(new RegExp('\\u2028', 'g'), '\\u2028').replace(new RegExp('\\u2029', 'g'), '\\u2029');
14
13
 
15
14
  const SDK_URL = 'https://unpkg.com/anentrypoint-design@latest/dist/247420.js';
16
15
 
@@ -31,10 +30,10 @@ function Hero() {
31
30
  home.hero.subheading ? C.Lede({ children: home.hero.subheading }) : null,
32
31
  home.hero.body ? h('p', { style: 'margin:8px 0 16px 0;color:var(--panel-text-2);max-width:64ch' }, home.hero.body) : null,
33
32
  (home.hero.badges && home.hero.badges.length) ? h('div', { style: 'display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px 0' },
34
- ...home.hero.badges.map((b, i) => C.Chip({ key: 'b'+i, children: b.label }))
33
+ ...home.hero.badges.map((b, i) => C.Chip({ key: 'b' + i, children: b.label }))
35
34
  ) : null,
36
35
  (home.hero.ctas && home.hero.ctas.length) ? h('div', { style: 'display:flex;gap:8px;flex-wrap:wrap' },
37
- ...home.hero.ctas.map((c, i) => C.Btn({ key: 'c'+i, href: c.href, primary: c.primary, children: c.label }))
36
+ ...home.hero.ctas.map((c, i) => C.Btn({ key: 'c' + i, href: c.href, primary: c.primary, children: c.label }))
38
37
  ) : null
39
38
  )
40
39
  });
@@ -43,8 +42,8 @@ function Hero() {
43
42
  function Features() {
44
43
  if (!home || !home.features || !home.features.items || !home.features.items.length) return null;
45
44
  const rows = home.features.items.map((it, i) => C.RowLink({
46
- key: 'f'+i,
47
- code: String(i+1).padStart(2,'0'),
45
+ key: 'f' + i,
46
+ code: String(i + 1).padStart(2, '0'),
48
47
  title: it.name,
49
48
  sub: it.desc || '',
50
49
  meta: it.meta || '',
@@ -59,99 +58,13 @@ function Features() {
59
58
 
60
59
  function Quickstart() {
61
60
  if (!home || !home.quickstart || !home.quickstart.lines || !home.quickstart.lines.length) return null;
62
- const lineNodes = home.quickstart.lines.map((l, i) => h('div', { key: 'q'+i, class: 'cli' },
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
61
+ const lineNodes = home.quickstart.lines.map((l, i) => {
62
+ const isComment = l.kind === 'cmt';
63
+ return h('div', { key: 'q' + i, class: 'cli' },
64
+ h('span', { class: 'prompt' }, isComment ? '#' : '$'),
65
+ h('span', { class: 'cmd' }, l.text)
66
+ );
78
67
  });
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
- )),
153
- h('span', { class: 'cmd' }, l.text)
154
- ));
155
68
  return C.Panel({
156
69
  title: home.quickstart.heading || 'quick start',
157
70
  style: 'margin:8px',
@@ -162,7 +75,7 @@ export default {
162
75
  function Examples() {
163
76
  if (!home || !home.examples || !home.examples.items || !home.examples.items.length) return null;
164
77
  const rows = home.examples.items.map((it, i) => C.RowLink({
165
- key: 'e'+i,
78
+ key: 'e' + i,
166
79
  title: it.name,
167
80
  sub: it.desc || '',
168
81
  meta: it.cta || 'open',