@glossarist/concept-browser 0.7.60 → 0.7.61
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/README.md +1 -1
- package/package.json +1 -1
- package/src/config/group-types.ts +1 -1
- package/src/views/DatasetView.vue +13 -1
- package/src/views/HomeView.vue +10 -1
package/README.md
CHANGED
|
@@ -432,7 +432,7 @@ Sites currently powered by `@glossarist/concept-browser`. When cutting a release
|
|
|
432
432
|
| [`geolexica/osgeo.geolexica.org`](https://github.com/geolexica/osgeo.geolexica.org) | https://osgeo.geolexica.org |
|
|
433
433
|
| [`oimlsmart/vocab`](https://github.com/oimlsmart/vocab) | https://www.oimlsmart.org/vocab/ (VIML)¹ |
|
|
434
434
|
| [`metanorma/oiml-terms`](https://github.com/metanorma/oiml-terms) | https://metanorma.github.io/oiml-terms/ |
|
|
435
|
-
| [`
|
|
435
|
+
| [`glossarist/iala-vocab`](https://github.com/glossarist/iala-vocab) | https://glossarist.github.io/iala-vocab/ |
|
|
436
436
|
| [`metanorma/iso-10303-2-vocab`](https://github.com/metanorma/iso-10303-2-vocab) | https://metanorma.github.io/iso-10303-2-vocab/ |
|
|
437
437
|
|
|
438
438
|
To add a new deployment here, open a PR against this README.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glossarist/concept-browser",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.61",
|
|
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": {
|
|
@@ -33,7 +33,7 @@ export const GROUP_TYPES: Record<DatasetGroupKind, GroupTypeMeta> = {
|
|
|
33
33
|
kind: 'lineage',
|
|
34
34
|
label: 'Edition series',
|
|
35
35
|
description: 'Same vocabulary, different editions over time',
|
|
36
|
-
glyph: '
|
|
36
|
+
glyph: '⟶',
|
|
37
37
|
ordered: true,
|
|
38
38
|
supersession: true,
|
|
39
39
|
sameVocabulary: true,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed, ref, watch, onMounted, onUnmounted, onBeforeUnmount } from 'vue';
|
|
3
3
|
import { useRoute, useRouter } from 'vue-router';
|
|
4
4
|
import { useVocabularyStore } from '../stores/vocabulary';
|
|
5
|
+
import { useUiStore } from '../stores/ui';
|
|
5
6
|
import { useDsStyle } from '../utils/dataset-style';
|
|
6
7
|
import { useDatasetLoader } from '../composables/use-dataset-loader';
|
|
7
8
|
import { FORMAT_LABELS } from '../config/types';
|
|
@@ -17,6 +18,7 @@ import { formatSectionLabel } from '../utils/section-display';
|
|
|
17
18
|
const props = defineProps<{ registerId: string }>();
|
|
18
19
|
|
|
19
20
|
const store = useVocabularyStore();
|
|
21
|
+
const uiStore = useUiStore();
|
|
20
22
|
const { getStyle } = useDsStyle();
|
|
21
23
|
const { ensureLoaded, loading, localError } = useDatasetLoader(() => props.registerId);
|
|
22
24
|
const { t } = useI18n();
|
|
@@ -30,6 +32,16 @@ const localizedDescription = computed(() => localizedDatasetField(props.register
|
|
|
30
32
|
const adapter = computed(() => store.datasets.get(props.registerId));
|
|
31
33
|
const chunkLoading = ref(false);
|
|
32
34
|
|
|
35
|
+
// Concept-count badge: tinted bg + always-readable text in either mode.
|
|
36
|
+
// Previously used `.light` for bg and `.dark` for text — but `.dark` is
|
|
37
|
+
// just `.light` with alpha, so text was invisible against the bg.
|
|
38
|
+
const conceptCountBadgeStyle = computed(() => {
|
|
39
|
+
const s = getStyle(props.registerId);
|
|
40
|
+
return uiStore.isDark
|
|
41
|
+
? { backgroundColor: s.darkAlpha(0.25), color: s.light }
|
|
42
|
+
: { backgroundColor: s.light, color: '#ffffff' };
|
|
43
|
+
});
|
|
44
|
+
|
|
33
45
|
// Background chunk preloading via requestIdleCallback
|
|
34
46
|
let idlePreloadHandle: ReturnType<typeof requestIdleCallback> | ReturnType<typeof setTimeout> | null = null;
|
|
35
47
|
|
|
@@ -310,7 +322,7 @@ function clearSection() {
|
|
|
310
322
|
<h1 class="font-serif text-3xl text-ink-800 mb-2">{{ localizedTitle }}</h1>
|
|
311
323
|
<p class="text-ink-400 leading-relaxed max-w-2xl">{{ localizedDescription }}</p>
|
|
312
324
|
<div class="flex flex-wrap gap-2 mt-4">
|
|
313
|
-
<span class="badge" :style="
|
|
325
|
+
<span class="badge" :style="conceptCountBadgeStyle">{{ manifest.conceptCount.toLocaleString() }} {{ t('dataset.concepts') }}</span>
|
|
314
326
|
<span class="badge badge-gray">{{ manifest.languages.length }} {{ t('dataset.languages') }}</span>
|
|
315
327
|
<span class="badge badge-green">{{ manifest.owner }}</span>
|
|
316
328
|
<router-link :to="{ name: 'stats', params: { registerId } }" class="badge badge-blue hover:opacity-80 transition-opacity">
|
package/src/views/HomeView.vue
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref } from 'vue';
|
|
3
3
|
import { useVocabularyStore } from '../stores/vocabulary';
|
|
4
|
+
import { useUiStore } from '../stores/ui';
|
|
4
5
|
import { useRouter } from 'vue-router';
|
|
5
6
|
import { useDsStyle } from '../utils/dataset-style';
|
|
6
7
|
import { useSiteConfig } from '../config/use-site-config';
|
|
@@ -8,10 +9,18 @@ import { useI18n } from '../i18n';
|
|
|
8
9
|
import HomeSeriesSection from '../components/HomeSeriesSection.vue';
|
|
9
10
|
|
|
10
11
|
const store = useVocabularyStore();
|
|
12
|
+
const uiStore = useUiStore();
|
|
11
13
|
const router = useRouter();
|
|
12
14
|
const { getStyle } = useDsStyle();
|
|
13
15
|
const { config: siteConfig, localizedTitle, localizedSubtitle, localizedDescription, localizedDatasetField } = useSiteConfig();
|
|
14
16
|
const { t } = useI18n();
|
|
17
|
+
|
|
18
|
+
function tagBadgeStyle(dsId: string) {
|
|
19
|
+
const s = getStyle(dsId);
|
|
20
|
+
return uiStore.isDark
|
|
21
|
+
? { backgroundColor: s.darkAlpha(0.25), color: s.light }
|
|
22
|
+
: { backgroundColor: s.light, color: '#ffffff' };
|
|
23
|
+
}
|
|
15
24
|
const exploring = ref(false);
|
|
16
25
|
|
|
17
26
|
async function exploreRandom() {
|
|
@@ -181,7 +190,7 @@ function goToGraph() { router.push({ name: 'graph' }); }
|
|
|
181
190
|
</div>
|
|
182
191
|
|
|
183
192
|
<div class="flex flex-wrap gap-1.5 pl-[22px] mb-3">
|
|
184
|
-
<span v-for="tag in (ds.manifest.tags ?? []).slice(0, 3)" :key="tag" class="badge text-[10px]" :style="
|
|
193
|
+
<span v-for="tag in (ds.manifest.tags ?? []).slice(0, 3)" :key="tag" class="badge text-[10px]" :style="tagBadgeStyle(ds.id)">
|
|
185
194
|
{{ tag }}
|
|
186
195
|
</span>
|
|
187
196
|
</div>
|