@abraca/nuxt 2.0.6 → 2.0.8
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
|
@@ -12,13 +12,13 @@ type __VLS_Props = {
|
|
|
12
12
|
extraItems?: DropdownMenuItem[][];
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
logout: () => any;
|
|
15
16
|
"open-settings": () => any;
|
|
16
17
|
"open-account": () => any;
|
|
17
|
-
logout: () => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onLogout?: (() => any) | undefined;
|
|
19
20
|
"onOpen-settings"?: (() => any) | undefined;
|
|
20
21
|
"onOpen-account"?: (() => any) | undefined;
|
|
21
|
-
onLogout?: (() => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
color: string;
|
|
24
24
|
collapsed: boolean;
|
|
@@ -12,13 +12,13 @@ type __VLS_Props = {
|
|
|
12
12
|
extraItems?: DropdownMenuItem[][];
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
logout: () => any;
|
|
15
16
|
"open-settings": () => any;
|
|
16
17
|
"open-account": () => any;
|
|
17
|
-
logout: () => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onLogout?: (() => any) | undefined;
|
|
19
20
|
"onOpen-settings"?: (() => any) | undefined;
|
|
20
21
|
"onOpen-account"?: (() => any) | undefined;
|
|
21
|
-
onLogout?: (() => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
color: string;
|
|
24
24
|
collapsed: 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.
|
|
3
|
+
"version": "2.0.8",
|
|
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.
|
|
99
|
+
"@abraca/dabra": "^2.0.8",
|
|
100
100
|
"@iconify-json/lucide": "^1.2.105",
|
|
101
101
|
"@noble/ed25519": "^3.1.0",
|
|
102
102
|
"@noble/hashes": "^2.2.0",
|