@abraca/nuxt 0.2.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +72 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +139 -3
- package/dist/runtime/assets/editor.css +1 -0
- package/dist/runtime/components/AAccountSwitcherModal.d.vue.ts +10 -0
- package/dist/runtime/components/AAccountSwitcherModal.vue +158 -0
- package/dist/runtime/components/AAccountSwitcherModal.vue.d.ts +10 -0
- package/dist/runtime/components/AClaimAccountModal.d.vue.ts +10 -0
- package/dist/runtime/components/AClaimAccountModal.vue +230 -0
- package/dist/runtime/components/AClaimAccountModal.vue.d.ts +10 -0
- package/dist/runtime/components/ACollaborationUsers.vue +1 -0
- package/dist/runtime/components/AColorPicker.vue +4 -2
- package/dist/runtime/components/ACommandPalette.vue +8 -3
- package/dist/runtime/components/AConnectServerModal.d.vue.ts +12 -0
- package/dist/runtime/components/AConnectServerModal.vue +200 -0
- package/dist/runtime/components/AConnectServerModal.vue.d.ts +12 -0
- package/dist/runtime/components/AConnectionStatus.vue +1 -0
- package/dist/runtime/components/ADocPickModal.d.vue.ts +13 -0
- package/dist/runtime/components/ADocPickModal.vue +71 -0
- package/dist/runtime/components/ADocPickModal.vue.d.ts +13 -0
- package/dist/runtime/components/ADocRenderer.d.vue.ts +29 -0
- package/dist/runtime/components/ADocRenderer.vue +105 -0
- package/dist/runtime/components/ADocRenderer.vue.d.ts +29 -0
- package/dist/runtime/components/ADocTypeSelect.vue +8 -4
- package/dist/runtime/components/ADocumentTree.d.vue.ts +3 -3
- package/dist/runtime/components/ADocumentTree.vue +196 -29
- package/dist/runtime/components/ADocumentTree.vue.d.ts +3 -3
- package/dist/runtime/components/AEditor.d.vue.ts +9 -4
- package/dist/runtime/components/AEditor.vue +118 -8
- package/dist/runtime/components/AEditor.vue.d.ts +9 -4
- package/dist/runtime/components/AFloatingWindow.d.vue.ts +54 -2
- package/dist/runtime/components/AFloatingWindow.vue +15 -14
- package/dist/runtime/components/AFloatingWindow.vue.d.ts +54 -2
- package/dist/runtime/components/AIconPicker.vue +10 -2
- package/dist/runtime/components/AInviteRedeemModal.d.vue.ts +10 -0
- package/dist/runtime/components/AInviteRedeemModal.vue +122 -0
- package/dist/runtime/components/AInviteRedeemModal.vue.d.ts +10 -0
- package/dist/runtime/components/ANodePanel.vue +109 -62
- package/dist/runtime/components/ANotifications.vue +37 -8
- package/dist/runtime/components/APermissionGuard.vue +4 -1
- package/dist/runtime/components/APresence.vue +15 -3
- package/dist/runtime/components/AProvider.d.vue.ts +0 -1
- package/dist/runtime/components/AProvider.vue +24 -5
- package/dist/runtime/components/AProvider.vue.d.ts +0 -1
- package/dist/runtime/components/ARoleBadge.vue +1 -0
- package/dist/runtime/components/ASpaceFormModal.d.vue.ts +16 -0
- package/dist/runtime/components/ASpaceFormModal.vue +182 -0
- package/dist/runtime/components/ASpaceFormModal.vue.d.ts +16 -0
- package/dist/runtime/components/AVoiceBar.vue +60 -16
- package/dist/runtime/components/AVoiceTile.vue +5 -1
- package/dist/runtime/components/AWindowLayer.vue +1 -0
- package/dist/runtime/components/aware/AArea.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AArea.vue +3 -2
- package/dist/runtime/components/aware/AArea.vue.d.ts +1 -1
- package/dist/runtime/components/aware/AAvatar.vue +87 -16
- package/dist/runtime/components/aware/AButton.vue +7 -2
- package/dist/runtime/components/aware/ACursorLabel.vue +6 -1
- package/dist/runtime/components/aware/ADocBadge.vue +6 -1
- package/dist/runtime/components/aware/AFacepile.vue +15 -3
- package/dist/runtime/components/aware/AInput.vue +8 -3
- package/dist/runtime/components/aware/ASelect.vue +3 -2
- package/dist/runtime/components/aware/ATextarea.vue +8 -3
- package/dist/runtime/components/aware/AUserList.vue +10 -2
- package/dist/runtime/components/chat/AChatAgentStatus.d.vue.ts +15 -0
- package/dist/runtime/components/chat/AChatAgentStatus.vue +95 -0
- package/dist/runtime/components/chat/AChatAgentStatus.vue.d.ts +15 -0
- package/dist/runtime/components/chat/AChatDocLink.d.vue.ts +18 -0
- package/dist/runtime/components/chat/AChatDocLink.vue +29 -0
- package/dist/runtime/components/chat/AChatDocLink.vue.d.ts +18 -0
- package/dist/runtime/components/chat/AChatDocQuote.d.vue.ts +26 -0
- package/dist/runtime/components/chat/AChatDocQuote.vue +47 -0
- package/dist/runtime/components/chat/AChatDocQuote.vue.d.ts +26 -0
- package/dist/runtime/components/chat/AChatInput.d.vue.ts +45 -0
- package/dist/runtime/components/chat/AChatInput.vue +219 -0
- package/dist/runtime/components/chat/AChatInput.vue.d.ts +45 -0
- package/dist/runtime/components/chat/AChatList.d.vue.ts +59 -0
- package/dist/runtime/components/chat/AChatList.vue +184 -0
- package/dist/runtime/components/chat/AChatList.vue.d.ts +59 -0
- package/dist/runtime/components/chat/AChatMemberList.d.vue.ts +24 -0
- package/dist/runtime/components/chat/AChatMemberList.vue +97 -0
- package/dist/runtime/components/chat/AChatMemberList.vue.d.ts +24 -0
- package/dist/runtime/components/chat/AChatMessages.d.vue.ts +31 -0
- package/dist/runtime/components/chat/AChatMessages.vue +161 -0
- package/dist/runtime/components/chat/AChatMessages.vue.d.ts +31 -0
- package/dist/runtime/components/chat/AChatPanel.d.vue.ts +84 -0
- package/dist/runtime/components/chat/AChatPanel.vue +89 -0
- package/dist/runtime/components/chat/AChatPanel.vue.d.ts +84 -0
- package/dist/runtime/components/chat/AChatTypingIndicator.d.vue.ts +11 -0
- package/dist/runtime/components/chat/AChatTypingIndicator.vue +58 -0
- package/dist/runtime/components/chat/AChatTypingIndicator.vue.d.ts +11 -0
- package/dist/runtime/components/editor/AColorPalettePopover.d.vue.ts +23 -0
- package/dist/runtime/components/editor/AColorPalettePopover.vue +71 -0
- package/dist/runtime/components/editor/AColorPalettePopover.vue.d.ts +23 -0
- package/dist/runtime/components/editor/ADocLinkPopover.d.vue.ts +7 -0
- package/dist/runtime/components/editor/ADocLinkPopover.vue +74 -0
- package/dist/runtime/components/editor/ADocLinkPopover.vue.d.ts +7 -0
- package/dist/runtime/components/editor/AFileAudioPlayer.d.vue.ts +10 -0
- package/dist/runtime/components/editor/AFileAudioPlayer.vue +353 -0
- package/dist/runtime/components/editor/AFileAudioPlayer.vue.d.ts +10 -0
- package/dist/runtime/components/editor/AFileGlbViewer.d.vue.ts +13 -0
- package/dist/runtime/components/editor/AFileGlbViewer.vue +187 -0
- package/dist/runtime/components/editor/AFileGlbViewer.vue.d.ts +13 -0
- package/dist/runtime/components/editor/AFileVideoPlayer.d.vue.ts +7 -0
- package/dist/runtime/components/editor/AFileVideoPlayer.vue +62 -0
- package/dist/runtime/components/editor/AFileVideoPlayer.vue.d.ts +7 -0
- package/dist/runtime/components/editor/ALinkPopover.d.vue.ts +8 -0
- package/dist/runtime/components/editor/ALinkPopover.vue +149 -0
- package/dist/runtime/components/editor/ALinkPopover.vue.d.ts +8 -0
- package/dist/runtime/components/editor/ALocationPickerPopover.d.vue.ts +28 -0
- package/dist/runtime/components/editor/ALocationPickerPopover.vue +232 -0
- package/dist/runtime/components/editor/ALocationPickerPopover.vue.d.ts +28 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.d.vue.ts +14 -1
- package/dist/runtime/components/renderers/ACalendarRenderer.vue +279 -125
- package/dist/runtime/components/renderers/ACalendarRenderer.vue.d.ts +14 -1
- package/dist/runtime/components/renderers/ACallRenderer.d.vue.ts +13 -0
- package/dist/runtime/components/renderers/ACallRenderer.vue +172 -0
- package/dist/runtime/components/renderers/ACallRenderer.vue.d.ts +13 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.vue +582 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/ADashboardRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/ADashboardRenderer.vue +1374 -0
- package/dist/runtime/components/renderers/ADashboardRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/AGalleryCoverImage.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/AGalleryCoverImage.vue +60 -0
- package/dist/runtime/components/renderers/AGalleryCoverImage.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/AGalleryRenderer.d.vue.ts +12 -1
- package/dist/runtime/components/renderers/AGalleryRenderer.vue +327 -53
- package/dist/runtime/components/renderers/AGalleryRenderer.vue.d.ts +12 -1
- package/dist/runtime/components/renderers/AGraphRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/AGraphRenderer.vue +1030 -0
- package/dist/runtime/components/renderers/AGraphRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/AKanbanRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/renderers/AKanbanRenderer.vue +490 -140
- package/dist/runtime/components/renderers/AKanbanRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/renderers/AMapRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/AMapRenderer.vue +1624 -0
- package/dist/runtime/components/renderers/AMapRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/AMediaRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/AMediaRenderer.vue +224 -0
- package/dist/runtime/components/renderers/AMediaRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/AOutlineRenderer.d.vue.ts +12 -1
- package/dist/runtime/components/renderers/AOutlineRenderer.vue +295 -134
- package/dist/runtime/components/renderers/AOutlineRenderer.vue.d.ts +12 -1
- package/dist/runtime/components/renderers/ASpatialRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/ASpatialRenderer.vue +436 -0
- package/dist/runtime/components/renderers/ASpatialRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/ATableRenderer.d.vue.ts +12 -1
- package/dist/runtime/components/renderers/ATableRenderer.vue +459 -147
- package/dist/runtime/components/renderers/ATableRenderer.vue.d.ts +12 -1
- package/dist/runtime/components/renderers/ATimelineRenderer.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/ATimelineRenderer.vue +468 -0
- package/dist/runtime/components/renderers/ATimelineRenderer.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.d.vue.ts +41 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue +109 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue.d.ts +41 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.d.vue.ts +49 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.vue +152 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.vue.d.ts +49 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.d.vue.ts +39 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue +101 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue.d.ts +39 -0
- package/dist/runtime/components/renderers/calendar/ACalendarMonthView.d.vue.ts +43 -0
- package/dist/runtime/components/renderers/calendar/ACalendarMonthView.vue +87 -0
- package/dist/runtime/components/renderers/calendar/ACalendarMonthView.vue.d.ts +43 -0
- package/dist/runtime/components/renderers/calendar/ACalendarToolbar.d.vue.ts +38 -0
- package/dist/runtime/components/renderers/calendar/ACalendarToolbar.vue +206 -0
- package/dist/runtime/components/renderers/calendar/ACalendarToolbar.vue.d.ts +38 -0
- package/dist/runtime/components/renderers/calendar/ACalendarUnscheduled.d.vue.ts +28 -0
- package/dist/runtime/components/renderers/calendar/ACalendarUnscheduled.vue +33 -0
- package/dist/runtime/components/renderers/calendar/ACalendarUnscheduled.vue.d.ts +28 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.d.vue.ts +50 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.vue +188 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.vue.d.ts +50 -0
- package/dist/runtime/components/renderers/media/MediaPlaylist.d.vue.ts +25 -0
- package/dist/runtime/components/renderers/media/MediaPlaylist.vue +115 -0
- package/dist/runtime/components/renderers/media/MediaPlaylist.vue.d.ts +25 -0
- package/dist/runtime/components/renderers/media/MediaSyncBar.d.vue.ts +21 -0
- package/dist/runtime/components/renderers/media/MediaSyncBar.vue +61 -0
- package/dist/runtime/components/renderers/media/MediaSyncBar.vue.d.ts +21 -0
- package/dist/runtime/components/renderers/media/MediaTransportBar.d.vue.ts +22 -0
- package/dist/runtime/components/renderers/media/MediaTransportBar.vue +98 -0
- package/dist/runtime/components/renderers/media/MediaTransportBar.vue.d.ts +22 -0
- package/dist/runtime/components/renderers/spatial/SpatialGround.d.vue.ts +20 -0
- package/dist/runtime/components/renderers/spatial/SpatialGround.vue +26 -0
- package/dist/runtime/components/renderers/spatial/SpatialGround.vue.d.ts +20 -0
- package/dist/runtime/components/renderers/spatial/SpatialObject.d.vue.ts +17 -0
- package/dist/runtime/components/renderers/spatial/SpatialObject.vue +257 -0
- package/dist/runtime/components/renderers/spatial/SpatialObject.vue.d.ts +17 -0
- package/dist/runtime/components/renderers/spatial/SpatialSceneBridge.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/spatial/SpatialSceneBridge.vue +18 -0
- package/dist/runtime/components/renderers/spatial/SpatialSceneBridge.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/spatial/SpatialUserAvatar.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/spatial/SpatialUserAvatar.vue +53 -0
- package/dist/runtime/components/renderers/spatial/SpatialUserAvatar.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/table/ATableColumnHeader.d.vue.ts +25 -0
- package/dist/runtime/components/renderers/table/ATableColumnHeader.vue +129 -0
- package/dist/runtime/components/renderers/table/ATableColumnHeader.vue.d.ts +25 -0
- package/dist/runtime/components/renderers/table/ATableFlatMode.d.vue.ts +21 -0
- package/dist/runtime/components/renderers/table/ATableFlatMode.vue +370 -0
- package/dist/runtime/components/renderers/table/ATableFlatMode.vue.d.ts +21 -0
- package/dist/runtime/components/renderers/table/ATableToolbar.d.vue.ts +22 -0
- package/dist/runtime/components/renderers/table/ATableToolbar.vue +106 -0
- package/dist/runtime/components/renderers/table/ATableToolbar.vue.d.ts +22 -0
- package/dist/runtime/components/renderers/table/cells/ATableCell.d.vue.ts +18 -0
- package/dist/runtime/components/renderers/table/cells/ATableCell.vue +54 -0
- package/dist/runtime/components/renderers/table/cells/ATableCell.vue.d.ts +18 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.d.vue.ts +14 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.vue +67 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.vue.d.ts +14 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellDate.d.vue.ts +16 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellDate.vue +91 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellDate.vue.d.ts +16 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellMembers.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellMembers.vue +30 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellMembers.vue.d.ts +6 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellMultiSelect.d.vue.ts +17 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellMultiSelect.vue +76 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellMultiSelect.vue.d.ts +17 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellNumber.d.vue.ts +17 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellNumber.vue +54 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellNumber.vue.d.ts +17 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellRating.d.vue.ts +16 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellRating.vue +35 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellRating.vue.d.ts +16 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellSelect.d.vue.ts +18 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellSelect.vue +111 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellSelect.vue.d.ts +18 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellSlider.d.vue.ts +16 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellSlider.vue +35 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellSlider.vue.d.ts +16 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellTags.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellTags.vue +92 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellTags.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellText.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellText.vue +44 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellText.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellToggle.d.vue.ts +14 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellToggle.vue +31 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellToggle.vue.d.ts +14 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellUrl.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellUrl.vue +63 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellUrl.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/timeline/ATimelineAxis.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/timeline/ATimelineAxis.vue +53 -0
- package/dist/runtime/components/renderers/timeline/ATimelineAxis.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.d.vue.ts +26 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue +59 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue.d.ts +26 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.d.vue.ts +28 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue +109 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue.d.ts +28 -0
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.d.vue.ts +43 -0
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue +168 -0
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue.d.ts +43 -0
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.d.vue.ts +24 -0
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.vue +46 -0
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.vue.d.ts +24 -0
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.d.vue.ts +34 -0
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.vue +193 -0
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.vue.d.ts +34 -0
- package/dist/runtime/components/settings/ASettingsAdminPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsAdminPanel.vue +159 -0
- package/dist/runtime/components/settings/ASettingsAdminPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsConnectionPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsConnectionPanel.vue +146 -0
- package/dist/runtime/components/settings/ASettingsConnectionPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsInvitesPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsInvitesPanel.vue +157 -0
- package/dist/runtime/components/settings/ASettingsInvitesPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsMembersPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsMembersPanel.vue +134 -0
- package/dist/runtime/components/settings/ASettingsMembersPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsModal.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsModal.vue +176 -0
- package/dist/runtime/components/settings/ASettingsModal.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsOfflinePanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsOfflinePanel.vue +170 -0
- package/dist/runtime/components/settings/ASettingsOfflinePanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsPluginsPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsPluginsPanel.vue +96 -0
- package/dist/runtime/components/settings/ASettingsPluginsPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsProfilePanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsProfilePanel.vue +223 -0
- package/dist/runtime/components/settings/ASettingsProfilePanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsSecurityPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsSecurityPanel.vue +312 -0
- package/dist/runtime/components/settings/ASettingsSecurityPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsSpacesPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsSpacesPanel.vue +195 -0
- package/dist/runtime/components/settings/ASettingsSpacesPanel.vue.d.ts +3 -0
- package/dist/runtime/components/settings/ASettingsTrashPanel.d.vue.ts +3 -0
- package/dist/runtime/components/settings/ASettingsTrashPanel.vue +135 -0
- package/dist/runtime/components/settings/ASettingsTrashPanel.vue.d.ts +3 -0
- package/dist/runtime/components/shell/AChildContextMenu.d.vue.ts +30 -0
- package/dist/runtime/components/shell/AChildContextMenu.vue +48 -0
- package/dist/runtime/components/shell/AChildContextMenu.vue.d.ts +30 -0
- package/dist/runtime/components/shell/ACursorOverlay.d.vue.ts +11 -0
- package/dist/runtime/components/shell/ACursorOverlay.vue +55 -0
- package/dist/runtime/components/shell/ACursorOverlay.vue.d.ts +11 -0
- package/dist/runtime/components/shell/ADocDragGhost.d.vue.ts +3 -0
- package/dist/runtime/components/shell/ADocDragGhost.vue +58 -0
- package/dist/runtime/components/shell/ADocDragGhost.vue.d.ts +3 -0
- package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +111 -0
- package/dist/runtime/components/shell/ADocPanelSettings.vue +621 -0
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +111 -0
- package/dist/runtime/components/shell/AFavoritesList.d.vue.ts +27 -0
- package/dist/runtime/components/shell/AFavoritesList.vue +83 -0
- package/dist/runtime/components/shell/AFavoritesList.vue.d.ts +27 -0
- package/dist/runtime/components/shell/ANodeContextMenu.d.vue.ts +17 -0
- package/dist/runtime/components/shell/ANodeContextMenu.vue +14 -0
- package/dist/runtime/components/shell/ANodeContextMenu.vue.d.ts +17 -0
- package/dist/runtime/components/shell/ASidebar.d.vue.ts +54 -0
- package/dist/runtime/components/shell/ASidebar.vue +92 -0
- package/dist/runtime/components/shell/ASidebar.vue.d.ts +54 -0
- package/dist/runtime/components/shell/ASidebarToggle.d.vue.ts +7 -0
- package/dist/runtime/components/shell/ASidebarToggle.vue +23 -0
- package/dist/runtime/components/shell/ASidebarToggle.vue.d.ts +7 -0
- package/dist/runtime/components/shell/ASpaceSwitcher.d.vue.ts +32 -0
- package/dist/runtime/components/shell/ASpaceSwitcher.vue +63 -0
- package/dist/runtime/components/shell/ASpaceSwitcher.vue.d.ts +32 -0
- package/dist/runtime/components/shell/ASyncStatus.d.vue.ts +25 -0
- package/dist/runtime/components/shell/ASyncStatus.vue +96 -0
- package/dist/runtime/components/shell/ASyncStatus.vue.d.ts +25 -0
- package/dist/runtime/components/shell/AUserMenu.d.vue.ts +28 -0
- package/dist/runtime/components/shell/AUserMenu.vue +79 -0
- package/dist/runtime/components/shell/AUserMenu.vue.d.ts +28 -0
- package/dist/runtime/components/shell/AUserProfilePopover.d.vue.ts +54 -0
- package/dist/runtime/components/shell/AUserProfilePopover.vue +176 -0
- package/dist/runtime/components/shell/AUserProfilePopover.vue.d.ts +54 -0
- package/dist/runtime/components/shell/AWelcomeScreen.d.vue.ts +96 -0
- package/dist/runtime/components/shell/AWelcomeScreen.vue +422 -0
- package/dist/runtime/components/shell/AWelcomeScreen.vue.d.ts +96 -0
- package/dist/runtime/composables/useAAField.js +2 -0
- package/dist/runtime/composables/useAbraLocale.js +1 -0
- package/dist/runtime/composables/useAbracadabra.js +1 -0
- package/dist/runtime/composables/useAbracadabraAuth.d.ts +3 -4
- package/dist/runtime/composables/useAbracadabraAuth.js +4 -0
- package/dist/runtime/composables/useAwareness.js +6 -0
- package/dist/runtime/composables/useAwarenessPeers.js +1 -0
- package/dist/runtime/composables/useBackgroundSync.d.ts +5 -0
- package/dist/runtime/composables/useBackgroundSync.js +24 -3
- package/dist/runtime/composables/useBroadcastSync.d.ts +18 -0
- package/dist/runtime/composables/useBroadcastSync.js +26 -0
- package/dist/runtime/composables/useCalendarView.d.ts +86 -0
- package/dist/runtime/composables/useCalendarView.js +316 -0
- package/dist/runtime/composables/useChat.d.ts +2 -1
- package/dist/runtime/composables/useChat.js +21 -12
- package/dist/runtime/composables/useChatUsers.js +3 -1
- package/dist/runtime/composables/useChildTree.d.ts +4 -2
- package/dist/runtime/composables/useChildTree.js +31 -21
- package/dist/runtime/composables/useCommandPalette.js +77 -19
- package/dist/runtime/composables/useConnectionStatus.d.ts +1 -1
- package/dist/runtime/composables/useConnectionStatus.js +8 -1
- package/dist/runtime/composables/useCrossWindowSync.d.ts +11 -0
- package/dist/runtime/composables/useCrossWindowSync.js +38 -0
- package/dist/runtime/composables/useDashboard.js +17 -9
- package/dist/runtime/composables/useDevicePairing.d.ts +58 -0
- package/dist/runtime/composables/useDevicePairing.js +110 -0
- package/dist/runtime/composables/useDocDragBus.d.ts +28 -0
- package/dist/runtime/composables/useDocDragBus.js +22 -0
- package/dist/runtime/composables/useDocDropZone.d.ts +51 -0
- package/dist/runtime/composables/useDocDropZone.js +84 -0
- package/dist/runtime/composables/useDocExport.d.ts +5 -0
- package/dist/runtime/composables/useDocExport.js +4 -2
- package/dist/runtime/composables/useDocImport.js +5 -3
- package/dist/runtime/composables/useDocLabels.d.ts +22 -0
- package/dist/runtime/composables/useDocLabels.js +11 -0
- package/dist/runtime/composables/useDocLinkPick.d.ts +18 -0
- package/dist/runtime/composables/useDocLinkPick.js +22 -0
- package/dist/runtime/composables/useDocSeo.d.ts +20 -0
- package/dist/runtime/composables/useDocSeo.js +45 -0
- package/dist/runtime/composables/useDocSlugs.d.ts +7 -0
- package/dist/runtime/composables/useDocSlugs.js +23 -0
- package/dist/runtime/composables/useDocTree.d.ts +35 -0
- package/dist/runtime/composables/useDocTree.js +39 -0
- package/dist/runtime/composables/useEditor.js +1 -0
- package/dist/runtime/composables/useEditorDragHandle.js +4 -1
- package/dist/runtime/composables/useEditorEmojis.d.ts +22 -0
- package/dist/runtime/composables/useEditorEmojis.js +57 -0
- package/dist/runtime/composables/useEditorMentions.d.ts +10 -3
- package/dist/runtime/composables/useEditorMentions.js +35 -5
- package/dist/runtime/composables/useEditorSuggestions.d.ts +2 -1
- package/dist/runtime/composables/useEditorSuggestions.js +36 -21
- package/dist/runtime/composables/useEditorToolbar.d.ts +1 -1
- package/dist/runtime/composables/useEditorToolbar.js +5 -1
- package/dist/runtime/composables/useFavorites.d.ts +13 -0
- package/dist/runtime/composables/useFavorites.js +42 -0
- package/dist/runtime/composables/useFileIndex.js +4 -1
- package/dist/runtime/composables/useFileTransfer.d.ts +112 -0
- package/dist/runtime/composables/useFileTransfer.js +183 -0
- package/dist/runtime/composables/useFollowUser.js +4 -1
- package/dist/runtime/composables/useIdentityDoc.d.ts +89 -0
- package/dist/runtime/composables/useIdentityDoc.js +349 -0
- package/dist/runtime/composables/useInstalledPlugins.d.ts +31 -0
- package/dist/runtime/composables/useInstalledPlugins.js +58 -0
- package/dist/runtime/composables/useInvites.d.ts +56 -0
- package/dist/runtime/composables/useInvites.js +78 -0
- package/dist/runtime/composables/useJoinLink.d.ts +25 -0
- package/dist/runtime/composables/useJoinLink.js +58 -0
- package/dist/runtime/composables/useMediaExtractor.d.ts +31 -0
- package/dist/runtime/composables/useMediaExtractor.js +46 -0
- package/dist/runtime/composables/useMediaPlayback.d.ts +43 -0
- package/dist/runtime/composables/useMediaPlayback.js +465 -0
- package/dist/runtime/composables/useNodeContextMenu.d.ts +26 -0
- package/dist/runtime/composables/useNodeContextMenu.js +99 -0
- package/dist/runtime/composables/useNodePanel.d.ts +20 -0
- package/dist/runtime/composables/useNodePanel.js +89 -0
- package/dist/runtime/composables/useNodePanelFollow.d.ts +2 -0
- package/dist/runtime/composables/useNodePanelFollow.js +37 -0
- package/dist/runtime/composables/useNotifications.d.ts +1 -0
- package/dist/runtime/composables/useNotifications.js +9 -2
- package/dist/runtime/composables/usePasskeyAccounts.js +4 -2
- package/dist/runtime/composables/usePluginRegistry.js +1 -0
- package/dist/runtime/composables/useRendererBase.d.ts +16 -1
- package/dist/runtime/composables/useRendererBase.js +10 -1
- package/dist/runtime/composables/useSearchIndex.d.ts +1 -0
- package/dist/runtime/composables/useSearchIndex.js +15 -5
- package/dist/runtime/composables/useServerInfo.d.ts +31 -0
- package/dist/runtime/composables/useServerInfo.js +80 -0
- package/dist/runtime/composables/useSettingsModal.d.ts +18 -0
- package/dist/runtime/composables/useSettingsModal.js +30 -0
- package/dist/runtime/composables/useSlideoverSwipe.d.ts +39 -0
- package/dist/runtime/composables/useSlideoverSwipe.js +48 -0
- package/dist/runtime/composables/useSlugRoute.d.ts +6 -0
- package/dist/runtime/composables/useSlugRoute.js +21 -0
- package/dist/runtime/composables/useSpaces.d.ts +37 -0
- package/dist/runtime/composables/useSpaces.js +85 -0
- package/dist/runtime/composables/useSpatialCamera.d.ts +16 -0
- package/dist/runtime/composables/useSpatialCamera.js +175 -0
- package/dist/runtime/composables/useSpatialDrag.d.ts +14 -0
- package/dist/runtime/composables/useSpatialDrag.js +137 -0
- package/dist/runtime/composables/useTableView.d.ts +29 -0
- package/dist/runtime/composables/useTableView.js +184 -0
- package/dist/runtime/composables/useTimelineView.d.ts +55 -0
- package/dist/runtime/composables/useTimelineView.js +434 -0
- package/dist/runtime/composables/useTiptapDragState.d.ts +8 -0
- package/dist/runtime/composables/useTiptapDragState.js +5 -0
- package/dist/runtime/composables/useTouchDrag.d.ts +36 -0
- package/dist/runtime/composables/useTouchDrag.js +194 -0
- package/dist/runtime/composables/useTrash.d.ts +5 -1
- package/dist/runtime/composables/useTrash.js +12 -6
- package/dist/runtime/composables/useTreeUndoManager.d.ts +22 -0
- package/dist/runtime/composables/useTreeUndoManager.js +45 -0
- package/dist/runtime/composables/useUndoRedo.d.ts +37 -0
- package/dist/runtime/composables/useUndoRedo.js +115 -0
- package/dist/runtime/composables/useVoice.js +2 -0
- package/dist/runtime/composables/useWebRTC.d.ts +50 -0
- package/dist/runtime/composables/useWebRTC.js +179 -0
- package/dist/runtime/composables/useWindowManager.d.ts +2 -0
- package/dist/runtime/composables/useWindowManager.js +63 -1
- package/dist/runtime/extensions/code-preview.d.ts +2 -0
- package/dist/runtime/extensions/code-preview.js +17 -0
- package/dist/runtime/extensions/code-tree.d.ts +2 -0
- package/dist/runtime/extensions/code-tree.js +33 -0
- package/dist/runtime/extensions/doc-embed.d.ts +12 -0
- package/dist/runtime/extensions/doc-embed.js +63 -0
- package/dist/runtime/extensions/doc-link-drop.d.ts +3 -0
- package/dist/runtime/extensions/doc-link-drop.js +63 -0
- package/dist/runtime/extensions/document-header.js +1 -1
- package/dist/runtime/extensions/field.d.ts +3 -0
- package/dist/runtime/extensions/field.js +53 -0
- package/dist/runtime/extensions/mention-drop.d.ts +8 -0
- package/dist/runtime/extensions/mention-drop.js +47 -0
- package/dist/runtime/extensions/meta-field.d.ts +4 -1
- package/dist/runtime/extensions/meta-field.js +2 -0
- package/dist/runtime/extensions/selection-drag.d.ts +13 -0
- package/dist/runtime/extensions/selection-drag.js +126 -0
- package/dist/runtime/extensions/steps.js +1 -1
- package/dist/runtime/extensions/views/AccordionItemView.vue +14 -3
- package/dist/runtime/extensions/views/AccordionView.vue +4 -1
- package/dist/runtime/extensions/views/BadgeView.vue +12 -2
- package/dist/runtime/extensions/views/CalloutView.vue +4 -1
- package/dist/runtime/extensions/views/CardGroupView.vue +4 -1
- package/dist/runtime/extensions/views/CardView.vue +18 -3
- package/dist/runtime/extensions/views/CodeCollapseView.vue +1 -0
- package/dist/runtime/extensions/views/CodeGroupView.vue +5 -1
- package/dist/runtime/extensions/views/CodePreviewView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CodePreviewView.vue +48 -0
- package/dist/runtime/extensions/views/CodePreviewView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CodeTreeView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/CodeTreeView.vue +88 -0
- package/dist/runtime/extensions/views/CodeTreeView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/CollapsibleView.vue +9 -2
- package/dist/runtime/extensions/views/DocEmbedView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DocEmbedView.vue +198 -0
- package/dist/runtime/extensions/views/DocEmbedView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FieldGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/FieldGroupView.vue +25 -0
- package/dist/runtime/extensions/views/FieldGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FieldView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/FieldView.vue +53 -0
- package/dist/runtime/extensions/views/FieldView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FileNodeView.vue +34 -8
- package/dist/runtime/extensions/views/KbdView.vue +9 -2
- package/dist/runtime/extensions/views/MetaFieldView.vue +276 -48
- package/dist/runtime/extensions/views/ProseIconView.vue +9 -2
- package/dist/runtime/extensions/views/StepsView.vue +1 -0
- package/dist/runtime/extensions/views/TabsView.vue +18 -4
- package/dist/runtime/locale.d.ts +136 -0
- package/dist/runtime/locale.js +137 -1
- package/dist/runtime/middleware/abracadabra-auth.d.ts +1 -10
- package/dist/runtime/middleware/abracadabra-auth.js +2 -0
- package/dist/runtime/plugin-abracadabra.client.d.ts +1 -1
- package/dist/runtime/plugin-abracadabra.client.js +127 -55
- package/dist/runtime/plugin-abracadabra.server.d.ts +1 -1
- package/dist/runtime/plugin-abracadabra.server.js +4 -0
- package/dist/runtime/plugin-shared-globals.client.d.ts +1 -1
- package/dist/runtime/plugin-shared-globals.client.js +1 -0
- package/dist/runtime/plugins/core.plugin.js +40 -4
- package/dist/runtime/server/api/_abracadabra/render/[docId].get.d.ts +19 -17
- package/dist/runtime/server/api/_abracadabra/render/[docId].get.js +33 -4
- package/dist/runtime/server/api/_abracadabra/resolve/[...slug].get.d.ts +12 -0
- package/dist/runtime/server/api/_abracadabra/resolve/[...slug].get.js +44 -0
- package/dist/runtime/server/api/_abracadabra/slugs.get.d.ts +2 -0
- package/dist/runtime/server/api/_abracadabra/slugs.get.js +8 -0
- package/dist/runtime/server/api/_abracadabra/spaces.get.d.ts +1 -10
- package/dist/runtime/server/api/_abracadabra/spaces.get.js +3 -0
- package/dist/runtime/server/plugins/abracadabra-service.js +29 -12
- package/dist/runtime/server/runners/doc-tree-cache.js +4 -0
- package/dist/runtime/server/utils/docCache.d.ts +8 -6
- package/dist/runtime/server/utils/docCache.js +3 -3
- package/dist/runtime/server/utils/serverPluginLoader.d.ts +20 -0
- package/dist/runtime/server/utils/serverPluginLoader.js +42 -0
- package/dist/runtime/server/utils/serverRunner.d.ts +11 -2
- package/dist/runtime/server/utils/serverRunner.js +21 -10
- package/dist/runtime/server/utils/slugMap.d.ts +32 -0
- package/dist/runtime/server/utils/slugMap.js +58 -0
- package/dist/runtime/server/utils/spaceManager.d.ts +25 -0
- package/dist/runtime/server/utils/spaceManager.js +188 -0
- package/dist/runtime/types.d.ts +129 -30
- package/dist/runtime/types.js +17 -17
- package/dist/runtime/utils/chatContent.d.ts +41 -0
- package/dist/runtime/utils/chatContent.js +65 -0
- package/dist/runtime/utils/colorPalettes.js +12 -6
- package/dist/runtime/utils/coverCache.d.ts +12 -0
- package/dist/runtime/utils/coverCache.js +14 -0
- package/dist/runtime/utils/docReferenceEdges.d.ts +26 -0
- package/dist/runtime/utils/docReferenceEdges.js +122 -0
- package/dist/runtime/utils/docTypes.d.ts +34 -1
- package/dist/runtime/utils/docTypes.js +129 -1
- package/dist/runtime/utils/duplicateDocContent.d.ts +19 -0
- package/dist/runtime/utils/duplicateDocContent.js +68 -0
- package/dist/runtime/utils/extractFileMetadata.d.ts +13 -0
- package/dist/runtime/utils/extractFileMetadata.js +94 -0
- package/dist/runtime/utils/getMetaColor.d.ts +6 -0
- package/dist/runtime/utils/getMetaColor.js +12 -0
- package/dist/runtime/utils/htmlToYjs.d.ts +19 -0
- package/dist/runtime/utils/htmlToYjs.js +235 -0
- package/dist/runtime/utils/markdownToYjs.js +5 -5
- package/dist/runtime/utils/metaFieldDefinitions.js +9 -0
- package/dist/runtime/utils/notificationRenderers.d.ts +13 -0
- package/dist/runtime/utils/notificationRenderers.js +41 -0
- package/dist/runtime/utils/sdkRef.d.ts +12 -0
- package/dist/runtime/utils/sdkRef.js +7 -0
- package/dist/runtime/utils/slugify.d.ts +40 -0
- package/dist/runtime/utils/slugify.js +36 -0
- package/dist/types.d.mts +18 -0
- package/package.json +44 -32
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ref, computed } from "vue";
|
|
2
2
|
const syncStates = ref(/* @__PURE__ */ new Map());
|
|
3
3
|
const isSyncing = ref(false);
|
|
4
|
+
const isPaused = ref(false);
|
|
4
5
|
const lastCompletedAt = ref(null);
|
|
5
6
|
let _manager = null;
|
|
6
7
|
let _stopPeriodicSync = null;
|
|
8
|
+
let _periodicIntervalMs = 5 * 60 * 1e3;
|
|
7
9
|
const syncedCount = computed(() => {
|
|
8
10
|
let n = 0;
|
|
9
11
|
for (const s of syncStates.value.values()) {
|
|
@@ -29,12 +31,16 @@ const progress = computed(() => {
|
|
|
29
31
|
});
|
|
30
32
|
export function _initBackgroundSync(manager, intervalMs = 5 * 60 * 1e3) {
|
|
31
33
|
_manager = manager;
|
|
32
|
-
|
|
33
|
-
syncStates.value = new Map(existing);
|
|
34
|
+
_periodicIntervalMs = intervalMs;
|
|
34
35
|
_manager.on("stateChanged", ({ docId, state }) => {
|
|
35
36
|
syncStates.value = new Map(syncStates.value).set(docId, state);
|
|
36
37
|
});
|
|
38
|
+
_manager.init().then(() => {
|
|
39
|
+
const existing = _manager.getSyncStatus();
|
|
40
|
+
syncStates.value = new Map(existing);
|
|
41
|
+
}).catch(() => null);
|
|
37
42
|
_stopPeriodicSync = _manager.startPeriodicSync(intervalMs);
|
|
43
|
+
isPaused.value = false;
|
|
38
44
|
}
|
|
39
45
|
export function _destroyBackgroundSync() {
|
|
40
46
|
_stopPeriodicSync?.();
|
|
@@ -43,8 +49,20 @@ export function _destroyBackgroundSync() {
|
|
|
43
49
|
_manager = null;
|
|
44
50
|
syncStates.value = /* @__PURE__ */ new Map();
|
|
45
51
|
isSyncing.value = false;
|
|
52
|
+
isPaused.value = false;
|
|
46
53
|
lastCompletedAt.value = null;
|
|
47
54
|
}
|
|
55
|
+
function pause() {
|
|
56
|
+
if (!_manager || isPaused.value) return;
|
|
57
|
+
_stopPeriodicSync?.();
|
|
58
|
+
_stopPeriodicSync = null;
|
|
59
|
+
isPaused.value = true;
|
|
60
|
+
}
|
|
61
|
+
function resume(intervalMs) {
|
|
62
|
+
if (!_manager || !isPaused.value) return;
|
|
63
|
+
_stopPeriodicSync = _manager.startPeriodicSync(intervalMs ?? _periodicIntervalMs);
|
|
64
|
+
isPaused.value = false;
|
|
65
|
+
}
|
|
48
66
|
async function syncNow() {
|
|
49
67
|
if (!_manager || isSyncing.value) return;
|
|
50
68
|
isSyncing.value = true;
|
|
@@ -63,11 +81,14 @@ export function useBackgroundSync() {
|
|
|
63
81
|
return {
|
|
64
82
|
syncStates,
|
|
65
83
|
isSyncing,
|
|
84
|
+
isPaused,
|
|
66
85
|
syncedCount,
|
|
67
86
|
errorCount,
|
|
68
87
|
progress,
|
|
69
88
|
lastCompletedAt,
|
|
70
89
|
syncNow,
|
|
71
|
-
syncDoc
|
|
90
|
+
syncDoc,
|
|
91
|
+
pause,
|
|
92
|
+
resume
|
|
72
93
|
};
|
|
73
94
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useBroadcastSync
|
|
3
|
+
*
|
|
4
|
+
* Wraps BroadcastChannelSync from @abraca/dabra for cross-tab Y.js sync.
|
|
5
|
+
* Initialized by the main plugin after root provider syncs.
|
|
6
|
+
* No user action needed — automatically syncs across browser tabs on the same origin.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* const { isActive } = useBroadcastSync()
|
|
10
|
+
*/
|
|
11
|
+
import type * as Y from 'yjs';
|
|
12
|
+
import type { Awareness } from 'y-protocols/awareness';
|
|
13
|
+
export declare function _initBroadcastSync(BroadcastChannelSync: any, doc: Y.Doc, docId: string, awareness?: Awareness | null): void;
|
|
14
|
+
export declare function _destroyBroadcastSync(): void;
|
|
15
|
+
export declare function useBroadcastSync(): {
|
|
16
|
+
/** Whether cross-tab BroadcastChannel sync is currently active. */
|
|
17
|
+
isActive: import("vue").Ref<boolean, boolean>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
const isActive = ref(false);
|
|
3
|
+
let _sync = null;
|
|
4
|
+
export function _initBroadcastSync(BroadcastChannelSync, doc, docId, awareness) {
|
|
5
|
+
_destroyBroadcastSync();
|
|
6
|
+
try {
|
|
7
|
+
_sync = BroadcastChannelSync.forDoc(doc, docId, awareness ?? void 0);
|
|
8
|
+
_sync.connect();
|
|
9
|
+
isActive.value = true;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
console.error("[abracadabra] BroadcastChannelSync init failed:", e);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function _destroyBroadcastSync() {
|
|
15
|
+
if (_sync) {
|
|
16
|
+
_sync.destroy();
|
|
17
|
+
_sync = null;
|
|
18
|
+
}
|
|
19
|
+
isActive.value = false;
|
|
20
|
+
}
|
|
21
|
+
export function useBroadcastSync() {
|
|
22
|
+
return {
|
|
23
|
+
/** Whether cross-tab BroadcastChannel sync is currently active. */
|
|
24
|
+
isActive
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { TreeEntry } from './useChildTree.js';
|
|
3
|
+
export type CalendarViewMode = 'month' | 'week' | 'day';
|
|
4
|
+
export interface CalendarEvent {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
color: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
datetimeStart: string;
|
|
10
|
+
datetimeEnd: string;
|
|
11
|
+
allDay: boolean;
|
|
12
|
+
entry: TreeEntry;
|
|
13
|
+
}
|
|
14
|
+
export interface LaneSlot {
|
|
15
|
+
type: 'empty' | 'span';
|
|
16
|
+
id?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
isStart?: boolean;
|
|
21
|
+
isEnd?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface CalendarCell {
|
|
24
|
+
date: Date | null;
|
|
25
|
+
dateStr: string | null;
|
|
26
|
+
isToday: boolean;
|
|
27
|
+
isCurrentMonth: boolean;
|
|
28
|
+
laneSlots: LaneSlot[];
|
|
29
|
+
events: CalendarEvent[];
|
|
30
|
+
}
|
|
31
|
+
export interface WeekRow {
|
|
32
|
+
cells: CalendarCell[];
|
|
33
|
+
laneCount: number;
|
|
34
|
+
}
|
|
35
|
+
export interface HourSlot {
|
|
36
|
+
hour: number;
|
|
37
|
+
label: string;
|
|
38
|
+
events: CalendarEvent[];
|
|
39
|
+
}
|
|
40
|
+
export interface DayColumn {
|
|
41
|
+
date: Date;
|
|
42
|
+
dateStr: string;
|
|
43
|
+
isToday: boolean;
|
|
44
|
+
label: string;
|
|
45
|
+
shortLabel: string;
|
|
46
|
+
allDayEvents: CalendarEvent[];
|
|
47
|
+
hourSlots: HourSlot[];
|
|
48
|
+
}
|
|
49
|
+
export interface UseCalendarViewOptions {
|
|
50
|
+
tree: {
|
|
51
|
+
childrenOf: (parentId: string | null) => TreeEntry[];
|
|
52
|
+
};
|
|
53
|
+
/** Stored view mode from doc meta */
|
|
54
|
+
storedView?: Ref<CalendarViewMode | undefined>;
|
|
55
|
+
/** 'sun' | 'mon' */
|
|
56
|
+
weekStartDay?: Ref<string>;
|
|
57
|
+
/** Whether to show week numbers */
|
|
58
|
+
showWeekNumbers?: Ref<boolean>;
|
|
59
|
+
}
|
|
60
|
+
declare function toDateStr(d: Date): string;
|
|
61
|
+
export declare function useCalendarView(options: UseCalendarViewOptions): {
|
|
62
|
+
viewMode: Ref<CalendarViewMode, CalendarViewMode>;
|
|
63
|
+
isMobile: Ref<boolean, boolean>;
|
|
64
|
+
isTablet: Ref<boolean, boolean>;
|
|
65
|
+
currentDate: Ref<Date, Date>;
|
|
66
|
+
year: import("vue").ComputedRef<number>;
|
|
67
|
+
month: import("vue").ComputedRef<number>;
|
|
68
|
+
todayStr: import("vue").ComputedRef<string>;
|
|
69
|
+
periodLabel: import("vue").ComputedRef<string>;
|
|
70
|
+
prevPeriod: () => void;
|
|
71
|
+
nextPeriod: () => void;
|
|
72
|
+
goToday: () => void;
|
|
73
|
+
goToMonth: (y: number, m: number) => void;
|
|
74
|
+
weekStartOffset: import("vue").ComputedRef<1 | 0>;
|
|
75
|
+
weekDayHeaders: import("vue").ComputedRef<("Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat")[]>;
|
|
76
|
+
weekViewDays: import("vue").ComputedRef<3 | 7>;
|
|
77
|
+
weeks: import("vue").ComputedRef<WeekRow[]>;
|
|
78
|
+
weekNumbers: import("vue").ComputedRef<(number | null)[]>;
|
|
79
|
+
weekColumns: import("vue").ComputedRef<DayColumn[]>;
|
|
80
|
+
dayColumn: import("vue").ComputedRef<DayColumn>;
|
|
81
|
+
allEvents: import("vue").ComputedRef<CalendarEvent[]>;
|
|
82
|
+
unscheduledEntries: import("vue").ComputedRef<TreeEntry[]>;
|
|
83
|
+
toDateStr: typeof toDateStr;
|
|
84
|
+
cleanup: () => void;
|
|
85
|
+
};
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { ref, computed, onMounted } from "vue";
|
|
2
|
+
const ALL_WEEK_DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
3
|
+
const HOURS_START = 0;
|
|
4
|
+
const HOURS_END = 24;
|
|
5
|
+
function toDateStr(d) {
|
|
6
|
+
return d.toISOString().slice(0, 10);
|
|
7
|
+
}
|
|
8
|
+
function isoWeekNumber(d) {
|
|
9
|
+
const date = new Date(d.getTime());
|
|
10
|
+
date.setHours(0, 0, 0, 0);
|
|
11
|
+
date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
|
|
12
|
+
const week1 = new Date(date.getFullYear(), 0, 4);
|
|
13
|
+
return 1 + Math.round(((date.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
|
|
14
|
+
}
|
|
15
|
+
function parseEventTime(dt) {
|
|
16
|
+
const d = new Date(dt);
|
|
17
|
+
return { hour: d.getHours(), minute: d.getMinutes() };
|
|
18
|
+
}
|
|
19
|
+
export function useCalendarView(options) {
|
|
20
|
+
const { tree, storedView, weekStartDay, showWeekNumbers } = options;
|
|
21
|
+
const viewMode = ref("month");
|
|
22
|
+
const isMobile = ref(false);
|
|
23
|
+
const isTablet = ref(false);
|
|
24
|
+
function checkBreakpoints() {
|
|
25
|
+
if (typeof window === "undefined") return;
|
|
26
|
+
isMobile.value = window.innerWidth < 640;
|
|
27
|
+
isTablet.value = window.innerWidth >= 640 && window.innerWidth < 768;
|
|
28
|
+
}
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
checkBreakpoints();
|
|
31
|
+
window.addEventListener("resize", checkBreakpoints);
|
|
32
|
+
const stored = storedView?.value;
|
|
33
|
+
if (stored) {
|
|
34
|
+
viewMode.value = stored;
|
|
35
|
+
} else if (isMobile.value) {
|
|
36
|
+
viewMode.value = "day";
|
|
37
|
+
} else if (isTablet.value) {
|
|
38
|
+
viewMode.value = "week";
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const currentDate = ref(/* @__PURE__ */ new Date());
|
|
42
|
+
const year = computed(() => currentDate.value.getFullYear());
|
|
43
|
+
const month = computed(() => currentDate.value.getMonth());
|
|
44
|
+
const todayStr = computed(() => toDateStr(/* @__PURE__ */ new Date()));
|
|
45
|
+
const weekStartOffset = computed(
|
|
46
|
+
() => weekStartDay?.value === "mon" ? 1 : 0
|
|
47
|
+
);
|
|
48
|
+
const weekDayHeaders = computed(() => {
|
|
49
|
+
const o = weekStartOffset.value;
|
|
50
|
+
return [...ALL_WEEK_DAYS.slice(o), ...ALL_WEEK_DAYS.slice(0, o)];
|
|
51
|
+
});
|
|
52
|
+
const weekViewDays = computed(() => isMobile.value ? 3 : 7);
|
|
53
|
+
const periodLabel = computed(() => {
|
|
54
|
+
const d = currentDate.value;
|
|
55
|
+
const loc = typeof navigator !== "undefined" ? navigator.language : "en-US";
|
|
56
|
+
if (viewMode.value === "month") {
|
|
57
|
+
return d.toLocaleDateString(loc, { month: "long", year: "numeric" });
|
|
58
|
+
}
|
|
59
|
+
if (viewMode.value === "day") {
|
|
60
|
+
return d.toLocaleDateString(loc, { weekday: "long", month: "long", day: "numeric", year: "numeric" });
|
|
61
|
+
}
|
|
62
|
+
const start = weekStartDate.value;
|
|
63
|
+
const end = new Date(start);
|
|
64
|
+
end.setDate(end.getDate() + weekViewDays.value - 1);
|
|
65
|
+
const startStr = start.toLocaleDateString(loc, { month: "short", day: "numeric" });
|
|
66
|
+
const endStr = end.toLocaleDateString(loc, { month: "short", day: "numeric", year: "numeric" });
|
|
67
|
+
return `${startStr} \u2013 ${endStr}`;
|
|
68
|
+
});
|
|
69
|
+
function prevPeriod() {
|
|
70
|
+
const d = new Date(currentDate.value);
|
|
71
|
+
if (viewMode.value === "month") {
|
|
72
|
+
d.setMonth(d.getMonth() - 1);
|
|
73
|
+
} else if (viewMode.value === "week") {
|
|
74
|
+
d.setDate(d.getDate() - weekViewDays.value);
|
|
75
|
+
} else {
|
|
76
|
+
d.setDate(d.getDate() - 1);
|
|
77
|
+
}
|
|
78
|
+
currentDate.value = d;
|
|
79
|
+
}
|
|
80
|
+
function nextPeriod() {
|
|
81
|
+
const d = new Date(currentDate.value);
|
|
82
|
+
if (viewMode.value === "month") {
|
|
83
|
+
d.setMonth(d.getMonth() + 1);
|
|
84
|
+
} else if (viewMode.value === "week") {
|
|
85
|
+
d.setDate(d.getDate() + weekViewDays.value);
|
|
86
|
+
} else {
|
|
87
|
+
d.setDate(d.getDate() + 1);
|
|
88
|
+
}
|
|
89
|
+
currentDate.value = d;
|
|
90
|
+
}
|
|
91
|
+
function goToday() {
|
|
92
|
+
currentDate.value = /* @__PURE__ */ new Date();
|
|
93
|
+
}
|
|
94
|
+
function goToMonth(y, m) {
|
|
95
|
+
currentDate.value = new Date(y, m, 1);
|
|
96
|
+
}
|
|
97
|
+
function entryToEvent(entry) {
|
|
98
|
+
const start = entry.meta?.datetimeStart;
|
|
99
|
+
if (!start) return null;
|
|
100
|
+
return {
|
|
101
|
+
id: entry.id,
|
|
102
|
+
label: entry.label,
|
|
103
|
+
color: entry.meta?.color ?? "#6366f1",
|
|
104
|
+
icon: entry.meta?.icon,
|
|
105
|
+
datetimeStart: start,
|
|
106
|
+
datetimeEnd: entry.meta?.datetimeEnd ?? start,
|
|
107
|
+
allDay: !!entry.meta?.allDay,
|
|
108
|
+
entry
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const allEvents = computed(() => {
|
|
112
|
+
const result = [];
|
|
113
|
+
for (const entry of tree.childrenOf(null)) {
|
|
114
|
+
const evt = entryToEvent(entry);
|
|
115
|
+
if (evt) result.push(evt);
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
});
|
|
119
|
+
const unscheduledEntries = computed(
|
|
120
|
+
() => tree.childrenOf(null).filter((e) => !e.meta?.datetimeStart)
|
|
121
|
+
);
|
|
122
|
+
const weeks = computed(() => {
|
|
123
|
+
const y = year.value;
|
|
124
|
+
const m = month.value;
|
|
125
|
+
const firstDay = (new Date(y, m, 1).getDay() - weekStartOffset.value + 7) % 7;
|
|
126
|
+
const daysInMonth = new Date(y, m + 1, 0).getDate();
|
|
127
|
+
const raw = [];
|
|
128
|
+
for (let i = firstDay - 1; i >= 0; i--) {
|
|
129
|
+
const date = new Date(y, m, -i);
|
|
130
|
+
const dateStr = toDateStr(date);
|
|
131
|
+
raw.push({ date, dateStr, isToday: dateStr === todayStr.value, isCurrentMonth: false });
|
|
132
|
+
}
|
|
133
|
+
for (let d = 1; d <= daysInMonth; d++) {
|
|
134
|
+
const date = new Date(y, m, d);
|
|
135
|
+
const dateStr = toDateStr(date);
|
|
136
|
+
raw.push({ date, dateStr, isToday: dateStr === todayStr.value, isCurrentMonth: true });
|
|
137
|
+
}
|
|
138
|
+
while (raw.length % 7 !== 0) {
|
|
139
|
+
const date = new Date(y, m + 1, raw.length - firstDay - daysInMonth + 1);
|
|
140
|
+
const dateStr = toDateStr(date);
|
|
141
|
+
raw.push({ date, dateStr, isToday: dateStr === todayStr.value, isCurrentMonth: false });
|
|
142
|
+
}
|
|
143
|
+
const entries = allEvents.value;
|
|
144
|
+
const result = [];
|
|
145
|
+
for (let wi = 0; wi < raw.length; wi += 7) {
|
|
146
|
+
const weekRaw = raw.slice(wi, wi + 7);
|
|
147
|
+
const weekDates = weekRaw.map((c) => c.dateStr);
|
|
148
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
149
|
+
const multiDay = [];
|
|
150
|
+
const singleDay = [];
|
|
151
|
+
for (const evt of entries) {
|
|
152
|
+
const start = evt.datetimeStart.slice(0, 10);
|
|
153
|
+
const end = evt.datetimeEnd.slice(0, 10);
|
|
154
|
+
const isMulti = start !== end;
|
|
155
|
+
let startCol = -1;
|
|
156
|
+
let endCol = -1;
|
|
157
|
+
for (let col = 0; col < 7; col++) {
|
|
158
|
+
const d = weekDates[col];
|
|
159
|
+
if (!d) continue;
|
|
160
|
+
if (d >= start && d <= end) {
|
|
161
|
+
if (startCol === -1) startCol = col;
|
|
162
|
+
endCol = col;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (startCol === -1 || seenIds.has(evt.id)) continue;
|
|
166
|
+
seenIds.add(evt.id);
|
|
167
|
+
if (isMulti || evt.allDay) {
|
|
168
|
+
multiDay.push({
|
|
169
|
+
id: evt.id,
|
|
170
|
+
label: evt.label,
|
|
171
|
+
color: evt.color,
|
|
172
|
+
icon: evt.icon,
|
|
173
|
+
startCol,
|
|
174
|
+
endCol,
|
|
175
|
+
globalStart: start,
|
|
176
|
+
entry: evt.entry
|
|
177
|
+
});
|
|
178
|
+
} else {
|
|
179
|
+
singleDay.push({ ...evt, col: startCol });
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
multiDay.sort(
|
|
183
|
+
(a, b) => a.startCol - b.startCol || b.endCol - b.startCol - (a.endCol - a.startCol) || a.globalStart.localeCompare(b.globalStart)
|
|
184
|
+
);
|
|
185
|
+
const lanes = [];
|
|
186
|
+
const assigned = [];
|
|
187
|
+
for (const evt of multiDay) {
|
|
188
|
+
let lane = lanes.findIndex((lastEnd) => lastEnd < evt.startCol);
|
|
189
|
+
if (lane === -1) {
|
|
190
|
+
lane = lanes.length;
|
|
191
|
+
lanes.push(-1);
|
|
192
|
+
}
|
|
193
|
+
lanes[lane] = evt.endCol;
|
|
194
|
+
assigned.push({ ...evt, lane });
|
|
195
|
+
}
|
|
196
|
+
const laneCount = lanes.length;
|
|
197
|
+
const cells = weekRaw.map((r, col) => {
|
|
198
|
+
const laneSlots = [];
|
|
199
|
+
for (let l = 0; l < laneCount; l++) {
|
|
200
|
+
const span = assigned.find(
|
|
201
|
+
(s) => s.lane === l && col >= s.startCol && col <= s.endCol
|
|
202
|
+
);
|
|
203
|
+
if (span) {
|
|
204
|
+
laneSlots.push({
|
|
205
|
+
type: "span",
|
|
206
|
+
id: span.id,
|
|
207
|
+
label: span.label,
|
|
208
|
+
color: span.color,
|
|
209
|
+
icon: span.icon,
|
|
210
|
+
isStart: col === span.startCol,
|
|
211
|
+
isEnd: col === span.endCol
|
|
212
|
+
});
|
|
213
|
+
} else {
|
|
214
|
+
laneSlots.push({ type: "empty" });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const events = singleDay.filter((e) => e.col === col);
|
|
218
|
+
return { ...r, laneSlots, events, isCurrentMonth: r.isCurrentMonth };
|
|
219
|
+
});
|
|
220
|
+
result.push({ cells, laneCount });
|
|
221
|
+
}
|
|
222
|
+
return result;
|
|
223
|
+
});
|
|
224
|
+
const weekNumbers = computed(() => {
|
|
225
|
+
if (!showWeekNumbers?.value) return [];
|
|
226
|
+
return weeks.value.map((week) => {
|
|
227
|
+
const firstDate = week.cells.find((c) => c.date)?.date;
|
|
228
|
+
return firstDate ? isoWeekNumber(firstDate) : null;
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
const weekStartDate = computed(() => {
|
|
232
|
+
const d = new Date(currentDate.value);
|
|
233
|
+
const dayOfWeek = (d.getDay() - weekStartOffset.value + 7) % 7;
|
|
234
|
+
d.setDate(d.getDate() - dayOfWeek);
|
|
235
|
+
d.setHours(0, 0, 0, 0);
|
|
236
|
+
return d;
|
|
237
|
+
});
|
|
238
|
+
function buildDayColumn(date) {
|
|
239
|
+
const dateStr = toDateStr(date);
|
|
240
|
+
const loc = typeof navigator !== "undefined" ? navigator.language : "en-US";
|
|
241
|
+
const isToday = dateStr === todayStr.value;
|
|
242
|
+
const dayEvents = allEvents.value.filter((evt) => {
|
|
243
|
+
const evtStart = evt.datetimeStart.slice(0, 10);
|
|
244
|
+
const evtEnd = evt.datetimeEnd.slice(0, 10);
|
|
245
|
+
return dateStr >= evtStart && dateStr <= evtEnd;
|
|
246
|
+
});
|
|
247
|
+
const allDayEvents = dayEvents.filter((e) => e.allDay);
|
|
248
|
+
const timedEvents = dayEvents.filter((e) => !e.allDay);
|
|
249
|
+
const hourSlots = [];
|
|
250
|
+
for (let h = HOURS_START; h < HOURS_END; h++) {
|
|
251
|
+
const eventsInHour = timedEvents.filter((evt) => {
|
|
252
|
+
const start = parseEventTime(evt.datetimeStart);
|
|
253
|
+
const end = parseEventTime(evt.datetimeEnd);
|
|
254
|
+
return start.hour <= h && (end.hour > h || end.hour === h && end.minute > 0);
|
|
255
|
+
});
|
|
256
|
+
hourSlots.push({
|
|
257
|
+
hour: h,
|
|
258
|
+
label: `${h.toString().padStart(2, "0")}:00`,
|
|
259
|
+
events: eventsInHour
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
263
|
+
date,
|
|
264
|
+
dateStr,
|
|
265
|
+
isToday,
|
|
266
|
+
label: date.toLocaleDateString(loc, { weekday: "long", month: "short", day: "numeric" }),
|
|
267
|
+
shortLabel: date.toLocaleDateString(loc, { weekday: "short", day: "numeric" }),
|
|
268
|
+
allDayEvents,
|
|
269
|
+
hourSlots
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
const weekColumns = computed(() => {
|
|
273
|
+
const start = weekStartDate.value;
|
|
274
|
+
const cols = [];
|
|
275
|
+
const count = weekViewDays.value;
|
|
276
|
+
for (let i = 0; i < count; i++) {
|
|
277
|
+
const d = new Date(start);
|
|
278
|
+
d.setDate(d.getDate() + i);
|
|
279
|
+
cols.push(buildDayColumn(d));
|
|
280
|
+
}
|
|
281
|
+
return cols;
|
|
282
|
+
});
|
|
283
|
+
const dayColumn = computed(
|
|
284
|
+
() => buildDayColumn(currentDate.value)
|
|
285
|
+
);
|
|
286
|
+
function cleanup() {
|
|
287
|
+
if (typeof window !== "undefined") {
|
|
288
|
+
window.removeEventListener("resize", checkBreakpoints);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
viewMode,
|
|
293
|
+
isMobile,
|
|
294
|
+
isTablet,
|
|
295
|
+
currentDate,
|
|
296
|
+
year,
|
|
297
|
+
month,
|
|
298
|
+
todayStr,
|
|
299
|
+
periodLabel,
|
|
300
|
+
prevPeriod,
|
|
301
|
+
nextPeriod,
|
|
302
|
+
goToday,
|
|
303
|
+
goToMonth,
|
|
304
|
+
weekStartOffset,
|
|
305
|
+
weekDayHeaders,
|
|
306
|
+
weekViewDays,
|
|
307
|
+
weeks,
|
|
308
|
+
weekNumbers,
|
|
309
|
+
weekColumns,
|
|
310
|
+
dayColumn,
|
|
311
|
+
allEvents,
|
|
312
|
+
unscheduledEntries,
|
|
313
|
+
toDateStr,
|
|
314
|
+
cleanup
|
|
315
|
+
};
|
|
316
|
+
}
|
|
@@ -41,7 +41,8 @@ export declare function useChat(): {
|
|
|
41
41
|
channels: import("vue").Ref<Record<string, ChatChannel>, Record<string, ChatChannel>>;
|
|
42
42
|
activeChannel: import("vue").Ref<string | null, string | null>;
|
|
43
43
|
messagesByChannel: import("vue").Ref<Record<string, ChatMessage[]>, Record<string, ChatMessage[]>>;
|
|
44
|
-
typingByChannel: import("vue").Ref<Record<string,
|
|
44
|
+
typingByChannel: import("vue").Ref<Record<string, Map<string, string>>, Record<string, Map<string, string>>>;
|
|
45
|
+
totalUnreadCount: import("vue").ComputedRef<number>;
|
|
45
46
|
sendMessage: typeof sendMessage;
|
|
46
47
|
fetchHistory: typeof fetchHistory;
|
|
47
48
|
sendTyping: typeof sendTyping;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref, computed } from "vue";
|
|
2
|
+
import { useAbracadabra } from "./useAbracadabra.js";
|
|
2
3
|
export function buildDmChannelId(a, b) {
|
|
3
4
|
return `dm:${[a, b].sort().join(":")}`;
|
|
4
5
|
}
|
|
@@ -32,7 +33,8 @@ function resolveChannelLabel(channelId, senderName, senderId) {
|
|
|
32
33
|
try {
|
|
33
34
|
const entry = doc.value?.getMap("doc-tree")?.get(docId);
|
|
34
35
|
if (entry?.label) return `${entry.label} Chat`;
|
|
35
|
-
} catch {
|
|
36
|
+
} catch (e) {
|
|
37
|
+
if (import.meta.dev) console.warn("[abracadabra] chat: failed to resolve channel label:", e);
|
|
36
38
|
}
|
|
37
39
|
return "Group Chat";
|
|
38
40
|
}
|
|
@@ -106,35 +108,38 @@ export function _handleStatelessChat(payload) {
|
|
|
106
108
|
ensureChannel(msg.channel, resolveChannelLabel(msg.channel, msg.senderName, msg.senderId));
|
|
107
109
|
addMessage(msg);
|
|
108
110
|
const typing = typingByChannel.value[msg.channel];
|
|
109
|
-
if (typing?.has(msg.
|
|
110
|
-
const next = new
|
|
111
|
-
next.delete(msg.
|
|
111
|
+
if (typing?.has(msg.senderId)) {
|
|
112
|
+
const next = new Map(typing);
|
|
113
|
+
next.delete(msg.senderId);
|
|
112
114
|
typingByChannel.value = { ...typingByChannel.value, [msg.channel]: next };
|
|
113
115
|
}
|
|
114
116
|
break;
|
|
115
117
|
}
|
|
116
118
|
case "chat:typing": {
|
|
117
119
|
const channel = data.channel;
|
|
120
|
+
const senderId = data.sender_id ?? "";
|
|
118
121
|
const name = data.sender_name ?? "User";
|
|
119
|
-
if (
|
|
120
|
-
const current = typingByChannel.value[channel] ?? /* @__PURE__ */ new
|
|
121
|
-
const next = new
|
|
122
|
+
if (senderId === _publicKeyB64.value) break;
|
|
123
|
+
const current = typingByChannel.value[channel] ?? /* @__PURE__ */ new Map();
|
|
124
|
+
const next = new Map(current);
|
|
125
|
+
next.set(senderId, name);
|
|
122
126
|
typingByChannel.value = { ...typingByChannel.value, [channel]: next };
|
|
123
|
-
const timerKey = `${channel}:${
|
|
127
|
+
const timerKey = `${channel}:${senderId}`;
|
|
124
128
|
const existing = typingTimers.get(timerKey);
|
|
125
129
|
if (existing) clearTimeout(existing);
|
|
126
130
|
typingTimers.set(timerKey, setTimeout(() => {
|
|
127
131
|
typingTimers.delete(timerKey);
|
|
128
132
|
const cur = typingByChannel.value[channel];
|
|
129
133
|
if (!cur) return;
|
|
130
|
-
const updated = new
|
|
131
|
-
updated.delete(
|
|
134
|
+
const updated = new Map(cur);
|
|
135
|
+
updated.delete(senderId);
|
|
132
136
|
typingByChannel.value = { ...typingByChannel.value, [channel]: updated };
|
|
133
137
|
}, 4e3));
|
|
134
138
|
break;
|
|
135
139
|
}
|
|
136
140
|
}
|
|
137
|
-
} catch {
|
|
141
|
+
} catch (e) {
|
|
142
|
+
if (import.meta.dev) console.warn("[abracadabra] chat: failed to handle stateless message:", e);
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
145
|
function sendMessage(channelId, content) {
|
|
@@ -173,12 +178,16 @@ function setActiveChannel(channelId) {
|
|
|
173
178
|
};
|
|
174
179
|
}
|
|
175
180
|
}
|
|
181
|
+
const totalUnreadCount = computed(
|
|
182
|
+
() => Object.values(channels.value).reduce((sum, ch) => sum + ch.unreadCount, 0)
|
|
183
|
+
);
|
|
176
184
|
export function useChat() {
|
|
177
185
|
return {
|
|
178
186
|
channels,
|
|
179
187
|
activeChannel,
|
|
180
188
|
messagesByChannel,
|
|
181
189
|
typingByChannel,
|
|
190
|
+
totalUnreadCount,
|
|
182
191
|
sendMessage,
|
|
183
192
|
fetchHistory,
|
|
184
193
|
sendTyping,
|
|
@@ -189,7 +198,7 @@ export function useChat() {
|
|
|
189
198
|
export function useChatChannel(channelId) {
|
|
190
199
|
const messages = computed(() => messagesByChannel.value[channelId] ?? []);
|
|
191
200
|
const channel = computed(() => channels.value[channelId]);
|
|
192
|
-
const typingUsers = computed(() => [...typingByChannel.value[channelId] ?? []]);
|
|
201
|
+
const typingUsers = computed(() => [...typingByChannel.value[channelId]?.values() ?? []]);
|
|
193
202
|
const unreadCount = computed(() => channels.value[channelId]?.unreadCount ?? 0);
|
|
194
203
|
function send(content) {
|
|
195
204
|
sendMessage(channelId, content);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import { deriveColorFromPubKey } from "../types.js";
|
|
3
|
+
import { useAbracadabra } from "./useAbracadabra.js";
|
|
3
4
|
export function useChatUsers() {
|
|
4
5
|
const { provider } = useAbracadabra();
|
|
5
6
|
const onlineUsers = computed(() => {
|
|
@@ -19,7 +20,8 @@ export function useChatUsers() {
|
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
} catch {
|
|
23
|
+
} catch (e) {
|
|
24
|
+
if (import.meta.dev) console.warn("[abracadabra] chat-users: failed to read awareness states:", e);
|
|
23
25
|
}
|
|
24
26
|
return result;
|
|
25
27
|
});
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
import { type ShallowRef } from 'vue';
|
|
13
13
|
import type * as Y from 'yjs';
|
|
14
14
|
import type { DocPageMeta, TreeEntry } from '../types.js';
|
|
15
|
-
export { type DocPageMeta, type TreeEntry } from '../types.js';
|
|
16
|
-
export declare function useChildTree(rootDoc: ShallowRef<Y.Doc | null>, parentDocId: string
|
|
15
|
+
export { type DocPageMeta, type TreeEntry, type TableColumnDef } from '../types.js';
|
|
16
|
+
export declare function useChildTree(rootDoc: ShallowRef<Y.Doc | null>, parentDocId: string, options?: {
|
|
17
|
+
isSpaceRoot?: boolean;
|
|
18
|
+
}): {
|
|
17
19
|
entries: import("vue").ComputedRef<TreeEntry[]>;
|
|
18
20
|
childrenOf: (parentId: string | null) => TreeEntry[];
|
|
19
21
|
descendantsOf: (id: string) => TreeEntry[];
|