dsh-biocore 0.1.9 → 0.2.0

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": "dsh-biocore",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "BioCore DSH UI: per-session state tab, standalone instrument panel, /api/biocore/state, session/event one_turn updates, /bio sync.",
6
6
  "main": "lib/index.js",
@@ -10,15 +10,17 @@
10
10
  var STORAGE_KEY = 'biocore-panel-layout-v2'
11
11
  var DEFAULT_ORDER = [
12
12
  'mood', 'tension', 'warmth', 'heaviness', 'clarity', 'chart',
13
- 'memory', 'memory-summary', 'metrics', 'trace', 'runtime',
13
+ 'memory', 'memory-summary', 'metrics',
14
14
  'persona', 'model', 'switches', 'expression', 'advanced',
15
+ 'runtime', 'trace',
15
16
  ]
16
- var TAB_ORDER = ['dashboard', 'memory', 'settings', 'diagnosis']
17
+ var TAB_ORDER = ['dashboard', 'memory', 'relation', 'settings', 'tools']
17
18
  var TAB_GROUPS = Object.freeze({
18
19
  dashboard: ['mood', 'tension', 'warmth', 'heaviness', 'clarity', 'chart'],
19
20
  memory: ['memory', 'memory-summary'],
21
+ relation: ['metrics'],
20
22
  settings: ['persona', 'model', 'switches', 'expression', 'advanced'],
21
- diagnosis: ['metrics', 'trace', 'runtime'],
23
+ tools: ['runtime', 'trace'],
22
24
  })
23
25
 
24
26
  function defaultLayout() {
package/ui/panel.css CHANGED
@@ -1,4 +1,4 @@
1
- /* BioCore instrument panel — FlClash mobile spec. | layout v26
1
+ /* BioCore instrument panel — FlClash mobile spec. | layout v27
2
2
  1) tokens 2) base 3) topbar 4) cards 5) figures 6) lists 7) forms
3
3
  8) switches 9) nav 10) edit mode 11) desktop.
4
4
  Rule: one component rule per selector, px values from docs/DSH-PANEL-FLCLASH-SPEC.md. */
@@ -499,6 +499,9 @@ canvas#moodChart { display: block; width: 100%; height: 150px; }
499
499
  .expression-fields { grid-template-columns: 1fr; }
500
500
  }
501
501
 
502
+ /* bug fix: whole channels block (title included) leaves non-dashboard tabs */
503
+ .panel:not(.tab-dashboard):not(.layout-editing) .channels-wrap { display: none; }
504
+
502
505
  /* ---------- 13. layout guards (防止旧版/串版样式压扁版面) ---------- */
503
506
  html, body { overflow-x: clip; }
504
507
  body { max-width: 100%; }
@@ -794,7 +797,12 @@ body { max-width: 100%; }
794
797
  grid-template-columns: repeat(12, minmax(0, 1fr));
795
798
  gap: 12px;
796
799
  }
800
+ .panel:not(.tab-dashboard) #cards { align-content: start; }
797
801
  .panel:not(.tab-dashboard) #cards > * { grid-column: span 6; }
802
+ .panel:not(.tab-dashboard) #cards > [data-card-id="metrics"] { grid-column: span 8; }
803
+ .panel:not(.tab-dashboard) #cards > [data-card-id="trace"] { grid-column: span 8; }
804
+ .panel:not(.tab-dashboard) #cards > [data-card-id="runtime"] { grid-column: span 4; }
805
+ .panel:not(.tab-dashboard) #cards > [data-card-id="model"] { grid-column: span 12; }
798
806
  .panel:not(.tab-dashboard) #cards > .channels-wrap { grid-column: span 12; }
799
807
  .panel:not(.tab-dashboard) .channels-wrap .channel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
800
808
  .panel:not(.tab-dashboard) .add-cards { grid-column: 1 / -1; }
package/ui/panel.html CHANGED
@@ -1,11 +1,11 @@
1
1
  <!doctype html>
2
- <!-- BioCore panel layout v26: mobile = FlClash phone (masthead/channels 2x2/pill tabbar); desktop >=1024 = left rail + 12-col 5-row dashboard -->
2
+ <!-- BioCore panel layout v27: mobile = FlClash phone (masthead/channels 2x2/pill tabbar); desktop >=1024 = left rail + 12-col 5-row dashboard -->
3
3
  <html lang="zh-CN">
4
4
  <head>
5
5
  <meta charset="utf-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  <title>生物核 · 仪器面板</title>
8
- <link rel="stylesheet" href="panel.css?v=26">
8
+ <link rel="stylesheet" href="panel.css?v=27">
9
9
  </head>
10
10
  <body>
11
11
  <aside class="rail" id="rail" aria-label="主导航">
@@ -15,8 +15,9 @@
15
15
  <nav class="rail-nav" aria-label="页面导航">
16
16
  <button class="rail-item active" type="button" data-tab="dashboard" title="仪表盘" aria-selected="true"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="6" height="6" rx="1.5"/><rect x="11" y="3" width="6" height="6" rx="1.5"/><rect x="3" y="11" width="6" height="6" rx="1.5"/><rect x="11" y="11" width="6" height="6" rx="1.5"/></svg><span>仪表盘</span></button>
17
17
  <button class="rail-item" type="button" data-tab="memory" title="记忆" aria-selected="false"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 3.5h10v13l-5-3-5 3z"/></svg><span>记忆</span></button>
18
- <button class="rail-item" type="button" data-tab="settings" title="设置" aria-selected="false"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="10" cy="10" r="2.6"/><path d="M10 3.2v2M10 14.8v2M3.2 10h2M14.8 10h2M5.2 5.2l1.4 1.4M13.4 13.4l1.4 1.4M14.8 5.2l-1.4 1.4M6.6 13.4l-1.4 1.4"/></svg><span>设置</span></button>
19
- <button class="rail-item" type="button" data-tab="diagnosis" title="诊断" aria-selected="false"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 11h3.5l2-5 3 10 2-5H17"/></svg><span>诊断</span></button>
18
+ <button class="rail-item" type="button" data-tab="relation" title="关系" aria-selected="false"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 16.2s-5.4-3.4-5.4-7a2.9 2.9 0 015.4-1.7 2.9 2.9 0 015.4 1.7c0 3.6-5.4 7-5.4 7z"/></svg><span>关系</span></button>
19
+ <button class="rail-item" type="button" data-tab="settings" title="配置" aria-selected="false"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="10" cy="10" r="2.6"/><path d="M10 3.2v2M10 14.8v2M3.2 10h2M14.8 10h2M5.2 5.2l1.4 1.4M13.4 13.4l1.4 1.4M14.8 5.2l-1.4 1.4M6.6 13.4l-1.4 1.4"/></svg><span>配置</span></button>
20
+ <button class="rail-item" type="button" data-tab="tools" title="工具" aria-selected="false"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11.6 4.4a3.2 3.2 0 00-4 4l-4.1 4.1 2 2 4.1-4.1a3.2 3.2 0 004-4l-2 2-1.6-1.6 1.6-2.4z"/></svg><span>工具</span></button>
20
21
  </nav>
21
22
  </aside>
22
23
  <main class="panel" id="panel">
@@ -58,8 +59,9 @@
58
59
  <nav class="card desk-card desk-seg" id="segTabs" aria-label="分组导航">
59
60
  <button class="seg-item active" type="button" data-tab="dashboard" aria-selected="true">仪表盘</button>
60
61
  <button class="seg-item" type="button" data-tab="memory" aria-selected="false">记忆</button>
61
- <button class="seg-item" type="button" data-tab="settings" aria-selected="false">设置</button>
62
- <button class="seg-item" type="button" data-tab="diagnosis" aria-selected="false">诊断</button>
62
+ <button class="seg-item" type="button" data-tab="relation" aria-selected="false">关系</button>
63
+ <button class="seg-item" type="button" data-tab="settings" aria-selected="false">配置</button>
64
+ <button class="seg-item" type="button" data-tab="tools" aria-selected="false">工具</button>
63
65
  </nav>
64
66
 
65
67
  <section class="card desk-card desk-switch" aria-label="安全闸">
@@ -376,15 +378,19 @@
376
378
  <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 3.5h10v13l-5-3-5 3z"/></svg>
377
379
  <span>记忆</span>
378
380
  </button>
381
+ <button class="tab-item" type="button" data-tab="relation" aria-selected="false">
382
+ <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 16.2s-5.4-3.4-5.4-7a2.9 2.9 0 015.4-1.7 2.9 2.9 0 015.4 1.7c0 3.6-5.4 7-5.4 7z"/></svg>
383
+ <span>关系</span>
384
+ </button>
379
385
  <button class="tab-item" type="button" data-tab="settings" aria-selected="false">
380
386
  <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="10" cy="10" r="2.6"/><path d="M10 3.2v2M10 14.8v2M3.2 10h2M14.8 10h2M5.2 5.2l1.4 1.4M13.4 13.4l1.4 1.4M14.8 5.2l-1.4 1.4M6.6 13.4l-1.4 1.4"/></svg>
381
- <span>设置</span>
387
+ <span>配置</span>
382
388
  </button>
383
- <button class="tab-item" type="button" data-tab="diagnosis" aria-selected="false">
384
- <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 11h3.5l2-5 3 10 2-5H17"/></svg>
385
- <span>诊断</span>
389
+ <button class="tab-item" type="button" data-tab="tools" aria-selected="false">
390
+ <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11.6 4.4a3.2 3.2 0 00-4 4l-4.1 4.1 2 2 4.1-4.1a3.2 3.2 0 004-4l-2 2-1.6-1.6 1.6-2.4z"/></svg>
391
+ <span>工具</span>
386
392
  </button>
387
- </nav>
393
+ </nav>
388
394
 
389
395
  <div class="layout-toast" id="layoutToast" role="status" hidden></div>
390
396
 
@@ -395,6 +401,6 @@
395
401
  </main>
396
402
  <script src="panel-layout.js?v=5"></script>
397
403
  <script src="trace-view.js?v=5"></script>
398
- <script src="panel.js?v=5"></script>
404
+ <script src="panel.js?v=6"></script>
399
405
  </body>
400
406
  </html>
package/ui/panel.js CHANGED
@@ -1445,7 +1445,7 @@
1445
1445
  var group = layoutEditing ? null : (layoutApi.TAB_GROUPS[activeTab] || [])
1446
1446
  var panel = $('panel')
1447
1447
  if (panel) {
1448
- var tabsKnown = ['dashboard', 'memory', 'settings', 'diagnosis']
1448
+ var tabsKnown = ['dashboard', 'memory', 'relation', 'settings', 'tools']
1449
1449
  for (var t = 0; t < tabsKnown.length; t += 1) {
1450
1450
  panel.classList.toggle('tab-' + tabsKnown[t], activeTab === tabsKnown[t])
1451
1451
  }