@glossarist/concept-browser 0.2.9 → 0.2.10

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": "@glossarist/concept-browser",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Vue SPA for browsing Glossarist terminology datasets with cross-reference resolution, graph visualization, and multi-language support",
5
5
  "type": "module",
6
6
  "bin": {
@@ -364,6 +364,10 @@ function selectOnly(registerId: string) {
364
364
  }
365
365
  }
366
366
 
367
+ function registerTitle(id: string): string {
368
+ return props.registers.find(r => r.id === id)?.title ?? id;
369
+ }
370
+
367
371
  function selectedNodeColor(): string {
368
372
  if (!selectedNode.value) return STUB_COLOR;
369
373
  if (!selectedNode.value.loaded) return STUB_COLOR;
@@ -458,15 +462,15 @@ function selectedNodeColor(): string {
458
462
  </div>
459
463
  </div>
460
464
 
461
- <!-- Legend -->
462
- <div v-if="nodeCount > 0" class="absolute top-4 right-4 z-10 bg-surface-raised/90 backdrop-blur rounded-lg px-3 py-2.5 border border-ink-100/60 text-xs" style="box-shadow: 0 2px 6px rgba(26, 27, 46, 0.04);">
465
+ <!-- Legend (only when multiple registers) -->
466
+ <div v-if="nodeCount > 0 && registers.length > 1" class="absolute top-4 right-4 z-10 bg-surface-raised/90 backdrop-blur rounded-lg px-3 py-2.5 border border-ink-100/60 text-xs" style="box-shadow: 0 2px 6px rgba(26, 27, 46, 0.04);">
463
467
  <div class="font-semibold text-ink-400 text-[10px] uppercase tracking-wide mb-2">Datasets</div>
464
468
  <div v-for="reg in registers" :key="reg.id" class="flex items-center gap-2 mb-1.5 last:mb-0">
465
469
  <span
466
470
  class="w-2.5 h-2.5 rounded-full inline-block flex-shrink-0"
467
471
  :style="{ backgroundColor: registerColor(reg.id) }"
468
472
  ></span>
469
- <span class="text-ink-500">{{ reg.id }}</span>
473
+ <span class="text-ink-500">{{ reg.title }}</span>
470
474
  </div>
471
475
  <div class="flex items-center gap-2 mt-2 pt-2 border-t border-ink-100/40">
472
476
  <span class="w-2 h-2 rounded-full inline-block" :style="{ backgroundColor: STUB_COLOR }"></span>
@@ -495,7 +499,7 @@ function selectedNodeColor(): string {
495
499
  :style="{ backgroundColor: selectedNodeColor() }"
496
500
  ></span>
497
501
  <span class="text-[10px] text-ink-400 uppercase tracking-wide">
498
- {{ selectedNode.register || 'unknown' }} &middot;
502
+ {{ registerTitle(selectedNode.register) }} &middot;
499
503
  {{ selectedNode.loaded ? 'loaded' : 'stub' }}
500
504
  </span>
501
505
  </div>