@abraca/nuxt 0.3.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 +26 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +51 -8
- 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 +4 -2
- 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 +1 -1
- package/dist/runtime/components/ADocRenderer.vue +6 -0
- package/dist/runtime/components/ADocRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/ADocTypeSelect.vue +4 -3
- package/dist/runtime/components/ADocumentTree.d.vue.ts +3 -3
- package/dist/runtime/components/ADocumentTree.vue +118 -10
- package/dist/runtime/components/ADocumentTree.vue.d.ts +3 -3
- package/dist/runtime/components/AEditor.d.vue.ts +4 -4
- package/dist/runtime/components/AEditor.vue +16 -1
- package/dist/runtime/components/AEditor.vue.d.ts +4 -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 +2 -0
- 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 +10 -2
- package/dist/runtime/components/ANotifications.vue +3 -1
- package/dist/runtime/components/APermissionGuard.vue +1 -0
- package/dist/runtime/components/APresence.vue +1 -0
- package/dist/runtime/components/AProvider.d.vue.ts +0 -1
- package/dist/runtime/components/AProvider.vue +17 -4
- 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 +3 -1
- package/dist/runtime/components/AVoiceTile.vue +1 -0
- 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 +2 -1
- package/dist/runtime/components/aware/AArea.vue.d.ts +1 -1
- package/dist/runtime/components/aware/AAvatar.vue +2 -0
- package/dist/runtime/components/aware/AButton.vue +2 -1
- package/dist/runtime/components/aware/ACursorLabel.vue +1 -0
- package/dist/runtime/components/aware/ADocBadge.vue +2 -0
- package/dist/runtime/components/aware/AFacepile.vue +2 -0
- package/dist/runtime/components/aware/AInput.vue +3 -2
- package/dist/runtime/components/aware/ASelect.vue +3 -2
- package/dist/runtime/components/aware/ATextarea.vue +3 -2
- package/dist/runtime/components/aware/AUserList.vue +2 -0
- 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 +2 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.vue +207 -327
- package/dist/runtime/components/renderers/ACalendarRenderer.vue.d.ts +2 -0
- package/dist/runtime/components/renderers/ACallRenderer.vue +3 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.vue +1 -0
- package/dist/runtime/components/renderers/ADashboardRenderer.vue +14 -12
- package/dist/runtime/components/renderers/AGalleryRenderer.vue +120 -12
- package/dist/runtime/components/renderers/AGraphRenderer.vue +5 -2
- package/dist/runtime/components/renderers/AKanbanRenderer.vue +21 -5
- package/dist/runtime/components/renderers/AMapRenderer.vue +2 -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.vue +1 -0
- 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.vue +65 -45
- package/dist/runtime/components/renderers/ATimelineRenderer.vue +282 -260
- 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 +1 -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/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 +17 -10
- package/dist/runtime/composables/useChatUsers.js +1 -0
- package/dist/runtime/composables/useChildTree.d.ts +4 -2
- package/dist/runtime/composables/useChildTree.js +31 -21
- package/dist/runtime/composables/useCommandPalette.js +16 -17
- package/dist/runtime/composables/useConnectionStatus.d.ts +1 -1
- package/dist/runtime/composables/useConnectionStatus.js +1 -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.js +2 -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.js +2 -0
- package/dist/runtime/composables/useDocImport.js +1 -0
- 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.js +3 -2
- package/dist/runtime/composables/useDocSlugs.js +3 -0
- package/dist/runtime/composables/useDocTree.d.ts +1 -0
- package/dist/runtime/composables/useDocTree.js +6 -2
- package/dist/runtime/composables/useEditor.js +1 -0
- package/dist/runtime/composables/useEditorDragHandle.js +2 -0
- 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 +31 -3
- package/dist/runtime/composables/useEditorSuggestions.d.ts +2 -2
- package/dist/runtime/composables/useEditorSuggestions.js +27 -19
- package/dist/runtime/composables/useEditorToolbar.d.ts +1 -1
- package/dist/runtime/composables/useEditorToolbar.js +3 -0
- package/dist/runtime/composables/useFavorites.d.ts +13 -0
- package/dist/runtime/composables/useFavorites.js +42 -0
- package/dist/runtime/composables/useFileIndex.js +2 -0
- package/dist/runtime/composables/useFileTransfer.js +13 -1
- package/dist/runtime/composables/useFollowUser.js +2 -0
- 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.js +1 -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 +7 -1
- package/dist/runtime/composables/useNodePanel.js +45 -8
- 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 +7 -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.js +2 -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.js +2 -0
- package/dist/runtime/composables/useSpaces.js +2 -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 +2 -0
- package/dist/runtime/composables/useTouchDrag.js +3 -0
- package/dist/runtime/composables/useTrash.d.ts +4 -0
- package/dist/runtime/composables/useTrash.js +6 -3
- 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.js +2 -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.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/views/AccordionItemView.vue +1 -0
- package/dist/runtime/extensions/views/BadgeView.vue +1 -0
- package/dist/runtime/extensions/views/CardView.vue +1 -0
- package/dist/runtime/extensions/views/CodeCollapseView.vue +1 -0
- package/dist/runtime/extensions/views/CodeGroupView.vue +1 -0
- 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 +1 -0
- 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 +2 -0
- package/dist/runtime/extensions/views/KbdView.vue +1 -0
- package/dist/runtime/extensions/views/MetaFieldView.vue +68 -2
- package/dist/runtime/extensions/views/ProseIconView.vue +1 -0
- package/dist/runtime/extensions/views/StepsView.vue +1 -0
- package/dist/runtime/extensions/views/TabsView.vue +1 -0
- package/dist/runtime/locale.d.ts +65 -0
- package/dist/runtime/locale.js +67 -2
- 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 +99 -53
- package/dist/runtime/plugin-abracadabra.server.d.ts +1 -1
- package/dist/runtime/plugin-abracadabra.server.js +2 -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 +4 -0
- package/dist/runtime/server/api/_abracadabra/resolve/[...slug].get.d.ts +11 -1
- package/dist/runtime/server/api/_abracadabra/resolve/[...slug].get.js +1 -0
- package/dist/runtime/server/api/_abracadabra/slugs.get.js +1 -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 +24 -12
- 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/spaceManager.d.ts +25 -0
- package/dist/runtime/server/utils/spaceManager.js +188 -0
- package/dist/runtime/types.d.ts +128 -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 +6 -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 +3 -3
- 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 -2
- package/dist/types.d.mts +12 -0
- package/package.json +26 -27
|
@@ -32,38 +32,37 @@ export default defineNitroPlugin(async (nitroApp) => {
|
|
|
32
32
|
let wsp = null;
|
|
33
33
|
try {
|
|
34
34
|
const [
|
|
35
|
-
{ AbracadabraClient, AbracadabraProvider,
|
|
35
|
+
{ AbracadabraClient, AbracadabraProvider, AbracadabraWS },
|
|
36
36
|
ed,
|
|
37
37
|
{ sha512 },
|
|
38
38
|
Y
|
|
39
39
|
] = await Promise.all([
|
|
40
40
|
import("@abraca/dabra"),
|
|
41
41
|
import("@noble/ed25519"),
|
|
42
|
-
import("@noble/hashes/
|
|
42
|
+
import("@noble/hashes/sha512"),
|
|
43
43
|
import("yjs")
|
|
44
44
|
]);
|
|
45
|
-
|
|
46
|
-
ed.etc.sha512Sync = (m) => sha512(m);
|
|
47
|
-
}
|
|
45
|
+
ed.hashes.sha512 = (m) => sha512(m);
|
|
48
46
|
const privKey = fromBase64Url(privKeyB64);
|
|
49
47
|
const client = new AbracadabraClient({
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Nuxt runtime config augmentation not resolved in Nitro
|
|
50
49
|
url: config.public?.abracadabra?.url,
|
|
51
50
|
persistAuth: false
|
|
52
51
|
});
|
|
53
52
|
await client.loginWithKey(pubKeyB64, async (challenge) => {
|
|
54
|
-
const sig = await ed.
|
|
53
|
+
const sig = await ed.sign(fromBase64Url(challenge), privKey);
|
|
55
54
|
return toBase64Url(sig);
|
|
56
55
|
});
|
|
57
56
|
console.log("[abracadabra-service] Authenticated as service role");
|
|
58
57
|
const wsUrl = client.wsUrl;
|
|
59
|
-
wsp = new
|
|
58
|
+
wsp = new AbracadabraWS({
|
|
60
59
|
url: wsUrl,
|
|
61
60
|
delay: 1e3,
|
|
62
61
|
minDelay: 1e3,
|
|
63
62
|
maxDelay: 3e4,
|
|
64
63
|
factor: 2,
|
|
65
64
|
jitter: true,
|
|
66
|
-
maxAttempts:
|
|
65
|
+
maxAttempts: 50
|
|
67
66
|
});
|
|
68
67
|
let rootDocId = rootDocIdOverride;
|
|
69
68
|
if (!rootDocId) {
|
|
@@ -84,11 +83,24 @@ export default defineNitroPlugin(async (nitroApp) => {
|
|
|
84
83
|
document: rootDoc,
|
|
85
84
|
name: rootDocId,
|
|
86
85
|
websocketProvider: wsp,
|
|
87
|
-
disableOfflineStore: true
|
|
86
|
+
disableOfflineStore: true,
|
|
87
|
+
cryptoIdentity: { publicKey: pubKeyB64 },
|
|
88
|
+
signChallenge: async (challenge) => {
|
|
89
|
+
const sig = await ed.sign(fromBase64Url(challenge), privKey);
|
|
90
|
+
return toBase64Url(sig);
|
|
91
|
+
}
|
|
88
92
|
});
|
|
89
|
-
rootProvider.attach
|
|
93
|
+
rootProvider.attach();
|
|
90
94
|
await Promise.race([
|
|
91
|
-
new Promise((resolve) =>
|
|
95
|
+
new Promise((resolve) => {
|
|
96
|
+
const handler = ({ state }) => {
|
|
97
|
+
if (state) {
|
|
98
|
+
rootProvider.off("synced", handler);
|
|
99
|
+
resolve();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
rootProvider.on("synced", handler);
|
|
103
|
+
}),
|
|
92
104
|
new Promise((_, reject) => setTimeout(() => reject(new Error("sync timeout")), 3e4))
|
|
93
105
|
]);
|
|
94
106
|
console.log("[abracadabra-service] Root doc synced");
|
|
@@ -118,7 +130,7 @@ export default defineNitroPlugin(async (nitroApp) => {
|
|
|
118
130
|
console.log("[abracadabra-service] Shutdown complete");
|
|
119
131
|
});
|
|
120
132
|
} catch (err) {
|
|
121
|
-
console.error("[abracadabra-service] Failed to initialize:", err
|
|
133
|
+
console.error("[abracadabra-service] Failed to initialize:", err instanceof Error ? err.message : err);
|
|
122
134
|
wsp?.destroy?.();
|
|
123
135
|
}
|
|
124
136
|
});
|
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Used by the built-in doc-tree-cache server runner and by the SSR render route.
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
9
|
+
import type { AnyExtension } from '@tiptap/core';
|
|
10
|
+
import type * as Y from 'yjs';
|
|
11
|
+
import type { DocCacheAPI, NitroStorage } from '../../../runtime/types.js';
|
|
10
12
|
/**
|
|
11
13
|
* Initialize the cache with a Nitro storage handle and optional extra extensions.
|
|
12
14
|
* Must be called before observeDoc().
|
|
13
15
|
*/
|
|
14
|
-
export declare function initDocCache(storage:
|
|
16
|
+
export declare function initDocCache(storage: NitroStorage, extraExtensions?: AnyExtension[]): void;
|
|
15
17
|
export declare function getCachedHTML(docId: string): Promise<string | null>;
|
|
16
|
-
export declare function getCachedJSON(docId: string): Promise<
|
|
17
|
-
export declare function invalidateDoc(docId: string, ydoc?:
|
|
18
|
+
export declare function getCachedJSON(docId: string): Promise<Record<string, unknown> | null>;
|
|
19
|
+
export declare function invalidateDoc(docId: string, ydoc?: Y.Doc): Promise<void>;
|
|
18
20
|
/**
|
|
19
21
|
* Start observing a Y.Doc for changes with debounced re-rendering.
|
|
20
22
|
* Renders immediately on first observe.
|
|
21
23
|
*/
|
|
22
|
-
export declare function observeDoc(docId: string, ydoc:
|
|
24
|
+
export declare function observeDoc(docId: string, ydoc: Y.Doc): void;
|
|
23
25
|
export declare function unobserveDoc(docId: string): void;
|
|
24
26
|
/** Build the DocCacheAPI object for the ServerRunnerContext. */
|
|
25
|
-
export declare function createDocCacheAPI(rootDoc:
|
|
27
|
+
export declare function createDocCacheAPI(rootDoc: Y.Doc): DocCacheAPI;
|
|
@@ -18,7 +18,7 @@ async function renderDocToHTML(ydoc) {
|
|
|
18
18
|
return generateHTML(json, [StarterKit, ..._extensions]);
|
|
19
19
|
} catch (e) {
|
|
20
20
|
console.warn("[abracadabra:doc-cache] HTML render failed:", e);
|
|
21
|
-
return
|
|
21
|
+
return null;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
async function renderDocToJSON(ydoc) {
|
|
@@ -61,8 +61,8 @@ export async function invalidateDoc(docId, ydoc) {
|
|
|
61
61
|
renderDocToJSON(doc)
|
|
62
62
|
]);
|
|
63
63
|
await Promise.all([
|
|
64
|
-
_storage.setItem(htmlKey(docId), html),
|
|
65
|
-
_storage.setItem(jsonKey(docId), json)
|
|
64
|
+
html !== null ? _storage.setItem(htmlKey(docId), html) : Promise.resolve(),
|
|
65
|
+
json !== null ? _storage.setItem(jsonKey(docId), json) : Promise.resolve()
|
|
66
66
|
]);
|
|
67
67
|
}
|
|
68
68
|
export function observeDoc(docId, ydoc) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic server plugin loader.
|
|
3
|
+
*
|
|
4
|
+
* Loads AbracadabraPlugin modules from ESM URLs at runtime.
|
|
5
|
+
* Appends `.server.js` to the base URL, fetches the module text,
|
|
6
|
+
* and imports it via a data: URL (stable in Node 22+).
|
|
7
|
+
*
|
|
8
|
+
* Ported from cou-sh/server/utils/serverPluginLoader.ts.
|
|
9
|
+
*/
|
|
10
|
+
import type { AbracadabraPlugin } from '../../types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Load a server plugin from an ESM URL.
|
|
13
|
+
* Appends `.server.js` to the base URL, fetches the module text,
|
|
14
|
+
* and imports it via a data: URL (stable in Node 22+).
|
|
15
|
+
*/
|
|
16
|
+
export declare function loadServerPlugin(baseUrl: string): Promise<AbracadabraPlugin>;
|
|
17
|
+
/** Clear the entire module cache (e.g. for reloading updated plugins). */
|
|
18
|
+
export declare function clearPluginCache(): void;
|
|
19
|
+
/** Evict a single URL from the cache. */
|
|
20
|
+
export declare function evictPlugin(baseUrl: string): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const _moduleCache = /* @__PURE__ */ new Map();
|
|
2
|
+
const _allowlist = (() => {
|
|
3
|
+
const raw = process.env.ABRA_PLUGIN_ALLOWLIST;
|
|
4
|
+
if (!raw) return [];
|
|
5
|
+
return raw.split(",").map((s) => s.trim()).filter(Boolean);
|
|
6
|
+
})();
|
|
7
|
+
export async function loadServerPlugin(baseUrl) {
|
|
8
|
+
const url = `${baseUrl}.server.js`;
|
|
9
|
+
const cached = _moduleCache.get(url);
|
|
10
|
+
if (cached) return cached;
|
|
11
|
+
if (_allowlist.length > 0 && !_allowlist.some((prefix) => url.startsWith(prefix))) {
|
|
12
|
+
throw new Error(`[plugin-loader] URL not in allowlist: ${url}`);
|
|
13
|
+
}
|
|
14
|
+
console.log(`[plugin-loader] Fetching: ${url}`);
|
|
15
|
+
const response = await fetch(url);
|
|
16
|
+
if (!response.ok) {
|
|
17
|
+
throw new Error(`[plugin-loader] HTTP ${response.status} fetching ${url}`);
|
|
18
|
+
}
|
|
19
|
+
const code = await response.text();
|
|
20
|
+
const encoded = Buffer.from(code).toString("base64");
|
|
21
|
+
const dataUrl = `data:text/javascript;base64,${encoded}`;
|
|
22
|
+
const mod = await import(
|
|
23
|
+
/* @vite-ignore */
|
|
24
|
+
dataUrl
|
|
25
|
+
);
|
|
26
|
+
const plugin = mod.default ?? mod;
|
|
27
|
+
if (!plugin?.name) {
|
|
28
|
+
throw new Error(`[plugin-loader] Module at ${url} does not export a valid AbracadabraPlugin (missing name)`);
|
|
29
|
+
}
|
|
30
|
+
if (!plugin.serverRunners?.length) {
|
|
31
|
+
console.warn(`[plugin-loader] Plugin "${plugin.name}" from ${url} has no serverRunners`);
|
|
32
|
+
}
|
|
33
|
+
_moduleCache.set(url, plugin);
|
|
34
|
+
console.log(`[plugin-loader] Loaded plugin: ${plugin.name}${plugin.version ? ` v${plugin.version}` : ""}`);
|
|
35
|
+
return plugin;
|
|
36
|
+
}
|
|
37
|
+
export function clearPluginCache() {
|
|
38
|
+
_moduleCache.clear();
|
|
39
|
+
}
|
|
40
|
+
export function evictPlugin(baseUrl) {
|
|
41
|
+
_moduleCache.delete(`${baseUrl}.server.js`);
|
|
42
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* })
|
|
13
13
|
* })
|
|
14
14
|
*/
|
|
15
|
-
import type { AbracadabraPlugin, ServerRunnerContext } from '../../types.js';
|
|
15
|
+
import type { AbracadabraPlugin, ServerRunnerDefinition, ServerRunnerContext } from '../../types.js';
|
|
16
16
|
/**
|
|
17
17
|
* Register a plugin that may declare serverRunners.
|
|
18
18
|
* Must be called before bootRunners() (e.g. inside the 'abracadabra:before-runners' hook).
|
|
@@ -22,7 +22,16 @@ export declare function registerServerPlugin(plugin: AbracadabraPlugin): void;
|
|
|
22
22
|
export declare function getServerPlugins(): readonly AbracadabraPlugin[];
|
|
23
23
|
/** Boot all runners from all registered plugins. Called once after auth + sync. */
|
|
24
24
|
export declare function bootRunners(ctx: ServerRunnerContext): Promise<void>;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Start a single runner. Optionally namespace-prefix the key for per-space isolation.
|
|
27
|
+
* When namespace is provided, the runner key becomes `${namespace}:${def.name}`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function startRunner(def: ServerRunnerDefinition, ctx?: ServerRunnerContext, namespace?: string): Promise<void>;
|
|
30
|
+
/** Stop a single runner by its full key and remove it from the registry. */
|
|
26
31
|
export declare function stopRunner(name: string): Promise<void>;
|
|
32
|
+
/** Stop all runners whose key starts with the given prefix (for space teardown). */
|
|
33
|
+
export declare function stopRunnersWithPrefix(prefix: string): Promise<void>;
|
|
34
|
+
/** Get all running runner keys. */
|
|
35
|
+
export declare function getRunnerKeys(): string[];
|
|
27
36
|
/** Shutdown all runners gracefully. Called on server close. */
|
|
28
37
|
export declare function shutdownAllRunners(): Promise<void>;
|
|
@@ -15,27 +15,29 @@ export async function bootRunners(ctx) {
|
|
|
15
15
|
_serverCtx = ctx;
|
|
16
16
|
for (const plugin of _plugins) {
|
|
17
17
|
for (const def of plugin.serverRunners ?? []) {
|
|
18
|
-
await
|
|
18
|
+
await startRunner(def, ctx);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
async function
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
export async function startRunner(def, ctx, namespace) {
|
|
23
|
+
const key = namespace ? `${namespace}:${def.name}` : def.name;
|
|
24
|
+
if (_runners.has(key)) {
|
|
25
|
+
console.warn(`[abracadabra-service] Runner "${key}" already running`);
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
const runCtx = ctx ?? _serverCtx;
|
|
29
|
+
if (!runCtx) {
|
|
28
30
|
throw new Error("[abracadabra-service] Server context not initialized");
|
|
29
31
|
}
|
|
30
32
|
const state = { definition: def, cleanup: void 0, running: false };
|
|
31
|
-
_runners.set(
|
|
33
|
+
_runners.set(key, state);
|
|
32
34
|
try {
|
|
33
|
-
console.log(`[abracadabra-service] Starting runner: ${
|
|
34
|
-
state.cleanup = await def.start(
|
|
35
|
+
console.log(`[abracadabra-service] Starting runner: ${key}`);
|
|
36
|
+
state.cleanup = await def.start(runCtx);
|
|
35
37
|
state.running = true;
|
|
36
38
|
} catch (err) {
|
|
37
|
-
console.error(`[abracadabra-service] Runner "${
|
|
38
|
-
_runners.delete(
|
|
39
|
+
console.error(`[abracadabra-service] Runner "${key}" failed to start:`, err);
|
|
40
|
+
_runners.delete(key);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
export async function stopRunner(name) {
|
|
@@ -49,6 +51,15 @@ export async function stopRunner(name) {
|
|
|
49
51
|
_runners.delete(name);
|
|
50
52
|
console.log(`[abracadabra-service] Stopped runner: ${name}`);
|
|
51
53
|
}
|
|
54
|
+
export async function stopRunnersWithPrefix(prefix) {
|
|
55
|
+
const keys = [..._runners.keys()].filter((k) => k.startsWith(prefix));
|
|
56
|
+
for (const key of keys) {
|
|
57
|
+
await stopRunner(key);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export function getRunnerKeys() {
|
|
61
|
+
return [..._runners.keys()];
|
|
62
|
+
}
|
|
52
63
|
export async function shutdownAllRunners() {
|
|
53
64
|
for (const [name] of _runners) {
|
|
54
65
|
await stopRunner(name);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-space lifecycle manager.
|
|
3
|
+
*
|
|
4
|
+
* Discovers spaces from the Abracadabra server, connects to each one,
|
|
5
|
+
* starts per-space doc-tree-cache runners, and observes the space-plugins
|
|
6
|
+
* Y.Map for dynamic plugin loading/unloading.
|
|
7
|
+
*
|
|
8
|
+
* Ported from cou-sh/server/utils/spaceManager.ts.
|
|
9
|
+
*/
|
|
10
|
+
import type { AbracadabraClient, AbracadabraWS } from '@abraca/dabra';
|
|
11
|
+
import type { NitroStorage } from '../../types.js';
|
|
12
|
+
interface BaseCtx {
|
|
13
|
+
client: AbracadabraClient;
|
|
14
|
+
wsp: AbracadabraWS;
|
|
15
|
+
storage: NitroStorage;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the space manager. Discovers spaces and starts polling.
|
|
19
|
+
*/
|
|
20
|
+
export declare function initSpaceManager(baseCtx: BaseCtx): Promise<void>;
|
|
21
|
+
/** Shutdown all spaces and stop polling. */
|
|
22
|
+
export declare function shutdownSpaceManager(): Promise<void>;
|
|
23
|
+
/** Get all connected space IDs. */
|
|
24
|
+
export declare function getConnectedSpaces(): string[];
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { startRunner, stopRunner, stopRunnersWithPrefix } from "./serverRunner.js";
|
|
2
|
+
import { createDocCacheAPI } from "./docCache.js";
|
|
3
|
+
import { loadServerPlugin } from "./serverPluginLoader.js";
|
|
4
|
+
import { docTreeCacheRunner } from "../runners/doc-tree-cache.js";
|
|
5
|
+
const _spaces = /* @__PURE__ */ new Map();
|
|
6
|
+
let _baseCtx = null;
|
|
7
|
+
let _pollInterval = null;
|
|
8
|
+
const POLL_INTERVAL_MS = 6e4;
|
|
9
|
+
export async function initSpaceManager(baseCtx) {
|
|
10
|
+
_baseCtx = baseCtx;
|
|
11
|
+
globalThis.__ABRACA_SHARED__ = {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- shared globals bridge
|
|
13
|
+
...globalThis.__ABRACA_SHARED__
|
|
14
|
+
};
|
|
15
|
+
await discoverSpaces();
|
|
16
|
+
_pollInterval = setInterval(() => {
|
|
17
|
+
discoverSpaces().catch(
|
|
18
|
+
(err) => console.error("[space-manager] Poll failed:", err)
|
|
19
|
+
);
|
|
20
|
+
}, POLL_INTERVAL_MS);
|
|
21
|
+
}
|
|
22
|
+
export async function shutdownSpaceManager() {
|
|
23
|
+
if (_pollInterval) {
|
|
24
|
+
clearInterval(_pollInterval);
|
|
25
|
+
_pollInterval = null;
|
|
26
|
+
}
|
|
27
|
+
const spaceIds = [..._spaces.keys()];
|
|
28
|
+
for (const spaceId of spaceIds) {
|
|
29
|
+
await disconnectSpace(spaceId);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function getConnectedSpaces() {
|
|
33
|
+
return [..._spaces.keys()];
|
|
34
|
+
}
|
|
35
|
+
async function discoverSpaces() {
|
|
36
|
+
if (!_baseCtx) return;
|
|
37
|
+
let spaces;
|
|
38
|
+
try {
|
|
39
|
+
spaces = await _baseCtx.client.listSpaces();
|
|
40
|
+
} catch (err) {
|
|
41
|
+
console.error("[space-manager] Failed to list spaces:", err);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const currentIds = new Set(spaces.map((s) => s.id));
|
|
45
|
+
for (const meta of spaces) {
|
|
46
|
+
if (meta.is_hub) continue;
|
|
47
|
+
if (!_spaces.has(meta.id)) {
|
|
48
|
+
await connectSpace(meta);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const existingIds = [..._spaces.keys()];
|
|
52
|
+
for (const spaceId of existingIds) {
|
|
53
|
+
if (!currentIds.has(spaceId)) {
|
|
54
|
+
await disconnectSpace(spaceId);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function connectSpace(meta) {
|
|
59
|
+
if (!_baseCtx || _spaces.has(meta.id)) return;
|
|
60
|
+
console.log(`[space-manager] Connecting space: ${meta.name} (${meta.id})`);
|
|
61
|
+
const Y = await import("yjs");
|
|
62
|
+
const doc = new Y.Doc();
|
|
63
|
+
const { AbracadabraProvider } = await import("@abraca/dabra");
|
|
64
|
+
const provider = new AbracadabraProvider({
|
|
65
|
+
client: _baseCtx.client,
|
|
66
|
+
document: doc,
|
|
67
|
+
name: meta.doc_id,
|
|
68
|
+
websocketProvider: _baseCtx.wsp,
|
|
69
|
+
disableOfflineStore: true
|
|
70
|
+
});
|
|
71
|
+
provider.attach();
|
|
72
|
+
await new Promise((resolve) => {
|
|
73
|
+
const done = () => {
|
|
74
|
+
provider.off("synced", done);
|
|
75
|
+
resolve();
|
|
76
|
+
};
|
|
77
|
+
provider.on("synced", done);
|
|
78
|
+
setTimeout(resolve, 1e4);
|
|
79
|
+
});
|
|
80
|
+
const conn = {
|
|
81
|
+
spaceId: meta.id,
|
|
82
|
+
docId: meta.doc_id,
|
|
83
|
+
meta,
|
|
84
|
+
provider,
|
|
85
|
+
doc,
|
|
86
|
+
pluginObserver: null,
|
|
87
|
+
loadedPlugins: /* @__PURE__ */ new Map()
|
|
88
|
+
};
|
|
89
|
+
_spaces.set(meta.id, conn);
|
|
90
|
+
console.log(`[space-manager] Space synced: ${meta.name}`);
|
|
91
|
+
const spaceCtx = buildSpaceContext(conn);
|
|
92
|
+
await startRunner(docTreeCacheRunner, spaceCtx, meta.doc_id);
|
|
93
|
+
observeSpacePlugins(conn);
|
|
94
|
+
}
|
|
95
|
+
async function disconnectSpace(spaceId) {
|
|
96
|
+
const conn = _spaces.get(spaceId);
|
|
97
|
+
if (!conn) return;
|
|
98
|
+
console.log(`[space-manager] Disconnecting space: ${conn.meta.name} (${spaceId})`);
|
|
99
|
+
if (conn.pluginObserver) {
|
|
100
|
+
try {
|
|
101
|
+
const pluginsMap = conn.doc.getMap("space-plugins");
|
|
102
|
+
pluginsMap.unobserve(conn.pluginObserver);
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
await stopRunnersWithPrefix(conn.docId);
|
|
107
|
+
conn.provider.destroy();
|
|
108
|
+
conn.doc.destroy();
|
|
109
|
+
_spaces.delete(spaceId);
|
|
110
|
+
}
|
|
111
|
+
function observeSpacePlugins(conn) {
|
|
112
|
+
const pluginsMap = conn.doc.getMap("space-plugins");
|
|
113
|
+
processPluginMap(conn, pluginsMap);
|
|
114
|
+
conn.pluginObserver = (event) => {
|
|
115
|
+
processPluginMapChanges(conn, pluginsMap, event);
|
|
116
|
+
};
|
|
117
|
+
pluginsMap.observe(conn.pluginObserver);
|
|
118
|
+
}
|
|
119
|
+
async function processPluginMap(conn, pluginsMap) {
|
|
120
|
+
const Y = await import("yjs");
|
|
121
|
+
const toLoad = [];
|
|
122
|
+
pluginsMap.forEach((value, pluginName) => {
|
|
123
|
+
const entry = value instanceof Y.Map ? value.toJSON() : value;
|
|
124
|
+
if (entry?.enabled && entry?.url) {
|
|
125
|
+
toLoad.push({ name: pluginName, url: entry.url });
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
for (const { name, url } of toLoad) {
|
|
129
|
+
await loadAndStartPlugin(conn, name, url);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function processPluginMapChanges(conn, pluginsMap, event) {
|
|
133
|
+
const Y = await import("yjs");
|
|
134
|
+
for (const key of event.keysChanged) {
|
|
135
|
+
const value = pluginsMap.get(key);
|
|
136
|
+
if (!value) {
|
|
137
|
+
await stopPluginRunners(conn, key);
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
const entry = value instanceof Y.Map ? value.toJSON() : value;
|
|
141
|
+
if (entry?.enabled && entry?.url) {
|
|
142
|
+
if (!conn.loadedPlugins.has(key)) {
|
|
143
|
+
await loadAndStartPlugin(conn, key, entry.url);
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
await stopPluginRunners(conn, key);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async function loadAndStartPlugin(conn, pluginName, url) {
|
|
151
|
+
try {
|
|
152
|
+
const plugin = await loadServerPlugin(url);
|
|
153
|
+
if (!plugin.serverRunners?.length) {
|
|
154
|
+
console.warn(`[space-manager] Plugin "${pluginName}" has no server runners`);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const spaceCtx = buildSpaceContext(conn);
|
|
158
|
+
const runnerKeys = [];
|
|
159
|
+
for (const def of plugin.serverRunners) {
|
|
160
|
+
const key = `${conn.docId}:${def.name}`;
|
|
161
|
+
await startRunner(def, spaceCtx, conn.docId);
|
|
162
|
+
runnerKeys.push(key);
|
|
163
|
+
}
|
|
164
|
+
conn.loadedPlugins.set(pluginName, runnerKeys);
|
|
165
|
+
console.log(`[space-manager] Started plugin "${pluginName}" in space "${conn.meta.name}" (${plugin.serverRunners.length} runners)`);
|
|
166
|
+
} catch (err) {
|
|
167
|
+
console.error(`[space-manager] Failed to load plugin "${pluginName}" from ${url}:`, err);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async function stopPluginRunners(conn, pluginName) {
|
|
171
|
+
const keys = conn.loadedPlugins.get(pluginName);
|
|
172
|
+
if (!keys) return;
|
|
173
|
+
for (const key of keys) {
|
|
174
|
+
await stopRunner(key);
|
|
175
|
+
}
|
|
176
|
+
conn.loadedPlugins.delete(pluginName);
|
|
177
|
+
console.log(`[space-manager] Stopped plugin "${pluginName}" in space "${conn.meta.name}"`);
|
|
178
|
+
}
|
|
179
|
+
function buildSpaceContext(conn) {
|
|
180
|
+
return {
|
|
181
|
+
client: _baseCtx.client,
|
|
182
|
+
wsp: _baseCtx.wsp,
|
|
183
|
+
rootDoc: conn.doc,
|
|
184
|
+
rootProvider: conn.provider,
|
|
185
|
+
storage: _baseCtx.storage,
|
|
186
|
+
docCache: createDocCacheAPI(conn.doc)
|
|
187
|
+
};
|
|
188
|
+
}
|