@glossarist/concept-browser 0.7.131 → 0.7.133

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.7.131",
3
+ "version": "0.7.133",
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": {
@@ -699,6 +699,9 @@ function defsToJsonLd(defs) {
699
699
  }
700
700
  function refToJsonLd(ref, typeName = "gl:Ref") {
701
701
  if (!ref) return void 0;
702
+ if (ref.ellipsis === true) {
703
+ return { "@type": typeName, "gl:ellipsis": true };
704
+ }
702
705
  const refObj = { "@type": typeName };
703
706
  if (typeof ref === "string") {
704
707
  refObj["gl:source"] = ref;
@@ -707,6 +710,7 @@ function refToJsonLd(ref, typeName = "gl:Ref") {
707
710
  if (ref.id) refObj["gl:id"] = ref.id;
708
711
  if (ref.version) refObj["gl:version"] = ref.version;
709
712
  if (ref.text) refObj["gl:text"] = ref.text;
713
+ if (ref.external === true) refObj["gl:external"] = true;
710
714
  }
711
715
  return refObj;
712
716
  }
@@ -86,6 +86,9 @@ export function defsToJsonLd(defs: any[]): Record<string, any>[] {
86
86
 
87
87
  export function refToJsonLd(ref: any, typeName = 'gl:Ref'): Record<string, any> | undefined {
88
88
  if (!ref) return undefined;
89
+ if (ref.ellipsis === true) {
90
+ return { '@type': typeName, 'gl:ellipsis': true };
91
+ }
89
92
  const refObj: Record<string, any> = { '@type': typeName };
90
93
  if (typeof ref === 'string') {
91
94
  refObj['gl:source'] = ref;
@@ -94,6 +97,7 @@ export function refToJsonLd(ref: any, typeName = 'gl:Ref'): Record<string, any>
94
97
  if (ref.id) refObj['gl:id'] = ref.id;
95
98
  if (ref.version) refObj['gl:version'] = ref.version;
96
99
  if (ref.text) refObj['gl:text'] = ref.text;
100
+ if (ref.external === true) refObj['gl:external'] = true;
97
101
  }
98
102
  return refObj;
99
103
  }
@@ -1408,19 +1408,22 @@ defineExpose({ navigate });
1408
1408
  <div v-for="item in legendItems" :key="item.type"
1409
1409
  class="sp-legend-item"
1410
1410
  :class="{ muted: isTypeMuted(item.type), 'is-partitive': item.type === '__partitive__' }"
1411
+ @click="toggleType(item.type)"
1412
+ role="switch"
1413
+ :aria-checked="!isTypeMuted(item.type)"
1414
+ :aria-label="`${t('sphere.toggleMute')}: ${item.label}`"
1411
1415
  >
1412
- <button class="sp-legend-toggle"
1413
- @click="toggleType(item.type)"
1414
- :title="item.type"
1415
- :aria-label="`${t('sphere.toggleMute')}: ${item.label}`">
1416
1416
  <span v-if="item.type === '__partitive__'" class="sp-swatch sp-swatch-rake"
1417
1417
  :style="{ '--rake-color': isTypeMuted(item.type) ? '#b8b9cc' : item.color }"></span>
1418
1418
  <span v-else class="sp-swatch" :style="{ background: isTypeMuted(item.type) ? '#b8b9cc' : item.color }"></span>
1419
1419
  <span class="sp-count">{{ item.count }}</span>
1420
- </button>
1421
- <router-link class="sp-legend-label"
1422
- :to="{ name: 'learn-relationships', hash: '#' + item.type }"
1423
- :title="t('sphere.learnAbout') + ': ' + item.label">{{ item.label }}</router-link>
1420
+ <span class="sp-legend-label">{{ item.label }}</span>
1421
+ <a class="sp-legend-info"
1422
+ :href="'/learn/relationships#' + item.type"
1423
+ target="_blank"
1424
+ rel="noopener"
1425
+ :title="t('sphere.learnAbout') + ': ' + item.label"
1426
+ @click.stop>?</a>
1424
1427
  </div>
1425
1428
  </div>
1426
1429
  </div>
@@ -1663,19 +1666,25 @@ defineExpose({ navigate });
1663
1666
  display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 3px;
1664
1667
  border: 1px solid transparent; background: transparent; text-align: left;
1665
1668
  width: 100%; font-family: inherit; font-size: 11px; color: var(--ink-mute);
1669
+ cursor: pointer; user-select: none;
1666
1670
  }
1667
1671
  .sp-legend-item:hover { background: var(--rule); }
1668
1672
  .sp-legend-item.muted { opacity: 0.35; }
1669
- .sp-legend-toggle {
1670
- display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
1671
- cursor: pointer; border: none; background: transparent; padding: 0;
1672
- font: inherit; color: inherit;
1673
- }
1673
+ .sp-legend-item .sp-count { flex-shrink: 0; font-size: 10px; color: var(--ink-faint); }
1674
1674
  .sp-legend-label {
1675
- color: inherit; text-decoration: none; flex: 1; min-width: 0;
1676
- overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
1675
+ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
1676
+ }
1677
+ .sp-legend-info {
1678
+ flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%;
1679
+ display: inline-flex; align-items: center; justify-content: center;
1680
+ font-size: 9px; line-height: 1; text-decoration: none;
1681
+ color: var(--ink-faint); border: 1px solid var(--rule);
1682
+ transition: all 0.15s;
1683
+ }
1684
+ .sp-legend-info:hover {
1685
+ color: var(--ink); border-color: var(--ink-mute);
1686
+ background: var(--surface);
1677
1687
  }
1678
- .sp-legend-label:hover { text-decoration: underline; }
1679
1688
  .sp-swatch { width: 18px; height: 2px; flex-shrink: 0; border-radius: 1px; }
1680
1689
  /* Rake swatch — small bracket icon signaling a PartitiveRelation hyperedge
1681
1690
  (not a single binary edge). Two parallel solid lines (close-set double)