@glossarist/concept-browser 0.2.0 → 0.2.1

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.0",
3
+ "version": "0.2.1",
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": {
package/src/App.vue CHANGED
@@ -2,14 +2,12 @@
2
2
  import { onMounted, onUnmounted, ref } from 'vue';
3
3
  import { useVocabularyStore } from './stores/vocabulary';
4
4
  import { useSiteConfig } from './config/use-site-config';
5
- import { buildPageRoutes } from './router/page-routes';
6
- import router from './router';
7
5
  import AppHeader from './components/AppHeader.vue';
8
6
  import AppSidebar from './components/AppSidebar.vue';
9
7
  import AppFooter from './components/AppFooter.vue';
10
8
 
11
9
  const store = useVocabularyStore();
12
- const { loadConfig, config, globalPages, datasetPages } = useSiteConfig();
10
+ const { loadConfig, config } = useSiteConfig();
13
11
  const appReady = ref(false);
14
12
  const showScrollTop = ref(false);
15
13
  let mainEl: HTMLElement | null = null;
@@ -27,12 +25,6 @@ onMounted(async () => {
27
25
  if (cfg?.title) {
28
26
  document.title = cfg.title;
29
27
  }
30
- const allPages = [...globalPages.value, ...datasetPages.value];
31
- if (allPages.length > 0) {
32
- for (const route of buildPageRoutes(allPages)) {
33
- router.addRoute(route);
34
- }
35
- }
36
28
  appReady.value = true;
37
29
  // Watch scroll on main content area
38
30
  mainEl = document.querySelector('main');
@@ -18,6 +18,18 @@ const routes: RouteRecordRaw[] = [
18
18
  component: () => import('../views/ConceptView.vue'),
19
19
  props: true,
20
20
  },
21
+ {
22
+ path: '/dataset/:registerId/stats',
23
+ name: 'stats',
24
+ component: () => import('../views/StatsView.vue'),
25
+ props: true,
26
+ },
27
+ {
28
+ path: '/dataset/:registerId/about',
29
+ name: 'about',
30
+ component: () => import('../views/AboutView.vue'),
31
+ props: true,
32
+ },
21
33
  {
22
34
  path: '/search',
23
35
  name: 'search',
@@ -28,6 +40,16 @@ const routes: RouteRecordRaw[] = [
28
40
  name: 'graph',
29
41
  component: () => import('../views/GraphView.vue'),
30
42
  },
43
+ {
44
+ path: '/news',
45
+ name: 'news',
46
+ component: () => import('../views/NewsView.vue'),
47
+ },
48
+ {
49
+ path: '/contributors',
50
+ name: 'contributors',
51
+ component: () => import('../views/ContributorsView.vue'),
52
+ },
31
53
  {
32
54
  path: '/resolve/:uri(.*)',
33
55
  name: 'resolve',
@@ -1,35 +0,0 @@
1
- import type { RouteRecordRaw } from 'vue-router';
2
- import type { PageConfig } from '../config/types';
3
-
4
- const pageComponents: Record<string, () => Promise<any>> = {
5
- news: () => import('../views/NewsView.vue'),
6
- contributors: () => import('../views/ContributorsView.vue'),
7
- about: () => import('../views/AboutView.vue'),
8
- stats: () => import('../views/StatsView.vue'),
9
- };
10
-
11
- export function buildPageRoutes(pages: PageConfig[]): RouteRecordRaw[] {
12
- const routes: RouteRecordRaw[] = [];
13
-
14
- for (const page of pages) {
15
- const component = pageComponents[page.type];
16
- if (!component) continue;
17
-
18
- if (page.datasetScoped) {
19
- routes.push({
20
- path: `/dataset/:registerId/${page.route}`,
21
- name: page.route,
22
- component,
23
- props: true,
24
- });
25
- } else {
26
- routes.push({
27
- path: `/${page.route}`,
28
- name: page.route,
29
- component,
30
- });
31
- }
32
- }
33
-
34
- return routes;
35
- }