@abraca/nuxt 2.17.2 → 2.19.0
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 +1 -1
- package/dist/runtime/components/aware/AMedia.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
- package/dist/runtime/components/settings/ASettingsSpacesPanel.vue +2 -0
- package/dist/runtime/components/shell/AUserMenu.d.vue.ts +2 -2
- package/dist/runtime/components/shell/AUserMenu.vue.d.ts +2 -2
- package/dist/runtime/composables/useCommandPalette.js +8 -4
- package/dist/runtime/composables/useSpaces.js +1 -1
- package/dist/runtime/plugin-abracadabra.client.js +15 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -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;
|
|
@@ -157,6 +157,7 @@ async function handleDelete(id) {
|
|
|
157
157
|
|
|
158
158
|
<div
|
|
159
159
|
v-if="spaces.length === 0 && !loading"
|
|
160
|
+
key="spaces-empty"
|
|
160
161
|
class="text-sm text-(--ui-text-muted) text-center py-8"
|
|
161
162
|
>
|
|
162
163
|
No spaces found.
|
|
@@ -164,6 +165,7 @@ async function handleDelete(id) {
|
|
|
164
165
|
|
|
165
166
|
<div
|
|
166
167
|
v-if="loading"
|
|
168
|
+
key="spaces-loading"
|
|
167
169
|
class="space-y-2"
|
|
168
170
|
>
|
|
169
171
|
<USkeleton
|
|
@@ -14,13 +14,13 @@ type __VLS_Props = {
|
|
|
14
14
|
extraItems?: DropdownMenuItem[][];
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
-
logout: () => any;
|
|
18
17
|
"open-settings": () => any;
|
|
19
18
|
"open-account": () => any;
|
|
19
|
+
logout: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onLogout?: (() => any) | undefined;
|
|
22
21
|
"onOpen-settings"?: (() => any) | undefined;
|
|
23
22
|
"onOpen-account"?: (() => any) | undefined;
|
|
23
|
+
onLogout?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
color: string;
|
|
26
26
|
collapsed: boolean;
|
|
@@ -14,13 +14,13 @@ type __VLS_Props = {
|
|
|
14
14
|
extraItems?: DropdownMenuItem[][];
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
-
logout: () => any;
|
|
18
17
|
"open-settings": () => any;
|
|
19
18
|
"open-account": () => any;
|
|
19
|
+
logout: () => any;
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onLogout?: (() => any) | undefined;
|
|
22
21
|
"onOpen-settings"?: (() => any) | undefined;
|
|
23
22
|
"onOpen-account"?: (() => any) | undefined;
|
|
23
|
+
onLogout?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
color: string;
|
|
26
26
|
collapsed: boolean;
|
|
@@ -36,13 +36,17 @@ export function useCommandPalette() {
|
|
|
36
36
|
const treeMap = doc.value.getMap("doc-tree");
|
|
37
37
|
const entries = [];
|
|
38
38
|
treeMap.forEach((entry, id) => {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const isYMap = entry && typeof entry.get === "function";
|
|
40
|
+
const label = isYMap ? entry.get("label") : entry?.label;
|
|
41
|
+
const type = isYMap ? entry.get("type") : entry?.type;
|
|
42
|
+
const trashed = isYMap ? entry.get("trashed") : entry?.trashed;
|
|
43
|
+
if (!label || trashed) return;
|
|
44
|
+
if (q && !label.toLowerCase().includes(q)) return;
|
|
41
45
|
entries.push({
|
|
42
46
|
id: `doc:${id}`,
|
|
43
|
-
label
|
|
47
|
+
label,
|
|
44
48
|
icon: "i-lucide-file-text",
|
|
45
|
-
suffix:
|
|
49
|
+
suffix: type,
|
|
46
50
|
onClick: () => {
|
|
47
51
|
trackRecentDoc(id);
|
|
48
52
|
navigateTo(getDocUrl(id));
|
|
@@ -9,7 +9,7 @@ export function useSpaces() {
|
|
|
9
9
|
const entry = abra.savedServers?.value?.find?.((s) => s.url === abra.currentServerUrl?.value);
|
|
10
10
|
const entryDocId = entry?.entryDocId;
|
|
11
11
|
if (!entryDocId) return spaces.value[0] ?? null;
|
|
12
|
-
return spaces.value.find((s) => s.
|
|
12
|
+
return spaces.value.find((s) => s.id === entryDocId) ?? spaces.value[0] ?? null;
|
|
13
13
|
});
|
|
14
14
|
async function refresh() {
|
|
15
15
|
loading.value = true;
|
|
@@ -592,9 +592,22 @@ export default defineNuxtPlugin({
|
|
|
592
592
|
_initPromise = init(url);
|
|
593
593
|
await _initPromise;
|
|
594
594
|
}
|
|
595
|
-
async function switchSpace(serverUrl,
|
|
595
|
+
async function switchSpace(serverUrl, spaceRootId) {
|
|
596
596
|
if (serverUrl !== currentServerUrl.value) await switchServer(serverUrl);
|
|
597
|
-
|
|
597
|
+
const idx = savedServers.value.findIndex((s) => s.url === serverUrl);
|
|
598
|
+
const alreadyActive = idx >= 0 && savedServers.value[idx].entryDocId === spaceRootId;
|
|
599
|
+
if (idx >= 0 && !alreadyActive) {
|
|
600
|
+
savedServers.value[idx] = { ...savedServers.value[idx], entryDocId: spaceRootId };
|
|
601
|
+
persistServers();
|
|
602
|
+
}
|
|
603
|
+
if (!alreadyActive) {
|
|
604
|
+
addLog(`Switching space \u2192 ${spaceRootId}`, "connection");
|
|
605
|
+
_teardown();
|
|
606
|
+
_initPromise = null;
|
|
607
|
+
_initPromise = init(serverUrl);
|
|
608
|
+
await _initPromise;
|
|
609
|
+
}
|
|
610
|
+
await navigateTo(abraConfig.docBasePath ?? "/doc");
|
|
598
611
|
}
|
|
599
612
|
async function claimAccount() {
|
|
600
613
|
if (!client.value || !keystore.value) {
|