anentrypoint-design 0.0.209 → 0.0.211

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.209",
3
+ "version": "0.0.211",
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",
@@ -100,7 +100,13 @@ export function Row({ code, rank, title, sub, meta, active, state = 'default', o
100
100
  onkeydown: (e) => { e.stopPropagation(); },
101
101
  }, a.label)))
102
102
  : null;
103
+ // Color is not the only status channel: emit a visually-hidden word for the
104
+ // meaningful rail tones (error/subagent) so AT and color-blind users get the
105
+ // state. green is the unremarkable default - announcing "ok" everywhere would
106
+ // be AT noise - so it emits nothing.
107
+ const railWord = rail === 'flame' ? 'error' : rail === 'purple' ? 'subagent' : null;
103
108
  return h(isLink ? 'a' : 'div', props,
109
+ railWord ? h('span', { class: 'sr-only' }, railWord) : null,
104
110
  leading != null ? leading : (codeVal != null ? h('span', { class: 'code' }, codeVal) : null),
105
111
  h('span', { class: 'title' }, titleNode, sub ? h('span', { class: 'sub' }, sub) : null),
106
112
  trailing != null ? trailing : (meta != null ? h('span', { class: 'meta' }, meta) : null),
@@ -97,7 +97,7 @@ export function FileRow({ name, type = 'other', size, modified, code, onOpen, on
97
97
  'aria-label': (marked ? 'unselect ' : 'select ') + name,
98
98
  disabled: (noAccess || busy) ? true : null,
99
99
  onclick: onMark ? (e) => onMark({ range: !!e.shiftKey }) : null,
100
- }, h('span', { 'aria-hidden': 'true' }, marked ? '[x]' : '[ ]')) : null;
100
+ }, h('span', { class: 'ds-check-box', 'aria-hidden': 'true' })) : null;
101
101
  // A role=button row containing real <button> action controls is invalid
102
102
  // HTML (interactive nesting). Instead the row is a plain container and the
103
103
  // primary "open" affordance is itself a real <button> (native keyboard +
@@ -243,7 +243,7 @@ export function FileGrid({ files = [], onOpen, onAction, onUp, emptyText = 'No f
243
243
  'aria-checked': allState,
244
244
  'aria-label': allState === 'true' ? 'clear selection' : 'select all ' + selectableKeys.length + ' shown files',
245
245
  onclick: () => (allState === 'true' && onClearSelection) ? onClearSelection() : onSelectAll(selectableKeys) },
246
- h('span', { 'aria-hidden': 'true' }, allState === 'true' ? '[x]' : allState === 'mixed' ? '[-]' : '[ ]'),
246
+ h('span', { class: 'ds-check-box', 'aria-hidden': 'true' }),
247
247
  h('span', {}, 'all'))
248
248
  : null;
249
249
  // Density picker — list / compact / thumbnails. A radiogroup, not tabs:
@@ -334,7 +334,7 @@ function FileCell({ key, f = {}, selectable = false, marked = false, onMark, onO
334
334
  'aria-label': (marked ? 'unselect ' : 'select ') + f.name,
335
335
  disabled: noAccess ? true : null,
336
336
  onclick: onMark ? (e) => onMark({ range: !!e.shiftKey }) : null,
337
- }, h('span', { 'aria-hidden': 'true' }, marked ? '[x]' : '[ ]')) : null,
337
+ }, h('span', { class: 'ds-check-box', 'aria-hidden': 'true' })) : null,
338
338
  h('button', {
339
339
  key: 'open', type: 'button', class: 'ds-file-cell-open',
340
340
  onclick: canOpen ? () => onOpen(f) : null,
@@ -186,7 +186,7 @@ export function SessionCard({ session = {}, onStop, onOpen, onView, active = fal
186
186
  'aria-checked': selected ? 'true' : 'false',
187
187
  'aria-label': (selected ? 'deselect' : 'select') + ' session ' + (s.title || s.agent || s.sid),
188
188
  onclick: () => onToggleSelect && onToggleSelect(s),
189
- }, selected ? '[x]' : '[ ]') : null,
189
+ }, h('span', { class: 'ds-check-box', 'aria-hidden': 'true' })) : null,
190
190
  h('span', { class: 'status-dot-disc ' + STATUS_DISC[st], 'aria-hidden': 'true' }),
191
191
  h('span', { class: 'ds-dash-status is-' + st }, STATUS_WORD[st]),
192
192
  s.external ? h('span', { class: 'ds-dash-external' }, 'external') : null,
@@ -310,7 +310,7 @@ export function SessionDashboard({ sessions = [], onStop, onOpen, onView, onStop
310
310
  ? h('button', { key: 'selall', type: 'button', class: 'ds-dash-selectall', role: 'checkbox',
311
311
  'aria-checked': allState, 'aria-label': allState === 'true' ? 'clear selection' : 'select all sessions',
312
312
  onclick: () => (allState === 'true' && onClearSelection) ? onClearSelection() : onSelectAll(selectableSids) },
313
- h('span', { 'aria-hidden': 'true' }, allState === 'true' ? '[x]' : allState === 'mixed' ? '[-]' : '[ ]'),
313
+ h('span', { class: 'ds-check-box', 'aria-hidden': 'true' }),
314
314
  h('span', {}, 'all'))
315
315
  : null;
316
316
  const clearCtl = (selectable && selCount && onClearSelection)
@@ -305,15 +305,60 @@ export function AppShell({ topbar, crumb, side, main, status, narrow } = {}) {
305
305
  function toggleWs(which) {
306
306
  const shell = document.querySelector('.ws-shell');
307
307
  if (!shell) return;
308
- const cls = which === 'pane' ? 'ws-pane-collapsed' : 'ws-rail-collapsed';
308
+ const cls = which === 'pane' ? 'ws-pane-collapsed'
309
+ : which === 'sessions' ? 'ws-sessions-collapsed'
310
+ : 'ws-rail-collapsed';
309
311
  const nowCollapsed = shell.classList.toggle(cls);
310
- const btn = document.querySelector('.ws-' + which + '-toggle');
311
- if (btn) btn.setAttribute('aria-expanded', nowCollapsed ? 'false' : 'true');
312
+ document.querySelectorAll('.ws-' + which + '-toggle').forEach((btn) =>
313
+ btn.setAttribute('aria-expanded', nowCollapsed ? 'false' : 'true'));
312
314
  try {
313
315
  localStorage.setItem('ds.ws.' + which, nowCollapsed ? 'collapsed' : 'open');
314
316
  } catch (_) {}
315
317
  }
316
318
 
319
+ // Column resize: read the current rendered track width and write a clamped inline
320
+ // --ws-<col>-w on .ws-shell (inline overrides the fluid clamp base), persisted.
321
+ const WS_RESIZE_CLAMP = { rail: [60, 360], sessions: [200, 520], pane: [240, 560] };
322
+ function wsResize(col, dx) {
323
+ const shell = document.querySelector('.ws-shell');
324
+ if (!shell) return;
325
+ const track = shell.querySelector('.ws-' + col);
326
+ const cur = track ? track.getBoundingClientRect().width : 0;
327
+ const [lo, hi] = WS_RESIZE_CLAMP[col] || [120, 600];
328
+ const next = Math.max(lo, Math.min(hi, Math.round(cur + dx)));
329
+ shell.style.setProperty('--ws-' + col + '-w', next + 'px');
330
+ try { localStorage.setItem('ds.ws.w.' + col, String(next)); } catch (_) {}
331
+ }
332
+ function seedWsWidths(el) {
333
+ if (!el) return;
334
+ ['rail', 'sessions', 'pane'].forEach((col) => {
335
+ try {
336
+ const v = localStorage.getItem('ds.ws.w.' + col);
337
+ if (v && /^\d+$/.test(v)) el.style.setProperty('--ws-' + col + '-w', v + 'px');
338
+ } catch (_) {}
339
+ });
340
+ }
341
+ function WsResizer(col) {
342
+ const onKey = (e) => {
343
+ if (e.key === 'ArrowLeft') { e.preventDefault(); wsResize(col, -16); }
344
+ else if (e.key === 'ArrowRight') { e.preventDefault(); wsResize(col, 16); }
345
+ };
346
+ const onDown = (e) => {
347
+ e.preventDefault();
348
+ let lastX = e.clientX;
349
+ const move = (ev) => { const dx = ev.clientX - lastX; lastX = ev.clientX; wsResize(col, dx); };
350
+ const up = () => { document.removeEventListener('pointermove', move); document.removeEventListener('pointerup', up); document.body.style.cursor = ''; };
351
+ document.addEventListener('pointermove', move);
352
+ document.addEventListener('pointerup', up);
353
+ document.body.style.cursor = 'col-resize';
354
+ };
355
+ return h('div', {
356
+ class: 'ws-resizer ws-resizer-' + col, role: 'separator', tabindex: '0',
357
+ 'aria-orientation': 'vertical', 'aria-label': 'resize ' + col + ' column (arrow keys)',
358
+ onpointerdown: onDown, onkeydown: onKey,
359
+ });
360
+ }
361
+
317
362
  // Toggle a mobile WorkspaceShell DRAWER (sessions or pane). Distinct from the
318
363
  // desktop width-collapse (toggleWs): on mobile the columns are fixed overlays
319
364
  // revealed by .ws-sessions-open / .ws-pane-open. Opening one closes the other
@@ -394,7 +439,7 @@ export function WorkspaceShell({ rail, sessions, main, pane, crumb, status, narr
394
439
  + (((hasPane && paneIsCollapsed) || keepPaneTrack) ? ' ws-pane-collapsed' : '')
395
440
  + (hasSessions ? '' : ' ws-no-sessions')
396
441
  + (narrow ? ' narrow' : '');
397
- return h('div', { class: shellCls },
442
+ return h('div', { class: shellCls, ref: seedWsWidths },
398
443
  h('a', { href: '#ws-main', class: 'skip-link' }, 'skip to main content'),
399
444
  // Left rail column. Its own toggle collapses it to icon-only.
400
445
  h('nav', { class: 'ws-rail', role: 'navigation', 'aria-label': railLabel },
@@ -430,6 +475,13 @@ export function WorkspaceShell({ rail, sessions, main, pane, crumb, status, narr
430
475
  'aria-label': 'toggle conversations', 'aria-expanded': 'false',
431
476
  onclick: () => toggleWsDrawer('sessions'),
432
477
  }, Icon('thread')) : null,
478
+ // Desktop-only sessions collapse (reclaims its width for a
479
+ // full-width thread/grid). Hidden on mobile via CSS.
480
+ hasSessions ? h('button', {
481
+ class: 'ws-desktop-toggle ws-sessions-toggle', type: 'button',
482
+ 'aria-label': 'collapse conversations', title: 'collapse conversations',
483
+ 'aria-expanded': 'true', onclick: () => toggleWs('sessions'),
484
+ }, Icon('chevron-left')) : null,
433
485
  h('div', { class: 'ws-crumb-main' }, crumb),
434
486
  hasPane ? h('button', {
435
487
  class: 'ws-drawer-toggle ws-pane-drawer-toggle', type: 'button',
@@ -452,6 +504,10 @@ export function WorkspaceShell({ rail, sessions, main, pane, crumb, status, narr
452
504
  }, Icon(paneIsCollapsed ? 'chevron-left' : 'chevron-right')),
453
505
  pane)
454
506
  : null,
507
+ // Keyboard/pointer column resize handles (desktop only).
508
+ (!narrow && !railIsCollapsed) ? WsResizer('rail') : null,
509
+ (!narrow && hasSessions) ? WsResizer('sessions') : null,
510
+ (!narrow && hasPane && !paneIsCollapsed) ? WsResizer('pane') : null,
455
511
  );
456
512
  }
457
513