@glossarist/concept-browser 0.7.33 → 0.7.34

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.33",
3
+ "version": "0.7.34",
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": {
@@ -72,7 +72,7 @@ const {
72
72
  relatedLabel,
73
73
  navigateEdge,
74
74
  navigateRelated,
75
- } = useConceptEdges(conceptComputed, registerIdComputed, manifestComputed, edgesComputed);
75
+ } = useConceptEdges(conceptComputed, registerIdComputed, manifestComputed, edgesComputed, router);
76
76
 
77
77
  const uriCopied = ref(false);
78
78
  function copyUri() {
@@ -1,4 +1,5 @@
1
1
  import { computed, type ComputedRef } from 'vue';
2
+ import type { Router } from 'vue-router';
2
3
  import type { Concept, RelatedConcept } from 'glossarist';
3
4
  import type { Manifest, GraphEdge } from '../adapters/types';
4
5
  import { getFactory } from '../adapters/factory';
@@ -24,6 +25,7 @@ export function useConceptEdges(
24
25
  registerId: ComputedRef<string>,
25
26
  manifest: ComputedRef<Manifest>,
26
27
  edges: ComputedRef<GraphEdge[]>,
28
+ router: Router,
27
29
  ) {
28
30
  const factory = getFactory();
29
31
  const store = useVocabularyStore();
@@ -145,7 +147,6 @@ export function useConceptEdges(
145
147
  async function navigateEdge(edge: GraphEdge) {
146
148
  const uri = edge.source === conceptUriValue.value ? edge.target : edge.source;
147
149
  const resolution = factory.resolve(uri);
148
- const router = (await import('vue-router')).useRouter();
149
150
 
150
151
  if (resolution.type === 'internal') {
151
152
  router.push({ name: 'concept', params: { registerId: resolution.registerId, conceptId: resolution.conceptId } });
@@ -159,7 +160,6 @@ export function useConceptEdges(
159
160
  async function navigateRelated(ref: { source: string | null; id: string | null }) {
160
161
  const target = resolveRelatedRef(ref);
161
162
  if (!target) return;
162
- const router = (await import('vue-router')).useRouter();
163
163
  router.push({ name: 'concept', params: { registerId: target.registerId, conceptId: target.conceptId } });
164
164
  }
165
165