@unson/brainbase-mcp 0.50.26 → 0.50.28

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.
@@ -1062,7 +1062,7 @@
1062
1062
  .bb-ws-topbar-tabs { display: flex; align-self: stretch; min-width: 0; }
1063
1063
  .bb-ws-topbar-tools { display: flex; align-items: center; flex: none; gap: 8px; margin-left: auto; }
1064
1064
  .bb-ws-topbar.has-query .bb-ws-topbar-tools { margin-left: 0; }
1065
- .bb-ws-topbar.has-tabs .bb-ws-search-control { width: 210px; height: 32px; padding: 0 10px; gap: 8px; border-radius: 7px; }
1065
+ .bb-ws-topbar.has-tabs .bb-ws-search-control { width: var(--bb-search-control-width,210px); height: 32px; padding: 0 10px; gap: 8px; border-radius: 7px; }
1066
1066
  .bb-ws-topbar.has-tabs .bb-ws-search-control > .bb-ws-action-icon { width: 14px; height: 14px; }
1067
1067
  .bb-ws-topbar.has-tabs .bb-ws-search-control > input { font-size: 12.5px; }
1068
1068
  .bb-ws-topbar-tools > .bb-ws-button { height: 32px; min-height: 32px; padding: 0 12px 0 9px; gap: 5px; border-radius: 7px; font-size: 12.5px; }
@@ -1112,7 +1112,7 @@
1112
1112
  .bb-ws-filter-popover--panel.is-closing { animation: none; }
1113
1113
  }
1114
1114
 
1115
- .bb-ws-search-control.bb-ws-search-control--compact { width: 210px; height: 32px; padding: 0 10px; gap: 8px; border-radius: 7px; }
1115
+ .bb-ws-search-control.bb-ws-search-control--compact { width: var(--bb-search-control-width,210px); height: 32px; padding: 0 10px; gap: 8px; border-radius: 7px; }
1116
1116
  .bb-ws-search-control--compact > .bb-ws-action-icon { width: 14px; height: 14px; }
1117
1117
  .bb-ws-search-control.bb-ws-search-control--compact > input { font-size: 12.5px; }
1118
1118
 
@@ -1379,6 +1379,19 @@
1379
1379
  .bb-ws-card-row.bb-ws-card-row--compact-panel:hover { box-shadow:none; }
1380
1380
  .bb-ws-card-row--skeleton { pointer-events:none; box-shadow:none; }
1381
1381
  .bb-ws-card-row--skeleton:hover { box-shadow:none; }
1382
+
1383
+ /* Reusable summary and identity surfaces, using the established palette. */
1384
+ .bb-ws-summary-card { --bb-summary-radius:8px; --bb-summary-padding:20px 24px 20px 29px; --bb-summary-stripe:5px; position:relative; display:grid; min-width:0; gap:32px; padding:var(--bb-summary-padding); border-radius:var(--bb-summary-radius); background:var(--bb-color-paper); }
1385
+ .bb-ws-summary-card.has-aside { grid-template-columns:minmax(0,1.9fr) minmax(0,1fr); align-items:start; }
1386
+ .bb-ws-summary-card::before { content:""; position:absolute; inset:0 auto 0 0; width:var(--bb-summary-stripe); border-radius:var(--bb-summary-radius) 0 0 var(--bb-summary-radius); background:var(--bb-card-stripe,var(--bb-color-border)); }
1387
+ .bb-ws-summary-card-main,.bb-ws-summary-card-aside { min-width:0; }
1388
+ .bb-ws-avatar { display:inline-flex; align-items:center; justify-content:center; flex:none; width:22px; height:22px; border-radius:50%; background:var(--bb-inbox-context-surface,var(--bb-color-canvas)); color:var(--bb-color-slate); font:600 10px/1 var(--bb-font-sans); }
1389
+ .bb-ws-identity-chip { display:inline-flex; align-items:center; flex-wrap:wrap; gap:8px; min-height:40px; padding:0 14px 0 9px; border:0; border-radius:var(--bb-radius-pill); background:var(--bb-color-paper); color:var(--bb-color-ink); font:500 13px/1 var(--bb-font-sans); text-align:start; overflow-wrap:anywhere; }
1390
+ button.bb-ws-identity-chip { cursor:pointer; }
1391
+ button.bb-ws-identity-chip:hover { box-shadow:var(--bb-shadow-card-preview); }
1392
+ .bb-ws-identity-chip small { color:var(--bb-color-muted); font-size:11.5px; font-weight:400; }
1393
+ .bb-ws-identity-chip:focus-visible { outline:2px solid var(--bb-color-focus); outline-offset:2px; }
1394
+ @media (max-width:760px) { .bb-ws-summary-card.has-aside { grid-template-columns:minmax(0,1fr); gap:20px; } .bb-ws-summary-card { --bb-summary-padding:18px 16px 18px 21px; } }
1382
1395
  .bb-ws-card-skeleton-line { display:block; width:var(--bb-card-skeleton-width,100%); height:var(--bb-card-skeleton-height,10px); border-radius:var(--bb-card-skeleton-radius,5px); background:linear-gradient(100deg,var(--bb-color-canvas) 30%,var(--bb-color-line-soft) 50%,var(--bb-color-canvas) 70%) 0 0 / 240% 100%; animation:bb-ws-card-skeleton-sweep 1.4s linear infinite; }
1383
1396
  @keyframes bb-ws-card-skeleton-sweep { to { background-position:100% 0; } }
1384
1397
 
@@ -1422,7 +1435,7 @@
1422
1435
  /* Content alignment changes only desktop horizontal gutters; the header preset owns sizing. */
1423
1436
  @media (min-width: 761px) {
1424
1437
  .bb-ws-topbar.bb-ws-topbar--content-aligned { padding-inline: var(--bb-space-5); }
1425
- .bb-ws-topbar.bb-ws-topbar--content-aligned.has-tabs > h1 { padding-inline-start: calc(var(--bb-space-6) - var(--bb-space-5)); }
1438
+ .bb-ws-topbar.bb-ws-topbar--content-aligned > h1 { padding-inline-start: calc(var(--bb-space-6) - var(--bb-space-5)); }
1426
1439
  }
1427
1440
 
1428
1441
  /* A narrow header keeps the title and tabs full width before its controls. */
@@ -1435,3 +1448,100 @@
1435
1448
  .bb-ws-topbar.has-tabs > :is(.bb-ws-search-control, .bb-ws-topbar-tools) { grid-row: 3; }
1436
1449
  .bb-ws-topbar.has-tabs:not(.has-query) > .bb-ws-topbar-tools { grid-column: 1 / -1; justify-content: flex-end; }
1437
1450
  }
1451
+
1452
+ /* Sections and in-place fields within the shared input frame. */
1453
+ .bb-ws-settings-section { padding:20px 0 22px; box-shadow:inset 0 -1px 0 var(--bb-color-line-soft); }
1454
+ .bb-ws-settings-section:last-child { box-shadow:none; padding-bottom:0; }
1455
+ .bb-ws-settings-heading { display:flex; align-items:center; gap:8px; min-height:28px; margin-bottom:10px; }
1456
+ .bb-ws-settings-heading h3 { flex:1; margin:0; color:var(--bb-color-ink); font:600 13.5px/1.6 var(--bb-font-sans); }
1457
+ .bb-ws-settings-heading h3 small { margin-left:6px; color:var(--bb-color-muted); font-size:12px; font-weight:400; }
1458
+ .bb-ws-settings-heading > .bb-ws-button { flex:none; height:28px; min-height:28px; padding:0 12px; border:0; border-radius:var(--bb-radius-sm); background:var(--bb-color-canvas); color:var(--bb-color-action); font:500 12.5px/1 var(--bb-font-sans); }
1459
+ .bb-ws-settings-heading > .bb-ws-button:hover { background:var(--bb-color-accent-soft); }
1460
+ .bb-ws-settings-section > .bb-ws-definition { grid-template-columns:76px minmax(0,1fr); gap:9px 12px; font-size:12.5px; }
1461
+ .bb-ws-settings-section > .bb-ws-definition dt { color:var(--bb-color-muted); }
1462
+ .bb-ws-settings-section > .bb-ws-definition dd { margin:0; line-height:1.7; }
1463
+ .bb-ws-settings-section > p { margin:0 0 12px; color:var(--bb-color-slate); font-size:12.5px; line-height:1.7; }
1464
+ .bb-ws-settings-identity { display:flex; align-items:center; gap:10px; font-size:13.5px; font-weight:600; }
1465
+ .bb-ws-settings-identity > .bb-project-icon { flex-basis:32px; width:32px; height:32px; font-size:13px; }
1466
+ .bb-ws-input-top:has(> .bb-ws-settings-identity) > h2 { margin-bottom:12px; }
1467
+ .bb-ws-input-footer[hidden] { display:none; }
1468
+
1469
+ /* Host-supplied work projections use the same row and progress primitives. */
1470
+ .bb-project-work-summary.bb-ws-summary-card { grid-template-columns:minmax(0,1fr) 220px; align-items:center; gap:40px; }
1471
+ .bb-project-work-progress { display:grid; gap:10px; min-width:0; }
1472
+ .bb-project-work-progress-top { display:flex; align-items:baseline; gap:6px; color:var(--bb-color-slate); font-size:12.5px; }
1473
+ .bb-project-work-progress-top b { color:var(--bb-color-ink); font-size:30px; line-height:1; font-weight:600; }
1474
+ .bb-project-work-progress-top .bb-ws-status-pill { margin-left:auto; }
1475
+ .bb-project-work-progress .bb-ws-progress-bar { height:10px; border-radius:5px; }
1476
+ .bb-project-work-legend { display:flex; flex-wrap:wrap; gap:22px; color:var(--bb-color-ink); font-size:13px; }
1477
+ .bb-project-work-legend > span::before { content:""; display:inline-block; width:8px; height:8px; margin-right:5px; border-radius:2px; vertical-align:0; background:var(--bb-color-action); }
1478
+ .bb-project-work-legend > span:nth-child(2)::before { background:var(--bb-color-mint); opacity:.55; }
1479
+ .bb-project-work-legend > span:nth-child(3)::before { background:var(--bb-color-review); }
1480
+ .bb-project-work-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; margin:28px 0 8px; padding:0 2px; }
1481
+ .bb-project-work-heading h3 { margin:0; color:var(--bb-color-ink); font:600 14px/1.6 var(--bb-font-sans); }
1482
+ .bb-project-work-heading small { color:var(--bb-color-muted); font-size:12px; }
1483
+ .bb-project-work-heading > :last-child:is(a,button) { margin-left:auto; }
1484
+ .bb-project-work-rows { --bb-card-columns:minmax(200px,1fr) 76px 170px 130px 120px; min-width:0; }
1485
+ .bb-project-work-rows .bb-ws-card-row,.bb-project-work-table-head { column-gap:20px; }
1486
+ .bb-project-work-table-head { box-sizing:border-box; display:grid; grid-template-columns:var(--bb-card-columns); align-items:center; padding:0 16px 0 22px; min-height:34px; margin-bottom:8px; border-bottom:2px solid var(--bb-color-action); color:var(--bb-color-action); font-size:12px; font-weight:600; }
1487
+ .bb-project-work-title { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:600; line-height:1.6; }
1488
+ .bb-project-work-muted { color:var(--bb-color-muted); font-size:12.5px; }
1489
+ .bb-project-work-list { min-width:0; }
1490
+ .bb-project-work-date { display:inline-flex; align-items:baseline; gap:6px; color:var(--bb-color-ink); font-size:13px; line-height:1.6; white-space:nowrap; }
1491
+ .bb-project-work-date b { font-size:inherit; font-weight:400; }
1492
+ .bb-project-work-date i,.bb-project-work-date em { font-style:normal; }
1493
+ .bb-project-work-date i { color:var(--bb-color-muted); font-size:12px; }
1494
+ .bb-project-work-date em { margin-left:4px; color:var(--bb-color-slate); }
1495
+ .bb-project-work-next-due .bb-project-work-date b { font-weight:600; }
1496
+ .bb-project-work-owner { display:flex; align-items:center; gap:8px; min-width:0; font-size:13px; }
1497
+ @media(max-width:760px) { .bb-project-work-summary.bb-ws-summary-card { grid-template-columns:minmax(0,1fr); gap:20px; } }
1498
+
1499
+ .bb-ws-pills--record-types { flex-wrap:wrap; gap:4px; }
1500
+ .bb-ws-pills--record-types > button { gap:6px; font-size:12.5px; line-height:1; }
1501
+ .bb-ws-pills--record-types > button[aria-pressed="true"] { font-weight:500; }
1502
+ .bb-ws-pills--record-types > button:not(:disabled):hover { background:var(--bb-color-paper); }
1503
+ .bb-ws-pills--record-types > button[aria-pressed="true"]:hover { background:var(--bb-color-action); }
1504
+ .bb-ws-pills--record-types i { flex:none; width:8px; height:8px; border-radius:50%; background:var(--bb-pill-dot,var(--bb-color-slate)); }
1505
+ .bb-ws-pills--record-types small { font-size:11px; opacity:.7; font-variant-numeric:tabular-nums; }
1506
+ .bb-ws-dot-pill { display:inline-flex; align-items:center; height:20px; padding:0 8px; border-radius:var(--bb-radius-pill); background:var(--bb-color-canvas); color:var(--bb-color-slate); font-size:11px; white-space:nowrap; }
1507
+ .bb-ws-dot-pill i { flex:none; width:7px; height:7px; margin-right:5px; border-radius:50%; background:var(--bb-pill-dot,var(--bb-color-slate)); }
1508
+ .bb-project-work-heading-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-left:auto; }
1509
+ .bb-project-work-next-due { display:grid; gap:4px; min-width:0; }
1510
+ .bb-project-work-plans { --bb-card-columns:150px minmax(0,1fr); }
1511
+ .bb-project-work-issues { --bb-card-columns:minmax(0,1fr) 240px 96px; }
1512
+ .bb-project-work-plans .bb-ws-card-row,.bb-project-work-issues .bb-ws-card-row { column-gap:20px; }
1513
+ @media(max-width:760px) {
1514
+ .bb-project-work-rows .bb-ws-card-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 12px; }
1515
+ .bb-project-work-rows .bb-ws-card-cell:nth-child(n+3) { display:flex; }
1516
+ .bb-project-work-rows .bb-ws-card-cell:first-child { grid-column:1/-1; }
1517
+ .bb-project-work-rows .bb-project-work-title { white-space:normal; }
1518
+ .bb-project-work-table-head { display:none; }
1519
+ .bb-project-work-plans { --bb-card-columns:minmax(0,1fr); }
1520
+ .bb-project-work-issues { --bb-card-columns:minmax(0,1fr); }
1521
+ }
1522
+
1523
+ /* In-place settings content; mutation state and controls stay with its owner. */
1524
+ .bb-ws-settings-inline { margin:2px -12px 0; padding:2px 12px 12px; border:0; border-radius:10px; background:var(--bb-color-canvas); }
1525
+ .bb-ws-settings-form,.bb-ws-settings-fields { display:grid; min-width:0; gap:0; }
1526
+ .bb-ws-settings-entry { min-width:0; padding-top:6px; }
1527
+ .bb-ws-settings-entry + .bb-ws-settings-entry { margin-top:10px; box-shadow:inset 0 1px 0 var(--bb-color-border); }
1528
+ .bb-ws-settings-entry-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-height:40px; font-size:12.5px; }
1529
+ .bb-ws-settings-primary { display:inline-flex; align-items:center; flex:1; gap:6px; color:var(--bb-color-slate); font-size:12.5px; cursor:pointer; }
1530
+ .bb-ws-settings-primary input { accent-color:var(--bb-color-action); }
1531
+ .bb-ws-settings-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; margin-top:14px; }
1532
+ .bb-ws-settings-actions > .bb-ws-button { height:34px; min-height:34px; padding:0 14px; border:0; border-radius:var(--bb-radius-sm); font-size:12.5px; font-weight:600; }
1533
+ .bb-ws-settings-actions > .bb-ws-button:not(.is-primary) { background:var(--bb-color-paper); color:var(--bb-color-slate); }
1534
+ .bb-ws-settings-confirm { margin-top:12px; padding:12px; border-radius:8px; background:var(--bb-color-paper); }
1535
+ .bb-ws-settings-error { margin:8px 0; color:var(--bb-color-inline-error); font-size:12.5px; line-height:1.7; }
1536
+ .bb-ws-settings-note { margin:8px 0; color:var(--bb-color-muted); font-size:11.5px; line-height:1.7; overflow-wrap:anywhere; }
1537
+ .bb-ws-settings-service-list { display:grid; gap:2px; }
1538
+ .bb-ws-settings-service-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; min-height:44px; font-size:13px; }
1539
+ .bb-ws-settings-service-name { display:inline-flex; align-items:center; gap:10px; color:var(--bb-color-ink); font-weight:600; }
1540
+ .bb-ws-settings-service-name img { flex:none; width:18px; height:18px; }
1541
+ .bb-ws-settings-service-count { flex:1; min-width:0; color:var(--bb-color-muted); font-size:12px; }
1542
+ .bb-ws-settings-service-actions { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
1543
+ .bb-ws-settings-service-actions > .bb-ws-button { height:28px; min-height:28px; padding:0 12px; border:0; border-radius:var(--bb-radius-sm); background:var(--bb-color-canvas); color:var(--bb-color-action); font:500 12.5px/1 var(--bb-font-sans); }
1544
+ .bb-ws-settings-service-actions > .bb-ws-button.is-quiet { background:none; color:var(--bb-color-slate); }
1545
+ .bb-ws-settings-service-editor { min-width:0; margin-bottom:8px; }
1546
+ .bb-ws-focus-only:not(:focus-visible) { position:absolute; width:1px; height:1px; min-width:0; min-height:0; margin:-1px; padding:0; border:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
1547
+ .bb-ws-settings-actions > .bb-ws-button.is-danger,.bb-ws-settings-service-actions > .bb-ws-button.is-danger { color:var(--bb-color-danger); }
@@ -84,10 +84,11 @@ export function workspacePageHeader(doc, { crumbs = [], title, lead, help, prese
84
84
  }
85
85
 
86
86
  /** Shared search presentation. The caller keeps the input, value and handlers. */
87
- export function workspaceSearchControl(doc, { input, appearance } = {}) {
87
+ export function workspaceSearchControl(doc, { input, appearance, width } = {}) {
88
88
  if (!input || typeof input.tagName !== 'string') throw new TypeError('search_input_required');
89
89
  const search = el(doc, 'label', { className: 'bb-ws-search-control' });
90
90
  if (appearance === 'compact') toggleWorkspaceClass(search, 'bb-ws-search-control--compact', true);
91
+ if (Number.isFinite(width) && width > 0) search.style?.setProperty('--bb-search-control-width', `${width}px`);
91
92
  search.append(workspaceActionIcon(doc, 'search'), input);
92
93
  return search;
93
94
  }
@@ -1427,6 +1428,7 @@ export function workspaceActionIcon(doc, name) {
1427
1428
  const paths = { edit: 'M4 20h4L19 9l-4-4L4 16z M13.5 6.5l4 4', undo: 'M4 5v5h5 M4.6 10A8 8 0 1 1 6.3 17.7', check: 'M5 12l5 5 9-10', sliders: 'M4 8h8M18 8h2M4 16h2M12 16h8 M17.4 8a2.4 2.4 0 1 1-4.8 0 2.4 2.4 0 0 1 4.8 0 M11.4 16a2.4 2.4 0 1 1-4.8 0 2.4 2.4 0 0 1 4.8 0', plus: 'M12 5v14M5 12h14', search: 'M21 21l-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0', filter: 'M4 7h16M7 12h10M10 17h4', sort: 'M8 4v16m-3-3 3 3 3-3M16 20V4m-3 3 3-3 3 3', close: 'M6 6l12 12M18 6L6 18', sparkles: 'M12 3l1.8 6.7 6.7 1.8-6.7 1.8L12 20l-1.8-6.7-6.7-1.8 6.7-1.8z M19 2v4 M17 4h4' };
1428
1429
  Object.assign(paths, {
1429
1430
  copy: 'M9 9h12v12H9z M5 15H3V3h12v2',
1431
+ star: 'M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z',
1430
1432
  lock: 'M6 10h12v11H6z M8 10V7a4 4 0 1 1 8 0v3',
1431
1433
  clock: 'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M12 7v5l3 2',
1432
1434
  users: 'M12.2 8a3.2 3.2 0 1 1-6.4 0 3.2 3.2 0 0 1 6.4 0 M3 20c0-3.3 2.7-5.5 6-5.5s6 2.2 6 5.5 M16 5.2a3.2 3.2 0 0 1 0 5.6 M18 14.8c1.9.7 3 2.5 3 5.2',
@@ -1672,12 +1674,18 @@ export function workspaceConditionChips(doc, { items = [], reset, resetLabel = '
1672
1674
  return root;
1673
1675
  }
1674
1676
 
1675
- export function workspacePills(doc, { label, items = [], value, onChange } = {}) {
1676
- const root = el(doc, 'div', { className: 'bb-ws-pills', attrs: { role: 'group', 'aria-label': label } });
1677
+ export function workspacePills(doc, { label, items = [], value, onChange, appearance } = {}) {
1678
+ const root = el(doc, 'div', { className: `bb-ws-pills${appearance === 'record-types' ? ' bb-ws-pills--record-types' : ''}`, attrs: { role: 'group', 'aria-label': label } });
1677
1679
  const buttons = items.map(item => {
1678
1680
  const button = workspaceButton(doc, { text: item.label, disabled: Boolean(item.disabled),
1679
1681
  attrs: { 'aria-pressed': String(item.value === value) }, onClick: () => onChange?.(item.value, item) });
1680
1682
  if (item.icon) button.prepend(item.icon);
1683
+ if (appearance === 'record-types') {
1684
+ button.textContent = '';
1685
+ if (item.color) { const dot = el(doc, 'i', { attrs: { 'aria-hidden': 'true' } }); dot.style?.setProperty('--bb-pill-dot', item.color); button.append(dot); }
1686
+ button.append(el(doc, 'span', { text: item.label }));
1687
+ if (Number.isInteger(item.count) && item.count >= 0) button.append(el(doc, 'small', { text: item.count }));
1688
+ }
1681
1689
  root.append(button); return button;
1682
1690
  });
1683
1691
  root.update = next => buttons.forEach((button, i) => button.setAttribute('aria-pressed', String(items[i].value === next)));
@@ -1692,10 +1700,10 @@ export function workspaceControlRow(doc, { label, control, tight = false } = {})
1692
1700
  return root;
1693
1701
  }
1694
1702
 
1695
- export function workspaceFormRow(doc, { label, control, required = false, top = false, appearance } = {}) {
1703
+ export function workspaceFormRow(doc, { label, control, required = false, top = false, appearance, labelFor } = {}) {
1696
1704
  const root = el(doc, 'div', { className: `bb-ws-form-row${top ? ' is-top' : ''}${appearance === 'quiet' ? ' is-quiet' : ''}${appearance === 'stacked' ? ' is-stacked' : ''}` });
1697
- const caption = el(doc, control?.id ? 'label' : 'span', { className: 'bb-ws-form-label', text: label,
1698
- attrs: { for: control?.id || undefined } });
1705
+ const caption = el(doc, labelFor || control?.id ? 'label' : 'span', { className: 'bb-ws-form-label', text: label,
1706
+ attrs: { for: labelFor || control?.id || undefined } });
1699
1707
  if (required) {
1700
1708
  caption.append(el(doc, 'span', { className: 'bb-ws-form-required', text: '※', attrs: { 'aria-label': '必須' } }));
1701
1709
  control?.setAttribute('aria-required', 'true');
@@ -1707,7 +1715,7 @@ export function workspaceFormRow(doc, { label, control, required = false, top =
1707
1715
  }
1708
1716
 
1709
1717
  /** Uses the canonical modal, Escape/backdrop/close animation and focus return. */
1710
- export function workspaceInputFrame(doc, { title, opener, onClose, beforeClose, tools = [], preview, rows = [], footer = [], showTitle = true } = {}) {
1718
+ export function workspaceInputFrame(doc, { title, opener, onClose, beforeClose, tools = [], preview, rows = [], footer = [], showTitle = true, showFooter = true } = {}) {
1711
1719
  const drawer = workspaceDetailDrawer(doc, { title, opener, onClose, beforeClose });
1712
1720
  drawer.dialog.classList.add('bb-ws-input-frame');
1713
1721
  if (tools.length) drawer.dialog.classList.add('has-tools');
@@ -1716,7 +1724,7 @@ export function workspaceInputFrame(doc, { title, opener, onClose, beforeClose,
1716
1724
  const toolRow = el(doc, 'div', { className: 'bb-ws-input-tools' }); toolRow.append(...tools);
1717
1725
  const heading = el(doc, 'h2', { text: title }); if (showTitle) top.append(heading); if (preview) top.append(preview);
1718
1726
  const form = el(doc, 'div', { className: 'bb-ws-input-fields' }); form.append(...rows);
1719
- const foot = el(doc, 'div', { className: 'bb-ws-input-footer' }); foot.append(...footer);
1727
+ const foot = el(doc, 'div', { className: 'bb-ws-input-footer' }); foot.append(...footer); foot.hidden = !showFooter;
1720
1728
  drawer.dialog.querySelector('.bb-ws-detail-closebar').prepend(toolRow);
1721
1729
  drawer.setContent(top, form, foot);
1722
1730
  return { ...drawer, top, tools: toolRow, fields: form, footer: foot,
@@ -1727,7 +1735,7 @@ export function workspaceInputFrame(doc, { title, opener, onClose, beforeClose,
1727
1735
  export function workspaceCardRow(doc, { cells = [], stripe, selected = false, key, onSelect, label, preview = false, columnGap, selectionAppearance, appearance } = {}) {
1728
1736
  const root = el(doc, onSelect ? 'button' : 'div', { className: `bb-ws-card-row${selected ? ' is-selected' : ''}${preview ? ' is-preview' : ''}${selectionAppearance === 'soft' ? ' bb-ws-card-row--soft-selected' : ''}${appearance === 'compact-panel' ? ' bb-ws-card-row--compact-panel' : ''}${appearance === 'busy' ? ' bb-ws-card-row--busy' : ''}`,
1729
1737
  attrs: { type: onSelect ? 'button' : undefined, 'data-key': key, 'aria-label': label, 'aria-pressed': onSelect ? String(selected) : undefined } });
1730
- if (stripe) root.style.setProperty('--bb-card-stripe', stripe);
1738
+ if (stripe) root.style?.setProperty('--bb-card-stripe', stripe);
1731
1739
  if (Number.isFinite(columnGap) && columnGap >= 0) root.style?.setProperty('--bb-ws-card-column-gap', `${columnGap}px`);
1732
1740
  for (const cell of cells) {
1733
1741
  const descriptor = cell && typeof cell === 'object' && typeof cell.tagName !== 'string' && ('className' in cell || 'content' in cell) ? cell : null;
@@ -1766,6 +1774,40 @@ export function workspaceCardRowSkeleton(doc, { cells = [], stripe, columnGap }
1766
1774
  return root;
1767
1775
  }
1768
1776
 
1777
+ /** A content summary with an optional accent stripe and supporting column. */
1778
+ export function workspaceSummaryCard(doc, { content, aside, stripe, label } = {}) {
1779
+ const root = el(doc, 'section', { className: `bb-ws-summary-card${aside ? ' has-aside' : ''}`, attrs: { 'aria-label': label } });
1780
+ if (stripe) root.style?.setProperty('--bb-card-stripe', stripe);
1781
+ const main = el(doc, 'div', { className: 'bb-ws-summary-card-main' });
1782
+ appendContent(main, doc, content); root.append(main);
1783
+ if (aside) { const side = el(doc, 'div', { className: 'bb-ws-summary-card-aside' }); appendContent(side, doc, aside); root.append(side); }
1784
+ return root;
1785
+ }
1786
+
1787
+ /** A person's display initial; the visible name is supplied alongside it. */
1788
+ export function workspaceAvatar(doc, { name = '', initial } = {}) {
1789
+ return el(doc, 'span', { className: 'bb-ws-avatar', text: initial ?? Array.from(String(name).trim())[0] ?? '', attrs: { 'aria-hidden': 'true' } });
1790
+ }
1791
+
1792
+ /** Host-owned identity navigation, without assigning permissions or roles. */
1793
+ export function workspaceIdentityChip(doc, { name, detail, onClick, label, initial } = {}) {
1794
+ const root = el(doc, onClick ? 'button' : 'span', { className: 'bb-ws-identity-chip', attrs: { type: onClick ? 'button' : undefined, 'aria-label': label } });
1795
+ root.append(workspaceAvatar(doc, { name, initial }), el(doc, 'span', { text: name }));
1796
+ if (detail) root.append(el(doc, 'small', { text: detail }));
1797
+ if (onClick) root.addEventListener('click', onClick);
1798
+ return root;
1799
+ }
1800
+
1801
+ /** One navigation entrance, explicitly invoked by the owning route. */
1802
+ export function workspaceViewMotion(root, { direction = 'forward' } = {}) {
1803
+ if (!root?.animate || root.ownerDocument?.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return null;
1804
+ const back = direction === 'back';
1805
+ return root.animate([
1806
+ { opacity: 0, transform: `translateX(${back ? -24 : 24}px)` },
1807
+ { opacity: 1, transform: 'none' },
1808
+ ], { duration: back ? 240 : 280, easing: 'cubic-bezier(.2,.7,.2,1)' });
1809
+ }
1810
+
1769
1811
  /** FLIP keyed retained or redrawn rows; capture immediately before a host redraw. */
1770
1812
  export function workspaceRowMotion(root) {
1771
1813
  let previous = new Map();
@@ -1792,3 +1834,22 @@ export function workspaceRowMotion(root) {
1792
1834
  destroy() { for (const animation of animations) animation.cancel(); animations.clear(); previous.clear(); },
1793
1835
  };
1794
1836
  }
1837
+
1838
+
1839
+ /** A section inside an input frame, with an optional in-place editing action. */
1840
+ export function workspaceSettingsSection(doc, { title, count, action, content, label = title } = {}) {
1841
+ const root = el(doc, 'section', { className: 'bb-ws-settings-section', attrs: { 'aria-label': label } });
1842
+ const head = el(doc, 'div', { className: 'bb-ws-settings-heading' });
1843
+ const heading = el(doc, 'h3', { text: title });
1844
+ if (Number.isInteger(count) && count > 0) heading.append(el(doc, 'small', { text: `${count}件` }));
1845
+ head.append(heading); if (action) head.append(action); root.append(head);
1846
+ appendContent(root, doc, content); return root;
1847
+ }
1848
+
1849
+
1850
+ /** A supplied category label with a decorative dot; it infers no record type. */
1851
+ export function workspaceDotPill(doc, { label, color } = {}) {
1852
+ const root = el(doc, 'span', { className: 'bb-ws-dot-pill' });
1853
+ if (color) { const dot = el(doc, 'i', { attrs: { 'aria-hidden': 'true' } }); dot.style?.setProperty('--bb-pill-dot', color); root.append(dot); }
1854
+ root.append(el(doc, 'span', { text: label })); return root;
1855
+ }