@abraca/nuxt 2.0.6 → 2.0.7

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=4.0.0"
6
6
  },
7
- "version": "2.0.6",
7
+ "version": "2.0.7",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
12
12
  awareness: boolean;
13
13
  tag: "video" | "audio";
14
14
  live: boolean;
15
- total: boolean;
16
15
  controls: boolean;
16
+ total: boolean;
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const _default: typeof __VLS_export;
19
19
  export default _default;
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
12
12
  awareness: boolean;
13
13
  tag: "video" | "audio";
14
14
  live: boolean;
15
- total: boolean;
16
15
  controls: boolean;
16
+ total: boolean;
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const _default: typeof __VLS_export;
19
19
  export default _default;
@@ -238,8 +238,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
238
238
  transition: boolean;
239
239
  autofocus: boolean;
240
240
  loading: boolean;
241
- overlay: boolean;
242
241
  colorMode: boolean;
242
+ overlay: boolean;
243
243
  dismissible: boolean;
244
244
  fullscreen: boolean;
245
245
  modal: boolean;
@@ -238,8 +238,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
238
238
  transition: boolean;
239
239
  autofocus: boolean;
240
240
  loading: boolean;
241
- overlay: boolean;
242
241
  colorMode: boolean;
242
+ overlay: boolean;
243
243
  dismissible: boolean;
244
244
  fullscreen: boolean;
245
245
  modal: boolean;
@@ -42,8 +42,9 @@ function _startWatcher() {
42
42
  if (!p) return;
43
43
  for (let i = 0; i < batch.length; i++) {
44
44
  const docId = batch[i];
45
+ const alreadyOpen = p.hasChild(docId);
45
46
  try {
46
- const childProvider = await p.loadChild(docId);
47
+ const childProvider = alreadyOpen ? await p.loadChild(docId) : await p.loadChild(docId, { evictable: false });
47
48
  await childProvider.ready;
48
49
  const treeMap = p.document.getMap("doc-tree");
49
50
  const docLabel = treeMap.get(docId)?.label ?? "";
@@ -53,6 +54,7 @@ function _startWatcher() {
53
54
  if (val.docId === docId) _fileEntries.delete(key);
54
55
  }
55
56
  for (const f of files) _fileEntries.set(f.uploadId, f);
57
+ if (!alreadyOpen) p.unloadChild(docId);
56
58
  } catch (e) {
57
59
  if (import.meta.dev) console.warn(`[abracadabra] file-index: failed to index doc ${docId}:`, e);
58
60
  }
@@ -87,8 +87,9 @@ function _startWatcher() {
87
87
  if (!p || !_searchIndex) return;
88
88
  for (let i = 0; i < batch.length; i++) {
89
89
  const docId = batch[i];
90
+ const alreadyOpen = p.hasChild(docId);
90
91
  try {
91
- const childProvider = await p.loadChild(docId);
92
+ const childProvider = alreadyOpen ? await p.loadChild(docId) : await p.loadChild(docId, { evictable: false });
92
93
  await childProvider.ready;
93
94
  const rootDoc = p.document;
94
95
  const treeMap = rootDoc.getMap("doc-tree");
@@ -97,6 +98,7 @@ function _startWatcher() {
97
98
  await _searchIndex.index(docId, texts);
98
99
  _indexedVersions.set(docId, _lastSyncedCache.get(docId) ?? 0);
99
100
  _indexedCount.value = _indexedVersions.size;
101
+ if (!alreadyOpen) p.unloadChild(docId);
100
102
  } catch (e) {
101
103
  if (import.meta.dev) console.warn(`[abracadabra] search: failed to index doc ${docId}:`, e);
102
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abraca/nuxt",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
5
5
  "repository": "abracadabra/abracadabra-nuxt",
6
6
  "license": "MIT",
@@ -96,7 +96,7 @@
96
96
  }
97
97
  },
98
98
  "devDependencies": {
99
- "@abraca/dabra": "^2.0.5",
99
+ "@abraca/dabra": "^2.0.7",
100
100
  "@iconify-json/lucide": "^1.2.105",
101
101
  "@noble/ed25519": "^3.1.0",
102
102
  "@noble/hashes": "^2.2.0",