anentrypoint-design 0.0.216 → 0.0.217

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.216",
3
+ "version": "0.0.217",
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",
@@ -184,7 +184,7 @@ export function AgentChat(props = {}) {
184
184
  const msgHasBody = (m) => !!(m.content || (Array.isArray(m.parts) && m.parts.length));
185
185
  const lastMsgLastPart = lastMsg && Array.isArray(lastMsg.parts) && lastMsg.parts.length ? lastMsg.parts[lastMsg.parts.length - 1] : null;
186
186
  const showWorkingTail = busy && lastMsg && lastMsg.role === 'assistant' && msgHasBody(lastMsg)
187
- && lastMsgLastPart && lastMsgLastPart.kind === 'tool' && (lastMsgLastPart.status === 'done' || lastMsgLastPart.status === 'error');
187
+ && lastMsgLastPart && lastMsgLastPart.kind === 'tool' && lastMsgLastPart.status === 'running';
188
188
  const rows = messages.slice(msgStart).map((m, wi) => {
189
189
  const i = wi + msgStart; // absolute index — streaming/caret/actions logic keys off the real lastIdx
190
190
  const isAssistant = m.role === 'assistant';
@@ -467,6 +467,7 @@ export function WorkspaceShell({ rail, sessions, main, pane, crumb, status, narr
467
467
  const keepPaneTrack = stableFrame && !hasPane;
468
468
  const railIsCollapsed = wsCollapsed('rail', railCollapsed);
469
469
  const paneIsCollapsed = hasPane ? wsCollapsed('pane', paneCollapsed) : true;
470
+ const sessionsIsCollapsed = wsCollapsed('sessions', false);
470
471
  const shellCls = 'ws-shell'
471
472
  + (railIsCollapsed ? ' ws-rail-collapsed' : '')
472
473
  + ((hasPane || keepPaneTrack) ? '' : ' ws-no-pane')
@@ -513,8 +514,9 @@ export function WorkspaceShell({ rail, sessions, main, pane, crumb, status, narr
513
514
  // full-width thread/grid). Hidden on mobile via CSS.
514
515
  hasSessions ? h('button', {
515
516
  class: 'ws-desktop-toggle ws-sessions-toggle', type: 'button',
516
- 'aria-label': 'collapse conversations', title: 'collapse conversations',
517
- 'aria-expanded': 'true', onclick: () => toggleWs('sessions'),
517
+ 'aria-label': sessionsIsCollapsed ? 'expand conversations' : 'collapse conversations',
518
+ title: sessionsIsCollapsed ? 'expand conversations' : 'collapse conversations',
519
+ 'aria-expanded': sessionsIsCollapsed ? 'false' : 'true', onclick: () => toggleWs('sessions'),
518
520
  }, Icon('chevron-left')) : null,
519
521
  h('div', { class: 'ws-crumb-main' }, crumb),
520
522
  // Desktop-only context-pane collapse, on the same crumb-level
package/src/markdown.js CHANGED
@@ -10,8 +10,12 @@ let _purify = null;
10
10
  let _failedAt = 0;
11
11
  const RETRY_BACKOFF_MS = 30000;
12
12
 
13
- const MARKED_URL = 'https://cdn.jsdelivr.net/npm/marked@15/+esm';
14
- const PURIFY_URL = 'https://cdn.jsdelivr.net/npm/dompurify@3/+esm';
13
+ // Pin to exact semver so the CDN cannot silently swap code under us.
14
+ // SRI cannot be applied to dynamic ESM imports in browsers (no importmap
15
+ // integrity support at design time); pinning the version is the best available
16
+ // mitigation for CDN-supply-chain risk on these two dependencies.
17
+ const MARKED_URL = 'https://cdn.jsdelivr.net/npm/marked@15.0.12/+esm';
18
+ const PURIFY_URL = 'https://cdn.jsdelivr.net/npm/dompurify@3.2.6/+esm';
15
19
 
16
20
  // True while the markdown stack is unavailable (escaped-fallback rendering).
17
21
  // Consumers (markdown-cache) use this to avoid caching degraded output.
@@ -50,7 +54,7 @@ export async function renderMarkdown(src) {
50
54
  const ok = await ensureReady();
51
55
  if (!ok) return escapeHtml(src).replace(/\n/g, '<br>');
52
56
  const raw = _marked.parse(String(src));
53
- return _purify.sanitize(raw);
57
+ return _purify.sanitize(raw, { FORCE_BODY: true });
54
58
  }
55
59
 
56
60
  // Sanitize already-rendered HTML before it touches innerHTML. For any surface
@@ -60,5 +64,5 @@ export async function renderMarkdown(src) {
60
64
  export async function sanitizeHtml(html) {
61
65
  const ok = await ensureReady();
62
66
  if (!ok) return escapeHtml(html);
63
- return _purify.sanitize(String(html));
67
+ return _purify.sanitize(String(html), { FORCE_BODY: true });
64
68
  }