@abraca/nuxt 2.96.0 → 2.99.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.
Files changed (58) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/ADocSubPageList.vue +8 -0
  3. package/dist/runtime/components/ANodePanel.vue +11 -1
  4. package/dist/runtime/components/ANodePanelStack.d.vue.ts +19 -0
  5. package/dist/runtime/components/ANodePanelStack.vue +35 -0
  6. package/dist/runtime/components/ANodePanelStack.vue.d.ts +19 -0
  7. package/dist/runtime/components/APresence.d.vue.ts +1 -13
  8. package/dist/runtime/components/APresence.vue.d.ts +1 -13
  9. package/dist/runtime/components/ATagsPopover.d.vue.ts +34 -0
  10. package/dist/runtime/components/ATagsPopover.vue +114 -0
  11. package/dist/runtime/components/ATagsPopover.vue.d.ts +34 -0
  12. package/dist/runtime/components/aware/AMedia.d.vue.ts +1 -1
  13. package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
  14. package/dist/runtime/components/chat/AChatMessages.d.vue.ts +14 -0
  15. package/dist/runtime/components/chat/AChatMessages.vue +94 -14
  16. package/dist/runtime/components/chat/AChatMessages.vue.d.ts +14 -0
  17. package/dist/runtime/components/chat/AChatPanel.d.vue.ts +10 -0
  18. package/dist/runtime/components/chat/AChatPanel.vue +5 -1
  19. package/dist/runtime/components/chat/AChatPanel.vue.d.ts +10 -0
  20. package/dist/runtime/components/chat/ANodeChatPanel.d.vue.ts +10 -3
  21. package/dist/runtime/components/chat/ANodeChatPanel.vue +6 -2
  22. package/dist/runtime/components/chat/ANodeChatPanel.vue.d.ts +10 -3
  23. package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +2 -2
  24. package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +2 -2
  25. package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +1 -1
  26. package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +1 -1
  27. package/dist/runtime/components/editor/ALocationPickerPopover.vue +6 -2
  28. package/dist/runtime/components/editor/AMetaChip.vue +18 -16
  29. package/dist/runtime/components/renderers/AMapRenderer.vue +3 -2
  30. package/dist/runtime/components/settings/ASettingsAboutPanel.d.vue.ts +3 -0
  31. package/dist/runtime/components/settings/ASettingsAboutPanel.vue +143 -0
  32. package/dist/runtime/components/settings/ASettingsAboutPanel.vue.d.ts +3 -0
  33. package/dist/runtime/components/settings/ASettingsConnectionPanel.vue +65 -100
  34. package/dist/runtime/components/settings/ASettingsModal.vue +7 -2
  35. package/dist/runtime/components/settings/sections.d.ts +28 -2
  36. package/dist/runtime/components/settings/sections.js +23 -0
  37. package/dist/runtime/composables/awarenessView.d.ts +46 -0
  38. package/dist/runtime/composables/awarenessView.js +65 -0
  39. package/dist/runtime/composables/useAwareness.js +19 -28
  40. package/dist/runtime/composables/useAwarenessPeers.d.ts +1 -25
  41. package/dist/runtime/composables/useChat.d.ts +21 -0
  42. package/dist/runtime/composables/useChat.js +77 -3
  43. package/dist/runtime/composables/useDocOpen.d.ts +69 -0
  44. package/dist/runtime/composables/useDocOpen.js +158 -0
  45. package/dist/runtime/composables/useRendererBase.d.ts +1 -25
  46. package/dist/runtime/composables/useSettingsModal.d.ts +1 -1
  47. package/dist/runtime/composables/useSpaceConnections.js +1 -60
  48. package/dist/runtime/composables/useYDoc.d.ts +3 -75
  49. package/dist/runtime/composables/useYDoc.js +28 -33
  50. package/dist/runtime/extensions/views/DocLinkView.vue +15 -5
  51. package/dist/runtime/extensions/views/MetaFieldView.vue +61 -49
  52. package/dist/runtime/locale.d.ts +2 -0
  53. package/dist/runtime/locale.js +1 -0
  54. package/dist/runtime/utils/mapboxToken.d.ts +7 -0
  55. package/dist/runtime/utils/mapboxToken.js +7 -0
  56. package/dist/runtime/utils/observeYMap.d.ts +44 -0
  57. package/dist/runtime/utils/observeYMap.js +86 -0
  58. package/package.json +5 -5
@@ -5,6 +5,7 @@ const props = defineProps({
5
5
  messages: { type: Array, required: true },
6
6
  currentUserId: { type: String, required: false, default: "" },
7
7
  canSend: { type: Boolean, required: false, default: true },
8
+ allowEdit: { type: Boolean, required: false },
8
9
  typingUsers: { type: Array, required: false, default: () => [] },
9
10
  activeAgents: { type: Array, required: false, default: () => [] },
10
11
  mentionUsers: { type: Array, required: false, default: () => [] },
@@ -15,7 +16,7 @@ const props = defineProps({
15
16
  emptyText: { type: String, required: false, default: "No messages yet" },
16
17
  emptySubtext: { type: String, required: false, default: "Be the first to send a message" }
17
18
  });
18
- const emit = defineEmits(["send", "typing", "doc-drop", "open-doc", "jump-to-quote", "close"]);
19
+ const emit = defineEmits(["send", "edit", "delete", "typing", "doc-drop", "open-doc", "jump-to-quote", "close"]);
19
20
  const messagesContainer = ref(null);
20
21
  const chatInputRef = ref(null);
21
22
  const replyingTo = ref(null);
@@ -81,9 +82,12 @@ defineExpose({
81
82
  :empty-icon="emptyIcon"
82
83
  :empty-text="emptyText"
83
84
  :empty-subtext="emptySubtext"
85
+ :allow-edit="allowEdit"
84
86
  @open-doc="(docId) => emit('open-doc', docId)"
85
87
  @jump-to-quote="(docId, from, to) => emit('jump-to-quote', docId, from, to)"
86
88
  @reply="startReply"
89
+ @edit="(id, content) => emit('edit', id, content)"
90
+ @delete="(id) => emit('delete', id)"
87
91
  />
88
92
 
89
93
  <AChatAgentStatus :agents="activeAgents" />
@@ -17,6 +17,12 @@ type __VLS_Props = {
17
17
  currentUserId?: string;
18
18
  /** Whether the user can send messages */
19
19
  canSend?: boolean;
20
+ /**
21
+ * Offer edit/delete on the user's own messages. Off by default — the host
22
+ * must handle `@edit`/`@delete` (wire them to `useChatChannel().edit/remove`)
23
+ * for the affordances to do anything.
24
+ */
25
+ allowEdit?: boolean;
20
26
  /** Users currently typing */
21
27
  typingUsers?: TypingUser[];
22
28
  /** Active agent indicators */
@@ -53,9 +59,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
53
59
  focus: () => void | undefined;
54
60
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
55
61
  close: () => any;
62
+ delete: (messageId: string) => any;
56
63
  send: (content: string, opts?: {
57
64
  replyTo?: string;
58
65
  } | undefined) => any;
66
+ edit: (messageId: string, content: string) => any;
59
67
  "open-doc": (docId: string) => any;
60
68
  "jump-to-quote": (docId: string, from: number, to: number) => any;
61
69
  typing: () => any;
@@ -65,9 +73,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
65
73
  }) => any;
66
74
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
67
75
  onClose?: (() => any) | undefined;
76
+ onDelete?: ((messageId: string) => any) | undefined;
68
77
  onSend?: ((content: string, opts?: {
69
78
  replyTo?: string;
70
79
  } | undefined) => any) | undefined;
80
+ onEdit?: ((messageId: string, content: string) => any) | undefined;
71
81
  "onOpen-doc"?: ((docId: string) => any) | undefined;
72
82
  "onJump-to-quote"?: ((docId: string, from: number, to: number) => any) | undefined;
73
83
  onTyping?: (() => any) | undefined;
@@ -12,12 +12,18 @@ type __VLS_Props = {
12
12
  emptyIcon?: string;
13
13
  emptyText?: string;
14
14
  emptySubtext?: string;
15
+ /**
16
+ * Offer edit/delete on the user's own messages. On by default here — unlike
17
+ * the bare `<AChatPanel>`, this composer owns the channel, so it can fulfil
18
+ * the actions itself. The server still refuses anyone but the sender or an admin.
19
+ */
20
+ allowEdit?: boolean;
15
21
  };
16
- declare var __VLS_15: {}, __VLS_18: {};
22
+ declare var __VLS_17: {}, __VLS_20: {};
17
23
  type __VLS_Slots = {} & {
18
- leading?: (props: typeof __VLS_15) => any;
24
+ leading?: (props: typeof __VLS_17) => any;
19
25
  } & {
20
- trailing?: (props: typeof __VLS_18) => any;
26
+ trailing?: (props: typeof __VLS_20) => any;
21
27
  };
22
28
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
29
  close: () => any;
@@ -33,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
33
39
  emptyText: string;
34
40
  emptyIcon: string;
35
41
  emptySubtext: string;
42
+ allowEdit: boolean;
36
43
  closable: boolean;
37
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
45
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -12,11 +12,12 @@ const props = defineProps({
12
12
  closable: { type: Boolean, required: false, default: true },
13
13
  emptyIcon: { type: String, required: false, default: "i-lucide-message-circle" },
14
14
  emptyText: { type: String, required: false, default: "No messages yet" },
15
- emptySubtext: { type: String, required: false, default: "Be the first to send a message" }
15
+ emptySubtext: { type: String, required: false, default: "Be the first to send a message" },
16
+ allowEdit: { type: Boolean, required: false, default: true }
16
17
  });
17
18
  const emit = defineEmits(["open-doc", "jump-to-quote", "close"]);
18
19
  const { publicKeyB64 } = useAbracadabra();
19
- const { messages, channel, typingUsers, send, typing } = useChatChannel(props.docId);
20
+ const { messages, channel, typingUsers, send, edit, remove, typing } = useChatChannel(props.docId);
20
21
  const { agentsForChannel } = useChatUsers();
21
22
  const channelAgents = computed(() => agentsForChannel(props.docId));
22
23
  const resolvedLabel = computed(() => props.label ?? channel.value?.label ?? "Chat");
@@ -44,7 +45,10 @@ const typingUsersAdapted = computed(
44
45
  :empty-text="emptyText"
45
46
  :empty-subtext="emptySubtext"
46
47
  can-send
48
+ :allow-edit="allowEdit"
47
49
  @send="(content, opts) => send(content, opts)"
50
+ @edit="(id, content) => edit(id, content)"
51
+ @delete="(id) => remove(id)"
48
52
  @typing="typing"
49
53
  @open-doc="(id) => emit('open-doc', id)"
50
54
  @jump-to-quote="(id, from, to) => emit('jump-to-quote', id, from, to)"
@@ -12,12 +12,18 @@ type __VLS_Props = {
12
12
  emptyIcon?: string;
13
13
  emptyText?: string;
14
14
  emptySubtext?: string;
15
+ /**
16
+ * Offer edit/delete on the user's own messages. On by default here — unlike
17
+ * the bare `<AChatPanel>`, this composer owns the channel, so it can fulfil
18
+ * the actions itself. The server still refuses anyone but the sender or an admin.
19
+ */
20
+ allowEdit?: boolean;
15
21
  };
16
- declare var __VLS_15: {}, __VLS_18: {};
22
+ declare var __VLS_17: {}, __VLS_20: {};
17
23
  type __VLS_Slots = {} & {
18
- leading?: (props: typeof __VLS_15) => any;
24
+ leading?: (props: typeof __VLS_17) => any;
19
25
  } & {
20
- trailing?: (props: typeof __VLS_18) => any;
26
+ trailing?: (props: typeof __VLS_20) => any;
21
27
  };
22
28
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
29
  close: () => any;
@@ -33,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
33
39
  emptyText: string;
34
40
  emptyIcon: string;
35
41
  emptySubtext: string;
42
+ allowEdit: boolean;
36
43
  closable: boolean;
37
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
45
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -236,11 +236,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
236
236
  transition: boolean;
237
237
  close: boolean | Record<string, any>;
238
238
  shortcut: string;
239
+ loading: boolean;
239
240
  autofocus: boolean;
240
241
  fullscreen: boolean;
241
- dismissible: boolean;
242
- loading: boolean;
243
242
  colorMode: boolean;
243
+ dismissible: boolean;
244
244
  overlay: boolean;
245
245
  modal: boolean;
246
246
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, __VLS_Slots>;
@@ -236,11 +236,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
236
236
  transition: boolean;
237
237
  close: boolean | Record<string, any>;
238
238
  shortcut: string;
239
+ loading: boolean;
239
240
  autofocus: boolean;
240
241
  fullscreen: boolean;
241
- dismissible: boolean;
242
- loading: boolean;
243
242
  colorMode: boolean;
243
+ dismissible: boolean;
244
244
  overlay: boolean;
245
245
  modal: boolean;
246
246
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, __VLS_Slots>;
@@ -237,10 +237,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
237
237
  }>> & Readonly<{}>, {
238
238
  color: any;
239
239
  disabled: boolean;
240
+ loading: boolean;
240
241
  viewTransition: boolean;
241
242
  block: boolean;
242
243
  square: boolean;
243
- loading: boolean;
244
244
  collapsed: boolean;
245
245
  tooltip: boolean | Record<string, any>;
246
246
  leading: boolean;
@@ -237,10 +237,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
237
237
  }>> & Readonly<{}>, {
238
238
  color: any;
239
239
  disabled: boolean;
240
+ loading: boolean;
240
241
  viewTransition: boolean;
241
242
  block: boolean;
242
243
  square: boolean;
243
- loading: boolean;
244
244
  collapsed: boolean;
245
245
  tooltip: boolean | Record<string, any>;
246
246
  leading: boolean;
@@ -1,17 +1,21 @@
1
1
  <script setup>
2
2
  import { ref, watch, nextTick, onUnmounted } from "vue";
3
- import { useRuntimeConfig } from "#imports";
3
+ import { mapboxAccessToken as resolveMapboxToken, MAPBOX_TOKEN_MISSING } from "../../utils/mapboxToken";
4
4
  const props = defineProps({
5
5
  latValue: { type: Number, required: false },
6
6
  lngValue: { type: Number, required: false },
7
7
  open: { type: Boolean, required: true }
8
8
  });
9
9
  const emit = defineEmits(["update:lat", "update:lng", "update:open", "clear"]);
10
- const mapboxAccessToken = useRuntimeConfig().public?.abracadabra?.mapboxToken;
10
+ const mapboxAccessToken = resolveMapboxToken();
11
11
  let mapboxgl = null;
12
12
  const mapboxError = ref(null);
13
13
  async function loadMapbox() {
14
14
  if (mapboxgl) return true;
15
+ if (!mapboxAccessToken) {
16
+ mapboxError.value = MAPBOX_TOKEN_MISSING;
17
+ return false;
18
+ }
15
19
  try {
16
20
  const mod = await import("mapbox-gl");
17
21
  mapboxgl = mod.default || mod;
@@ -8,7 +8,7 @@ import {
8
8
  } from "@internationalized/date";
9
9
  import ALocationPickerPopover from "./ALocationPickerPopover.vue";
10
10
  import AIconPickerPopover from "./AIconPickerPopover.vue";
11
- import ATagsEditor from "../ATagsEditor.vue";
11
+ import ATagsPopover from "../ATagsPopover.vue";
12
12
  const props = defineProps({
13
13
  fieldType: { type: String, required: true },
14
14
  label: { type: String, required: false, default: "" },
@@ -25,7 +25,7 @@ const props = defineProps({
25
25
  });
26
26
  const emit = defineEmits(["patch"]);
27
27
  const df = new DateFormatter("en-US", { dateStyle: "medium" });
28
- const CHIP_CLASS = "h-7 px-2.5 py-1 text-sm border border-(--ui-border) rounded-md hover:bg-(--ui-bg-elevated) gap-1.5 data-[state=open]:bg-(--ui-bg-elevated)";
28
+ const CHIP_CLASS = "h-7 px-2.5 py-1 text-sm border border-(--ui-border) rounded-md bg-(--ui-bg) hover:bg-(--ui-bg-elevated) gap-1.5 data-[state=open]:bg-(--ui-bg-elevated)";
29
29
  const DEFAULT_ICONS = {
30
30
  text: "i-lucide-text-cursor-input",
31
31
  url: "i-lucide-link",
@@ -279,31 +279,33 @@ function onIconPick(name) {
279
279
  />
280
280
  </template>
281
281
 
282
- <!-- tags delegates to the shared editor. It is a MODAL rather than a
283
- popover, so the chip is an ordinary button that opens it — an
284
- `<UInputTags>` inline in a popover loses its own focus to the popover's
285
- focus trap on the first Enter. -->
286
- <template v-else-if="fieldType === 'tags' && !readonly">
282
+ <!-- tags delegates to the shared POPOVER — the same shape as every other
283
+ field here. It used to be a modal, because an `<UInputTags>` inline in
284
+ a popover loses its own focus to the popover's focus scope on the first
285
+ Enter. `<ATagsPopover>` does not use `<UInputTags>`: its chips and its
286
+ input are its own markup, so there is nothing for a focus scope to
287
+ fight over, and a three-word field no longer dims the whole page to
288
+ edit. -->
289
+ <ATagsPopover
290
+ v-else-if="fieldType === 'tags' && !readonly"
291
+ v-model:open="popoverOpen"
292
+ :tags="tagList"
293
+ :title="label || 'Tags'"
294
+ @save="onTagsSave"
295
+ >
287
296
  <UButton
288
297
  size="sm"
289
298
  color="neutral"
290
299
  variant="ghost"
291
300
  :icon="chipIcon"
292
301
  :class="CHIP_CLASS"
293
- @click="popoverOpen = true"
294
302
  >
295
303
  <span
296
304
  class="max-w-44 truncate"
297
305
  :class="isEmpty ? 'text-(--ui-text-muted)' : ''"
298
306
  >{{ chipText }}</span>
299
307
  </UButton>
300
- <ATagsEditor
301
- v-model:open="popoverOpen"
302
- :tags="tagList"
303
- :title="label ? `Edit ${label.toLowerCase()}` : 'Edit tags'"
304
- @save="onTagsSave"
305
- />
306
- </template>
308
+ </ATagsPopover>
307
309
 
308
310
  <UPopover
309
311
  v-else-if="!readonly"
@@ -504,7 +506,7 @@ function onIconPick(name) {
504
506
  <!-- read-only chip -->
505
507
  <span
506
508
  v-else
507
- class="inline-flex items-center gap-1.5 h-7 px-2.5 py-1 text-sm border border-(--ui-border) rounded-md text-(--ui-text-muted)"
509
+ class="inline-flex items-center gap-1.5 h-7 px-2.5 py-1 text-sm border border-(--ui-border) rounded-md bg-(--ui-bg) text-(--ui-text-muted)"
508
510
  >
509
511
  <UIcon
510
512
  :name="chipIcon"
@@ -3,6 +3,7 @@ import { ref, computed, watch, nextTick, shallowRef, onMounted, onBeforeUnmount,
3
3
  import { useRuntimeConfig, useColorMode, useAppConfig, useToast } from "#imports";
4
4
  import { useRouter } from "vue-router";
5
5
  import { avatarBorderStyle } from "../../utils/avatarStyle";
6
+ import { mapboxAccessToken as resolveMapboxToken, MAPBOX_TOKEN_MISSING } from "../../utils/mapboxToken";
6
7
  import { useAbracadabra } from "../../composables/useAbracadabra";
7
8
  import { useDocSlugs } from "../../composables/useDocSlugs";
8
9
  import { useRendererBase } from "../../composables/useRendererBase";
@@ -1683,9 +1684,9 @@ onMounted(async () => {
1683
1684
  }
1684
1685
  if (!mapContainer.value) return;
1685
1686
  window.addEventListener("keydown", onKeyDown);
1686
- const token = config.public?.abracadabra?.mapboxToken;
1687
+ const token = resolveMapboxToken();
1687
1688
  if (!token) {
1688
- mapboxError.value = "Mapbox access token not configured. Set abracadabra.mapboxToken in runtimeConfig.public.";
1689
+ mapboxError.value = MAPBOX_TOKEN_MISSING;
1689
1690
  return;
1690
1691
  }
1691
1692
  mapboxgl.accessToken = token;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,143 @@
1
+ <script setup>
2
+ import { computed, ref } from "vue";
3
+ import { useAbracadabra } from "../../composables/useAbracadabra";
4
+ import { useServerInfo } from "../../composables/useServerInfo";
5
+ import ASettingsGroup from "./ASettingsGroup.vue";
6
+ import ASettingsRow from "./ASettingsRow.vue";
7
+ const abra = useAbracadabra();
8
+ const {
9
+ serverName,
10
+ serverVersion,
11
+ rootDocId,
12
+ healthy,
13
+ readiness,
14
+ checkingReadiness,
15
+ loading,
16
+ error,
17
+ refresh,
18
+ checkReadiness
19
+ } = useServerInfo();
20
+ const serverUrl = computed(() => abra.currentServerUrl.value ?? "");
21
+ const publicKey = computed(() => abra.publicKeyB64?.value ?? "");
22
+ const readinessLabel = computed(() => {
23
+ if (checkingReadiness.value) return "Checking\u2026";
24
+ const r = readiness.value;
25
+ if (r === null || r === void 0) return "Not checked";
26
+ return typeof r === "string" ? r : JSON.stringify(r);
27
+ });
28
+ const copied = ref(false);
29
+ const diagnostics = computed(() => [
30
+ `server: ${serverName.value ?? "\u2014"}`,
31
+ `url: ${serverUrl.value || "\u2014"}`,
32
+ `version: ${serverVersion.value ?? "\u2014"}`,
33
+ `root: ${rootDocId.value ?? "\u2014"}`,
34
+ `key: ${publicKey.value || "\u2014"}`,
35
+ `agent: ${typeof navigator === "undefined" ? "\u2014" : navigator.userAgent}`
36
+ ].join("\n"));
37
+ async function copyDiagnostics() {
38
+ try {
39
+ await navigator.clipboard.writeText(diagnostics.value);
40
+ copied.value = true;
41
+ setTimeout(() => {
42
+ copied.value = false;
43
+ }, 1600);
44
+ } catch {
45
+ }
46
+ }
47
+ </script>
48
+
49
+ <template>
50
+ <div class="flex flex-col gap-8">
51
+ <ASettingsGroup
52
+ title="Server"
53
+ description="Read live from the server this client is connected to."
54
+ >
55
+ <ASettingsRow
56
+ label="Name"
57
+ :description="serverUrl || void 0"
58
+ >
59
+ <span class="text-sm text-(--ui-text-muted)">{{ serverName ?? "\u2014" }}</span>
60
+ </ASettingsRow>
61
+
62
+ <ASettingsRow label="Version">
63
+ <span class="text-sm font-mono text-(--ui-text-muted)">{{ serverVersion ?? "\u2014" }}</span>
64
+ </ASettingsRow>
65
+
66
+ <ASettingsRow
67
+ label="Health"
68
+ description="Whether the server answered its health check."
69
+ >
70
+ <UBadge
71
+ :color="healthy ? 'success' : 'error'"
72
+ variant="subtle"
73
+ size="xs"
74
+ :label="healthy ? 'Healthy' : 'Unreachable'"
75
+ />
76
+ <UButton
77
+ icon="i-lucide-refresh-cw"
78
+ size="xs"
79
+ color="neutral"
80
+ variant="ghost"
81
+ :loading="loading"
82
+ @click="refresh()"
83
+ />
84
+ </ASettingsRow>
85
+
86
+ <ASettingsRow
87
+ label="Readiness"
88
+ description="The server's own /readyz report."
89
+ >
90
+ <span class="text-xs font-mono text-(--ui-text-muted) truncate max-w-64">{{ readinessLabel }}</span>
91
+ <UButton
92
+ label="Check"
93
+ size="xs"
94
+ color="neutral"
95
+ variant="outline"
96
+ :loading="checkingReadiness"
97
+ @click="checkReadiness()"
98
+ />
99
+ </ASettingsRow>
100
+
101
+ <ASettingsRow
102
+ v-if="error"
103
+ label="Last error"
104
+ >
105
+ <span class="text-xs font-mono text-(--ui-color-error-500)">{{ error }}</span>
106
+ </ASettingsRow>
107
+ </ASettingsGroup>
108
+
109
+ <ASettingsGroup
110
+ title="This client"
111
+ description="Identity and document root for the current session."
112
+ >
113
+ <ASettingsRow
114
+ label="Public key"
115
+ description="This device's identity on the server."
116
+ >
117
+ <code class="text-xs font-mono text-(--ui-text-muted) bg-(--ui-bg-elevated) px-2 py-1 rounded truncate max-w-64">
118
+ {{ publicKey || "\u2014" }}
119
+ </code>
120
+ </ASettingsRow>
121
+
122
+ <ASettingsRow label="Root document">
123
+ <code class="text-xs font-mono text-(--ui-text-muted) bg-(--ui-bg-elevated) px-2 py-1 rounded truncate max-w-64">
124
+ {{ rootDocId ?? "\u2014" }}
125
+ </code>
126
+ </ASettingsRow>
127
+
128
+ <ASettingsRow
129
+ label="Diagnostics"
130
+ description="Copy the values above as text for a bug report."
131
+ >
132
+ <UButton
133
+ :label="copied ? 'Copied' : 'Copy'"
134
+ :icon="copied ? 'i-lucide-check' : 'i-lucide-clipboard'"
135
+ size="xs"
136
+ color="neutral"
137
+ variant="outline"
138
+ @click="copyDiagnostics"
139
+ />
140
+ </ASettingsRow>
141
+ </ASettingsGroup>
142
+ </div>
143
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;