@glossarist/concept-browser 0.7.28 → 0.7.29

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.28",
3
+ "version": "0.7.29",
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": {
@@ -10,7 +10,7 @@ import { deduplicateSearchHits } from '../utils/search';
10
10
 
11
11
  export const useVocabularyStore = defineStore('vocabulary', () => {
12
12
  // State
13
- const datasets = ref<Map<string, DatasetAdapter>>(new Map());
13
+ const datasets = shallowRef<Map<string, DatasetAdapter>>(new Map());
14
14
  const manifests = ref<Map<string, Manifest>>(new Map());
15
15
  const currentConcept = ref<Concept | null>(null);
16
16
  const currentRegisterId = ref<string>('');
@@ -34,9 +34,9 @@ watch(adapter, (a) => {
34
34
  if (idlePreloadHandle !== null) return;
35
35
  if (!a || !a.index) return;
36
36
 
37
- const schedule = typeof requestIdleCallback !== 'undefined'
38
- ? requestIdleCallback
39
- : (cb: () => void) => setTimeout(cb, 0);
37
+ const schedule: (cb: () => void) => number = typeof requestIdleCallback !== 'undefined'
38
+ ? (cb) => requestIdleCallback(cb, { timeout: 2000 })
39
+ : (cb) => window.setTimeout(cb, 0);
40
40
 
41
41
  idlePreloadHandle = schedule(() => {
42
42
  if (allChunksLoaded.value || !a.index) {
@@ -52,7 +52,7 @@ watch(adapter, (a) => {
52
52
  a.ensureChunksForRange(0, 100).catch(() => {});
53
53
  }
54
54
  idlePreloadHandle = null;
55
- }, { timeout: 2000 } as any);
55
+ });
56
56
  });
57
57
 
58
58
  onBeforeUnmount(() => {