@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,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useNotifications
|
|
3
|
+
*
|
|
4
|
+
* Server-pushed notifications via provider.sendStateless().
|
|
5
|
+
* Wire _handleStatelessNotification() into the provider's onStateless callback
|
|
6
|
+
* from the main plugin.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* const { notifications, unreadCount, fetchNotifications, markRead } = useNotifications()
|
|
10
|
+
*/
|
|
11
|
+
export type NotificationType = 'chat' | 'agent' | 'mention' | 'system';
|
|
12
|
+
export interface AppNotification {
|
|
13
|
+
id: string;
|
|
14
|
+
type: NotificationType;
|
|
15
|
+
title: string;
|
|
16
|
+
body: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
link?: string;
|
|
19
|
+
sourceId?: string;
|
|
20
|
+
read: boolean;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
}
|
|
23
|
+
declare let _publicKeyB64: import("vue").Ref<string, string>;
|
|
24
|
+
export declare function _initNotifications(publicKeyB64Ref: typeof _publicKeyB64): void;
|
|
25
|
+
export declare function _destroyNotifications(): void;
|
|
26
|
+
export declare function _handleStatelessNotification(payload: string): void;
|
|
27
|
+
declare function fetchNotifications(opts?: {
|
|
28
|
+
before?: number;
|
|
29
|
+
limit?: number;
|
|
30
|
+
unreadOnly?: boolean;
|
|
31
|
+
}): void;
|
|
32
|
+
declare function markRead(id: string): void;
|
|
33
|
+
declare function markAllRead(): void;
|
|
34
|
+
declare function createNotification(opts: {
|
|
35
|
+
recipientId: string;
|
|
36
|
+
type?: NotificationType;
|
|
37
|
+
title: string;
|
|
38
|
+
body: string;
|
|
39
|
+
icon?: string;
|
|
40
|
+
link?: string;
|
|
41
|
+
sourceId?: string;
|
|
42
|
+
}): void;
|
|
43
|
+
export declare function useNotifications(): {
|
|
44
|
+
notifications: import("vue").Ref<{
|
|
45
|
+
id: string;
|
|
46
|
+
type: NotificationType;
|
|
47
|
+
title: string;
|
|
48
|
+
body: string;
|
|
49
|
+
icon?: string | undefined;
|
|
50
|
+
link?: string | undefined;
|
|
51
|
+
sourceId?: string | undefined;
|
|
52
|
+
read: boolean;
|
|
53
|
+
createdAt: number;
|
|
54
|
+
}[], AppNotification[] | {
|
|
55
|
+
id: string;
|
|
56
|
+
type: NotificationType;
|
|
57
|
+
title: string;
|
|
58
|
+
body: string;
|
|
59
|
+
icon?: string | undefined;
|
|
60
|
+
link?: string | undefined;
|
|
61
|
+
sourceId?: string | undefined;
|
|
62
|
+
read: boolean;
|
|
63
|
+
createdAt: number;
|
|
64
|
+
}[]>;
|
|
65
|
+
unreadCount: import("vue").ComputedRef<number>;
|
|
66
|
+
unreadNotifications: import("vue").ComputedRef<{
|
|
67
|
+
id: string;
|
|
68
|
+
type: NotificationType;
|
|
69
|
+
title: string;
|
|
70
|
+
body: string;
|
|
71
|
+
icon?: string | undefined;
|
|
72
|
+
link?: string | undefined;
|
|
73
|
+
sourceId?: string | undefined;
|
|
74
|
+
read: boolean;
|
|
75
|
+
createdAt: number;
|
|
76
|
+
}[]>;
|
|
77
|
+
fetchNotifications: typeof fetchNotifications;
|
|
78
|
+
markRead: typeof markRead;
|
|
79
|
+
markAllRead: typeof markAllRead;
|
|
80
|
+
createNotification: typeof createNotification;
|
|
81
|
+
};
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
const notifications = ref([]);
|
|
3
|
+
let _publicKeyB64 = ref("");
|
|
4
|
+
let pendingToasts = [];
|
|
5
|
+
let toastFlushTimer = null;
|
|
6
|
+
const TOAST_BATCH_MS = 1500;
|
|
7
|
+
const unreadCount = computed(() => notifications.value.filter((n) => !n.read).length);
|
|
8
|
+
const unreadNotifications = computed(
|
|
9
|
+
() => notifications.value.filter((n) => !n.read).sort((a, b) => b.createdAt - a.createdAt).slice(0, 10)
|
|
10
|
+
);
|
|
11
|
+
export function _initNotifications(publicKeyB64Ref) {
|
|
12
|
+
_publicKeyB64 = publicKeyB64Ref;
|
|
13
|
+
notifications.value = [];
|
|
14
|
+
}
|
|
15
|
+
export function _destroyNotifications() {
|
|
16
|
+
notifications.value = [];
|
|
17
|
+
pendingToasts = [];
|
|
18
|
+
if (toastFlushTimer) clearTimeout(toastFlushTimer);
|
|
19
|
+
toastFlushTimer = null;
|
|
20
|
+
}
|
|
21
|
+
function parseNotification(data) {
|
|
22
|
+
return {
|
|
23
|
+
id: data.id ?? crypto.randomUUID(),
|
|
24
|
+
type: data.notification_type ?? data.type ?? "system",
|
|
25
|
+
title: data.title ?? "",
|
|
26
|
+
body: data.body ?? "",
|
|
27
|
+
icon: data.icon,
|
|
28
|
+
link: data.link,
|
|
29
|
+
sourceId: data.source_id,
|
|
30
|
+
read: data.read ?? false,
|
|
31
|
+
createdAt: data.created_at ? new Date(data.created_at).getTime() : Date.now()
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function isForMe(recipientId) {
|
|
35
|
+
if (!recipientId) return true;
|
|
36
|
+
return recipientId === _publicKeyB64.value;
|
|
37
|
+
}
|
|
38
|
+
export function _handleStatelessNotification(payload) {
|
|
39
|
+
if (!payload.includes('"notify:')) return;
|
|
40
|
+
try {
|
|
41
|
+
const data = JSON.parse(payload);
|
|
42
|
+
if (!data.type?.startsWith("notify:")) return;
|
|
43
|
+
switch (data.type) {
|
|
44
|
+
case "notify:history": {
|
|
45
|
+
const incoming = (data.notifications || []).map(parseNotification);
|
|
46
|
+
const existingIds = new Set(notifications.value.map((n) => n.id));
|
|
47
|
+
const merged = [...notifications.value, ...incoming.filter((n) => !existingIds.has(n.id))];
|
|
48
|
+
notifications.value = merged.sort((a, b) => b.createdAt - a.createdAt);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
case "notify:new": {
|
|
52
|
+
const notif = parseNotification(data);
|
|
53
|
+
if (notif.id && isForMe(data.recipient_id)) {
|
|
54
|
+
if (!notifications.value.some((n) => n.id === notif.id)) {
|
|
55
|
+
notifications.value = [notif, ...notifications.value];
|
|
56
|
+
_scheduleToast(notif);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case "notify:read_update": {
|
|
62
|
+
if (!isForMe(data.recipient_id)) break;
|
|
63
|
+
if (data.all) {
|
|
64
|
+
notifications.value = notifications.value.map((n) => ({ ...n, read: true }));
|
|
65
|
+
} else if (data.ids) {
|
|
66
|
+
const idSet = new Set(data.ids);
|
|
67
|
+
notifications.value = notifications.value.map(
|
|
68
|
+
(n) => idSet.has(n.id) ? { ...n, read: true } : n
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function _scheduleToast(notif) {
|
|
78
|
+
pendingToasts.push(notif);
|
|
79
|
+
if (toastFlushTimer) clearTimeout(toastFlushTimer);
|
|
80
|
+
toastFlushTimer = setTimeout(_flushToasts, TOAST_BATCH_MS);
|
|
81
|
+
}
|
|
82
|
+
function _flushToasts() {
|
|
83
|
+
toastFlushTimer = null;
|
|
84
|
+
if (pendingToasts.length === 0) return;
|
|
85
|
+
const batch = [...pendingToasts];
|
|
86
|
+
pendingToasts = [];
|
|
87
|
+
import("#imports").then(({ useToast, useRouter }) => {
|
|
88
|
+
const toast = useToast();
|
|
89
|
+
const router = useRouter();
|
|
90
|
+
if (batch.length === 1) {
|
|
91
|
+
const n = batch[0];
|
|
92
|
+
const body = n.body.length > 80 ? n.body.slice(0, 80) + "\u2026" : n.body;
|
|
93
|
+
toast.add({
|
|
94
|
+
id: `notif-${n.id}`,
|
|
95
|
+
title: n.title,
|
|
96
|
+
description: body,
|
|
97
|
+
icon: n.icon || "i-lucide-bell",
|
|
98
|
+
color: "neutral",
|
|
99
|
+
duration: 5e3,
|
|
100
|
+
actions: n.link ? [{
|
|
101
|
+
label: "View",
|
|
102
|
+
color: "primary",
|
|
103
|
+
variant: "subtle",
|
|
104
|
+
onClick: (e) => {
|
|
105
|
+
e?.stopPropagation();
|
|
106
|
+
markRead(n.id);
|
|
107
|
+
router.push(n.link);
|
|
108
|
+
}
|
|
109
|
+
}] : void 0
|
|
110
|
+
});
|
|
111
|
+
} else {
|
|
112
|
+
toast.add({
|
|
113
|
+
id: `notif-batch-${Date.now()}`,
|
|
114
|
+
title: `${batch.length} new notifications`,
|
|
115
|
+
icon: "i-lucide-bell",
|
|
116
|
+
color: "neutral",
|
|
117
|
+
duration: 5e3
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}).catch(() => {
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function fetchNotifications(opts) {
|
|
124
|
+
const { provider } = useAbracadabra();
|
|
125
|
+
if (!provider.value) return;
|
|
126
|
+
provider.value.sendStateless(JSON.stringify({
|
|
127
|
+
type: "notify:fetch",
|
|
128
|
+
before: opts?.before,
|
|
129
|
+
limit: opts?.limit ?? 50,
|
|
130
|
+
unread_only: opts?.unreadOnly ?? false
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
function markRead(id) {
|
|
134
|
+
const { provider } = useAbracadabra();
|
|
135
|
+
if (provider.value) {
|
|
136
|
+
provider.value.sendStateless(JSON.stringify({ type: "notify:mark_read", id }));
|
|
137
|
+
}
|
|
138
|
+
notifications.value = notifications.value.map((n) => n.id === id ? { ...n, read: true } : n);
|
|
139
|
+
}
|
|
140
|
+
function markAllRead() {
|
|
141
|
+
const { provider } = useAbracadabra();
|
|
142
|
+
if (provider.value) {
|
|
143
|
+
provider.value.sendStateless(JSON.stringify({ type: "notify:mark_all_read" }));
|
|
144
|
+
}
|
|
145
|
+
notifications.value = notifications.value.map((n) => ({ ...n, read: true }));
|
|
146
|
+
}
|
|
147
|
+
function createNotification(opts) {
|
|
148
|
+
const { provider } = useAbracadabra();
|
|
149
|
+
if (!provider.value) return;
|
|
150
|
+
provider.value.sendStateless(JSON.stringify({
|
|
151
|
+
type: "notify:create",
|
|
152
|
+
recipient_id: opts.recipientId,
|
|
153
|
+
notification_type: opts.type ?? "system",
|
|
154
|
+
title: opts.title,
|
|
155
|
+
body: opts.body,
|
|
156
|
+
icon: opts.icon,
|
|
157
|
+
link: opts.link,
|
|
158
|
+
source_id: opts.sourceId
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
export function useNotifications() {
|
|
162
|
+
return {
|
|
163
|
+
notifications,
|
|
164
|
+
unreadCount,
|
|
165
|
+
unreadNotifications,
|
|
166
|
+
fetchNotifications,
|
|
167
|
+
markRead,
|
|
168
|
+
markAllRead,
|
|
169
|
+
createNotification
|
|
170
|
+
};
|
|
171
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useOfflineUploadQueue
|
|
3
|
+
*
|
|
4
|
+
* Queue for file uploads that fail because the client is offline.
|
|
5
|
+
* The file blob is stored in FileBlobStore (IDB) under a temporary UUID
|
|
6
|
+
* so components can render it immediately via getBlobUrl() — no special
|
|
7
|
+
* fallback needed. When the client reconnects, flushUploads() retries.
|
|
8
|
+
*
|
|
9
|
+
* The queue itself is in-memory only; blob data persists in IDB.
|
|
10
|
+
*/
|
|
11
|
+
interface PendingUpload {
|
|
12
|
+
tempId: string;
|
|
13
|
+
docId: string;
|
|
14
|
+
file: File;
|
|
15
|
+
filename: string;
|
|
16
|
+
}
|
|
17
|
+
declare function enqueue(docId: string, file: File): Promise<{
|
|
18
|
+
id: string;
|
|
19
|
+
doc_id: string;
|
|
20
|
+
filename: string;
|
|
21
|
+
}>;
|
|
22
|
+
declare function flushUploads(client: any, onReplaced: (tempId: string, realId: string, docId: string) => void): Promise<void>;
|
|
23
|
+
export declare function useOfflineUploadQueue(): {
|
|
24
|
+
pending: import("vue").Ref<Map<string, {
|
|
25
|
+
tempId: string;
|
|
26
|
+
docId: string;
|
|
27
|
+
file: {
|
|
28
|
+
readonly lastModified: number;
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly webkitRelativePath: string;
|
|
31
|
+
readonly size: number;
|
|
32
|
+
readonly type: string;
|
|
33
|
+
arrayBuffer: {
|
|
34
|
+
(): Promise<ArrayBuffer>;
|
|
35
|
+
(): Promise<ArrayBuffer>;
|
|
36
|
+
};
|
|
37
|
+
bytes: {
|
|
38
|
+
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
39
|
+
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
40
|
+
};
|
|
41
|
+
slice: {
|
|
42
|
+
(start?: number, end?: number, contentType?: string): Blob;
|
|
43
|
+
(start?: number, end?: number, contentType?: string): Blob;
|
|
44
|
+
};
|
|
45
|
+
stream: {
|
|
46
|
+
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
47
|
+
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
48
|
+
};
|
|
49
|
+
text: {
|
|
50
|
+
(): Promise<string>;
|
|
51
|
+
(): Promise<string>;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
filename: string;
|
|
55
|
+
}> & Omit<Map<string, PendingUpload>, keyof Map<any, any>>, Map<string, PendingUpload> | (Map<string, {
|
|
56
|
+
tempId: string;
|
|
57
|
+
docId: string;
|
|
58
|
+
file: {
|
|
59
|
+
readonly lastModified: number;
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly webkitRelativePath: string;
|
|
62
|
+
readonly size: number;
|
|
63
|
+
readonly type: string;
|
|
64
|
+
arrayBuffer: {
|
|
65
|
+
(): Promise<ArrayBuffer>;
|
|
66
|
+
(): Promise<ArrayBuffer>;
|
|
67
|
+
};
|
|
68
|
+
bytes: {
|
|
69
|
+
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
70
|
+
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
71
|
+
};
|
|
72
|
+
slice: {
|
|
73
|
+
(start?: number, end?: number, contentType?: string): Blob;
|
|
74
|
+
(start?: number, end?: number, contentType?: string): Blob;
|
|
75
|
+
};
|
|
76
|
+
stream: {
|
|
77
|
+
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
78
|
+
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
79
|
+
};
|
|
80
|
+
text: {
|
|
81
|
+
(): Promise<string>;
|
|
82
|
+
(): Promise<string>;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
filename: string;
|
|
86
|
+
}> & Omit<Map<string, PendingUpload>, keyof Map<any, any>>)>;
|
|
87
|
+
enqueue: typeof enqueue;
|
|
88
|
+
flushUploads: typeof flushUploads;
|
|
89
|
+
};
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import { _getFileBlobStore } from "./useFileBlobStore.js";
|
|
3
|
+
const pending = ref(/* @__PURE__ */ new Map());
|
|
4
|
+
async function enqueue(docId, file) {
|
|
5
|
+
const tempId = crypto.randomUUID();
|
|
6
|
+
const store = _getFileBlobStore();
|
|
7
|
+
if (store) {
|
|
8
|
+
await store.putBlob(docId, tempId, file, file.name);
|
|
9
|
+
}
|
|
10
|
+
pending.value = new Map(pending.value).set(tempId, {
|
|
11
|
+
tempId,
|
|
12
|
+
docId,
|
|
13
|
+
file,
|
|
14
|
+
filename: file.name
|
|
15
|
+
});
|
|
16
|
+
return { id: tempId, doc_id: docId, filename: file.name };
|
|
17
|
+
}
|
|
18
|
+
async function flushUploads(client, onReplaced) {
|
|
19
|
+
if (pending.value.size === 0) return;
|
|
20
|
+
for (const [tempId, entry] of pending.value) {
|
|
21
|
+
try {
|
|
22
|
+
const meta = await client.upload(entry.docId, entry.file, entry.filename);
|
|
23
|
+
onReplaced(tempId, meta.id, meta.doc_id);
|
|
24
|
+
const next = new Map(pending.value);
|
|
25
|
+
next.delete(tempId);
|
|
26
|
+
pending.value = next;
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function useOfflineUploadQueue() {
|
|
32
|
+
return { pending, enqueue, flushUploads };
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePasskeyAccounts
|
|
3
|
+
*
|
|
4
|
+
* Manages multiple hardware-bound passkey accounts in localStorage.
|
|
5
|
+
* Useful for account switching between different claimed identities.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* const { accounts, registerAccount, touchAccount } = usePasskeyAccounts()
|
|
9
|
+
*/
|
|
10
|
+
export interface PasskeyAccount {
|
|
11
|
+
publicKey: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
credentialId: string;
|
|
14
|
+
claimedAt: number;
|
|
15
|
+
lastUsedAt: number;
|
|
16
|
+
colorPrimary?: string;
|
|
17
|
+
colorNeutral?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function usePasskeyAccounts(): {
|
|
20
|
+
accounts: import("vue").ComputedRef<{
|
|
21
|
+
publicKey: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
credentialId: string;
|
|
24
|
+
claimedAt: number;
|
|
25
|
+
lastUsedAt: number;
|
|
26
|
+
colorPrimary?: string | undefined;
|
|
27
|
+
colorNeutral?: string | undefined;
|
|
28
|
+
}[]>;
|
|
29
|
+
registerAccount: (account: PasskeyAccount) => void;
|
|
30
|
+
touchAccount: (publicKey: string) => void;
|
|
31
|
+
removeAccount: (publicKey: string) => void;
|
|
32
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
const ACCOUNTS_KEY = "abracadabra_passkey_accounts";
|
|
3
|
+
function loadAccounts() {
|
|
4
|
+
try {
|
|
5
|
+
const raw = localStorage.getItem(ACCOUNTS_KEY);
|
|
6
|
+
return raw ? JSON.parse(raw) : [];
|
|
7
|
+
} catch {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const accounts = ref([]);
|
|
12
|
+
let _loaded = false;
|
|
13
|
+
export function usePasskeyAccounts() {
|
|
14
|
+
if (!_loaded && import.meta.client) {
|
|
15
|
+
accounts.value = loadAccounts();
|
|
16
|
+
_loaded = true;
|
|
17
|
+
}
|
|
18
|
+
function persist() {
|
|
19
|
+
try {
|
|
20
|
+
localStorage.setItem(ACCOUNTS_KEY, JSON.stringify(accounts.value));
|
|
21
|
+
} catch {
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function registerAccount(account) {
|
|
25
|
+
const idx = accounts.value.findIndex((a) => a.publicKey === account.publicKey);
|
|
26
|
+
if (idx >= 0) {
|
|
27
|
+
accounts.value[idx] = { ...accounts.value[idx], ...account, lastUsedAt: Date.now() };
|
|
28
|
+
} else {
|
|
29
|
+
accounts.value = [...accounts.value, { ...account, lastUsedAt: Date.now() }];
|
|
30
|
+
}
|
|
31
|
+
persist();
|
|
32
|
+
}
|
|
33
|
+
function touchAccount(publicKey) {
|
|
34
|
+
const a = accounts.value.find((a2) => a2.publicKey === publicKey);
|
|
35
|
+
if (a) {
|
|
36
|
+
a.lastUsedAt = Date.now();
|
|
37
|
+
persist();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function removeAccount(publicKey) {
|
|
41
|
+
accounts.value = accounts.value.filter((a) => a.publicKey !== publicKey);
|
|
42
|
+
persist();
|
|
43
|
+
}
|
|
44
|
+
const sorted = computed(() => [...accounts.value].sort((a, b) => b.lastUsedAt - a.lastUsedAt));
|
|
45
|
+
return { accounts: sorted, registerAccount, touchAccount, removeAccount };
|
|
46
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useRendererBase
|
|
3
|
+
*
|
|
4
|
+
* Standard setup shared by all non-TipTap renderers (Kanban, Gallery, etc.).
|
|
5
|
+
* Provides: childDoc, tree (scoped to this page), awareness cursors, connectedUsers.
|
|
6
|
+
*
|
|
7
|
+
* Ported from cou-sh/app/composables/useRendererBase.ts
|
|
8
|
+
*/
|
|
9
|
+
import { type ShallowRef } from 'vue';
|
|
10
|
+
import type * as Y from 'yjs';
|
|
11
|
+
export interface RendererBaseProps {
|
|
12
|
+
docId: string;
|
|
13
|
+
childProvider: any;
|
|
14
|
+
docLabel: string;
|
|
15
|
+
pageTypes?: Array<{
|
|
16
|
+
key: string;
|
|
17
|
+
label: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useRendererBase(props: RendererBaseProps): {
|
|
22
|
+
childProviderRef: ShallowRef<any, any>;
|
|
23
|
+
childDoc: ShallowRef<Y.Doc | null, Y.Doc | null>;
|
|
24
|
+
rootDoc: any;
|
|
25
|
+
cursors: import("vue").Ref<{
|
|
26
|
+
clientId: number;
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
state: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
clientId: number;
|
|
32
|
+
user?: {
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
color?: string | undefined;
|
|
35
|
+
avatar?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
};
|
|
38
|
+
}[], {
|
|
39
|
+
clientId: number;
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
state: import("./useYDoc.js").AwarenessUser;
|
|
43
|
+
}[] | {
|
|
44
|
+
clientId: number;
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
state: {
|
|
48
|
+
[x: string]: any;
|
|
49
|
+
clientId: number;
|
|
50
|
+
user?: {
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
color?: string | undefined;
|
|
53
|
+
avatar?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
};
|
|
56
|
+
}[]>;
|
|
57
|
+
states: import("vue").Ref<{
|
|
58
|
+
[x: string]: any;
|
|
59
|
+
clientId: number;
|
|
60
|
+
user?: {
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
color?: string | undefined;
|
|
63
|
+
avatar?: string | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
}[], import("./useYDoc.js").AwarenessUser[] | {
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
clientId: number;
|
|
68
|
+
user?: {
|
|
69
|
+
name?: string | undefined;
|
|
70
|
+
color?: string | undefined;
|
|
71
|
+
avatar?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
}[]>;
|
|
74
|
+
setLocalState: (state: any) => void;
|
|
75
|
+
tree: {
|
|
76
|
+
entries: import("vue").ComputedRef<import("./useChildTree.js").TreeEntry[]>;
|
|
77
|
+
childrenOf: (parentId: string | null) => import("./useChildTree.js").TreeEntry[];
|
|
78
|
+
descendantsOf: (id: string) => import("./useChildTree.js").TreeEntry[];
|
|
79
|
+
createChild: (parentId: string | null, label: string, type?: string) => string;
|
|
80
|
+
moveEntry: (id: string, newParentId: string | null, newOrder: number) => void;
|
|
81
|
+
deleteEntry: (id: string) => void;
|
|
82
|
+
renameEntry: (id: string, label: string) => void;
|
|
83
|
+
updateMeta: (id: string, patch: Partial<import("./useChildTree.js").DocPageMeta>) => void;
|
|
84
|
+
duplicateEntry: (id: string) => string;
|
|
85
|
+
treeMap: {
|
|
86
|
+
data: Record<string, {
|
|
87
|
+
label: string;
|
|
88
|
+
parentId: string | null;
|
|
89
|
+
order: number;
|
|
90
|
+
type?: string;
|
|
91
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
92
|
+
createdAt?: number;
|
|
93
|
+
updatedAt?: number;
|
|
94
|
+
}>;
|
|
95
|
+
lastUpdateLocal: ShallowRef<boolean, boolean>;
|
|
96
|
+
set: (key: string, value: {
|
|
97
|
+
label: string;
|
|
98
|
+
parentId: string | null;
|
|
99
|
+
order: number;
|
|
100
|
+
type?: string;
|
|
101
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
102
|
+
createdAt?: number;
|
|
103
|
+
updatedAt?: number;
|
|
104
|
+
}) => {
|
|
105
|
+
label: string;
|
|
106
|
+
parentId: string | null;
|
|
107
|
+
order: number;
|
|
108
|
+
type?: string;
|
|
109
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
110
|
+
createdAt?: number;
|
|
111
|
+
updatedAt?: number;
|
|
112
|
+
} | undefined;
|
|
113
|
+
remove: (key: string) => void | undefined;
|
|
114
|
+
clear: () => void | undefined;
|
|
115
|
+
get: (key: string) => {
|
|
116
|
+
label: string;
|
|
117
|
+
parentId: string | null;
|
|
118
|
+
order: number;
|
|
119
|
+
type?: string;
|
|
120
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
121
|
+
createdAt?: number;
|
|
122
|
+
updatedAt?: number;
|
|
123
|
+
} | undefined;
|
|
124
|
+
yMap: import("vue").ComputedRef<Y.Map<{
|
|
125
|
+
label: string;
|
|
126
|
+
parentId: string | null;
|
|
127
|
+
order: number;
|
|
128
|
+
type?: string;
|
|
129
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
130
|
+
createdAt?: number;
|
|
131
|
+
updatedAt?: number;
|
|
132
|
+
}> | null>;
|
|
133
|
+
};
|
|
134
|
+
trashMap: {
|
|
135
|
+
data: Record<string, {
|
|
136
|
+
label: string;
|
|
137
|
+
parentId: string | null;
|
|
138
|
+
order: number;
|
|
139
|
+
type?: string;
|
|
140
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
141
|
+
deletedAt: number;
|
|
142
|
+
}>;
|
|
143
|
+
lastUpdateLocal: ShallowRef<boolean, boolean>;
|
|
144
|
+
set: (key: string, value: {
|
|
145
|
+
label: string;
|
|
146
|
+
parentId: string | null;
|
|
147
|
+
order: number;
|
|
148
|
+
type?: string;
|
|
149
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
150
|
+
deletedAt: number;
|
|
151
|
+
}) => {
|
|
152
|
+
label: string;
|
|
153
|
+
parentId: string | null;
|
|
154
|
+
order: number;
|
|
155
|
+
type?: string;
|
|
156
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
157
|
+
deletedAt: number;
|
|
158
|
+
} | undefined;
|
|
159
|
+
remove: (key: string) => void | undefined;
|
|
160
|
+
clear: () => void | undefined;
|
|
161
|
+
get: (key: string) => {
|
|
162
|
+
label: string;
|
|
163
|
+
parentId: string | null;
|
|
164
|
+
order: number;
|
|
165
|
+
type?: string;
|
|
166
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
167
|
+
deletedAt: number;
|
|
168
|
+
} | undefined;
|
|
169
|
+
yMap: import("vue").ComputedRef<Y.Map<{
|
|
170
|
+
label: string;
|
|
171
|
+
parentId: string | null;
|
|
172
|
+
order: number;
|
|
173
|
+
type?: string;
|
|
174
|
+
meta?: import("./useChildTree.js").DocPageMeta;
|
|
175
|
+
deletedAt: number;
|
|
176
|
+
}> | null>;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
connectedUsers: import("vue").ComputedRef<{
|
|
180
|
+
clientId: number;
|
|
181
|
+
name: string;
|
|
182
|
+
color: string;
|
|
183
|
+
avatar: string | undefined;
|
|
184
|
+
publicKey: any;
|
|
185
|
+
}[]>;
|
|
186
|
+
};
|