@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
|
@@ -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
|
+
}
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ShallowRef, Ref, Component } from 'vue';
|
|
2
2
|
import type { Extension } from '@tiptap/core';
|
|
3
3
|
import type { Editor } from '@tiptap/vue-3';
|
|
4
|
+
import type { Node as ProsemirrorNode } from '@tiptap/pm/model';
|
|
4
5
|
import type * as Y from 'yjs';
|
|
6
|
+
import type { AbracadabraClient, AbracadabraProvider, AbracadabraWS, CryptoIdentityKeystore } from '@abraca/dabra';
|
|
7
|
+
import type { Router } from 'vue-router';
|
|
5
8
|
/**
|
|
6
9
|
* An Abracadabra plugin contributes editor extensions, page types, toolbar items,
|
|
7
10
|
* slash commands, mentions, awareness fields, command palette items, and more.
|
|
@@ -34,7 +37,7 @@ export interface AbracadabraPlugin {
|
|
|
34
37
|
/** Extra drag-handle menu items (per-block context menu) */
|
|
35
38
|
dragHandleItems?: (ctx: DragHandlePluginCtx) => AbracadabraDragHandleItem[][];
|
|
36
39
|
/** Custom editor handlers merged into UEditorCustomHandlers */
|
|
37
|
-
customHandlers?: () => Record<string, (...args:
|
|
40
|
+
customHandlers?: () => Record<string, (...args: unknown[]) => unknown>;
|
|
38
41
|
/** Mention (@) providers contributing items to the mention popup */
|
|
39
42
|
mentionProviders?: AbracadabraMentionProvider[];
|
|
40
43
|
/** Awareness field declarations — keys this plugin reads/writes on awareness */
|
|
@@ -51,14 +54,14 @@ export interface AbracadabraPlugin {
|
|
|
51
54
|
* Client-side setup hook — called once after client + provider are ready.
|
|
52
55
|
* May return a teardown function called on app unmount.
|
|
53
56
|
*/
|
|
54
|
-
clientSetup?: (ctx: ClientPluginCtx) =>
|
|
57
|
+
clientSetup?: (ctx: ClientPluginCtx) => undefined | Promise<undefined | (() => void)>;
|
|
55
58
|
/** TipTap extensions safe for server-side Y.Doc → HTML rendering (no Vue NodeViews) */
|
|
56
59
|
serverExtensions?: () => Extension[];
|
|
57
60
|
/**
|
|
58
61
|
* Custom cache renderer for non-doc page types.
|
|
59
62
|
* Receives the Y.Doc and returns serializable data for the cache.
|
|
60
63
|
*/
|
|
61
|
-
serverCacheRenderer?: (docId: string, ydoc: Y.Doc) =>
|
|
64
|
+
serverCacheRenderer?: (docId: string, ydoc: Y.Doc) => unknown;
|
|
62
65
|
/**
|
|
63
66
|
* Server-side background runners (Nitro context).
|
|
64
67
|
* Each runner receives a ServerRunnerContext and returns a cleanup function.
|
|
@@ -78,7 +81,7 @@ export interface EditorPluginCtx {
|
|
|
78
81
|
/** Context passed to drag-handle plugin hooks */
|
|
79
82
|
export interface DragHandlePluginCtx extends EditorPluginCtx {
|
|
80
83
|
selectedNode: Ref<{
|
|
81
|
-
node:
|
|
84
|
+
node: ProsemirrorNode | null;
|
|
82
85
|
pos: number;
|
|
83
86
|
} | undefined>;
|
|
84
87
|
}
|
|
@@ -130,9 +133,30 @@ export interface AbracadabraDragHandleItem {
|
|
|
130
133
|
}
|
|
131
134
|
export interface CommandPaletteCtx {
|
|
132
135
|
docId: string | null;
|
|
133
|
-
router:
|
|
134
|
-
abracadabra:
|
|
135
|
-
tree:
|
|
136
|
+
router: Router;
|
|
137
|
+
abracadabra: AbracadabraState;
|
|
138
|
+
tree: DocTreeHelper | null;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Tree helper shape — matches useChildTree()'s return type.
|
|
142
|
+
* Declared here to avoid circular imports.
|
|
143
|
+
*/
|
|
144
|
+
export interface DocTreeHelper {
|
|
145
|
+
entries: import('vue').ComputedRef<TreeEntry[]>;
|
|
146
|
+
childrenOf: (parentId: string | null) => TreeEntry[];
|
|
147
|
+
descendantsOf: (id: string) => TreeEntry[];
|
|
148
|
+
createChild: (parentId: string | null, label: string, type?: string) => string;
|
|
149
|
+
moveEntry: (id: string, newParentId: string | null, newOrder: number) => void;
|
|
150
|
+
deleteEntry: (id: string) => void;
|
|
151
|
+
renameEntry: (id: string, label: string) => void;
|
|
152
|
+
updateMeta: (id: string, patch: Partial<DocPageMeta>) => void;
|
|
153
|
+
duplicateEntry: (id: string) => string;
|
|
154
|
+
treeMap: {
|
|
155
|
+
data: Record<string, any>;
|
|
156
|
+
};
|
|
157
|
+
trashMap: {
|
|
158
|
+
data: Record<string, any>;
|
|
159
|
+
};
|
|
136
160
|
}
|
|
137
161
|
export interface AbracadabraCommandItem {
|
|
138
162
|
id: string;
|
|
@@ -152,14 +176,14 @@ export interface AbracadabraMentionProvider {
|
|
|
152
176
|
export interface MentionPluginCtx {
|
|
153
177
|
docId: string;
|
|
154
178
|
connectedUsers: CollaborationUser[];
|
|
155
|
-
rootDoc:
|
|
179
|
+
rootDoc: Y.Doc;
|
|
156
180
|
}
|
|
157
181
|
export interface AbracadabraMentionItem {
|
|
158
182
|
id: string;
|
|
159
183
|
label: string;
|
|
160
184
|
avatar?: string;
|
|
161
185
|
color?: string;
|
|
162
|
-
attrs?: Record<string,
|
|
186
|
+
attrs?: Record<string, unknown>;
|
|
163
187
|
}
|
|
164
188
|
export interface AbracadabraAwarenessContribution {
|
|
165
189
|
/** Namespaced keys this plugin writes, e.g. ['cursor', 'presence:kanban'] */
|
|
@@ -176,11 +200,11 @@ export interface AbracadabraNodePanelSlot {
|
|
|
176
200
|
}
|
|
177
201
|
export interface NodePanelCtx {
|
|
178
202
|
childId: string;
|
|
179
|
-
childDoc:
|
|
203
|
+
childDoc: Y.Doc | null;
|
|
180
204
|
parentDocId: string;
|
|
181
205
|
parentType: string | undefined;
|
|
182
|
-
meta: Record<string,
|
|
183
|
-
tree:
|
|
206
|
+
meta: Record<string, unknown>;
|
|
207
|
+
tree: DocTreeHelper;
|
|
184
208
|
}
|
|
185
209
|
export interface AbracadabraSettingsPanel {
|
|
186
210
|
label: string;
|
|
@@ -259,6 +283,27 @@ export interface DocPageMeta extends Record<string, unknown> {
|
|
|
259
283
|
graphPinned?: boolean;
|
|
260
284
|
_metaFields?: UserMetaField[];
|
|
261
285
|
_metaInitialized?: boolean;
|
|
286
|
+
tableMode?: 'hierarchy' | 'flat';
|
|
287
|
+
tableColumns?: TableColumnDef[];
|
|
288
|
+
tableColumnOrder?: string[];
|
|
289
|
+
tableColumnWidths?: Record<string, number>;
|
|
290
|
+
tableSortKey?: string;
|
|
291
|
+
tableSortDir?: 'asc' | 'desc';
|
|
292
|
+
timelinePixelsPerDay?: number;
|
|
293
|
+
timelineCenterDate?: string;
|
|
294
|
+
timelineZoom?: string;
|
|
295
|
+
}
|
|
296
|
+
export interface TableColumnDef {
|
|
297
|
+
id: string;
|
|
298
|
+
type: 'label' | 'meta';
|
|
299
|
+
metaKey?: string;
|
|
300
|
+
metaType?: string;
|
|
301
|
+
label: string;
|
|
302
|
+
options?: string[];
|
|
303
|
+
sliderMin?: number;
|
|
304
|
+
sliderMax?: number;
|
|
305
|
+
step?: number;
|
|
306
|
+
unit?: string;
|
|
262
307
|
}
|
|
263
308
|
export interface TreeEntry {
|
|
264
309
|
id: string;
|
|
@@ -306,6 +351,15 @@ export interface SpaceMeta {
|
|
|
306
351
|
created_at: number;
|
|
307
352
|
updated_at: number;
|
|
308
353
|
}
|
|
354
|
+
export interface InviteInfo {
|
|
355
|
+
code: string;
|
|
356
|
+
role: string;
|
|
357
|
+
max_uses: number;
|
|
358
|
+
uses: number;
|
|
359
|
+
created_at: number;
|
|
360
|
+
expires_at: number | null;
|
|
361
|
+
created_by: string | null;
|
|
362
|
+
}
|
|
309
363
|
export interface SavedServer {
|
|
310
364
|
url: string;
|
|
311
365
|
label: string;
|
|
@@ -324,20 +378,37 @@ export interface LogEntry {
|
|
|
324
378
|
message: string;
|
|
325
379
|
type: 'system' | 'connection' | 'auth' | 'sync' | 'user' | 'data';
|
|
326
380
|
}
|
|
327
|
-
export declare const UI_COLORS: readonly ["red", "
|
|
328
|
-
export declare const UI_NEUTRALS: readonly ["slate", "gray", "zinc", "neutral", "stone", "cobblestone", "bedrock", "cream", "sage", "lavender", "blush", "copper", "oxidized", "mint", "peach", "mist", "mauve"];
|
|
381
|
+
export declare const UI_COLORS: readonly ["red", "coral", "orange", "amber", "yellow", "chartreuse", "lime", "green", "jade", "emerald", "teal", "cyan", "sky", "blue", "sapphire", "indigo", "violet", "purple", "fuchsia", "magenta", "pink", "rose", "oxidized"];
|
|
382
|
+
export declare const UI_NEUTRALS: readonly ["slate", "gray", "zinc", "neutral", "stone", "cobblestone", "bedrock", "cream", "sand", "bark", "sage", "moss", "lavender", "blush", "wine", "copper", "oxidized", "mint", "peach", "fog", "mist", "mauve", "dusk"];
|
|
329
383
|
export declare const COLOR_HUES: Record<string, number>;
|
|
330
384
|
export declare function deriveColorFromPubKey(pubKey: string): {
|
|
331
385
|
name: string;
|
|
332
386
|
hsl: string;
|
|
333
387
|
neutralName: string;
|
|
334
388
|
};
|
|
389
|
+
/**
|
|
390
|
+
* Explicit identity state machine.
|
|
391
|
+
*
|
|
392
|
+
* Transitions:
|
|
393
|
+
* initializing → guest (soft-key generated)
|
|
394
|
+
* initializing → claimed (passkey restored from cache)
|
|
395
|
+
* initializing → identityLost (was claimed but cached key missing)
|
|
396
|
+
* guest → claimed (claimAccount succeeds)
|
|
397
|
+
* claimed → needsReauth (token expired, passkey re-auth available)
|
|
398
|
+
* claimed → identityLost (passkey/key cache lost)
|
|
399
|
+
* needsReauth → claimed (loginWithHardware succeeds)
|
|
400
|
+
* → connectionBlocked (AUTH_FAILURE_LIMIT reached or permanent denial)
|
|
401
|
+
* connectionBlocked → (previous) (unblockConnection called)
|
|
402
|
+
*/
|
|
403
|
+
export type IdentityState = 'initializing' | 'guest' | 'claimed' | 'identityLost' | 'needsReauth' | 'connectionBlocked';
|
|
335
404
|
/** Injected into nuxtApp as $abracadabra */
|
|
336
405
|
export interface AbracadabraState {
|
|
337
406
|
doc: ShallowRef<Y.Doc>;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
407
|
+
/** The doc ID of the current space (the invisible root of the tree). */
|
|
408
|
+
spaceDocId: Ref<string | null>;
|
|
409
|
+
provider: ShallowRef<AbracadabraProvider | null>;
|
|
410
|
+
client: ShallowRef<AbracadabraClient | null>;
|
|
411
|
+
keystore: ShallowRef<CryptoIdentityKeystore | null>;
|
|
341
412
|
status: Ref<'disconnected' | 'connecting' | 'connected'>;
|
|
342
413
|
synced: Ref<boolean>;
|
|
343
414
|
isReady: Ref<boolean>;
|
|
@@ -349,15 +420,23 @@ export interface AbracadabraState {
|
|
|
349
420
|
userCount: Ref<number>;
|
|
350
421
|
publicKeyB64: Ref<string>;
|
|
351
422
|
connectionError: Ref<string | null>;
|
|
423
|
+
/** Explicit identity state machine — prefer over individual booleans. */
|
|
424
|
+
identityState: Ref<IdentityState>;
|
|
425
|
+
/** @deprecated Use `identityState === 'claimed'` */
|
|
352
426
|
isClaimed: Ref<boolean>;
|
|
427
|
+
/** @deprecated Use `identityState === 'identityLost'` */
|
|
353
428
|
identityLost: Ref<boolean>;
|
|
429
|
+
/** @deprecated Use `identityState === 'needsReauth'` */
|
|
354
430
|
needsReauth: Ref<boolean>;
|
|
355
431
|
requirePasskeyOnLogin: Ref<boolean>;
|
|
432
|
+
/** @deprecated Use `identityState === 'connectionBlocked'` */
|
|
356
433
|
isConnectionBlocked: Ref<boolean>;
|
|
434
|
+
effectiveRole: Ref<string | null>;
|
|
435
|
+
unsyncedChanges: Ref<number>;
|
|
357
436
|
currentServerUrl: Ref<string>;
|
|
358
437
|
savedServers: Ref<SavedServer[]>;
|
|
359
|
-
currentServerSpaces:
|
|
360
|
-
currentServerSpacesEnabled:
|
|
438
|
+
currentServerSpaces: Ref<SpaceMeta[]>;
|
|
439
|
+
currentServerSpacesEnabled: Ref<boolean>;
|
|
361
440
|
pendingInviteCode: Ref<string | null>;
|
|
362
441
|
registry: import('./plugin-registry').PluginRegistry;
|
|
363
442
|
addLog: (message: string, type?: LogEntry['type']) => void;
|
|
@@ -387,31 +466,51 @@ export interface AbracadabraState {
|
|
|
387
466
|
role?: string;
|
|
388
467
|
maxUses?: number;
|
|
389
468
|
expiresIn?: number;
|
|
390
|
-
}) => Promise<
|
|
391
|
-
listInvites: () => Promise<
|
|
469
|
+
}) => Promise<InviteInfo>;
|
|
470
|
+
listInvites: () => Promise<InviteInfo[]>;
|
|
392
471
|
revokeInvite: (code: string) => Promise<void>;
|
|
472
|
+
/**
|
|
473
|
+
* Attempt identity recovery: tries silent passkey re-auth, then falls back
|
|
474
|
+
* to emitting a recoverable event so the app can show mnemonic input.
|
|
475
|
+
* Returns true if recovery succeeded.
|
|
476
|
+
*/
|
|
477
|
+
recoverIdentity: () => Promise<boolean>;
|
|
478
|
+
/**
|
|
479
|
+
* Reset auth failure count and reconnect. Use when the user has resolved
|
|
480
|
+
* the issue that caused repeated auth failures (e.g. re-invited, role fixed).
|
|
481
|
+
*/
|
|
482
|
+
unblockConnection: () => void;
|
|
483
|
+
broadcastSyncActive: Ref<boolean>;
|
|
393
484
|
init: (serverUrl?: string) => Promise<void>;
|
|
394
485
|
}
|
|
486
|
+
/** Nitro storage interface (subset used by runners) */
|
|
487
|
+
export interface NitroStorage {
|
|
488
|
+
getItem: (key: string) => Promise<unknown>;
|
|
489
|
+
setItem: (key: string, value: unknown) => Promise<void>;
|
|
490
|
+
removeItem: (key: string) => Promise<void>;
|
|
491
|
+
getKeys: (base?: string) => Promise<string[]>;
|
|
492
|
+
hasItem: (key: string) => Promise<boolean>;
|
|
493
|
+
}
|
|
395
494
|
/**
|
|
396
495
|
* Cleanup function returned by a runner's start().
|
|
397
496
|
* Called on graceful server shutdown.
|
|
398
497
|
*/
|
|
399
|
-
export type RunnerCleanup = (() => void | Promise<void>) |
|
|
498
|
+
export type RunnerCleanup = (() => void | Promise<void>) | undefined;
|
|
400
499
|
/**
|
|
401
500
|
* Context provided to every server-side runner.
|
|
402
501
|
* Available after the service provider successfully syncs with the root document.
|
|
403
502
|
*/
|
|
404
503
|
export interface ServerRunnerContext {
|
|
405
504
|
/** Service-role REST + auth client (AbracadabraClient) */
|
|
406
|
-
client:
|
|
407
|
-
/** Shared
|
|
408
|
-
wsp:
|
|
505
|
+
client: AbracadabraClient;
|
|
506
|
+
/** Shared AbracadabraWS — reuse for all child providers */
|
|
507
|
+
wsp: AbracadabraWS;
|
|
409
508
|
/** Root Y.Doc (the world document) */
|
|
410
|
-
rootDoc:
|
|
509
|
+
rootDoc: Y.Doc;
|
|
411
510
|
/** Root AbracadabraProvider — call .loadChild(docId) to open sub-documents */
|
|
412
|
-
rootProvider:
|
|
511
|
+
rootProvider: AbracadabraProvider;
|
|
413
512
|
/** Nitro useStorage() handle — use for persistent cache across requests */
|
|
414
|
-
storage:
|
|
513
|
+
storage: NitroStorage;
|
|
415
514
|
/** Document cache API: read/write HTML+JSON renders, build tree snapshots */
|
|
416
515
|
docCache: DocCacheAPI;
|
|
417
516
|
}
|
|
@@ -429,7 +528,7 @@ export interface ServerRunnerDefinition {
|
|
|
429
528
|
*/
|
|
430
529
|
export interface DocCacheAPI {
|
|
431
530
|
getHTML: (docId: string) => Promise<string | null>;
|
|
432
|
-
getJSON: (docId: string) => Promise<
|
|
531
|
+
getJSON: (docId: string) => Promise<Record<string, unknown> | null>;
|
|
433
532
|
invalidate: (docId: string) => Promise<void>;
|
|
434
533
|
getTree: () => Promise<CachedTreeNode[]>;
|
|
435
534
|
}
|
|
@@ -439,6 +538,6 @@ export interface CachedTreeNode {
|
|
|
439
538
|
label: string;
|
|
440
539
|
type: string;
|
|
441
540
|
html: string | null;
|
|
442
|
-
data:
|
|
541
|
+
data: Record<string, unknown> | null;
|
|
443
542
|
children: CachedTreeNode[];
|
|
444
543
|
}
|
package/dist/runtime/types.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
export const UI_COLORS = [
|
|
2
2
|
"red",
|
|
3
|
+
"coral",
|
|
3
4
|
"orange",
|
|
4
5
|
"amber",
|
|
5
6
|
"yellow",
|
|
7
|
+
"chartreuse",
|
|
6
8
|
"lime",
|
|
7
9
|
"green",
|
|
10
|
+
"jade",
|
|
8
11
|
"emerald",
|
|
9
12
|
"teal",
|
|
10
13
|
"cyan",
|
|
11
14
|
"sky",
|
|
12
15
|
"blue",
|
|
16
|
+
"sapphire",
|
|
13
17
|
"indigo",
|
|
14
18
|
"violet",
|
|
15
19
|
"purple",
|
|
16
20
|
"fuchsia",
|
|
21
|
+
"magenta",
|
|
17
22
|
"pink",
|
|
18
23
|
"rose",
|
|
19
|
-
"grass",
|
|
20
|
-
"diamond",
|
|
21
|
-
"gold",
|
|
22
|
-
"redstone",
|
|
23
|
-
"lapis",
|
|
24
|
-
"wood",
|
|
25
|
-
"discord",
|
|
26
|
-
"steam",
|
|
27
24
|
"oxidized"
|
|
28
25
|
];
|
|
29
26
|
export const UI_NEUTRALS = [
|
|
@@ -35,15 +32,21 @@ export const UI_NEUTRALS = [
|
|
|
35
32
|
"cobblestone",
|
|
36
33
|
"bedrock",
|
|
37
34
|
"cream",
|
|
35
|
+
"sand",
|
|
36
|
+
"bark",
|
|
38
37
|
"sage",
|
|
38
|
+
"moss",
|
|
39
39
|
"lavender",
|
|
40
40
|
"blush",
|
|
41
|
+
"wine",
|
|
41
42
|
"copper",
|
|
42
43
|
"oxidized",
|
|
43
44
|
"mint",
|
|
44
45
|
"peach",
|
|
46
|
+
"fog",
|
|
45
47
|
"mist",
|
|
46
|
-
"mauve"
|
|
48
|
+
"mauve",
|
|
49
|
+
"dusk"
|
|
47
50
|
];
|
|
48
51
|
export const COLOR_HUES = {
|
|
49
52
|
red: 0,
|
|
@@ -61,16 +64,13 @@ export const COLOR_HUES = {
|
|
|
61
64
|
violet: 258,
|
|
62
65
|
purple: 271,
|
|
63
66
|
fuchsia: 292,
|
|
67
|
+
magenta: 310,
|
|
64
68
|
pink: 330,
|
|
65
69
|
rose: 350,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
lapis: 217,
|
|
71
|
-
wood: 20,
|
|
72
|
-
discord: 235,
|
|
73
|
-
steam: 84,
|
|
70
|
+
coral: 16,
|
|
71
|
+
chartreuse: 75,
|
|
72
|
+
jade: 152,
|
|
73
|
+
sapphire: 225,
|
|
74
74
|
oxidized: 168
|
|
75
75
|
};
|
|
76
76
|
export function deriveColorFromPubKey(pubKey) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat message content parsing and rendering utilities.
|
|
3
|
+
*
|
|
4
|
+
* Handles doc-quote, doc-link, and plain text messages with @mention
|
|
5
|
+
* and URL segment extraction for rich rendering.
|
|
6
|
+
*
|
|
7
|
+
* Ported from cou-sh/app/utils/chatContent.ts.
|
|
8
|
+
*/
|
|
9
|
+
export type ParsedMessage = {
|
|
10
|
+
kind: 'text';
|
|
11
|
+
text: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'doc-quote';
|
|
14
|
+
text: string;
|
|
15
|
+
docId: string;
|
|
16
|
+
from: number;
|
|
17
|
+
to: number;
|
|
18
|
+
label: string;
|
|
19
|
+
section: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'doc-link';
|
|
22
|
+
docId: string;
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function parseMessageContent(content: string): ParsedMessage;
|
|
27
|
+
/** Segment types for rich text rendering */
|
|
28
|
+
export type TextSegment = {
|
|
29
|
+
type: 'text';
|
|
30
|
+
value: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'link';
|
|
33
|
+
url: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'mention';
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
/** Split plain text into segments for rich rendering (links, @mentions) */
|
|
39
|
+
export declare function renderMessageSegments(text: string): TextSegment[];
|
|
40
|
+
/** Return a short plain-text preview for any message content string. */
|
|
41
|
+
export declare function previewMessageContent(content: string): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export function parseMessageContent(content) {
|
|
2
|
+
if (content.startsWith("{")) {
|
|
3
|
+
try {
|
|
4
|
+
const obj = JSON.parse(content);
|
|
5
|
+
if (obj.type === "doc-quote") {
|
|
6
|
+
return {
|
|
7
|
+
kind: "doc-quote",
|
|
8
|
+
text: obj.text ?? "",
|
|
9
|
+
docId: obj.docId ?? "",
|
|
10
|
+
from: obj.from ?? 0,
|
|
11
|
+
to: obj.to ?? 0,
|
|
12
|
+
label: obj.label ?? "",
|
|
13
|
+
section: obj.section ?? ""
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (obj.type === "doc-link") {
|
|
17
|
+
return {
|
|
18
|
+
kind: "doc-link",
|
|
19
|
+
docId: obj.docId ?? "",
|
|
20
|
+
label: obj.label ?? "",
|
|
21
|
+
icon: obj.icon
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return { kind: "text", text: content };
|
|
28
|
+
}
|
|
29
|
+
const URL_RE = /https?:\/\/[^\s<>)"']+/g;
|
|
30
|
+
const MENTION_RE = /@(\w+)/g;
|
|
31
|
+
export function renderMessageSegments(text) {
|
|
32
|
+
const segments = [];
|
|
33
|
+
const matches = [];
|
|
34
|
+
for (const m of text.matchAll(URL_RE)) {
|
|
35
|
+
matches.push({ index: m.index, length: m[0].length, segment: { type: "link", url: m[0] } });
|
|
36
|
+
}
|
|
37
|
+
for (const m of text.matchAll(MENTION_RE)) {
|
|
38
|
+
matches.push({ index: m.index, length: m[0].length, segment: { type: "mention", name: m[1] } });
|
|
39
|
+
}
|
|
40
|
+
matches.sort((a, b) => a.index - b.index);
|
|
41
|
+
let cursor = 0;
|
|
42
|
+
for (const m of matches) {
|
|
43
|
+
if (m.index < cursor) continue;
|
|
44
|
+
if (m.index > cursor) {
|
|
45
|
+
segments.push({ type: "text", value: text.slice(cursor, m.index) });
|
|
46
|
+
}
|
|
47
|
+
segments.push(m.segment);
|
|
48
|
+
cursor = m.index + m.length;
|
|
49
|
+
}
|
|
50
|
+
if (cursor < text.length) {
|
|
51
|
+
segments.push({ type: "text", value: text.slice(cursor) });
|
|
52
|
+
}
|
|
53
|
+
return segments.length > 0 ? segments : [{ type: "text", value: text }];
|
|
54
|
+
}
|
|
55
|
+
export function previewMessageContent(content) {
|
|
56
|
+
const parsed = parseMessageContent(content);
|
|
57
|
+
if (parsed.kind === "doc-quote") {
|
|
58
|
+
const quote = parsed.text ? `"${parsed.text}"` : "";
|
|
59
|
+
return parsed.label ? `${parsed.label} \u2014 ${quote}` : quote || content;
|
|
60
|
+
}
|
|
61
|
+
if (parsed.kind === "doc-link") {
|
|
62
|
+
return parsed.label || "Document";
|
|
63
|
+
}
|
|
64
|
+
return parsed.text;
|
|
65
|
+
}
|