@abraca/nuxt 0.1.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/README.md +84 -0
- package/dist/module.d.mts +201 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +170 -0
- package/dist/runtime/components/ACollaborationUsers.d.vue.ts +11 -0
- package/dist/runtime/components/ACollaborationUsers.vue +48 -0
- package/dist/runtime/components/ACollaborationUsers.vue.d.ts +11 -0
- package/dist/runtime/components/AColorPicker.d.vue.ts +13 -0
- package/dist/runtime/components/AColorPicker.vue +71 -0
- package/dist/runtime/components/AColorPicker.vue.d.ts +13 -0
- package/dist/runtime/components/ACommandPalette.d.vue.ts +13 -0
- package/dist/runtime/components/ACommandPalette.vue +31 -0
- package/dist/runtime/components/ACommandPalette.vue.d.ts +13 -0
- package/dist/runtime/components/AConnectionStatus.d.vue.ts +13 -0
- package/dist/runtime/components/AConnectionStatus.vue +50 -0
- package/dist/runtime/components/AConnectionStatus.vue.d.ts +13 -0
- package/dist/runtime/components/ADocTypeSelect.d.vue.ts +10 -0
- package/dist/runtime/components/ADocTypeSelect.vue +34 -0
- package/dist/runtime/components/ADocTypeSelect.vue.d.ts +10 -0
- package/dist/runtime/components/ADocumentTree.d.vue.ts +53 -0
- package/dist/runtime/components/ADocumentTree.vue +350 -0
- package/dist/runtime/components/ADocumentTree.vue.d.ts +53 -0
- package/dist/runtime/components/AEditor.d.vue.ts +60 -0
- package/dist/runtime/components/AEditor.vue +174 -0
- package/dist/runtime/components/AEditor.vue.d.ts +60 -0
- package/dist/runtime/components/AFloatingWindow.d.vue.ts +24 -0
- package/dist/runtime/components/AFloatingWindow.vue +232 -0
- package/dist/runtime/components/AFloatingWindow.vue.d.ts +24 -0
- package/dist/runtime/components/AIconPicker.d.vue.ts +13 -0
- package/dist/runtime/components/AIconPicker.vue +257 -0
- package/dist/runtime/components/AIconPicker.vue.d.ts +13 -0
- package/dist/runtime/components/ANodePanel.d.vue.ts +15 -0
- package/dist/runtime/components/ANodePanel.vue +541 -0
- package/dist/runtime/components/ANodePanel.vue.d.ts +15 -0
- package/dist/runtime/components/ANotifications.d.vue.ts +7 -0
- package/dist/runtime/components/ANotifications.vue +75 -0
- package/dist/runtime/components/ANotifications.vue.d.ts +7 -0
- package/dist/runtime/components/APermissionGuard.d.vue.ts +21 -0
- package/dist/runtime/components/APermissionGuard.vue +22 -0
- package/dist/runtime/components/APermissionGuard.vue.d.ts +21 -0
- package/dist/runtime/components/APresence.d.vue.ts +43 -0
- package/dist/runtime/components/APresence.vue +36 -0
- package/dist/runtime/components/APresence.vue.d.ts +43 -0
- package/dist/runtime/components/AProvider.d.vue.ts +27 -0
- package/dist/runtime/components/AProvider.vue +42 -0
- package/dist/runtime/components/AProvider.vue.d.ts +27 -0
- package/dist/runtime/components/ARoleBadge.d.vue.ts +11 -0
- package/dist/runtime/components/ARoleBadge.vue +29 -0
- package/dist/runtime/components/ARoleBadge.vue.d.ts +11 -0
- package/dist/runtime/components/AVoiceBar.d.vue.ts +13 -0
- package/dist/runtime/components/AVoiceBar.vue +379 -0
- package/dist/runtime/components/AVoiceBar.vue.d.ts +13 -0
- package/dist/runtime/components/AVoiceTile.d.vue.ts +10 -0
- package/dist/runtime/components/AVoiceTile.vue +48 -0
- package/dist/runtime/components/AVoiceTile.vue.d.ts +10 -0
- package/dist/runtime/components/AWindowLayer.d.vue.ts +3 -0
- package/dist/runtime/components/AWindowLayer.vue +17 -0
- package/dist/runtime/components/AWindowLayer.vue.d.ts +3 -0
- package/dist/runtime/components/aware/AArea.d.vue.ts +42 -0
- package/dist/runtime/components/aware/AArea.vue +45 -0
- package/dist/runtime/components/aware/AArea.vue.d.ts +42 -0
- package/dist/runtime/components/aware/AAvatar.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AAvatar.vue +86 -0
- package/dist/runtime/components/aware/AAvatar.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AButton.d.vue.ts +7 -0
- package/dist/runtime/components/aware/AButton.vue +39 -0
- package/dist/runtime/components/aware/AButton.vue.d.ts +7 -0
- package/dist/runtime/components/aware/ACursorLabel.d.vue.ts +12 -0
- package/dist/runtime/components/aware/ACursorLabel.vue +44 -0
- package/dist/runtime/components/aware/ACursorLabel.vue.d.ts +12 -0
- package/dist/runtime/components/aware/ADocBadge.d.vue.ts +11 -0
- package/dist/runtime/components/aware/ADocBadge.vue +27 -0
- package/dist/runtime/components/aware/ADocBadge.vue.d.ts +11 -0
- package/dist/runtime/components/aware/AFacepile.d.vue.ts +20 -0
- package/dist/runtime/components/aware/AFacepile.vue +92 -0
- package/dist/runtime/components/aware/AFacepile.vue.d.ts +20 -0
- package/dist/runtime/components/aware/AInput.d.vue.ts +7 -0
- package/dist/runtime/components/aware/AInput.vue +44 -0
- package/dist/runtime/components/aware/AInput.vue.d.ts +7 -0
- package/dist/runtime/components/aware/ASelect.d.vue.ts +7 -0
- package/dist/runtime/components/aware/ASelect.vue +51 -0
- package/dist/runtime/components/aware/ASelect.vue.d.ts +7 -0
- package/dist/runtime/components/aware/ATextarea.d.vue.ts +7 -0
- package/dist/runtime/components/aware/ATextarea.vue +44 -0
- package/dist/runtime/components/aware/ATextarea.vue.d.ts +7 -0
- package/dist/runtime/components/aware/AUserList.d.vue.ts +17 -0
- package/dist/runtime/components/aware/AUserList.vue +72 -0
- package/dist/runtime/components/aware/AUserList.vue.d.ts +17 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.vue +154 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/AGalleryRenderer.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/AGalleryRenderer.vue +88 -0
- package/dist/runtime/components/renderers/AGalleryRenderer.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/AKanbanRenderer.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/AKanbanRenderer.vue +179 -0
- package/dist/runtime/components/renderers/AKanbanRenderer.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/AOutlineRenderer.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/AOutlineRenderer.vue +180 -0
- package/dist/runtime/components/renderers/AOutlineRenderer.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/ATableRenderer.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/ATableRenderer.vue +191 -0
- package/dist/runtime/components/renderers/ATableRenderer.vue.d.ts +8 -0
- package/dist/runtime/composables/useAAField.d.ts +42 -0
- package/dist/runtime/composables/useAAField.js +62 -0
- package/dist/runtime/composables/useAbraLocale.d.ts +14 -0
- package/dist/runtime/composables/useAbraLocale.js +11 -0
- package/dist/runtime/composables/useAbracadabra.d.ts +11 -0
- package/dist/runtime/composables/useAbracadabra.js +3 -0
- package/dist/runtime/composables/useAbracadabraAuth.d.ts +23 -0
- package/dist/runtime/composables/useAbracadabraAuth.js +22 -0
- package/dist/runtime/composables/useAwareness.d.ts +22 -0
- package/dist/runtime/composables/useAwareness.js +48 -0
- package/dist/runtime/composables/useAwarenessPeers.d.ts +34 -0
- package/dist/runtime/composables/useAwarenessPeers.js +33 -0
- package/dist/runtime/composables/useBackgroundSync.d.ts +37 -0
- package/dist/runtime/composables/useBackgroundSync.js +73 -0
- package/dist/runtime/composables/useChat.d.ts +65 -0
- package/dist/runtime/composables/useChat.js +210 -0
- package/dist/runtime/composables/useChatUsers.d.ts +21 -0
- package/dist/runtime/composables/useChatUsers.js +39 -0
- package/dist/runtime/composables/useChildTree.d.ts +119 -0
- package/dist/runtime/composables/useChildTree.js +100 -0
- package/dist/runtime/composables/useCommandPalette.d.ts +58 -0
- package/dist/runtime/composables/useCommandPalette.js +94 -0
- package/dist/runtime/composables/useConnectionStatus.d.ts +17 -0
- package/dist/runtime/composables/useConnectionStatus.js +37 -0
- package/dist/runtime/composables/useDashboard.d.ts +3 -0
- package/dist/runtime/composables/useDashboard.js +23 -0
- package/dist/runtime/composables/useDocExport.d.ts +5 -0
- package/dist/runtime/composables/useDocExport.js +256 -0
- package/dist/runtime/composables/useDocImport.d.ts +10 -0
- package/dist/runtime/composables/useDocImport.js +227 -0
- package/dist/runtime/composables/useDocJump.d.ts +29 -0
- package/dist/runtime/composables/useDocJump.js +17 -0
- package/dist/runtime/composables/useDocumentPermissions.d.ts +20 -0
- package/dist/runtime/composables/useDocumentPermissions.js +33 -0
- package/dist/runtime/composables/useEditor.d.ts +45 -0
- package/dist/runtime/composables/useEditor.js +121 -0
- package/dist/runtime/composables/useEditorDragHandle.d.ts +26 -0
- package/dist/runtime/composables/useEditorDragHandle.js +219 -0
- package/dist/runtime/composables/useEditorMentions.d.ts +28 -0
- package/dist/runtime/composables/useEditorMentions.js +40 -0
- package/dist/runtime/composables/useEditorSuggestions.d.ts +18 -0
- package/dist/runtime/composables/useEditorSuggestions.js +45 -0
- package/dist/runtime/composables/useEditorToolbar.d.ts +22 -0
- package/dist/runtime/composables/useEditorToolbar.js +60 -0
- package/dist/runtime/composables/useFileBlobStore.d.ts +15 -0
- package/dist/runtime/composables/useFileBlobStore.js +22 -0
- package/dist/runtime/composables/useFileIndex.d.ts +20 -0
- package/dist/runtime/composables/useFileIndex.js +69 -0
- package/dist/runtime/composables/useFollowUser.d.ts +5 -0
- package/dist/runtime/composables/useFollowUser.js +40 -0
- package/dist/runtime/composables/useNotifications.d.ts +82 -0
- package/dist/runtime/composables/useNotifications.js +171 -0
- package/dist/runtime/composables/useOfflineUploadQueue.d.ts +90 -0
- package/dist/runtime/composables/useOfflineUploadQueue.js +33 -0
- package/dist/runtime/composables/usePasskeyAccounts.d.ts +32 -0
- package/dist/runtime/composables/usePasskeyAccounts.js +46 -0
- package/dist/runtime/composables/usePluginRegistry.d.ts +6 -0
- package/dist/runtime/composables/usePluginRegistry.js +3 -0
- package/dist/runtime/composables/useRendererBase.d.ts +186 -0
- package/dist/runtime/composables/useRendererBase.js +46 -0
- package/dist/runtime/composables/useSearchIndex.d.ts +20 -0
- package/dist/runtime/composables/useSearchIndex.js +104 -0
- package/dist/runtime/composables/useTrash.d.ts +50 -0
- package/dist/runtime/composables/useTrash.js +127 -0
- package/dist/runtime/composables/useVoice.d.ts +51 -0
- package/dist/runtime/composables/useVoice.js +220 -0
- package/dist/runtime/composables/useWindowManager.d.ts +122 -0
- package/dist/runtime/composables/useWindowManager.js +141 -0
- package/dist/runtime/composables/useYDoc.d.ts +142 -0
- package/dist/runtime/composables/useYDoc.js +172 -0
- package/dist/runtime/extensions/accordion.d.ts +3 -0
- package/dist/runtime/extensions/accordion.js +49 -0
- package/dist/runtime/extensions/badge.d.ts +2 -0
- package/dist/runtime/extensions/badge.js +39 -0
- package/dist/runtime/extensions/callout.d.ts +2 -0
- package/dist/runtime/extensions/callout.js +28 -0
- package/dist/runtime/extensions/card.d.ts +3 -0
- package/dist/runtime/extensions/card.js +53 -0
- package/dist/runtime/extensions/code-collapse.d.ts +2 -0
- package/dist/runtime/extensions/code-collapse.js +32 -0
- package/dist/runtime/extensions/code-group.d.ts +2 -0
- package/dist/runtime/extensions/code-group.js +17 -0
- package/dist/runtime/extensions/collapsible.d.ts +2 -0
- package/dist/runtime/extensions/collapsible.js +35 -0
- package/dist/runtime/extensions/document-header.d.ts +11 -0
- package/dist/runtime/extensions/document-header.js +82 -0
- package/dist/runtime/extensions/document-meta.d.ts +20 -0
- package/dist/runtime/extensions/document-meta.js +121 -0
- package/dist/runtime/extensions/document.d.ts +6 -0
- package/dist/runtime/extensions/document.js +6 -0
- package/dist/runtime/extensions/file-block.d.ts +15 -0
- package/dist/runtime/extensions/file-block.js +34 -0
- package/dist/runtime/extensions/file-drop.d.ts +6 -0
- package/dist/runtime/extensions/file-drop.js +65 -0
- package/dist/runtime/extensions/kbd.d.ts +2 -0
- package/dist/runtime/extensions/kbd.js +33 -0
- package/dist/runtime/extensions/prose-icon.d.ts +2 -0
- package/dist/runtime/extensions/prose-icon.js +33 -0
- package/dist/runtime/extensions/search-highlight.d.ts +10 -0
- package/dist/runtime/extensions/search-highlight.js +129 -0
- package/dist/runtime/extensions/steps.d.ts +2 -0
- package/dist/runtime/extensions/steps.js +32 -0
- package/dist/runtime/extensions/tabs.d.ts +3 -0
- package/dist/runtime/extensions/tabs.js +49 -0
- package/dist/runtime/extensions/views/AccordionItemView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/AccordionItemView.vue +41 -0
- package/dist/runtime/extensions/views/AccordionItemView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/AccordionView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/AccordionView.vue +22 -0
- package/dist/runtime/extensions/views/AccordionView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/BadgeView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/BadgeView.vue +23 -0
- package/dist/runtime/extensions/views/BadgeView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CalloutView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CalloutView.vue +43 -0
- package/dist/runtime/extensions/views/CalloutView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CardGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CardGroupView.vue +22 -0
- package/dist/runtime/extensions/views/CardGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CardView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CardView.vue +28 -0
- package/dist/runtime/extensions/views/CardView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CodeCollapseView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CodeCollapseView.vue +45 -0
- package/dist/runtime/extensions/views/CodeCollapseView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CodeGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CodeGroupView.vue +53 -0
- package/dist/runtime/extensions/views/CodeGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CollapsibleView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CollapsibleView.vue +42 -0
- package/dist/runtime/extensions/views/CollapsibleView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FileNodeView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/FileNodeView.vue +140 -0
- package/dist/runtime/extensions/views/FileNodeView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/KbdView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/KbdView.vue +23 -0
- package/dist/runtime/extensions/views/KbdView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/ProseIconView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ProseIconView.vue +23 -0
- package/dist/runtime/extensions/views/ProseIconView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/StepsView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/StepsView.vue +32 -0
- package/dist/runtime/extensions/views/StepsView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/TabsItemView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/TabsItemView.vue +22 -0
- package/dist/runtime/extensions/views/TabsItemView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/TabsView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/TabsView.vue +56 -0
- package/dist/runtime/extensions/views/TabsView.vue.d.ts +4 -0
- package/dist/runtime/locale.d.ts +134 -0
- package/dist/runtime/locale.js +119 -0
- package/dist/runtime/middleware/abracadabra-auth.d.ts +11 -0
- package/dist/runtime/middleware/abracadabra-auth.js +9 -0
- package/dist/runtime/plugin-abracadabra.client.d.ts +7 -0
- package/dist/runtime/plugin-abracadabra.client.js +898 -0
- package/dist/runtime/plugin-abracadabra.server.d.ts +2 -0
- package/dist/runtime/plugin-abracadabra.server.js +71 -0
- package/dist/runtime/plugin-registry.d.ts +34 -0
- package/dist/runtime/plugin-registry.js +83 -0
- package/dist/runtime/plugin-shared-globals.client.d.ts +2 -0
- package/dist/runtime/plugin-shared-globals.client.js +20 -0
- package/dist/runtime/plugins/core.plugin.d.ts +12 -0
- package/dist/runtime/plugins/core.plugin.js +179 -0
- package/dist/runtime/server/api/_abracadabra/render/[docId].get.d.ts +18 -0
- package/dist/runtime/server/api/_abracadabra/render/[docId].get.js +51 -0
- package/dist/runtime/server/api/_abracadabra/spaces.get.d.ts +11 -0
- package/dist/runtime/server/api/_abracadabra/spaces.get.js +16 -0
- package/dist/runtime/server/plugins/abracadabra-service.d.ts +2 -0
- package/dist/runtime/server/plugins/abracadabra-service.js +116 -0
- package/dist/runtime/server/runners/doc-tree-cache.d.ts +11 -0
- package/dist/runtime/server/runners/doc-tree-cache.js +65 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/docCache.d.ts +25 -0
- package/dist/runtime/server/utils/docCache.js +131 -0
- package/dist/runtime/server/utils/serverRunner.d.ts +28 -0
- package/dist/runtime/server/utils/serverRunner.js +58 -0
- package/dist/runtime/types.d.ts +444 -0
- package/dist/runtime/types.js +93 -0
- package/dist/runtime/utils/VoiceClient.d.ts +94 -0
- package/dist/runtime/utils/VoiceClient.js +599 -0
- package/dist/runtime/utils/avatarStyle.d.ts +15 -0
- package/dist/runtime/utils/avatarStyle.js +20 -0
- package/dist/runtime/utils/colorPalettes.d.ts +13 -0
- package/dist/runtime/utils/colorPalettes.js +49 -0
- package/dist/runtime/utils/docTypes.d.ts +129 -0
- package/dist/runtime/utils/docTypes.js +116 -0
- package/dist/runtime/utils/markdownToYjs.d.ts +23 -0
- package/dist/runtime/utils/markdownToYjs.js +440 -0
- package/dist/runtime/utils/metaFieldDefinitions.d.ts +7 -0
- package/dist/runtime/utils/metaFieldDefinitions.js +182 -0
- package/dist/runtime/utils/voiceErrors.d.ts +33 -0
- package/dist/runtime/utils/voiceErrors.js +54 -0
- package/dist/runtime/utils/yjsConvert.d.ts +14 -0
- package/dist/runtime/utils/yjsConvert.js +331 -0
- package/dist/types.d.mts +13 -0
- package/package.json +100 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper, NodeViewContent } from "@tiptap/vue-3";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
const open = ref(props.node.attrs.open ?? false);
|
|
17
|
+
function toggleOpen() {
|
|
18
|
+
open.value = !open.value;
|
|
19
|
+
props.updateAttributes({ open: open.value });
|
|
20
|
+
}
|
|
21
|
+
const label = computed(() => props.node.attrs.label || "Details");
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<NodeViewWrapper as="div" class="my-5">
|
|
26
|
+
<button
|
|
27
|
+
contenteditable="false"
|
|
28
|
+
class="group relative rounded-xs inline-flex items-center gap-1.5 text-(--ui-text-muted) hover:text-(--ui-text) text-sm transition-colors focus-visible:ring-2 focus-visible:ring-(--ui-primary) focus:outline-none"
|
|
29
|
+
:data-state="open ? 'open' : 'closed'"
|
|
30
|
+
@click="toggleOpen"
|
|
31
|
+
>
|
|
32
|
+
<UIcon
|
|
33
|
+
name="i-lucide-chevron-down"
|
|
34
|
+
class="size-4 shrink-0 transition-transform duration-200 group-data-[state=open]:rotate-180"
|
|
35
|
+
/>
|
|
36
|
+
<span class="truncate">{{ open ? "Hide" : "Show" }} {{ label }}</span>
|
|
37
|
+
</button>
|
|
38
|
+
<div v-show="open" class="[&>*:first-child]:mt-2.5 [&>*:last-child]:mb-0 [&>*]:my-1.5">
|
|
39
|
+
<NodeViewContent />
|
|
40
|
+
</div>
|
|
41
|
+
</NodeViewWrapper>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper } from "@tiptap/vue-3";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
const { getBlobUrl } = useFileBlobStore();
|
|
17
|
+
const { client } = useAbracadabra();
|
|
18
|
+
const uploadId = computed(() => props.node.attrs.uploadId);
|
|
19
|
+
const docId = computed(() => props.node.attrs.docId);
|
|
20
|
+
const filename = computed(() => props.node.attrs.filename);
|
|
21
|
+
const mimeType = computed(() => props.node.attrs.mimeType);
|
|
22
|
+
const blobUrl = ref(null);
|
|
23
|
+
const loading = ref(true);
|
|
24
|
+
const error = ref(null);
|
|
25
|
+
const fileCategory = computed(() => {
|
|
26
|
+
const mt = mimeType.value || "";
|
|
27
|
+
if (mt.startsWith("image/")) return "image";
|
|
28
|
+
if (mt.startsWith("video/")) return "video";
|
|
29
|
+
if (mt.startsWith("audio/")) return "audio";
|
|
30
|
+
return "file";
|
|
31
|
+
});
|
|
32
|
+
const fileIcon = computed(() => {
|
|
33
|
+
const mt = mimeType.value || "";
|
|
34
|
+
const fn = filename.value?.toLowerCase() || "";
|
|
35
|
+
if (mt === "application/pdf" || fn.endsWith(".pdf")) return "i-lucide-file-text";
|
|
36
|
+
if (mt.startsWith("text/") || fn.endsWith(".ts") || fn.endsWith(".js") || fn.endsWith(".json")) return "i-lucide-file-code";
|
|
37
|
+
if (fn.endsWith(".zip") || fn.endsWith(".tar") || fn.endsWith(".gz") || fn.endsWith(".rar")) return "i-lucide-file-archive";
|
|
38
|
+
return "i-lucide-file";
|
|
39
|
+
});
|
|
40
|
+
async function loadBlob() {
|
|
41
|
+
if (!docId.value || !uploadId.value) {
|
|
42
|
+
loading.value = false;
|
|
43
|
+
error.value = "Missing upload reference";
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
loading.value = true;
|
|
47
|
+
error.value = null;
|
|
48
|
+
try {
|
|
49
|
+
const url = await getBlobUrl(docId.value, uploadId.value);
|
|
50
|
+
if (url) {
|
|
51
|
+
blobUrl.value = url;
|
|
52
|
+
} else {
|
|
53
|
+
error.value = "File not available offline";
|
|
54
|
+
}
|
|
55
|
+
} catch (e) {
|
|
56
|
+
error.value = "Failed to load file";
|
|
57
|
+
console.error("[FileNodeView] failed to load upload", uploadId.value, e);
|
|
58
|
+
} finally {
|
|
59
|
+
loading.value = false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
onMounted(loadBlob);
|
|
63
|
+
watch(client, (c) => {
|
|
64
|
+
if (c && !blobUrl.value) loadBlob();
|
|
65
|
+
});
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<NodeViewWrapper class="my-2">
|
|
70
|
+
<div class="rounded-lg overflow-hidden border border-(--ui-border) bg-(--ui-bg-elevated)">
|
|
71
|
+
<!-- Loading -->
|
|
72
|
+
<div v-if="loading" class="flex items-center justify-center h-20">
|
|
73
|
+
<UIcon name="i-lucide-loader-circle" class="animate-spin text-xl text-(--ui-text-muted)" />
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- Error -->
|
|
77
|
+
<div v-else-if="error" class="flex items-center gap-3 px-4 py-3">
|
|
78
|
+
<UIcon name="i-lucide-alert-circle" class="text-error shrink-0" />
|
|
79
|
+
<div class="min-w-0">
|
|
80
|
+
<p class="text-sm font-medium text-(--ui-text) truncate">
|
|
81
|
+
{{ filename }}
|
|
82
|
+
</p>
|
|
83
|
+
<p class="text-xs text-(--ui-text-muted)">
|
|
84
|
+
{{ error }}
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<!-- Image -->
|
|
90
|
+
<img
|
|
91
|
+
v-else-if="fileCategory === 'image'"
|
|
92
|
+
:src="blobUrl"
|
|
93
|
+
:alt="filename"
|
|
94
|
+
class="block max-w-full h-auto"
|
|
95
|
+
draggable="false"
|
|
96
|
+
>
|
|
97
|
+
|
|
98
|
+
<!-- Video -->
|
|
99
|
+
<video
|
|
100
|
+
v-else-if="fileCategory === 'video'"
|
|
101
|
+
:src="blobUrl"
|
|
102
|
+
controls
|
|
103
|
+
class="block w-full"
|
|
104
|
+
:aria-label="filename"
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
<!-- Audio -->
|
|
108
|
+
<div v-else-if="fileCategory === 'audio'" class="flex items-center gap-3 p-4">
|
|
109
|
+
<UIcon name="i-lucide-music-2" class="text-(--ui-primary) text-2xl shrink-0" />
|
|
110
|
+
<div class="flex-1 min-w-0">
|
|
111
|
+
<p class="text-sm font-medium text-(--ui-text) truncate mb-1.5">
|
|
112
|
+
{{ filename }}
|
|
113
|
+
</p>
|
|
114
|
+
<audio
|
|
115
|
+
:src="blobUrl"
|
|
116
|
+
controls
|
|
117
|
+
class="w-full"
|
|
118
|
+
style="height:36px"
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<!-- Generic file (download) -->
|
|
124
|
+
<a
|
|
125
|
+
v-else
|
|
126
|
+
:href="blobUrl"
|
|
127
|
+
:download="filename"
|
|
128
|
+
class="flex items-center gap-3 p-4 hover:bg-(--ui-bg-accented) transition-colors no-underline"
|
|
129
|
+
@click.stop
|
|
130
|
+
>
|
|
131
|
+
<UIcon :name="fileIcon" class="text-2xl text-(--ui-text-muted) shrink-0" />
|
|
132
|
+
<div class="flex-1 min-w-0">
|
|
133
|
+
<p class="text-sm font-medium text-(--ui-text) truncate">{{ filename }}</p>
|
|
134
|
+
<p class="text-xs text-(--ui-text-muted)">Click to download</p>
|
|
135
|
+
</div>
|
|
136
|
+
<UIcon name="i-lucide-download" class="text-(--ui-text-muted) shrink-0" />
|
|
137
|
+
</a>
|
|
138
|
+
</div>
|
|
139
|
+
</NodeViewWrapper>
|
|
140
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper } from "@tiptap/vue-3";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
const value = computed(() => props.node.attrs.value || "");
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<NodeViewWrapper as="span" class="inline">
|
|
21
|
+
<UKbd :value="value" class="align-text-top" />
|
|
22
|
+
</NodeViewWrapper>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper } from "@tiptap/vue-3";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
const iconName = computed(() => props.node.attrs.name || "i-lucide-star");
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<NodeViewWrapper as="span" class="inline">
|
|
21
|
+
<UIcon :name="iconName" class="size-4 shrink-0 align-sub" />
|
|
22
|
+
</NodeViewWrapper>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper, NodeViewContent } from "@tiptap/vue-3";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
const level = computed(() => props.node.attrs.level || 3);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<NodeViewWrapper
|
|
21
|
+
as="div"
|
|
22
|
+
class="my-5 ms-4 border-s border-(--ui-border) ps-8"
|
|
23
|
+
style="counter-reset: step;"
|
|
24
|
+
:class="{
|
|
25
|
+
'[&>div>h2]:[counter-increment:step] [&>div>h2]:relative [&>div>h2]:before:absolute [&>div>h2]:before:size-8 [&>div>h2]:before:bg-(--ui-bg-elevated) [&>div>h2]:before:rounded-full [&>div>h2]:before:font-semibold [&>div>h2]:before:text-sm [&>div>h2]:before:tabular-nums [&>div>h2]:before:inline-flex [&>div>h2]:before:items-center [&>div>h2]:before:justify-center [&>div>h2]:before:ring-4 [&>div>h2]:before:ring-(--ui-bg) [&>div>h2]:before:-ms-[48.5px] [&>div>h2]:before:content-[counter(step)]': level === 2,
|
|
26
|
+
'[&>div>h3]:[counter-increment:step] [&>div>h3]:relative [&>div>h3]:before:absolute [&>div>h3]:before:size-7 [&>div>h3]:before:bg-(--ui-bg-elevated) [&>div>h3]:before:rounded-full [&>div>h3]:before:font-semibold [&>div>h3]:before:text-sm [&>div>h3]:before:tabular-nums [&>div>h3]:before:inline-flex [&>div>h3]:before:items-center [&>div>h3]:before:justify-center [&>div>h3]:before:ring-4 [&>div>h3]:before:ring-(--ui-bg) [&>div>h3]:before:-ms-[48.5px] [&>div>h3]:before:content-[counter(step)]': level === 3 || level === 1,
|
|
27
|
+
'[&>div>h4]:[counter-increment:step] [&>div>h4]:relative [&>div>h4]:before:absolute [&>div>h4]:before:size-7 [&>div>h4]:before:bg-(--ui-bg-elevated) [&>div>h4]:before:rounded-full [&>div>h4]:before:font-semibold [&>div>h4]:before:text-sm [&>div>h4]:before:tabular-nums [&>div>h4]:before:inline-flex [&>div>h4]:before:items-center [&>div>h4]:before:justify-center [&>div>h4]:before:ring-4 [&>div>h4]:before:ring-(--ui-bg) [&>div>h4]:before:-ms-[48.5px] [&>div>h4]:before:content-[counter(step)]': level === 4
|
|
28
|
+
}"
|
|
29
|
+
>
|
|
30
|
+
<NodeViewContent />
|
|
31
|
+
</NodeViewWrapper>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper, NodeViewContent } from "@tiptap/vue-3";
|
|
3
|
+
defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<NodeViewWrapper as="div">
|
|
20
|
+
<NodeViewContent class="[&>*:first-child]:mt-0 [&>*:last-child]:mb-0" />
|
|
21
|
+
</NodeViewWrapper>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper, NodeViewContent } from "@tiptap/vue-3";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
decorations: { type: Array, required: true },
|
|
5
|
+
selected: { type: Boolean, required: true },
|
|
6
|
+
updateAttributes: { type: Function, required: true },
|
|
7
|
+
deleteNode: { type: Function, required: true },
|
|
8
|
+
node: { type: null, required: true },
|
|
9
|
+
view: { type: null, required: true },
|
|
10
|
+
getPos: { type: null, required: true },
|
|
11
|
+
innerDecorations: { type: null, required: true },
|
|
12
|
+
editor: { type: Object, required: true },
|
|
13
|
+
extension: { type: Object, required: true },
|
|
14
|
+
HTMLAttributes: { type: Object, required: true }
|
|
15
|
+
});
|
|
16
|
+
const activeIndex = ref(0);
|
|
17
|
+
const tabs = computed(() => {
|
|
18
|
+
const result = [];
|
|
19
|
+
props.node.forEach((child, _offset, index) => {
|
|
20
|
+
result.push({
|
|
21
|
+
label: child.attrs?.label || `Tab ${index + 1}`,
|
|
22
|
+
icon: child.attrs?.icon || ""
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
return result;
|
|
26
|
+
});
|
|
27
|
+
watch(() => props.node.childCount, () => {
|
|
28
|
+
if (activeIndex.value >= props.node.childCount) {
|
|
29
|
+
activeIndex.value = Math.max(0, props.node.childCount - 1);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<NodeViewWrapper as="div" class="my-5">
|
|
36
|
+
<div class="relative flex items-center border-b border-(--ui-border)" contenteditable="false">
|
|
37
|
+
<button
|
|
38
|
+
v-for="(tab, i) in tabs"
|
|
39
|
+
:key="i"
|
|
40
|
+
class="relative px-3 py-2 text-sm font-medium transition-colors"
|
|
41
|
+
:class="activeIndex === i ? 'text-(--ui-primary)' : 'text-(--ui-text-muted) hover:text-(--ui-text)'"
|
|
42
|
+
@click="activeIndex = i"
|
|
43
|
+
>
|
|
44
|
+
<UIcon v-if="tab.icon" :name="tab.icon" class="size-4 shrink-0 me-1.5 inline-block align-text-bottom" />
|
|
45
|
+
<span>{{ tab.label }}</span>
|
|
46
|
+
<span v-if="activeIndex === i" class="absolute bottom-0 inset-x-0 h-0.5 bg-(--ui-primary) rounded-full" />
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="mt-4">
|
|
50
|
+
<NodeViewContent
|
|
51
|
+
class="[&>*]:hidden"
|
|
52
|
+
:class="`[&>*:nth-child(${activeIndex + 1})]:block`"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</NodeViewWrapper>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AbracadabraLocale — all user-visible strings in the module's built-in components.
|
|
3
|
+
*
|
|
4
|
+
* App developers can override any subset of strings at two levels:
|
|
5
|
+
*
|
|
6
|
+
* 1. Module-wide (nuxt.config.ts):
|
|
7
|
+
* abracadabra: { locale: { documentTree: { newDocument: 'Nuevo documento' } } }
|
|
8
|
+
*
|
|
9
|
+
* 2. Per-component (:labels prop):
|
|
10
|
+
* <ADocumentTree :labels="{ newDocument: t('doc.new') }" />
|
|
11
|
+
*
|
|
12
|
+
* This design is i18n-library-agnostic. Pass computed values from @nuxtjs/i18n,
|
|
13
|
+
* vue-i18n, or any other source — or just use plain static strings.
|
|
14
|
+
*/
|
|
15
|
+
export interface AbracadabraLocale {
|
|
16
|
+
documentTree: {
|
|
17
|
+
newDocument: string;
|
|
18
|
+
rename: string;
|
|
19
|
+
newChild: string;
|
|
20
|
+
moveToTrash: string;
|
|
21
|
+
trash: string;
|
|
22
|
+
restore: string;
|
|
23
|
+
deleteForever: string;
|
|
24
|
+
emptyTrash: string;
|
|
25
|
+
untitled: string;
|
|
26
|
+
dropFilesHere: string;
|
|
27
|
+
noDocuments: string;
|
|
28
|
+
expand: string;
|
|
29
|
+
collapse: string;
|
|
30
|
+
};
|
|
31
|
+
editor: {
|
|
32
|
+
placeholder: string;
|
|
33
|
+
};
|
|
34
|
+
commandPalette: {
|
|
35
|
+
placeholder: string;
|
|
36
|
+
noResults: string;
|
|
37
|
+
newDocument: string;
|
|
38
|
+
documents: string;
|
|
39
|
+
};
|
|
40
|
+
notifications: {
|
|
41
|
+
title: string;
|
|
42
|
+
empty: string;
|
|
43
|
+
markAllRead: string;
|
|
44
|
+
};
|
|
45
|
+
nodePanel: {
|
|
46
|
+
editorTab: string;
|
|
47
|
+
propertiesTab: string;
|
|
48
|
+
close: string;
|
|
49
|
+
icon: string;
|
|
50
|
+
color: string;
|
|
51
|
+
status: string;
|
|
52
|
+
priority: string;
|
|
53
|
+
rating: string;
|
|
54
|
+
dates: string;
|
|
55
|
+
docType: string;
|
|
56
|
+
cover: string;
|
|
57
|
+
customFields: string;
|
|
58
|
+
addField: string;
|
|
59
|
+
url: string;
|
|
60
|
+
noCover: string;
|
|
61
|
+
};
|
|
62
|
+
colorPicker: {
|
|
63
|
+
none: string;
|
|
64
|
+
};
|
|
65
|
+
iconPicker: {
|
|
66
|
+
search: string;
|
|
67
|
+
none: string;
|
|
68
|
+
};
|
|
69
|
+
floatingWindow: {
|
|
70
|
+
minimize: string;
|
|
71
|
+
maximize: string;
|
|
72
|
+
restore: string;
|
|
73
|
+
close: string;
|
|
74
|
+
};
|
|
75
|
+
connectionStatus: {
|
|
76
|
+
connected: string;
|
|
77
|
+
syncing: string;
|
|
78
|
+
connecting: string;
|
|
79
|
+
offline: string;
|
|
80
|
+
};
|
|
81
|
+
permissionGuard: {
|
|
82
|
+
noPermission: string;
|
|
83
|
+
};
|
|
84
|
+
roleBadge: {
|
|
85
|
+
owner: string;
|
|
86
|
+
admin: string;
|
|
87
|
+
member: string;
|
|
88
|
+
editor: string;
|
|
89
|
+
viewer: string;
|
|
90
|
+
};
|
|
91
|
+
voice: {
|
|
92
|
+
join: string;
|
|
93
|
+
leave: string;
|
|
94
|
+
cancel: string;
|
|
95
|
+
mute: string;
|
|
96
|
+
unmute: string;
|
|
97
|
+
voice: string;
|
|
98
|
+
connecting: string;
|
|
99
|
+
alone: string;
|
|
100
|
+
openStream: string;
|
|
101
|
+
volume: string;
|
|
102
|
+
peers: string;
|
|
103
|
+
error: string;
|
|
104
|
+
};
|
|
105
|
+
renderers: {
|
|
106
|
+
kanban: {
|
|
107
|
+
newColumn: string;
|
|
108
|
+
newCard: string;
|
|
109
|
+
untitled: string;
|
|
110
|
+
addColumn: string;
|
|
111
|
+
};
|
|
112
|
+
table: {
|
|
113
|
+
addRow: string;
|
|
114
|
+
addColumn: string;
|
|
115
|
+
untitled: string;
|
|
116
|
+
noRows: string;
|
|
117
|
+
};
|
|
118
|
+
calendar: {
|
|
119
|
+
today: string;
|
|
120
|
+
newEvent: string;
|
|
121
|
+
untitled: string;
|
|
122
|
+
};
|
|
123
|
+
outline: {
|
|
124
|
+
addItem: string;
|
|
125
|
+
empty: string;
|
|
126
|
+
};
|
|
127
|
+
gallery: {
|
|
128
|
+
addItem: string;
|
|
129
|
+
untitled: string;
|
|
130
|
+
noItems: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export declare const DEFAULT_LOCALE: AbracadabraLocale;
|