@unson/brainbase-mcp 0.48.2 → 0.48.4

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.
@@ -94,6 +94,7 @@ body {
94
94
 
95
95
  .bb-shell-nav-link[aria-current="page"] {
96
96
  background: var(--bb-color-rail-active);
97
+ --bb-color-muted: var(--bb-color-muted-on-surface);
97
98
  color: var(--bb-color-accent);
98
99
  box-shadow: none;
99
100
  }
@@ -169,6 +170,7 @@ body {
169
170
  border-left: 1px solid var(--bb-color-border);
170
171
  padding: 28px 22px 36px;
171
172
  background: var(--bb-color-surface);
173
+ --bb-color-muted: var(--bb-color-muted-on-surface);
172
174
  }
173
175
 
174
176
  .bb-shell-rail[hidden],
@@ -232,6 +234,7 @@ body {
232
234
  border-left: 3px solid var(--bb-color-warning);
233
235
  padding: var(--bb-space-5);
234
236
  background: var(--bb-color-surface);
237
+ --bb-color-muted: var(--bb-color-muted-on-surface);
235
238
  }
236
239
 
237
240
  .bb-shell-gate h2,
@@ -337,7 +340,7 @@ body {
337
340
  left: 0;
338
341
  width: min(300px, 88vw);
339
342
  transform: translateX(-100%);
340
- transition: transform .2s ease;
343
+ transition: transform .2s var(--bb-ease-drawer, cubic-bezier(0.32, 0.72, 0, 1));
341
344
  }
342
345
 
343
346
  .bb-shell-sidebar.is-open {
@@ -21,6 +21,7 @@
21
21
  border: 1px solid var(--bb-color-border);
22
22
  border-radius: var(--bb-radius-lg, 8px);
23
23
  background: var(--bb-color-surface);
24
+ --bb-color-muted: var(--bb-color-muted-on-surface);
24
25
  }
25
26
 
26
27
  .bb-minutes-eyebrow,
@@ -117,6 +118,7 @@
117
118
  border: 1px solid var(--bb-color-border);
118
119
  border-radius: var(--bb-radius-md, 6px);
119
120
  background: var(--bb-color-surface);
121
+ --bb-color-muted: var(--bb-color-muted-on-surface);
120
122
  }
121
123
 
122
124
  .bb-minutes-filter-host {
@@ -189,6 +191,7 @@
189
191
  border: 1px solid var(--bb-color-border);
190
192
  border-radius: var(--bb-radius-md, 6px);
191
193
  background: var(--bb-color-surface);
194
+ --bb-color-muted: var(--bb-color-muted-on-surface);
192
195
  }
193
196
 
194
197
  .bb-minutes-list-pane,
@@ -301,6 +304,7 @@
301
304
  .bb-minutes-version.is-selected {
302
305
  border-left-color: var(--bb-color-brand-indigo);
303
306
  background: var(--bb-color-accent-soft);
307
+ --bb-color-muted: var(--bb-color-muted-on-surface);
304
308
  }
305
309
 
306
310
  .bb-minutes-item-title,
@@ -380,6 +384,7 @@
380
384
 
381
385
  .bb-minutes-state.is-muted {
382
386
  background: var(--bb-color-surface);
387
+ --bb-color-muted: var(--bb-color-muted-on-surface);
383
388
  color: var(--bb-color-muted);
384
389
  }
385
390
 
@@ -425,6 +430,7 @@
425
430
  .bb-minutes-withdrawn {
426
431
  padding: 8px 12px;
427
432
  background: var(--bb-color-surface);
433
+ --bb-color-muted: var(--bb-color-muted-on-surface);
428
434
  border: 1px solid var(--bb-color-border);
429
435
  border-radius: var(--bb-radius-sm, 4px);
430
436
  }
@@ -501,6 +507,7 @@
501
507
  padding: 8px;
502
508
  border-radius: var(--bb-radius-sm, 4px);
503
509
  background: var(--bb-color-accent-soft);
510
+ --bb-color-muted: var(--bb-color-muted-on-surface);
504
511
  overflow-wrap: anywhere;
505
512
  }
506
513
 
@@ -635,6 +642,7 @@
635
642
  border: 1px solid var(--bb-color-border);
636
643
  border-radius: var(--bb-radius-md, 6px);
637
644
  background: var(--bb-color-surface);
645
+ --bb-color-muted: var(--bb-color-muted-on-surface);
638
646
  }
639
647
 
640
648
  .bb-minutes-connections-title {
@@ -707,6 +715,7 @@
707
715
  border: 1px solid var(--bb-color-border);
708
716
  border-radius: var(--bb-radius-md, 6px);
709
717
  background: var(--bb-color-surface);
718
+ --bb-color-muted: var(--bb-color-muted-on-surface);
710
719
  }
711
720
 
712
721
  .bb-minutes-participants[hidden] {
@@ -272,17 +272,6 @@
272
272
  gap: 8px;
273
273
  }
274
274
 
275
- .bb-pc-action-row .bb-ws-button.is-primary {
276
- border-color: var(--bb-color-action);
277
- background: var(--bb-color-action);
278
- color: var(--bb-color-action-text);
279
- }
280
-
281
- .bb-pc-action-row .bb-ws-button.is-primary:hover:not(:disabled) {
282
- border-color: var(--bb-color-action-hover);
283
- background: var(--bb-color-action-hover);
284
- }
285
-
286
275
  .bb-pc-action-row .bb-ws-button[data-adds]::before {
287
276
  content: '+';
288
277
  }
@@ -23,6 +23,7 @@
23
23
  margin: 0 0 10px;
24
24
  overflow: hidden;
25
25
  background: var(--bb-color-accent-soft);
26
+ --bb-color-muted: var(--bb-color-muted-on-surface);
26
27
  color: transparent;
27
28
  font-size: 0;
28
29
  }
@@ -49,6 +50,7 @@
49
50
  .bb-pm-chip.is-active {
50
51
  border-color: var(--bb-color-accent);
51
52
  background: var(--bb-color-accent-soft);
53
+ --bb-color-muted: var(--bb-color-muted-on-surface);
52
54
  }
53
55
 
54
56
  .bb-pm-chip-button,
@@ -104,6 +106,7 @@
104
106
  border: 1px solid var(--bb-color-border);
105
107
  border-radius: 8px;
106
108
  background: var(--bb-color-surface);
109
+ --bb-color-muted: var(--bb-color-muted-on-surface);
107
110
  }
108
111
 
109
112
  .bb-pm-option {
@@ -115,6 +118,7 @@
115
118
  .bb-pm-option.is-selected {
116
119
  border-color: var(--bb-color-accent);
117
120
  background: var(--bb-color-accent-soft);
121
+ --bb-color-muted: var(--bb-color-muted-on-surface);
118
122
  }
119
123
 
120
124
  .bb-pm-ledger .bb-ws-ledger-row {
@@ -522,6 +522,7 @@ button.bb-pkw-context-task-title:focus-visible { outline: 3px solid var(--bb-col
522
522
  .bb-pkw-graph-item.is-selected {
523
523
  border-color: var(--bb-color-accent);
524
524
  background: var(--bb-color-accent-soft);
525
+ --bb-color-muted: var(--bb-color-muted-on-surface);
525
526
  }
526
527
 
527
528
  .bb-pkw-graph-item strong {
@@ -547,6 +548,7 @@ button.bb-pkw-context-task-title:focus-visible { outline: 3px solid var(--bb-col
547
548
  border-radius: var(--bb-radius-sm);
548
549
  padding: var(--bb-space-3);
549
550
  background: var(--bb-color-surface);
551
+ --bb-color-muted: var(--bb-color-muted-on-surface);
550
552
  }
551
553
 
552
554
  .bb-pkw-evidence-head strong {
@@ -1119,10 +1121,12 @@ button.bb-pkw-context-task-title:focus-visible { outline: 3px solid var(--bb-col
1119
1121
 
1120
1122
  .bb-pkw-graph-item:hover {
1121
1123
  background: var(--bb-color-surface);
1124
+ --bb-color-muted: var(--bb-color-muted-on-surface);
1122
1125
  }
1123
1126
 
1124
1127
  .bb-pkw-graph-item.is-selected {
1125
1128
  background: var(--bb-color-accent-soft);
1129
+ --bb-color-muted: var(--bb-color-muted-on-surface);
1126
1130
  box-shadow: inset 3px 0 var(--bb-color-accent);
1127
1131
  }
1128
1132
 
@@ -1,4 +1,4 @@
1
- import { workspaceTabList } from './workspace-kit.js';
1
+ import { workspaceTabStrip } from './workspace-kit.js';
2
2
  /*
3
3
  * Shared project knowledge workspace.
4
4
  *
@@ -1254,7 +1254,7 @@ export function createProjectKnowledgeWorkspace({
1254
1254
  });
1255
1255
  const body = makeElement(doc, 'div', { className: 'bb-pkw-body' });
1256
1256
  const tabs = makeElement(doc, 'div', { className: 'bb-pkw-tabs', attrs: { role: 'tablist', 'aria-label': 'プロジェクト情報の表示' } });
1257
- workspaceTabList(tabs);
1257
+ const tabStrip = workspaceTabStrip(tabs);
1258
1258
  const panels = makeElement(doc, 'div', { className: 'bb-pkw-panels' });
1259
1259
  root.append(makeElement(doc, 'div', { className: 'bb-pkw-kicker', text: 'プロジェクトの記録' }));
1260
1260
  const header = makeElement(doc, 'header', { className: 'bb-pkw-header' });
@@ -1562,6 +1562,7 @@ export function createProjectKnowledgeWorkspace({
1562
1562
  if (typeof onTabChange === 'function') onTabChange(activeTab);
1563
1563
  teardownGraph();
1564
1564
  tabs.replaceChildren(tabButton('概要', 'overview'), tabButton('情報を探す', 'graph'));
1565
+ tabStrip.update();
1565
1566
  panels.replaceChildren();
1566
1567
  const actions = { openOverview, openWorkList, openWorkDetail, openRecordDetail, openSectionList, openGraphEntity: selectAndExplore,
1567
1568
  retryParticipants: typeof onRetryProject === 'function' ? () => onRetryProject(workspaceProjectId) : null,
@@ -132,6 +132,7 @@ body:has(#brainbase-value-proof-review) {
132
132
  .bb-ws-button.bb-vpr-toggle.is-pressed {
133
133
  border-color: var(--bb-color-accent);
134
134
  background: var(--bb-color-accent-soft);
135
+ --bb-color-muted: var(--bb-color-muted-on-surface);
135
136
  color: var(--bb-color-accent-strong);
136
137
  box-shadow: inset 3px 0 var(--bb-color-accent);
137
138
  }
@@ -171,10 +172,12 @@ body:has(#brainbase-value-proof-review) {
171
172
 
172
173
  .bb-vpr-map-ledger.is-unrecorded .bb-ws-ledger-row:not(.bb-ws-ledger-head) {
173
174
  background: var(--bb-color-surface);
175
+ --bb-color-muted: var(--bb-color-muted-on-surface);
174
176
  }
175
177
 
176
178
  .bb-vpr-map-ledger.is-unrecorded .bb-ws-ledger-row.is-selected {
177
179
  background: var(--bb-color-accent-soft);
180
+ --bb-color-muted: var(--bb-color-muted-on-surface);
178
181
  }
179
182
 
180
183
  /* Highlights: compact ledgers of judgments, above the map. */
@@ -342,6 +345,7 @@ body:has(#brainbase-value-proof-review) {
342
345
 
343
346
  .bb-vpr-item.is-selected {
344
347
  background: var(--bb-color-accent-soft);
348
+ --bb-color-muted: var(--bb-color-muted-on-surface);
345
349
  box-shadow: inset 3px 0 var(--bb-color-accent);
346
350
  }
347
351
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  .bb-ws-breadcrumb {
15
15
  margin-bottom: 24px;
16
- color: var(--bb-color-quiet);
16
+ color: var(--bb-color-muted);
17
17
  font-size: 11px;
18
18
  letter-spacing: .02em;
19
19
  }
@@ -73,6 +73,7 @@
73
73
  border-radius: var(--bb-radius-sm);
74
74
  padding: 7px 10px;
75
75
  background: var(--bb-color-accent-soft);
76
+ --bb-color-muted: var(--bb-color-muted-on-surface);
76
77
  color: var(--bb-color-accent-strong);
77
78
  font-size: 11px;
78
79
  font-weight: var(--bb-font-weight-medium);
@@ -97,6 +98,7 @@
97
98
  border-left: 3px solid var(--bb-color-accent);
98
99
  padding: 14px 16px;
99
100
  background: var(--bb-color-surface);
101
+ --bb-color-muted: var(--bb-color-muted-on-surface);
100
102
  color: var(--bb-color-muted);
101
103
  font-size: 12px;
102
104
  line-height: 1.65;
@@ -163,7 +165,7 @@
163
165
  color: var(--bb-color-action-text);
164
166
  }
165
167
 
166
- .bb-ws-button.is-primary:hover {
168
+ .bb-ws-button.is-primary:hover:not(:disabled) {
167
169
  border-color: var(--bb-color-action-hover);
168
170
  background: var(--bb-color-action-hover);
169
171
  }
@@ -276,11 +278,13 @@
276
278
 
277
279
  .bb-ws-ledger-row.is-selectable:hover {
278
280
  background: var(--bb-color-surface);
281
+ --bb-color-muted: var(--bb-color-muted-on-surface);
279
282
  }
280
283
 
281
284
  .bb-ws-ledger-row.is-selected,
282
285
  .bb-ws-ledger-row.is-selectable.is-selected:hover {
283
286
  background: var(--bb-color-accent-soft);
287
+ --bb-color-muted: var(--bb-color-muted-on-surface);
284
288
  box-shadow: inset 3px 0 var(--bb-color-accent);
285
289
  }
286
290
 
@@ -569,10 +573,10 @@
569
573
  margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--bb-color-border);
570
574
  border-radius: 0; background: var(--bb-color-panel); color: var(--bb-color-ink); box-shadow: var(--bb-shadow-drawer); overflow: auto;
571
575
  }
572
- .bb-ws-drawer[open] { animation: bb-ws-drawer-in 180ms ease-out; }
576
+ .bb-ws-drawer[open] { animation: bb-ws-drawer-in var(--bb-duration-drawer-in, 180ms) var(--bb-ease-drawer-in, ease-out); }
573
577
  .bb-ws-drawer::backdrop { background: var(--bb-color-drawer-overlay); }
574
- .bb-ws-drawer.is-closing { animation: bb-ws-drawer-out 280ms ease-in both; pointer-events: none; }
575
- .bb-ws-drawer.is-closing::backdrop { animation: bb-ws-drawer-backdrop-out 280ms ease-in both; }
578
+ .bb-ws-drawer.is-closing { animation: bb-ws-drawer-out var(--bb-duration-drawer-out, 150ms) var(--bb-ease-drawer, cubic-bezier(0.32, 0.72, 0, 1)) both; pointer-events: none; }
579
+ .bb-ws-drawer.is-closing::backdrop { animation: bb-ws-drawer-backdrop-out var(--bb-duration-drawer-out, 150ms) var(--bb-ease-drawer, cubic-bezier(0.32, 0.72, 0, 1)) both; }
576
580
  .bb-ws-drawer .bb-ws-dialog-head { align-items: center; padding: 14px 16px 14px 28px; }
577
581
  .bb-ws-drawer .bb-ws-dialog-head h2 { font-weight: var(--bb-font-weight-medium); line-height: 1.35; }
578
582
  .bb-ws-drawer .bb-ws-dialog-body { padding: 18px 28px 32px; }
@@ -616,7 +620,7 @@
616
620
  }
617
621
  .bb-ws-loading-stage-title { margin: 0; font-weight: var(--bb-font-weight-medium); }
618
622
  .bb-ws-loading-stage-detail { margin: 0; color: var(--bb-color-muted, inherit); font-size: .875rem; }
619
- .bb-ws-error-card.is-dismissing { animation: bb-ws-notification-out 450ms ease both; pointer-events: none; }
623
+ .bb-ws-error-card.is-dismissing { animation: bb-ws-notification-out var(--bb-duration-toast-out, 200ms) var(--bb-ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; pointer-events: none; }
620
624
  @keyframes bb-ws-notification-out { to { opacity: 0; transform: translateX(28px); } }
621
625
  @media (max-width:760px) { .bb-ws-drawer { width: 100vw; border-left: 0; } }
622
626
  @media (prefers-reduced-motion:reduce) {
@@ -649,7 +653,8 @@
649
653
  .bb-ws-combobox-popup[hidden], .bb-ws-combobox-search[hidden] { display: none !important; }
650
654
  .bb-ws-combobox-search {
651
655
  box-sizing: border-box; width: 100%; min-height: 34px; padding: 0 10px;
652
- border: 1px solid var(--bb-color-border-strong); border-radius: var(--bb-radius-sm); background: var(--bb-color-surface); color: var(--bb-color-ink); font: inherit; font-size: 13px;
656
+ border: 1px solid var(--bb-color-border-strong); border-radius: var(--bb-radius-sm); background: var(--bb-color-surface);
657
+ --bb-color-muted: var(--bb-color-muted-on-surface); color: var(--bb-color-ink); font: inherit; font-size: 13px;
653
658
  }
654
659
  .bb-ws-combobox-search:focus-visible { outline: 2px solid var(--bb-color-focus); outline-offset: 0; }
655
660
  .bb-ws-combobox-list { max-height: 300px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
@@ -660,7 +665,8 @@
660
665
  }
661
666
  .bb-ws-combobox-option::before { content: ''; color: var(--bb-color-accent-strong); font-weight: var(--bb-font-weight-medium); }
662
667
  .bb-ws-combobox-option[aria-selected='true']::before { content: '✓'; }
663
- .bb-ws-combobox-option:hover, .bb-ws-combobox-option.is-active { background: var(--bb-color-accent-soft); }
668
+ .bb-ws-combobox-option:hover, .bb-ws-combobox-option.is-active { background: var(--bb-color-accent-soft);
669
+ --bb-color-muted: var(--bb-color-muted-on-surface); }
664
670
  .bb-ws-combobox-option.is-active { box-shadow: inset 2px 0 0 var(--bb-color-accent); }
665
671
  .bb-ws-combobox-option-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
666
672
  .bb-ws-combobox-option-hint { color: var(--bb-color-muted); font-size: 12px; white-space: nowrap; }
@@ -710,6 +716,7 @@
710
716
  .bb-ws-neutral-controls
711
717
  .bb-ws-combobox-option:is(:hover, .is-active) {
712
718
  background: var(--bb-color-surface);
719
+ --bb-color-muted: var(--bb-color-muted-on-surface);
713
720
  box-shadow: none;
714
721
  }
715
722
  .bb-ws-neutral-controls
@@ -732,13 +739,15 @@
732
739
  .bb-ws-toolbar-query > .bb-ws-action-icon { position: absolute; left: var(--bb-space-2); top: 50%; transform: translateY(-50%); color: var(--bb-color-muted); pointer-events: none; }
733
740
  .bb-ws-compact-toolbar .bb-ws-toolbar-query input { width: 100%; min-width: 0; height: var(--bb-control-compact-height); min-height: var(--bb-control-compact-height); box-sizing: border-box; padding: var(--bb-space-1) var(--bb-space-2) var(--bb-space-1) calc(var(--bb-space-2) * 2 + var(--bb-toolbar-icon-size)); font-size: var(--bb-toolbar-font-size); }
734
741
  .bb-ws-toolbar-filter-group { display: inline-flex; align-items: center; flex: none; border-radius: var(--bb-radius-sm); }
735
- .bb-ws-toolbar-filter-group.is-filtered { background: var(--bb-color-filter-selected); }
742
+ .bb-ws-toolbar-filter-group.is-filtered { background: var(--bb-color-filter-selected);
743
+ --bb-color-muted: var(--bb-color-muted-on-surface); }
736
744
  .bb-ws-compact-toolbar :is(.bb-ws-toolbar-filter, .bb-ws-toolbar-sort-trigger, .bb-ws-toolbar-clear) { display: inline-flex; align-items: center; justify-content: center; gap: var(--bb-space-1); white-space: nowrap; height: var(--bb-control-compact-height); min-height: var(--bb-control-compact-height); box-sizing: border-box; padding: var(--bb-space-1) var(--bb-space-2); border: 0; border-radius: var(--bb-radius-sm); background: transparent; color: var(--bb-color-muted); font-size: var(--bb-toolbar-font-size); font-weight: 400; box-shadow: none; }
737
745
  .bb-ws-compact-toolbar .bb-ws-toolbar-filter { position: relative; padding-right: calc(var(--bb-space-2) + var(--bb-toolbar-clear-width)); }
738
746
  .bb-ws-toolbar-filter-group.is-filtered .bb-ws-toolbar-filter { padding-right: var(--bb-space-2); }
739
747
  .bb-ws-toolbar-filter-group.is-filtered :is(.bb-ws-toolbar-filter, .bb-ws-toolbar-clear) { color: var(--bb-color-brand-indigo); }
740
748
  .bb-ws-compact-toolbar .bb-ws-toolbar-filter::after { display: none; }
741
- .bb-ws-compact-toolbar .bb-ws-toolbar-filter-group:not(.is-filtered) .bb-ws-toolbar-filter:hover, .bb-ws-compact-toolbar .bb-ws-toolbar-sort-trigger:hover { background: var(--bb-color-surface); color: var(--bb-color-ink); }
749
+ .bb-ws-compact-toolbar .bb-ws-toolbar-filter-group:not(.is-filtered) .bb-ws-toolbar-filter:hover, .bb-ws-compact-toolbar .bb-ws-toolbar-sort-trigger:hover { background: var(--bb-color-surface);
750
+ --bb-color-muted: var(--bb-color-muted-on-surface); color: var(--bb-color-ink); }
742
751
  .bb-ws-toolbar-caret { position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; justify-content: center; width: var(--bb-toolbar-clear-width); height: var(--bb-control-compact-height); font-size: 18px; line-height: 1; transform: translate(var(--bb-toolbar-caret-x), var(--bb-toolbar-caret-y)); pointer-events: none; }
743
752
  .bb-ws-toolbar-clear-slot { display: inline-flex; width: var(--bb-toolbar-clear-width); height: var(--bb-control-compact-height); flex: none; }
744
753
  .bb-ws-compact-toolbar .bb-ws-toolbar-clear { width: var(--bb-toolbar-clear-width); padding: 0; font-size: 20px; }
@@ -831,6 +840,26 @@
831
840
  line-height: var(--bb-tab-count-size);
832
841
  font-weight: var(--bb-tab-font-weight);
833
842
  }
843
+ /* workspaceTabStrip: one bar slides between tabs once the selected tab was measured. */
844
+ .bb-ws-tabs.is-indicator-ready { position: relative; }
845
+ .bb-ws-tabs.is-indicator-ready > :is([role="tab"], a, button):is([aria-selected="true"], [aria-current="page"], [aria-pressed="true"]),
846
+ .bb-ws-tabs.is-indicator-ready > :is([role="tab"], a, button):is([aria-selected="true"], [aria-current="page"], [aria-pressed="true"]):hover {
847
+ box-shadow: none;
848
+ }
849
+ .bb-ws-tabs.is-indicator-ready::after {
850
+ content: "";
851
+ position: absolute;
852
+ left: 0;
853
+ bottom: 0;
854
+ width: var(--bb-tab-indicator-width, 0px);
855
+ height: var(--bb-tab-indicator-size);
856
+ background: var(--bb-color-ink);
857
+ transform: translateX(var(--bb-tab-indicator-x, 0px));
858
+ transition: transform var(--bb-tab-indicator-duration) var(--bb-tab-indicator-ease), width var(--bb-tab-indicator-duration) var(--bb-tab-indicator-ease);
859
+ pointer-events: none;
860
+ }
861
+ .bb-ws-tabs.is-indicator-instant::after { transition: none; }
862
+ @media (prefers-reduced-motion: reduce) { .bb-ws-tabs.is-indicator-ready::after { transition: none; } }
834
863
  .bb-ws-tabs::-webkit-scrollbar { display: none; }
835
864
  .bb-ws-tabs[hidden],
836
865
  .bb-ws-tabs > [hidden] { display: none; }
@@ -850,7 +879,8 @@
850
879
  .bb-ws-combobox-multiple .bb-ws-combobox-option,
851
880
  .bb-ws-combobox-multiple .bb-ws-combobox-option.is-active,
852
881
  .bb-ws-combobox-multiple .bb-ws-combobox-option[aria-selected='true'] { background: transparent; box-shadow: none; }
853
- .bb-ws-combobox-multiple .bb-ws-combobox-option:hover { background: var(--bb-color-surface); }
882
+ .bb-ws-combobox-multiple .bb-ws-combobox-option:hover { background: var(--bb-color-surface);
883
+ --bb-color-muted: var(--bb-color-muted-on-surface); }
854
884
  .bb-ws-combobox-multiple .bb-ws-combobox-list:focus-visible .bb-ws-combobox-option.is-active { outline: 1px solid var(--bb-color-muted); outline-offset: -1px; }
855
885
  .bb-ws-combobox-status[hidden] { display: none; }
856
886
 
@@ -328,6 +328,14 @@ export function workspaceHelp(doc, { text, label } = {}) {
328
328
  const drawerClosings = new WeakMap();
329
329
  const notificationClosings = new WeakMap();
330
330
  const reducedMotion = node => node.ownerDocument?.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches === true;
331
+ const animationFallback = (node, margin, fallback) => {
332
+ const durations = node.ownerDocument?.defaultView?.getComputedStyle?.(node).animationDuration;
333
+ const duration = Math.max(...(durations ?? '').split(',').map(value => {
334
+ const match = value.trim().match(/^(\d*\.?\d+)(ms|s)$/);
335
+ return match ? Number(match[1]) * (match[2] === 's' ? 1000 : 1) : NaN;
336
+ }));
337
+ return Number.isFinite(duration) && duration > 0 ? duration + margin : fallback;
338
+ };
331
339
 
332
340
  /** Apply the same native-dialog presentation to host-owned and kit drawers. */
333
341
  export function workspaceApplyDrawer(dialog) {
@@ -358,7 +366,7 @@ export function workspaceCloseDrawer(dialog, finish) {
358
366
  dialog.addEventListener('animationend', ended);
359
367
  dialog.addEventListener('close', cancel);
360
368
  dialog.classList.add('is-closing');
361
- timer = setTimeout(complete, 360); // Animation cancellation / background-tab fallback.
369
+ timer = setTimeout(complete, animationFallback(dialog, 70, 220)); // Animation cancellation / background-tab fallback.
362
370
  return cancel;
363
371
  }
364
372
 
@@ -496,14 +504,14 @@ export function workspaceDismissNotification(card, onDismiss) {
496
504
  const complete = () => { if (!active) return; cancel(); remove(); onDismiss?.(); };
497
505
  const ended = event => { if (event.target === card && event.animationName === 'bb-ws-notification-out') complete(); };
498
506
  notificationClosings.set(card, cancel); card.addEventListener('animationend', ended);
499
- card.classList.add('is-dismissing'); timer = setTimeout(complete, 500);
507
+ card.classList.add('is-dismissing'); timer = setTimeout(complete, animationFallback(card, 50, 250));
500
508
  return cancel;
501
509
  }
502
510
 
503
- /** Persistent, initially closed notification. The caller owns its lifecycle. */
504
- export function workspaceErrorCard(doc, { title, message, tone = 'danger', onRetry } = {}) {
511
+ /** Persistent notification, closed unless `open`. The caller owns its lifecycle. */
512
+ export function workspaceErrorCard(doc, { title, message, tone = 'danger', onRetry, open = false } = {}) {
505
513
  const card = workspaceNotificationCard(doc, { tone, className: 'bb-ws-error-card', role: 'listitem' });
506
- const details = el(doc, 'details');
514
+ const details = el(doc, 'details'); details.open = open;
507
515
  const summary = el(doc, 'summary', { attrs: { 'aria-label': `${title}の通知` } });
508
516
  summary.append(el(doc, 'span', { className: 'bb-ws-error-symbol', text: '!', attrs: { 'aria-hidden': 'true' } }), el(doc, 'span', { text: title }));
509
517
  details.append(summary, el(doc, 'p', { text: message })); card.append(details);
@@ -783,6 +791,112 @@ export function workspaceTabList(root) {
783
791
  return root;
784
792
  }
785
793
 
794
+ const TAB_STRIP_KEYS = new Set(['ArrowLeft', 'ArrowRight', 'Home', 'End']);
795
+ // How long a key move may wait for the host to redraw before focus is no longer brought back.
796
+ const TAB_STRIP_FOCUS_WINDOW_MS = 5000;
797
+ const tabStrips = new WeakMap();
798
+ const tabStripMemory = new Map();
799
+ const isEnabledTab = node => node?.getAttribute?.('role') === 'tab' && !node.hidden && !node.disabled && node.getAttribute('aria-disabled') !== 'true';
800
+ const isSelectedTab = node => node?.getAttribute?.('aria-selected') === 'true' || node?.getAttribute?.('aria-current') === 'page' || node?.getAttribute?.('aria-pressed') === 'true';
801
+
802
+ /** Opt-in keyboard switching and a sliding indicator on top of `workspaceTabList`.
803
+ * Selection stays with the host: a key move calls the tab's own click(). Hosts
804
+ * that redraw the strip as new nodes pass the same `memoryKey`; hosts that keep
805
+ * the root and replace its children call `update()` after drawing.
806
+ */
807
+ export function workspaceTabStrip(root, { memoryKey } = {}) {
808
+ workspaceTabList(root);
809
+ if (tabStrips.has(root)) return tabStrips.get(root);
810
+ const doc = root.ownerDocument;
811
+ const view = doc?.defaultView;
812
+ const schedule = typeof view?.requestAnimationFrame === 'function' ? fn => view.requestAnimationFrame(fn) : fn => { Promise.resolve().then(fn); };
813
+ const key = typeof memoryKey === 'string' && memoryKey ? memoryKey : null;
814
+ if (key && !tabStripMemory.has(key)) tabStripMemory.set(key, { x: null, width: null, focusUntil: 0 });
815
+ const local = { x: null, width: null, focusUntil: 0 };
816
+ const memory = () => (key ? tabStripMemory.get(key) : local);
817
+ const children = () => Array.from(root.children ?? []);
818
+ const tabs = () => children().filter(isEnabledTab);
819
+ const selectedTab = () => children().find(isSelectedTab) ?? null;
820
+ let placed = false;
821
+ let destroyed = false;
822
+
823
+ const setIndicator = ({ x, width }) => {
824
+ root.style.setProperty('--bb-tab-indicator-x', `${x}px`);
825
+ root.style.setProperty('--bb-tab-indicator-width', `${width}px`);
826
+ };
827
+ const placeIndicator = tab => {
828
+ const width = tab?.offsetWidth;
829
+ if (!(width > 0) || typeof root.style?.setProperty !== 'function') {
830
+ toggleWorkspaceClass(root, 'is-indicator-ready', false); placed = false; return;
831
+ }
832
+ // Measure from the strip itself: before the strip is positioned, offsetLeft counts from an outer box.
833
+ const box = tab.getBoundingClientRect?.();
834
+ const origin = root.getBoundingClientRect?.();
835
+ const target = box && origin ? { x: box.left - origin.left + (root.scrollLeft || 0), width: box.width } : { x: tab.offsetLeft, width };
836
+ const mem = memory();
837
+ if (!placed) {
838
+ // A new strip starts where the last strip with the same key left the bar, then slides.
839
+ const from = mem.width > 0 && !reducedMotion(root) ? mem : target;
840
+ toggleWorkspaceClass(root, 'is-indicator-instant', true);
841
+ setIndicator(from); toggleWorkspaceClass(root, 'is-indicator-ready', true);
842
+ void root.offsetWidth;
843
+ toggleWorkspaceClass(root, 'is-indicator-instant', false);
844
+ }
845
+ setIndicator(target); placed = true;
846
+ mem.x = target.x; mem.width = target.width;
847
+ };
848
+ const restoreFocus = () => {
849
+ const mem = memory();
850
+ if (!(mem.focusUntil > Date.now())) return;
851
+ const target = selectedTab();
852
+ if (!target || root.isConnected === false) return;
853
+ const active = doc?.activeElement ?? null;
854
+ if (active === target) { mem.focusUntil = 0; return; }
855
+ const lost = !active || active === doc.body || active.isConnected === false;
856
+ // Focus moved somewhere else: the viewer chose it, so leave it there.
857
+ if (!lost && !root.contains?.(active)) { mem.focusUntil = 0; return; }
858
+ // Still on a tab of this strip: the host has not finished selecting yet.
859
+ if (!lost) return;
860
+ target.focus?.({ preventScroll: true });
861
+ target.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
862
+ mem.focusUntil = 0;
863
+ };
864
+ const update = () => {
865
+ // A strip the host already replaced must not move the shared memory back.
866
+ if (destroyed || root.isConnected === false) return;
867
+ const all = tabs();
868
+ const selected = selectedTab();
869
+ const focusable = all.includes(selected) ? selected : all[0];
870
+ for (const tab of all) tab.setAttribute('tabindex', tab === focusable ? '0' : '-1');
871
+ placeIndicator(selected);
872
+ restoreFocus();
873
+ };
874
+ const keydown = event => {
875
+ if (!TAB_STRIP_KEYS.has(event.key) || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
876
+ const all = tabs();
877
+ const current = all.indexOf(event.target);
878
+ if (current < 0 || all.length < 2) return;
879
+ event.preventDefault?.();
880
+ const last = all.length - 1;
881
+ const index = event.key === 'Home' ? 0 : event.key === 'End' ? last : (current + (event.key === 'ArrowRight' ? 1 : last)) % all.length;
882
+ const next = all[index];
883
+ if (next === event.target) return;
884
+ memory().focusUntil = Date.now() + TAB_STRIP_FOCUS_WINDOW_MS;
885
+ next.focus?.({ preventScroll: true });
886
+ if (!isSelectedTab(next)) next.click?.();
887
+ schedule(update);
888
+ };
889
+ root.addEventListener?.('keydown', keydown);
890
+ const controller = { root, update, destroy() {
891
+ destroyed = true; root.removeEventListener?.('keydown', keydown); tabStrips.delete(root);
892
+ toggleWorkspaceClass(root, 'is-indicator-ready', false);
893
+ root.style?.removeProperty?.('--bb-tab-indicator-x'); root.style?.removeProperty?.('--bb-tab-indicator-width');
894
+ } };
895
+ tabStrips.set(root, controller);
896
+ schedule(update);
897
+ return controller;
898
+ }
899
+
786
900
  /** The shared shallow dropdown chevron, sized and colored through shared CSS. */
787
901
  export function workspaceDropdownChevron(doc) {
788
902
  const wrap = el(doc, 'span', { className: 'bb-ws-combobox-chevron', attrs: { 'aria-hidden': 'true' } });
@@ -223,7 +223,7 @@
223
223
  width: calc(var(--bb-world-panel-width) - var(--bb-world-right-inset));
224
224
  overflow: hidden;
225
225
  transform: translateX(calc(100% + 20px));
226
- transition: transform .24s ease, visibility .24s;
226
+ transition: transform .24s var(--bb-ease-drawer, cubic-bezier(0.32, 0.72, 0, 1)), visibility .24s;
227
227
  }
228
228
  .bb-world-canvas-ui .bb-world-canvas-drawer.is-open { transform: translateX(0); }
229
229
  .bb-world-canvas-ui .bb-world-canvas-panel-top {
@@ -320,7 +320,7 @@
320
320
  overflow: hidden;
321
321
  opacity: 0;
322
322
  transform: translateY(24px);
323
- transition: transform .24s ease, opacity .24s ease, visibility .24s;
323
+ transition: transform .24s var(--bb-ease-out, cubic-bezier(0.23, 1, 0.32, 1)), opacity .24s var(--bb-ease-out, cubic-bezier(0.23, 1, 0.32, 1)), visibility .24s;
324
324
  }
325
325
  .bb-world-canvas-ui .bb-world-canvas-help.is-open { opacity: 1; transform: translateY(0); }
326
326
  .bb-world-canvas-ui .bb-world-canvas-help-body,
@@ -243,6 +243,7 @@
243
243
 
244
244
  .bb-wm .bb-ws-ledger-row.is-superseded {
245
245
  background: var(--bb-color-surface);
246
+ --bb-color-muted: var(--bb-color-muted-on-surface);
246
247
  }
247
248
 
248
249
  .bb-wm .bb-ws-ledger-row.is-superseded .bb-wm-cell.is-value .bb-wm-main {