@glossarist/concept-browser 0.7.15 → 0.7.16

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.15",
3
+ "version": "0.7.16",
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": {
@@ -98,7 +98,25 @@ const conceptSources = computed(() => props.concept.sources);
98
98
  const conceptTags = computed(() => props.concept.tags ?? []);
99
99
 
100
100
  // Managed concept related (concept-level cross-references)
101
- const conceptRelated = computed(() => props.concept.relatedConcepts ?? []);
101
+ // Derives superseded_by from incoming supersedes edges instead of storing it.
102
+ const conceptRelated = computed(() => {
103
+ const direct = props.concept.relatedConcepts?.filter(rc => rc.type !== 'superseded_by') ?? [];
104
+ const derived = incomingEdges.value
105
+ .filter(e => e.type === 'supersedes')
106
+ .map(e => {
107
+ const parsed = factory.resolve(e.source, props.registerId);
108
+ const sourceUrn = parsed.type === 'internal'
109
+ ? store.manifests.get(parsed.registerId)?.datasetUri
110
+ : null;
111
+ const conceptId = e.source.match(/\/concept\/([^/]+)$/)?.[1];
112
+ return {
113
+ type: 'superseded_by' as const,
114
+ ref: sourceUrn && conceptId ? { source: sourceUrn, id: conceptId } : null,
115
+ content: '',
116
+ };
117
+ });
118
+ return [...direct, ...derived];
119
+ });
102
120
 
103
121
  function resolveRelatedRef(ref: { source: string | null; id: string | null } | null): { registerId: string; conceptId: string } | null {
104
122
  if (!ref?.source || !ref?.id) return null;