@abraca/nuxt 2.10.0 → 2.13.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 (127) hide show
  1. package/dist/module.d.mts +14 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +9 -0
  4. package/dist/runtime/assets/editor.css +1 -1
  5. package/dist/runtime/components/AConnectionBadge.d.vue.ts +29 -0
  6. package/dist/runtime/components/AConnectionBadge.vue +79 -0
  7. package/dist/runtime/components/AConnectionBadge.vue.d.ts +29 -0
  8. package/dist/runtime/components/ADocPickerModal.d.vue.ts +31 -0
  9. package/dist/runtime/components/ADocPickerModal.vue +191 -0
  10. package/dist/runtime/components/ADocPickerModal.vue.d.ts +31 -0
  11. package/dist/runtime/components/ADocumentTree.vue +65 -0
  12. package/dist/runtime/components/AEditor.d.vue.ts +19 -12
  13. package/dist/runtime/components/AEditor.vue +243 -165
  14. package/dist/runtime/components/AEditor.vue.d.ts +19 -12
  15. package/dist/runtime/components/AEncryptionModePicker.d.vue.ts +33 -0
  16. package/dist/runtime/components/AEncryptionModePicker.vue +211 -0
  17. package/dist/runtime/components/AEncryptionModePicker.vue.d.ts +33 -0
  18. package/dist/runtime/components/AModalShell.d.vue.ts +48 -0
  19. package/dist/runtime/components/AModalShell.vue +105 -0
  20. package/dist/runtime/components/AModalShell.vue.d.ts +48 -0
  21. package/dist/runtime/components/ANodePanel.d.vue.ts +17 -7
  22. package/dist/runtime/components/ANodePanel.vue +550 -451
  23. package/dist/runtime/components/ANodePanel.vue.d.ts +17 -7
  24. package/dist/runtime/components/ANodePanelHeader.d.vue.ts +20 -10
  25. package/dist/runtime/components/ANodePanelHeader.vue +17 -3
  26. package/dist/runtime/components/ANodePanelHeader.vue.d.ts +20 -10
  27. package/dist/runtime/components/ANodeSettingsPanel.d.vue.ts +2 -0
  28. package/dist/runtime/components/ANodeSettingsPanel.vue +21 -1
  29. package/dist/runtime/components/ANodeSettingsPanel.vue.d.ts +2 -0
  30. package/dist/runtime/components/ASnapshotPreviewModal.d.vue.ts +33 -0
  31. package/dist/runtime/components/ASnapshotPreviewModal.vue +430 -0
  32. package/dist/runtime/components/ASnapshotPreviewModal.vue.d.ts +33 -0
  33. package/dist/runtime/components/ATagsEditor.d.vue.ts +19 -0
  34. package/dist/runtime/components/ATagsEditor.vue +60 -0
  35. package/dist/runtime/components/ATagsEditor.vue.d.ts +19 -0
  36. package/dist/runtime/components/aware/AMedia.d.vue.ts +1 -1
  37. package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
  38. package/dist/runtime/components/chat/AChatInput.d.vue.ts +11 -6
  39. package/dist/runtime/components/chat/AChatInput.vue +33 -2
  40. package/dist/runtime/components/chat/AChatInput.vue.d.ts +11 -6
  41. package/dist/runtime/components/chat/AChatList.d.vue.ts +12 -0
  42. package/dist/runtime/components/chat/AChatList.vue +76 -32
  43. package/dist/runtime/components/chat/AChatList.vue.d.ts +12 -0
  44. package/dist/runtime/components/chat/AChatMessages.d.vue.ts +4 -0
  45. package/dist/runtime/components/chat/AChatMessages.vue +57 -4
  46. package/dist/runtime/components/chat/AChatMessages.vue.d.ts +4 -0
  47. package/dist/runtime/components/chat/AChatPanel.d.vue.ts +6 -2
  48. package/dist/runtime/components/chat/AChatPanel.vue +17 -1
  49. package/dist/runtime/components/chat/AChatPanel.vue.d.ts +6 -2
  50. package/dist/runtime/components/chat/ANodeChatPanel.vue +1 -1
  51. package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +1 -1
  52. package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +1 -1
  53. package/dist/runtime/components/editor/ALocationPickerPopover.vue +28 -7
  54. package/dist/runtime/components/registry/APluginDetail.d.vue.ts +2 -2
  55. package/dist/runtime/components/registry/APluginDetail.vue.d.ts +2 -2
  56. package/dist/runtime/components/renderers/AChartRenderer.client.d.vue.ts +17 -0
  57. package/dist/runtime/components/renderers/AChartRenderer.client.vue +622 -0
  58. package/dist/runtime/components/renderers/AChartRenderer.client.vue.d.ts +17 -0
  59. package/dist/runtime/components/renderers/AGraphRenderer.vue +64 -15
  60. package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +2 -2
  61. package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +2 -2
  62. package/dist/runtime/components/renderers/calendar/ACalendarToolbar.d.vue.ts +2 -2
  63. package/dist/runtime/components/renderers/calendar/ACalendarToolbar.vue.d.ts +2 -2
  64. package/dist/runtime/components/renderers/media/MediaTransportBar.d.vue.ts +2 -2
  65. package/dist/runtime/components/renderers/media/MediaTransportBar.vue.d.ts +2 -2
  66. package/dist/runtime/components/renderers/sheets/ASheetsGrid.d.vue.ts +2 -2
  67. package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue.d.ts +2 -2
  68. package/dist/runtime/components/settings/ASettingsAppearancePanel.d.vue.ts +3 -0
  69. package/dist/runtime/components/settings/ASettingsAppearancePanel.vue +67 -0
  70. package/dist/runtime/components/settings/ASettingsAppearancePanel.vue.d.ts +3 -0
  71. package/dist/runtime/components/settings/ASettingsGroup.d.vue.ts +24 -0
  72. package/dist/runtime/components/settings/ASettingsGroup.vue +31 -0
  73. package/dist/runtime/components/settings/ASettingsGroup.vue.d.ts +24 -0
  74. package/dist/runtime/components/settings/ASettingsModal.vue +84 -53
  75. package/dist/runtime/components/settings/ASettingsPlaceholder.d.vue.ts +20 -0
  76. package/dist/runtime/components/settings/ASettingsPlaceholder.vue +32 -0
  77. package/dist/runtime/components/settings/ASettingsPlaceholder.vue.d.ts +20 -0
  78. package/dist/runtime/components/settings/ASettingsRow.d.vue.ts +34 -0
  79. package/dist/runtime/components/settings/ASettingsRow.vue +34 -0
  80. package/dist/runtime/components/settings/ASettingsRow.vue.d.ts +34 -0
  81. package/dist/runtime/components/settings/sections.d.ts +37 -0
  82. package/dist/runtime/components/settings/sections.js +45 -0
  83. package/dist/runtime/components/shell/ABreadcrumbForDoc.d.vue.ts +6 -0
  84. package/dist/runtime/components/shell/ABreadcrumbForDoc.vue +75 -3
  85. package/dist/runtime/components/shell/ABreadcrumbForDoc.vue.d.ts +6 -0
  86. package/dist/runtime/components/shell/ADocPanelServerSettings.d.vue.ts +17 -0
  87. package/dist/runtime/components/shell/ADocPanelServerSettings.vue +253 -0
  88. package/dist/runtime/components/shell/ADocPanelServerSettings.vue.d.ts +17 -0
  89. package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +2 -0
  90. package/dist/runtime/components/shell/ADocPanelSettings.vue +15 -4
  91. package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +2 -0
  92. package/dist/runtime/components/shell/AUserProfilePopover.d.vue.ts +1 -1
  93. package/dist/runtime/components/shell/AUserProfilePopover.vue.d.ts +1 -1
  94. package/dist/runtime/composables/useChat.d.ts +22 -1
  95. package/dist/runtime/composables/useChat.js +79 -8
  96. package/dist/runtime/composables/useDocBreadcrumb.d.ts +17 -2
  97. package/dist/runtime/composables/useDocBreadcrumb.js +17 -3
  98. package/dist/runtime/composables/useDocSnapshots.d.ts +2 -1
  99. package/dist/runtime/composables/useDocSnapshots.js +5 -0
  100. package/dist/runtime/composables/useEditor.d.ts +1 -1
  101. package/dist/runtime/composables/useEditor.js +120 -0
  102. package/dist/runtime/composables/useEditorToolbar.d.ts +12 -4
  103. package/dist/runtime/composables/useEditorToolbar.js +78 -56
  104. package/dist/runtime/composables/useNodeContextMenu.d.ts +14 -0
  105. package/dist/runtime/composables/useNodeContextMenu.js +59 -1
  106. package/dist/runtime/composables/useSettingsModal.d.ts +1 -1
  107. package/dist/runtime/composables/useSwipeGesture.d.ts +48 -0
  108. package/dist/runtime/composables/useSwipeGesture.js +140 -0
  109. package/dist/runtime/extensions/document-header.js +16 -6
  110. package/dist/runtime/extensions/document-meta.js +344 -19
  111. package/dist/runtime/extensions/meta-field.js +42 -0
  112. package/dist/runtime/extensions/views/DocumentMetaView.vue +33 -7
  113. package/dist/runtime/extensions/views/FieldView.vue +51 -19
  114. package/dist/runtime/extensions/views/MetaFieldView.vue +30 -4
  115. package/dist/runtime/locale.d.ts +8 -0
  116. package/dist/runtime/locale.js +9 -1
  117. package/dist/runtime/middleware/abracadabra-auth.d.ts +1 -1
  118. package/dist/runtime/plugin-abracadabra.client.d.ts +1 -1
  119. package/dist/runtime/plugin-abracadabra.client.js +12 -2
  120. package/dist/runtime/plugin-abracadabra.server.d.ts +1 -1
  121. package/dist/runtime/plugin-shared-globals.client.d.ts +1 -1
  122. package/dist/runtime/utils/chatContent.d.ts +20 -2
  123. package/dist/runtime/utils/chatContent.js +20 -1
  124. package/dist/runtime/utils/docTypes.js +43 -0
  125. package/dist/runtime/utils/titleSync.d.ts +130 -0
  126. package/dist/runtime/utils/titleSync.js +53 -0
  127. package/package.json +11 -4
@@ -0,0 +1,211 @@
1
+ <script setup>
2
+ import { computed, onMounted, ref } from "vue";
3
+ import { useAbracadabra } from "../composables/useAbracadabra";
4
+ import AModalShell from "./AModalShell.vue";
5
+ const props = defineProps({
6
+ docId: { type: String, required: true },
7
+ labels: { type: Object, required: false }
8
+ });
9
+ const emit = defineEmits(["updated"]);
10
+ const DEFAULTS = {
11
+ noneTitle: "No encryption",
12
+ noneDesc: "The server stores and can read this document. Full-text search, offline cache, and previews all work.",
13
+ cseTitle: "Client-side encryption",
14
+ cseDesc: "Encrypted before it leaves your device. The server stores ciphertext but can still coordinate sync.",
15
+ e2eTitle: "End-to-end encryption",
16
+ e2eDesc: "Only people with the document key can read it. The server never sees plaintext.",
17
+ cannotDowngrade: "Encryption can only be strengthened, never reduced.",
18
+ loadFailed: "Couldn't load encryption settings",
19
+ retry: "Retry",
20
+ enableE2ETitle: "Enable end-to-end encryption?",
21
+ cannotBeUndone: "This cannot be undone.",
22
+ warningServerCantRead: "The server will no longer be able to read this document.",
23
+ warningNoSearch: "Server-side full-text search will stop working.",
24
+ warningNoOffline: "Some offline and preview features may be limited.",
25
+ warningKeysRequired: "Anyone who needs access must hold the document key.",
26
+ warningCannotUndo: "You cannot switch back to a weaker mode later.",
27
+ cancel: "Cancel",
28
+ enableE2E: "Enable end-to-end encryption"
29
+ };
30
+ const t = computed(() => ({ ...DEFAULTS, ...props.labels }));
31
+ const { client } = useAbracadabra();
32
+ const encInfo = ref(null);
33
+ const loading = ref(true);
34
+ const error = ref(null);
35
+ const saving = ref(false);
36
+ const showE2EConfirm = ref(false);
37
+ const pendingMode = ref("none");
38
+ const STRICTNESS = { none: 0, cse: 1, e2e: 2 };
39
+ const modes = computed(() => {
40
+ const effective = encInfo.value?.effective_mode ?? "none";
41
+ const current = STRICTNESS[effective];
42
+ return [
43
+ {
44
+ value: "none",
45
+ label: t.value.noneTitle,
46
+ description: t.value.noneDesc,
47
+ icon: "i-lucide-lock-open",
48
+ disabled: current > 0
49
+ },
50
+ {
51
+ value: "cse",
52
+ label: t.value.cseTitle,
53
+ description: t.value.cseDesc,
54
+ icon: "i-lucide-shield",
55
+ disabled: current > 1
56
+ },
57
+ {
58
+ value: "e2e",
59
+ label: t.value.e2eTitle,
60
+ description: t.value.e2eDesc,
61
+ icon: "i-lucide-lock-keyhole",
62
+ disabled: false
63
+ }
64
+ ];
65
+ });
66
+ const selected = computed(() => encInfo.value?.effective_mode ?? "none");
67
+ async function load() {
68
+ loading.value = true;
69
+ error.value = null;
70
+ try {
71
+ encInfo.value = await client.value.getDocEncryption(props.docId);
72
+ } catch (e) {
73
+ error.value = String(e);
74
+ } finally {
75
+ loading.value = false;
76
+ }
77
+ }
78
+ function handleSelect(mode) {
79
+ if (mode === selected.value) return;
80
+ pendingMode.value = mode;
81
+ if (mode === "e2e") {
82
+ showE2EConfirm.value = true;
83
+ } else {
84
+ void applyMode(mode);
85
+ }
86
+ }
87
+ async function applyMode(mode) {
88
+ showE2EConfirm.value = false;
89
+ saving.value = true;
90
+ try {
91
+ await client.value.setDocEncryption(props.docId, mode);
92
+ await load();
93
+ if (encInfo.value) emit("updated", encInfo.value);
94
+ } catch (e) {
95
+ error.value = String(e);
96
+ } finally {
97
+ saving.value = false;
98
+ }
99
+ }
100
+ onMounted(load);
101
+ </script>
102
+
103
+ <template>
104
+ <div class="space-y-3">
105
+ <div
106
+ v-if="loading"
107
+ class="space-y-2"
108
+ >
109
+ <USkeleton class="h-14 w-full rounded-lg" />
110
+ <USkeleton class="h-14 w-full rounded-lg" />
111
+ <USkeleton class="h-14 w-full rounded-lg" />
112
+ </div>
113
+
114
+ <UAlert
115
+ v-else-if="error"
116
+ color="error"
117
+ variant="soft"
118
+ icon="i-lucide-alert-circle"
119
+ :title="t.loadFailed"
120
+ :description="error"
121
+ >
122
+ <template #actions>
123
+ <UButton
124
+ size="sm"
125
+ color="error"
126
+ variant="soft"
127
+ :label="t.retry"
128
+ @click="load"
129
+ />
130
+ </template>
131
+ </UAlert>
132
+
133
+ <template v-else>
134
+ <URadioGroup
135
+ :model-value="selected"
136
+ :items="modes"
137
+ value-key="value"
138
+ variant="card"
139
+ color="primary"
140
+ size="md"
141
+ :ui="{ fieldset: 'gap-2', item: 'w-full items-start', wrapper: 'flex-1', label: 'flex items-center gap-2 font-medium text-default' }"
142
+ :disabled="saving"
143
+ @update:model-value="(v) => handleSelect(v)"
144
+ >
145
+ <template #label="{ item }">
146
+ <UIcon
147
+ :name="item.icon"
148
+ class="size-4 shrink-0 text-(--ui-text-muted)"
149
+ />
150
+ <span>{{ item.label }}</span>
151
+ </template>
152
+ <template #description="{ item }">
153
+ <span class="text-xs leading-snug text-(--ui-text-muted)">{{ item.description }}</span>
154
+ </template>
155
+ </URadioGroup>
156
+
157
+ <UAlert
158
+ v-if="selected !== 'none'"
159
+ color="warning"
160
+ variant="subtle"
161
+ size="sm"
162
+ icon="i-lucide-alert-triangle"
163
+ :title="t.cannotDowngrade"
164
+ />
165
+ </template>
166
+
167
+ <AModalShell
168
+ :open="showE2EConfirm"
169
+ max-width="sm:max-w-md"
170
+ @update:open="showE2EConfirm = $event"
171
+ >
172
+ <div class="flex flex-col gap-4">
173
+ <h2 class="text-base font-semibold text-(--ui-text-highlighted)">
174
+ {{ t.enableE2ETitle }}
175
+ </h2>
176
+ <UAlert
177
+ color="warning"
178
+ icon="i-lucide-alert-triangle"
179
+ variant="soft"
180
+ :title="t.cannotBeUndone"
181
+ >
182
+ <template #description>
183
+ <ul class="list-disc pl-4 mt-1 space-y-1 text-sm">
184
+ <li>{{ t.warningServerCantRead }}</li>
185
+ <li>{{ t.warningNoSearch }}</li>
186
+ <li>{{ t.warningNoOffline }}</li>
187
+ <li>{{ t.warningKeysRequired }}</li>
188
+ <li><strong>{{ t.warningCannotUndo }}</strong></li>
189
+ </ul>
190
+ </template>
191
+ </UAlert>
192
+ </div>
193
+ <template #footer>
194
+ <div class="flex gap-2 justify-end w-full">
195
+ <UButton
196
+ color="neutral"
197
+ variant="ghost"
198
+ :label="t.cancel"
199
+ @click="showE2EConfirm = false"
200
+ />
201
+ <UButton
202
+ color="error"
203
+ :loading="saving"
204
+ :label="t.enableE2E"
205
+ @click="applyMode('e2e')"
206
+ />
207
+ </div>
208
+ </template>
209
+ </AModalShell>
210
+ </div>
211
+ </template>
@@ -0,0 +1,33 @@
1
+ import type { DocEncryptionInfo } from '@abraca/dabra';
2
+ type __VLS_Props = {
3
+ docId: string;
4
+ /** Override any displayed string. */
5
+ labels?: Partial<typeof DEFAULTS>;
6
+ };
7
+ declare const DEFAULTS: {
8
+ noneTitle: string;
9
+ noneDesc: string;
10
+ cseTitle: string;
11
+ cseDesc: string;
12
+ e2eTitle: string;
13
+ e2eDesc: string;
14
+ cannotDowngrade: string;
15
+ loadFailed: string;
16
+ retry: string;
17
+ enableE2ETitle: string;
18
+ cannotBeUndone: string;
19
+ warningServerCantRead: string;
20
+ warningNoSearch: string;
21
+ warningNoOffline: string;
22
+ warningKeysRequired: string;
23
+ warningCannotUndo: string;
24
+ cancel: string;
25
+ enableE2E: string;
26
+ };
27
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ updated: (args_0: DocEncryptionInfo) => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ onUpdated?: ((args_0: DocEncryptionInfo) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
@@ -0,0 +1,48 @@
1
+ type __VLS_Props = {
2
+ open: boolean;
3
+ /** Tailwind max-width class for the modal content (e.g. `sm:max-w-3xl`). */
4
+ maxWidth?: string;
5
+ closeable?: boolean;
6
+ /** Standard modal heading — guarantees the canonical look every modal shares. */
7
+ title?: string;
8
+ /** Optional muted line under the title (e.g. a short description). */
9
+ subtitle?: string;
10
+ /** When false, Esc / overlay-click cannot dismiss the modal (forced choice). */
11
+ dismissible?: boolean;
12
+ /** Enable horizontal swipe gestures for multi-step navigation. */
13
+ swipeable?: boolean;
14
+ /** Whether forward (swipe left) navigation is available. */
15
+ canSwipeForward?: boolean;
16
+ /** Whether backward (swipe right) navigation is available. */
17
+ canSwipeBack?: boolean;
18
+ };
19
+ declare var __VLS_19: {}, __VLS_21: {};
20
+ type __VLS_Slots = {} & {
21
+ default?: (props: typeof __VLS_19) => any;
22
+ } & {
23
+ footer?: (props: typeof __VLS_21) => any;
24
+ };
25
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:open": (v: boolean) => any;
27
+ "swipe-forward": () => any;
28
+ "swipe-back": () => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ "onUpdate:open"?: ((v: boolean) => any) | undefined;
31
+ "onSwipe-forward"?: (() => any) | undefined;
32
+ "onSwipe-back"?: (() => any) | undefined;
33
+ }>, {
34
+ maxWidth: string;
35
+ closeable: boolean;
36
+ dismissible: boolean;
37
+ swipeable: boolean;
38
+ canSwipeForward: boolean;
39
+ canSwipeBack: boolean;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
44
+ type __VLS_WithSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,105 @@
1
+ <script setup>
2
+ import { computed, ref } from "vue";
3
+ import { useResizeObserver } from "@vueuse/core";
4
+ import { useSwipeGesture } from "../composables/useSwipeGesture";
5
+ const props = defineProps({
6
+ open: { type: Boolean, required: true },
7
+ maxWidth: { type: String, required: false, default: "sm:max-w-xl" },
8
+ closeable: { type: Boolean, required: false, default: true },
9
+ title: { type: String, required: false },
10
+ subtitle: { type: String, required: false },
11
+ dismissible: { type: Boolean, required: false, default: true },
12
+ swipeable: { type: Boolean, required: false, default: false },
13
+ canSwipeForward: { type: Boolean, required: false, default: false },
14
+ canSwipeBack: { type: Boolean, required: false, default: false }
15
+ });
16
+ const emit = defineEmits(["update:open", "swipe-forward", "swipe-back"]);
17
+ const innerRef = ref();
18
+ const contentHeight = ref(void 0);
19
+ useResizeObserver(innerRef, (entries) => {
20
+ const entry = entries[0];
21
+ if (entry && entry.contentRect.height > 0) contentHeight.value = entry.contentRect.height;
22
+ });
23
+ const swipeRef = ref(null);
24
+ const swipeDirection = ref(null);
25
+ const { swipeOffset, isSwiping } = useSwipeGesture({
26
+ el: swipeRef,
27
+ axis: "x",
28
+ disabled: computed(() => !props.swipeable),
29
+ canSwipeLeft: computed(() => props.canSwipeForward),
30
+ canSwipeRight: computed(() => props.canSwipeBack),
31
+ onSwipeLeft() {
32
+ swipeDirection.value = "forward";
33
+ emit("swipe-forward");
34
+ },
35
+ onSwipeRight() {
36
+ swipeDirection.value = "back";
37
+ emit("swipe-back");
38
+ }
39
+ });
40
+ const transitionName = computed(
41
+ () => swipeDirection.value === "back" ? "ams-step-fade-reverse" : "ams-step-fade"
42
+ );
43
+ function onAfterLeave() {
44
+ swipeDirection.value = null;
45
+ }
46
+ </script>
47
+
48
+ <template>
49
+ <UModal
50
+ :open="props.open"
51
+ :closeable="closeable"
52
+ :dismissible="dismissible"
53
+ :ui="{
54
+ content: `${maxWidth} divide-y-0`,
55
+ header: 'hidden'
56
+ }"
57
+ @update:open="emit('update:open', $event)"
58
+ >
59
+ <template #body>
60
+ <div class="flex flex-col gap-6 p-4 sm:p-6">
61
+ <div
62
+ v-if="title || subtitle"
63
+ class="flex flex-col gap-1"
64
+ >
65
+ <h2
66
+ v-if="title"
67
+ class="text-base font-semibold text-(--ui-text-highlighted)"
68
+ >
69
+ {{ title }}
70
+ </h2>
71
+ <p
72
+ v-if="subtitle"
73
+ class="text-sm text-(--ui-text-muted)"
74
+ >
75
+ {{ subtitle }}
76
+ </p>
77
+ </div>
78
+ <div
79
+ ref="swipeRef"
80
+ class="ams-height-wrap"
81
+ :style="{
82
+ ...contentHeight !== void 0 ? { height: contentHeight + 'px' } : {},
83
+ ...isSwiping ? { transform: `translateX(${swipeOffset.x}px)`, transition: 'none' } : {}
84
+ }"
85
+ >
86
+ <div ref="innerRef">
87
+ <Transition
88
+ :name="transitionName"
89
+ mode="out-in"
90
+ @after-leave="onAfterLeave"
91
+ >
92
+ <slot />
93
+ </Transition>
94
+ </div>
95
+ </div>
96
+
97
+ <slot name="footer" />
98
+ </div>
99
+ </template>
100
+ </UModal>
101
+ </template>
102
+
103
+ <style scoped>
104
+ .ams-height-wrap{overflow:hidden;transition:height .35s cubic-bezier(.4,0,.2,1),transform .3s ease}.ams-step-fade-enter-active{transition:opacity .3s ease,transform .35s cubic-bezier(.4,0,.2,1)}.ams-step-fade-leave-active{transition:opacity .2s ease,transform .2s cubic-bezier(.4,0,.2,1)}.ams-step-fade-enter-from{opacity:0;transform:translateX(16px) scale(.97)}.ams-step-fade-leave-to{opacity:0;transform:translateX(-12px) scale(.98)}.ams-step-fade-reverse-enter-active{transition:opacity .3s ease,transform .35s cubic-bezier(.4,0,.2,1)}.ams-step-fade-reverse-leave-active{transition:opacity .2s ease,transform .2s cubic-bezier(.4,0,.2,1)}.ams-step-fade-reverse-enter-from{opacity:0;transform:translateX(-16px) scale(.97)}.ams-step-fade-reverse-leave-to{opacity:0;transform:translateX(12px) scale(.98)}
105
+ </style>
@@ -0,0 +1,48 @@
1
+ type __VLS_Props = {
2
+ open: boolean;
3
+ /** Tailwind max-width class for the modal content (e.g. `sm:max-w-3xl`). */
4
+ maxWidth?: string;
5
+ closeable?: boolean;
6
+ /** Standard modal heading — guarantees the canonical look every modal shares. */
7
+ title?: string;
8
+ /** Optional muted line under the title (e.g. a short description). */
9
+ subtitle?: string;
10
+ /** When false, Esc / overlay-click cannot dismiss the modal (forced choice). */
11
+ dismissible?: boolean;
12
+ /** Enable horizontal swipe gestures for multi-step navigation. */
13
+ swipeable?: boolean;
14
+ /** Whether forward (swipe left) navigation is available. */
15
+ canSwipeForward?: boolean;
16
+ /** Whether backward (swipe right) navigation is available. */
17
+ canSwipeBack?: boolean;
18
+ };
19
+ declare var __VLS_19: {}, __VLS_21: {};
20
+ type __VLS_Slots = {} & {
21
+ default?: (props: typeof __VLS_19) => any;
22
+ } & {
23
+ footer?: (props: typeof __VLS_21) => any;
24
+ };
25
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:open": (v: boolean) => any;
27
+ "swipe-forward": () => any;
28
+ "swipe-back": () => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ "onUpdate:open"?: ((v: boolean) => any) | undefined;
31
+ "onSwipe-forward"?: (() => any) | undefined;
32
+ "onSwipe-back"?: (() => any) | undefined;
33
+ }>, {
34
+ maxWidth: string;
35
+ closeable: boolean;
36
+ dismissible: boolean;
37
+ swipeable: boolean;
38
+ canSwipeForward: boolean;
39
+ canSwipeBack: boolean;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
44
+ type __VLS_WithSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -7,19 +7,29 @@ type __VLS_Props = {
7
7
  docType?: string;
8
8
  labels?: Partial<AbracadabraLocale['nodePanel']>;
9
9
  /** Tab to open initially. Defaults to 'editor'. */
10
- initialTab?: 'editor' | 'properties' | 'chat' | 'settings' | string;
10
+ initialTab?: 'editor' | 'properties' | 'chat' | 'settings' | 'serverSettings' | string;
11
11
  /**
12
- * Built-in tabs to render. Defaults to all-on; pass an array to limit which
13
- * tabs appear (useful when a developer wants only properties + chat).
14
- * Plugin-registered tab slots are unaffected.
12
+ * Built-in tabs to render. Defaults to editor/properties/chat/settings on;
13
+ * pass an array to limit which tabs appear (useful when a developer wants
14
+ * only properties + chat). `serverSettings` is OPT-IN only rendered when
15
+ * explicitly included (it targets a server hub doc). Plugin-registered tab
16
+ * slots are unaffected.
15
17
  */
16
- tabs?: Array<'editor' | 'properties' | 'chat' | 'settings'>;
18
+ tabs?: Array<'editor' | 'properties' | 'chat' | 'settings' | 'serverSettings'>;
19
+ /**
20
+ * Build the URL the "open as full page" (expand) button navigates to.
21
+ * Defaults to a slug-aware path derived from the configured `docBasePath`
22
+ * (`useDocSlugs().getDocUrl`), which resolves to the doc's slug when it has
23
+ * one and falls back to the raw id. Override to target a custom route shape.
24
+ */
25
+ docHref?: (id: string) => string;
17
26
  };
18
27
  declare var __VLS_11: {
19
28
  nodeId: string | null;
20
- nodeLabel: string | undefined;
29
+ nodeLabel: any;
21
30
  editor: any;
22
31
  meta: DocPageMeta;
32
+ activeTab: string;
23
33
  docTypeDef: import("../utils/docTypes.js").DocTypeDefinition;
24
34
  };
25
35
  type __VLS_Slots = {} & {
@@ -30,7 +40,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
30
40
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
41
  onClose?: (() => any) | undefined;
32
42
  }>, {
33
- initialTab: "editor" | "properties" | "chat" | "settings" | string;
43
+ initialTab: "editor" | "properties" | "chat" | "settings" | "serverSettings" | string;
34
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
45
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
46
  declare const _default: typeof __VLS_export;