anentrypoint-design 0.0.376 → 0.0.378
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.
- package/dist/247420.css +23 -0
- package/dist/247420.js +26 -26
- package/package.json +1 -1
- package/src/community-app.js +16 -4
- package/src/components/freddie.js +3 -3
- package/src/components/git-status.js +1 -1
- package/src/components/shell.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.378",
|
|
4
4
|
"description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/247420.js",
|
package/src/community-app.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
// voiceParticipants, micMuted, voiceDeafened,
|
|
14
14
|
// audioQueueItems, audioQueueCurrentId, audioQueuePaused,
|
|
15
15
|
// showAuthModal, settingsOpen, voiceSettingsOpen, replyTarget,
|
|
16
|
-
// mobileMenuOpen
|
|
16
|
+
// mobileMenuOpen, // drives the .ca-rail off-canvas drawer on narrow shells
|
|
17
|
+
// canManage // gates the rail's "+ create channel" affordance
|
|
17
18
|
// }
|
|
18
19
|
// adapter.subscribe(cb) -> unsubscribe // cb fires when any snapshot field changes
|
|
19
20
|
// adapter.actions = {
|
|
@@ -22,7 +23,8 @@
|
|
|
22
23
|
// channelContext(id, x, y), serverContext(id, x, y), switchServer(id),
|
|
23
24
|
// goHome(), openServers(), memberMenu(id, name, x, y),
|
|
24
25
|
// replaySegment(id), skipSegment(), pauseQueue(), resumeQueue(),
|
|
25
|
-
// setInput(v), startReply(msg), cancelReply(), deleteMessage(id)
|
|
26
|
+
// setInput(v), startReply(msg), cancelReply(), deleteMessage(id),
|
|
27
|
+
// createChannel() // optional; when present + canManage, rail shows a "+" next to "rooms"
|
|
26
28
|
// }
|
|
27
29
|
// adapter.helpers = { avatarColor(id), initial(name), formatTime(ts) }
|
|
28
30
|
//
|
|
@@ -65,11 +67,12 @@ export function mountCommunityApp(root, adapter = {}) {
|
|
|
65
67
|
const voice = channels.filter(c => c.type === 'voice' || c.type === 'threaded');
|
|
66
68
|
const cur = s.currentChannel || {};
|
|
67
69
|
const servers = s.servers || [];
|
|
70
|
+
if (text.length || !servers.length) {
|
|
71
|
+
out.push(groupHeader('rooms', s));
|
|
72
|
+
}
|
|
68
73
|
if (text.length) {
|
|
69
|
-
out.push(h('div', { class: 'group' }, 'rooms'));
|
|
70
74
|
for (const c of text) out.push(railPill(c, cur, false, s));
|
|
71
75
|
} else if (!servers.length) {
|
|
72
|
-
out.push(h('div', { class: 'group' }, 'rooms'));
|
|
73
76
|
out.push(h('div', { class: 'rail-empty', role: 'status' }, 'no rooms yet'));
|
|
74
77
|
}
|
|
75
78
|
if (voice.length) {
|
|
@@ -84,6 +87,15 @@ export function mountCommunityApp(root, adapter = {}) {
|
|
|
84
87
|
return h('div', {}, ...out);
|
|
85
88
|
};
|
|
86
89
|
|
|
90
|
+
const groupHeader = (label, s) => h('div', { class: 'group group-header' },
|
|
91
|
+
h('span', {}, label),
|
|
92
|
+
(s.canManage && A.createChannel)
|
|
93
|
+
? h('button', {
|
|
94
|
+
type: 'button', class: 'group-add-btn', 'aria-label': 'create channel', title: 'Create channel',
|
|
95
|
+
onclick: (e) => { e.preventDefault(); e.stopPropagation(); A.createChannel(); },
|
|
96
|
+
}, Icon('plus', { size: 13 }))
|
|
97
|
+
: null);
|
|
98
|
+
|
|
87
99
|
const railPill = (c, cur, isVoice, s) => {
|
|
88
100
|
const active = cur.id === c.id;
|
|
89
101
|
const inVoice = isVoice && s.voiceConnected && s.voiceChannelName === c.name;
|
|
@@ -141,7 +141,7 @@ async function* parseSseStream(response) {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
} finally {
|
|
144
|
-
try { reader.releaseLock(); } catch { /* stream already closed/errored */ }
|
|
144
|
+
try { reader.releaseLock(); } catch { /* swallow: stream already closed/errored */ }
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -178,7 +178,7 @@ function partsFromMessages(assistantAndToolMessages) {
|
|
|
178
178
|
const target = m.tool_call_id ? byId.get(m.tool_call_id) : null;
|
|
179
179
|
let content = m.content;
|
|
180
180
|
let isError = false;
|
|
181
|
-
try { const parsed = JSON.parse(content); if (parsed && parsed.error) { isError = true; } } catch { /* not JSON, leave as-is */ }
|
|
181
|
+
try { const parsed = JSON.parse(content); if (parsed && parsed.error) { isError = true; } } catch { /* swallow: not JSON, leave as-is */ }
|
|
182
182
|
if (target) { target.result = content; target.status = isError ? 'error' : 'done'; target.error = isError || undefined; }
|
|
183
183
|
else parts.push({ kind: 'tool_result', name: 'result', result: content, error: isError || undefined, status: isError ? 'error' : 'done' });
|
|
184
184
|
}
|
|
@@ -276,7 +276,7 @@ export const chat = makePage((ctx) => {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
function stop() {
|
|
279
|
-
if (ctx.state.abort) { try { ctx.state.abort.abort(); } catch { /* already settled */ } }
|
|
279
|
+
if (ctx.state.abort) { try { ctx.state.abort.abort(); } catch { /* swallow: already settled */ } }
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
return () => {
|
|
@@ -149,7 +149,7 @@ export function GitDiffView({ diff = '', filename } = {}) {
|
|
|
149
149
|
const lang = langFromFilename(filename);
|
|
150
150
|
const highlightRef = (el) => {
|
|
151
151
|
if (!el) return;
|
|
152
|
-
try { highlightAllUnder(el); } catch { /* progressive enhancement only */ }
|
|
152
|
+
try { highlightAllUnder(el); } catch { /* swallow: progressive enhancement only */ }
|
|
153
153
|
};
|
|
154
154
|
if (!hunks.length) {
|
|
155
155
|
return h('div', { class: 'ds-git-diff-empty', role: 'status' }, 'no diff to show');
|
package/src/components/shell.js
CHANGED
|
@@ -176,6 +176,7 @@ export const ICON_PATHS = {
|
|
|
176
176
|
'arrow-down': '<path d="M12 5v14M5 12l7 7 7-7"/>',
|
|
177
177
|
'arrow-right': '<path d="M5 12h14M12 5l7 7-7 7"/>',
|
|
178
178
|
x: '<path d="M18 6 6 18M6 6l12 12"/>',
|
|
179
|
+
plus: '<path d="M12 5v14M5 12h14"/>',
|
|
179
180
|
play: '<path d="M6 4v16l14-8z"/>',
|
|
180
181
|
pause: '<path d="M8 5v14M16 5v14"/>',
|
|
181
182
|
refresh: '<path d="M21 12a9 9 0 1 1-3-6.7L21 8"/><path d="M21 3v5h-5"/>',
|