@abraca/nuxt 1.9.1 → 2.0.1
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 +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +9 -1
- package/dist/runtime/components/ADocumentTree.vue +1 -1
- package/dist/runtime/components/AEditor.d.vue.ts +26 -1
- package/dist/runtime/components/AEditor.vue +158 -4
- package/dist/runtime/components/AEditor.vue.d.ts +26 -1
- package/dist/runtime/components/AIdentityModal.d.vue.ts +46 -0
- package/dist/runtime/components/AIdentityModal.vue +157 -0
- package/dist/runtime/components/AIdentityModal.vue.d.ts +46 -0
- package/dist/runtime/components/AMnemonicLoginModal.d.vue.ts +35 -0
- package/dist/runtime/components/AMnemonicLoginModal.vue +173 -0
- package/dist/runtime/components/AMnemonicLoginModal.vue.d.ts +35 -0
- package/dist/runtime/components/ANodePanel.d.vue.ts +29 -2
- package/dist/runtime/components/ANodePanel.vue +148 -27
- package/dist/runtime/components/ANodePanel.vue.d.ts +29 -2
- package/dist/runtime/components/ANodePanelHeader.d.vue.ts +64 -0
- package/dist/runtime/components/ANodePanelHeader.vue +105 -0
- package/dist/runtime/components/ANodePanelHeader.vue.d.ts +64 -0
- package/dist/runtime/components/ANodeSettingsPanel.d.vue.ts +49 -0
- package/dist/runtime/components/ANodeSettingsPanel.vue +59 -0
- package/dist/runtime/components/ANodeSettingsPanel.vue.d.ts +49 -0
- package/dist/runtime/components/ANotificationBell.d.vue.ts +26 -0
- package/dist/runtime/components/ANotificationBell.vue +55 -0
- package/dist/runtime/components/ANotificationBell.vue.d.ts +26 -0
- package/dist/runtime/components/AOfflineSync.d.vue.ts +11 -0
- package/dist/runtime/components/AOfflineSync.vue +217 -0
- package/dist/runtime/components/AOfflineSync.vue.d.ts +11 -0
- package/dist/runtime/components/ARecoveryPhraseDisplay.d.vue.ts +26 -0
- package/dist/runtime/components/ARecoveryPhraseDisplay.vue +94 -0
- package/dist/runtime/components/ARecoveryPhraseDisplay.vue.d.ts +26 -0
- package/dist/runtime/components/AServerInfoModal.d.vue.ts +43 -0
- package/dist/runtime/components/AServerInfoModal.vue +150 -0
- package/dist/runtime/components/AServerInfoModal.vue.d.ts +43 -0
- package/dist/runtime/components/ASpaceFormModal.vue +1 -1
- package/dist/runtime/components/ASubPageList.d.vue.ts +66 -0
- package/dist/runtime/components/ASubPageList.vue +147 -0
- package/dist/runtime/components/ASubPageList.vue.d.ts +66 -0
- package/dist/runtime/components/aware/AAccordion.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AAccordion.vue +107 -0
- package/dist/runtime/components/aware/AAccordion.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AArea.vue +24 -11
- package/dist/runtime/components/aware/AAvatar.d.vue.ts +6 -0
- package/dist/runtime/components/aware/AAvatar.vue +33 -3
- package/dist/runtime/components/aware/AAvatar.vue.d.ts +6 -0
- package/dist/runtime/components/aware/AAvatarGroup.d.vue.ts +10 -0
- package/dist/runtime/components/aware/AAvatarGroup.vue +30 -0
- package/dist/runtime/components/aware/AAvatarGroup.vue.d.ts +10 -0
- package/dist/runtime/components/aware/AButton.d.vue.ts +4 -2
- package/dist/runtime/components/aware/AButton.vue +46 -14
- package/dist/runtime/components/aware/AButton.vue.d.ts +4 -2
- package/dist/runtime/components/aware/ACalendar.d.vue.ts +17 -0
- package/dist/runtime/components/aware/ACalendar.vue +145 -0
- package/dist/runtime/components/aware/ACalendar.vue.d.ts +17 -0
- package/dist/runtime/components/aware/ACarousel.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ACarousel.vue +39 -0
- package/dist/runtime/components/aware/ACarousel.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ACheckbox.d.vue.ts +11 -0
- package/dist/runtime/components/aware/ACheckbox.vue +74 -0
- package/dist/runtime/components/aware/ACheckbox.vue.d.ts +11 -0
- package/dist/runtime/components/aware/ACheckboxGroup.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ACheckboxGroup.vue +79 -0
- package/dist/runtime/components/aware/ACheckboxGroup.vue.d.ts +27 -0
- package/dist/runtime/components/aware/ACollapsible.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ACollapsible.vue +45 -0
- package/dist/runtime/components/aware/ACollapsible.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AColorPicker.d.vue.ts +15 -0
- package/dist/runtime/components/aware/AColorPicker.vue +48 -0
- package/dist/runtime/components/aware/AColorPicker.vue.d.ts +15 -0
- package/dist/runtime/components/aware/ACommandPalette.d.vue.ts +33 -0
- package/dist/runtime/components/aware/ACommandPalette.vue +123 -0
- package/dist/runtime/components/aware/ACommandPalette.vue.d.ts +33 -0
- package/dist/runtime/components/aware/AContextMenu.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AContextMenu.vue +63 -0
- package/dist/runtime/components/aware/AContextMenu.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ADrawer.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ADrawer.vue +57 -0
- package/dist/runtime/components/aware/ADrawer.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ADropdownMenu.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ADropdownMenu.vue +63 -0
- package/dist/runtime/components/aware/ADropdownMenu.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AFileUpload.d.vue.ts +27 -0
- package/dist/runtime/components/aware/AFileUpload.vue +67 -0
- package/dist/runtime/components/aware/AFileUpload.vue.d.ts +27 -0
- package/dist/runtime/components/aware/AFollowBar.d.vue.ts +21 -0
- package/dist/runtime/components/aware/AFollowBar.vue +62 -0
- package/dist/runtime/components/aware/AFollowBar.vue.d.ts +21 -0
- package/dist/runtime/components/aware/AFollowScroll.d.vue.ts +7 -0
- package/dist/runtime/components/aware/AFollowScroll.vue +17 -0
- package/dist/runtime/components/aware/AFollowScroll.vue.d.ts +7 -0
- package/dist/runtime/components/aware/AFormSync.d.vue.ts +21 -0
- package/dist/runtime/components/aware/AFormSync.vue +52 -0
- package/dist/runtime/components/aware/AFormSync.vue.d.ts +21 -0
- package/dist/runtime/components/aware/AGlobalFocusLayer.d.vue.ts +3 -0
- package/dist/runtime/components/aware/AGlobalFocusLayer.vue +90 -0
- package/dist/runtime/components/aware/AGlobalFocusLayer.vue.d.ts +3 -0
- package/dist/runtime/components/aware/AHoverItem.d.vue.ts +27 -0
- package/dist/runtime/components/aware/AHoverItem.vue +124 -0
- package/dist/runtime/components/aware/AHoverItem.vue.d.ts +27 -0
- package/dist/runtime/components/aware/AInput.d.vue.ts +12 -2
- package/dist/runtime/components/aware/AInput.vue +72 -19
- package/dist/runtime/components/aware/AInput.vue.d.ts +12 -2
- package/dist/runtime/components/aware/AInputMenu.d.vue.ts +17 -0
- package/dist/runtime/components/aware/AInputMenu.vue +138 -0
- package/dist/runtime/components/aware/AInputMenu.vue.d.ts +17 -0
- package/dist/runtime/components/aware/AInputNumber.d.vue.ts +15 -0
- package/dist/runtime/components/aware/AInputNumber.vue +67 -0
- package/dist/runtime/components/aware/AInputNumber.vue.d.ts +15 -0
- package/dist/runtime/components/aware/AInputTags.d.vue.ts +15 -0
- package/dist/runtime/components/aware/AInputTags.vue +67 -0
- package/dist/runtime/components/aware/AInputTags.vue.d.ts +15 -0
- package/dist/runtime/components/aware/AKeyHint.d.vue.ts +3 -0
- package/dist/runtime/components/aware/AKeyHint.vue +23 -0
- package/dist/runtime/components/aware/AKeyHint.vue.d.ts +3 -0
- package/dist/runtime/components/aware/AMedia.d.vue.ts +19 -0
- package/dist/runtime/components/aware/AMedia.vue +85 -0
- package/dist/runtime/components/aware/AMedia.vue.d.ts +19 -0
- package/dist/runtime/components/aware/AModal.d.vue.ts +33 -0
- package/dist/runtime/components/aware/AModal.vue +110 -0
- package/dist/runtime/components/aware/AModal.vue.d.ts +33 -0
- package/dist/runtime/components/aware/ANavigationMenu.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ANavigationMenu.vue +82 -0
- package/dist/runtime/components/aware/ANavigationMenu.vue.d.ts +25 -0
- package/dist/runtime/components/aware/APagination.d.vue.ts +13 -0
- package/dist/runtime/components/aware/APagination.vue +53 -0
- package/dist/runtime/components/aware/APagination.vue.d.ts +13 -0
- package/dist/runtime/components/aware/APeerCaretLayer.d.vue.ts +10 -0
- package/dist/runtime/components/aware/APeerCaretLayer.vue +133 -0
- package/dist/runtime/components/aware/APeerCaretLayer.vue.d.ts +10 -0
- package/dist/runtime/components/aware/APinInput.d.vue.ts +15 -0
- package/dist/runtime/components/aware/APinInput.vue +48 -0
- package/dist/runtime/components/aware/APinInput.vue.d.ts +15 -0
- package/dist/runtime/components/aware/APopover.d.vue.ts +25 -0
- package/dist/runtime/components/aware/APopover.vue +57 -0
- package/dist/runtime/components/aware/APopover.vue.d.ts +25 -0
- package/dist/runtime/components/aware/APresenceBlobs.d.vue.ts +3 -0
- package/dist/runtime/components/aware/APresenceBlobs.vue +69 -0
- package/dist/runtime/components/aware/APresenceBlobs.vue.d.ts +3 -0
- package/dist/runtime/components/aware/APresenceCursors.d.vue.ts +20 -0
- package/dist/runtime/components/aware/APresenceCursors.vue +47 -0
- package/dist/runtime/components/aware/APresenceCursors.vue.d.ts +20 -0
- package/dist/runtime/components/aware/ARadioGroup.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ARadioGroup.vue +86 -0
- package/dist/runtime/components/aware/ARadioGroup.vue.d.ts +27 -0
- package/dist/runtime/components/aware/AScroll.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AScroll.vue +87 -0
- package/dist/runtime/components/aware/AScroll.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ASelect.d.vue.ts +12 -2
- package/dist/runtime/components/aware/ASelect.vue +146 -22
- package/dist/runtime/components/aware/ASelect.vue.d.ts +12 -2
- package/dist/runtime/components/aware/ASelectMenu.d.vue.ts +17 -0
- package/dist/runtime/components/aware/ASelectMenu.vue +139 -0
- package/dist/runtime/components/aware/ASelectMenu.vue.d.ts +17 -0
- package/dist/runtime/components/aware/ASlideover.d.vue.ts +33 -0
- package/dist/runtime/components/aware/ASlideover.vue +110 -0
- package/dist/runtime/components/aware/ASlideover.vue.d.ts +33 -0
- package/dist/runtime/components/aware/ASlider.d.vue.ts +19 -0
- package/dist/runtime/components/aware/ASlider.vue +77 -0
- package/dist/runtime/components/aware/ASlider.vue.d.ts +19 -0
- package/dist/runtime/components/aware/AStepper.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AStepper.vue +82 -0
- package/dist/runtime/components/aware/AStepper.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ASwitch.d.vue.ts +11 -0
- package/dist/runtime/components/aware/ASwitch.vue +75 -0
- package/dist/runtime/components/aware/ASwitch.vue.d.ts +11 -0
- package/dist/runtime/components/aware/ATable.d.vue.ts +23 -0
- package/dist/runtime/components/aware/ATable.vue +97 -0
- package/dist/runtime/components/aware/ATable.vue.d.ts +23 -0
- package/dist/runtime/components/aware/ATabs.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ATabs.vue +128 -0
- package/dist/runtime/components/aware/ATabs.vue.d.ts +27 -0
- package/dist/runtime/components/aware/ATextarea.d.vue.ts +12 -2
- package/dist/runtime/components/aware/ATextarea.vue +72 -19
- package/dist/runtime/components/aware/ATextarea.vue.d.ts +12 -2
- package/dist/runtime/components/aware/AToggleGroup.d.vue.ts +27 -0
- package/dist/runtime/components/aware/AToggleGroup.vue +79 -0
- package/dist/runtime/components/aware/AToggleGroup.vue.d.ts +27 -0
- package/dist/runtime/components/aware/ATree.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ATree.vue +111 -0
- package/dist/runtime/components/aware/ATree.vue.d.ts +27 -0
- package/dist/runtime/components/chat/AChatPanel.d.vue.ts +6 -6
- package/dist/runtime/components/chat/AChatPanel.vue.d.ts +6 -6
- package/dist/runtime/components/chat/ANodeChatPanel.d.vue.ts +42 -0
- package/dist/runtime/components/chat/ANodeChatPanel.vue +53 -0
- package/dist/runtime/components/chat/ANodeChatPanel.vue.d.ts +42 -0
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +2 -2
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +2 -2
- package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +3 -3
- package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +3 -3
- package/dist/runtime/components/editor/AEditorRedoButton.d.vue.ts +26 -0
- package/dist/runtime/components/editor/AEditorRedoButton.vue +38 -0
- package/dist/runtime/components/editor/AEditorRedoButton.vue.d.ts +26 -0
- package/dist/runtime/components/editor/AEditorUndoButton.d.vue.ts +26 -0
- package/dist/runtime/components/editor/AEditorUndoButton.vue +38 -0
- package/dist/runtime/components/editor/AEditorUndoButton.vue.d.ts +26 -0
- package/dist/runtime/components/editor/AIconPickerPopover.d.vue.ts +24 -0
- package/dist/runtime/components/editor/AIconPickerPopover.vue +113 -0
- package/dist/runtime/components/editor/AIconPickerPopover.vue.d.ts +24 -0
- package/dist/runtime/components/editor/ANodeInlineLabel.d.vue.ts +24 -0
- package/dist/runtime/components/editor/ANodeInlineLabel.vue +101 -0
- package/dist/runtime/components/editor/ANodeInlineLabel.vue.d.ts +24 -0
- package/dist/runtime/components/renderers/ADocLoadError.d.vue.ts +3 -0
- package/dist/runtime/components/renderers/ADocLoadError.vue +11 -0
- package/dist/runtime/components/renderers/ADocLoadError.vue.d.ts +3 -0
- package/dist/runtime/components/renderers/ADocLoadingSkeleton.d.vue.ts +3 -0
- package/dist/runtime/components/renderers/ADocLoadingSkeleton.vue +5 -0
- package/dist/runtime/components/renderers/ADocLoadingSkeleton.vue.d.ts +3 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.d.vue.ts +22 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.vue +1041 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.vue.d.ts +22 -0
- package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +23 -0
- package/dist/runtime/components/renderers/AProseRenderer.vue +31 -0
- package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +23 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.vue +865 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.d.vue.ts +14 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue +45 -15
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue.d.ts +14 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.vue +93 -20
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue +31 -2
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.vue +94 -21
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/sheets/ASheetsCell.d.vue.ts +45 -0
- package/dist/runtime/components/renderers/sheets/ASheetsCell.vue +123 -0
- package/dist/runtime/components/renderers/sheets/ASheetsCell.vue.d.ts +45 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.d.vue.ts +111 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue +737 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue.d.ts +111 -0
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.d.vue.ts +26 -0
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue +100 -0
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue.d.ts +26 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.d.vue.ts +48 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue +243 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue.d.ts +48 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.d.vue.ts +1 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.vue +13 -32
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.vue.d.ts +1 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue +34 -4
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue.d.ts +6 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.d.vue.ts +16 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue +14 -3
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue.d.ts +16 -0
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.d.vue.ts +13 -1
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue +114 -47
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue.d.ts +13 -1
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.d.vue.ts +4 -0
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.vue +21 -4
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.vue.d.ts +4 -0
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.d.vue.ts +2 -2
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.vue.d.ts +2 -2
- package/dist/runtime/components/settings/ASettingsSpacesPanel.vue +7 -25
- package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +3 -3
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +3 -3
- package/dist/runtime/components/shell/ASyncStatus.d.vue.ts +1 -1
- package/dist/runtime/components/shell/ASyncStatus.vue.d.ts +1 -1
- package/dist/runtime/components/shell/AUserMenu.d.vue.ts +2 -2
- package/dist/runtime/components/shell/AUserMenu.vue.d.ts +2 -2
- package/dist/runtime/components/shell/AWelcomeScreen.d.vue.ts +1 -1
- package/dist/runtime/components/shell/AWelcomeScreen.vue.d.ts +1 -1
- package/dist/runtime/composables/useAACaret.d.ts +29 -0
- package/dist/runtime/composables/useAACaret.js +64 -0
- package/dist/runtime/composables/useAAEphemeral.d.ts +32 -0
- package/dist/runtime/composables/useAAEphemeral.js +33 -0
- package/dist/runtime/composables/useAAField.d.ts +10 -2
- package/dist/runtime/composables/useAAField.js +31 -2
- package/dist/runtime/composables/useAAFieldValue.d.ts +26 -0
- package/dist/runtime/composables/useAAFieldValue.js +32 -0
- package/dist/runtime/composables/useAAFocus.d.ts +68 -0
- package/dist/runtime/composables/useAAFocus.js +174 -0
- package/dist/runtime/composables/useAAFollowAnchor.d.ts +25 -0
- package/dist/runtime/composables/useAAFollowAnchor.js +69 -0
- package/dist/runtime/composables/useAAFollowPeer.d.ts +29 -0
- package/dist/runtime/composables/useAAFollowPeer.js +75 -0
- package/dist/runtime/composables/useAAKey.d.ts +22 -0
- package/dist/runtime/composables/useAAKey.js +24 -0
- package/dist/runtime/composables/useAAPointer.d.ts +30 -0
- package/dist/runtime/composables/useAAPointer.js +53 -0
- package/dist/runtime/composables/useAAUIState.d.ts +29 -0
- package/dist/runtime/composables/useAAUIState.js +28 -0
- package/dist/runtime/composables/useAAViewport.d.ts +22 -0
- package/dist/runtime/composables/useAAViewport.js +50 -0
- package/dist/runtime/composables/useAbraAdmin.d.ts +54 -0
- package/dist/runtime/composables/useAbraAdmin.js +115 -0
- package/dist/runtime/composables/useAbracadabraAuth.d.ts +8 -0
- package/dist/runtime/composables/useAbracadabraAuth.js +8 -0
- package/dist/runtime/composables/useAggregatedPresence.d.ts +23 -0
- package/dist/runtime/composables/useAggregatedPresence.js +140 -0
- package/dist/runtime/composables/useChat.d.ts +16 -2
- package/dist/runtime/composables/useChat.js +257 -66
- package/dist/runtime/composables/useChatUsers.d.ts +2 -0
- package/dist/runtime/composables/useChatUsers.js +2 -1
- package/dist/runtime/composables/useDocLookup.d.ts +4 -0
- package/dist/runtime/composables/useDocLookup.js +25 -0
- package/dist/runtime/composables/useDocSnapshots.d.ts +79 -0
- package/dist/runtime/composables/useDocSnapshots.js +234 -0
- package/dist/runtime/composables/useEditorDragHandle.d.ts +7 -0
- package/dist/runtime/composables/useEditorDragHandle.js +19 -1
- package/dist/runtime/composables/useEditorSuggestions.js +27 -1
- package/dist/runtime/composables/useEditorToolbar.js +9 -1
- package/dist/runtime/composables/useEmailVerification.d.ts +33 -0
- package/dist/runtime/composables/useEmailVerification.js +58 -0
- package/dist/runtime/composables/useIdentityDoc.js +0 -3
- package/dist/runtime/composables/useItemPresence.d.ts +47 -0
- package/dist/runtime/composables/useItemPresence.js +73 -0
- package/dist/runtime/composables/useResizableWidth.d.ts +24 -0
- package/dist/runtime/composables/useResizableWidth.js +87 -0
- package/dist/runtime/composables/useServerInfo.d.ts +17 -2
- package/dist/runtime/composables/useServerInfo.js +30 -6
- package/dist/runtime/composables/useServerSearch.d.ts +36 -0
- package/dist/runtime/composables/useServerSearch.js +91 -0
- package/dist/runtime/composables/useServerTrash.d.ts +67 -0
- package/dist/runtime/composables/useServerTrash.js +128 -0
- package/dist/runtime/composables/useSheetsClipboard.d.ts +42 -0
- package/dist/runtime/composables/useSheetsClipboard.js +109 -0
- package/dist/runtime/composables/useSheetsFormulas.d.ts +38 -0
- package/dist/runtime/composables/useSheetsFormulas.js +725 -0
- package/dist/runtime/composables/useSheetsSelection.d.ts +68 -0
- package/dist/runtime/composables/useSheetsSelection.js +390 -0
- package/dist/runtime/composables/useSheetsView.d.ts +31 -0
- package/dist/runtime/composables/useSheetsView.js +77 -0
- package/dist/runtime/composables/useSpaceConnections.d.ts +43 -0
- package/dist/runtime/composables/useSpaceConnections.js +72 -0
- package/dist/runtime/composables/useSpaces.d.ts +1 -3
- package/dist/runtime/composables/useSpaces.js +2 -5
- package/dist/runtime/composables/useTiptapHistory.d.ts +22 -0
- package/dist/runtime/composables/useTiptapHistory.js +12 -0
- package/dist/runtime/composables/useTreeExpansion.d.ts +28 -0
- package/dist/runtime/composables/useTreeExpansion.js +94 -0
- package/dist/runtime/composables/useYDoc.js +12 -1
- package/dist/runtime/extensions/button.d.ts +3 -0
- package/dist/runtime/extensions/button.js +62 -0
- package/dist/runtime/extensions/color-swatch.d.ts +2 -0
- package/dist/runtime/extensions/color-swatch.js +34 -0
- package/dist/runtime/extensions/diff.d.ts +2 -0
- package/dist/runtime/extensions/diff.js +40 -0
- package/dist/runtime/extensions/divider.d.ts +2 -0
- package/dist/runtime/extensions/divider.js +33 -0
- package/dist/runtime/extensions/embed.d.ts +2 -0
- package/dist/runtime/extensions/embed.js +40 -0
- package/dist/runtime/extensions/figure.d.ts +2 -0
- package/dist/runtime/extensions/figure.js +49 -0
- package/dist/runtime/extensions/math.d.ts +15 -0
- package/dist/runtime/extensions/math.js +66 -0
- package/dist/runtime/extensions/progress.d.ts +2 -0
- package/dist/runtime/extensions/progress.js +43 -0
- package/dist/runtime/extensions/quote.d.ts +2 -0
- package/dist/runtime/extensions/quote.js +39 -0
- package/dist/runtime/extensions/spoiler.d.ts +2 -0
- package/dist/runtime/extensions/spoiler.js +36 -0
- package/dist/runtime/extensions/stat.d.ts +3 -0
- package/dist/runtime/extensions/stat.js +58 -0
- package/dist/runtime/extensions/svg-embed.d.ts +23 -0
- package/dist/runtime/extensions/svg-embed.js +33 -0
- package/dist/runtime/extensions/video.d.ts +2 -0
- package/dist/runtime/extensions/video.js +40 -0
- package/dist/runtime/extensions/views/ButtonGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ButtonGroupView.vue +25 -0
- package/dist/runtime/extensions/views/ButtonGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/ButtonView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ButtonView.vue +171 -0
- package/dist/runtime/extensions/views/ButtonView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/ColorSwatchView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ColorSwatchView.vue +134 -0
- package/dist/runtime/extensions/views/ColorSwatchView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/DiffView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DiffView.vue +163 -0
- package/dist/runtime/extensions/views/DiffView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/DividerView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DividerView.vue +40 -0
- package/dist/runtime/extensions/views/DividerView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/EmbedView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/EmbedView.vue +166 -0
- package/dist/runtime/extensions/views/EmbedView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FigureView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/FigureView.vue +122 -0
- package/dist/runtime/extensions/views/FigureView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FileNodeView.vue +21 -24
- package/dist/runtime/extensions/views/MathBlockView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/MathBlockView.vue +151 -0
- package/dist/runtime/extensions/views/MathBlockView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/MathInlineView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/MathInlineView.vue +149 -0
- package/dist/runtime/extensions/views/MathInlineView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/MetaFieldView.vue +1129 -550
- package/dist/runtime/extensions/views/ProgressView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ProgressView.vue +156 -0
- package/dist/runtime/extensions/views/ProgressView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/QuoteView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/QuoteView.vue +128 -0
- package/dist/runtime/extensions/views/QuoteView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/SpoilerView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/SpoilerView.vue +62 -0
- package/dist/runtime/extensions/views/SpoilerView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/StatGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/StatGroupView.vue +25 -0
- package/dist/runtime/extensions/views/StatGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/StatView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/StatView.vue +89 -0
- package/dist/runtime/extensions/views/StatView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/SvgEmbedView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/SvgEmbedView.vue +120 -0
- package/dist/runtime/extensions/views/SvgEmbedView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/VideoView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/VideoView.vue +190 -0
- package/dist/runtime/extensions/views/VideoView.vue.d.ts +4 -0
- package/dist/runtime/locale.d.ts +133 -0
- package/dist/runtime/locale.js +121 -2
- package/dist/runtime/plugin-abracadabra.client.js +233 -36
- package/dist/runtime/plugin-abracadabra.server.js +0 -1
- package/dist/runtime/plugins/core.plugin.js +77 -4
- package/dist/runtime/server/plugins/abracadabra-service.js +84 -6
- package/dist/runtime/server/utils/rpcHandler.d.ts +74 -0
- package/dist/runtime/server/utils/rpcHandler.js +74 -0
- package/dist/runtime/server/utils/spaceManager.js +10 -9
- package/dist/runtime/types.d.ts +63 -10
- package/dist/runtime/utils/awareRingStyle.d.ts +22 -0
- package/dist/runtime/utils/awareRingStyle.js +16 -0
- package/dist/runtime/utils/caretCoordinates.d.ts +41 -0
- package/dist/runtime/utils/caretCoordinates.js +126 -0
- package/dist/runtime/utils/content.d.ts +1 -1
- package/dist/runtime/utils/docTypes.js +44 -13
- package/dist/runtime/utils/domPath.d.ts +42 -0
- package/dist/runtime/utils/domPath.js +89 -0
- package/dist/runtime/utils/loadKatex.d.ts +1 -0
- package/dist/runtime/utils/loadKatex.js +29 -0
- package/dist/runtime/utils/lucideIcons.d.ts +16 -0
- package/dist/runtime/utils/lucideIcons.js +451 -0
- package/dist/runtime/utils/sanitizeSvg.d.ts +19 -0
- package/dist/runtime/utils/sanitizeSvg.js +87 -0
- package/dist/runtime/utils/time.d.ts +15 -0
- package/dist/runtime/utils/time.js +5 -0
- package/dist/types.d.mts +4 -0
- package/package.json +26 -16
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ref, computed, onBeforeUnmount } from "vue";
|
|
2
|
+
import { useCookie } from "#imports";
|
|
3
|
+
export function useResizableWidth(options = {}) {
|
|
4
|
+
const defaultWidth = options.defaultWidth ?? 672;
|
|
5
|
+
const minWidth = options.minWidth ?? 320;
|
|
6
|
+
const maxFraction = options.maxFraction ?? 0.9;
|
|
7
|
+
const direction = options.direction ?? "left";
|
|
8
|
+
const sign = direction === "left" ? 1 : -1;
|
|
9
|
+
const cookie = options.cookieKey ? useCookie(options.cookieKey, { default: () => defaultWidth }) : null;
|
|
10
|
+
const width = ref(cookie?.value ?? defaultWidth);
|
|
11
|
+
const isResizing = ref(false);
|
|
12
|
+
let startX = 0;
|
|
13
|
+
let startWidth = 0;
|
|
14
|
+
function clamp(px) {
|
|
15
|
+
if (!import.meta.client) return px;
|
|
16
|
+
const maxW = window.innerWidth * maxFraction;
|
|
17
|
+
return Math.min(maxW, Math.max(minWidth, px));
|
|
18
|
+
}
|
|
19
|
+
function persist() {
|
|
20
|
+
if (cookie) cookie.value = width.value;
|
|
21
|
+
}
|
|
22
|
+
function onMouseDown(e) {
|
|
23
|
+
startX = e.clientX;
|
|
24
|
+
startWidth = width.value;
|
|
25
|
+
isResizing.value = true;
|
|
26
|
+
document.body.style.cursor = "col-resize";
|
|
27
|
+
document.body.style.userSelect = "none";
|
|
28
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
29
|
+
document.addEventListener("mouseup", onMouseUp, { once: true });
|
|
30
|
+
}
|
|
31
|
+
function onMouseMove(e) {
|
|
32
|
+
width.value = clamp(startWidth + sign * (startX - e.clientX));
|
|
33
|
+
}
|
|
34
|
+
function onMouseUp() {
|
|
35
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
36
|
+
document.body.style.cursor = "";
|
|
37
|
+
document.body.style.userSelect = "";
|
|
38
|
+
isResizing.value = false;
|
|
39
|
+
persist();
|
|
40
|
+
}
|
|
41
|
+
function onTouchStart(e) {
|
|
42
|
+
const t = e.touches[0];
|
|
43
|
+
if (!t) return;
|
|
44
|
+
startX = t.clientX;
|
|
45
|
+
startWidth = width.value;
|
|
46
|
+
isResizing.value = true;
|
|
47
|
+
document.body.style.userSelect = "none";
|
|
48
|
+
document.addEventListener("touchmove", onTouchMove);
|
|
49
|
+
document.addEventListener("touchend", onTouchEnd, { once: true });
|
|
50
|
+
}
|
|
51
|
+
function onTouchMove(e) {
|
|
52
|
+
const t = e.touches[0];
|
|
53
|
+
if (!t) return;
|
|
54
|
+
width.value = clamp(startWidth + sign * (startX - t.clientX));
|
|
55
|
+
}
|
|
56
|
+
function onTouchEnd() {
|
|
57
|
+
document.removeEventListener("touchmove", onTouchMove);
|
|
58
|
+
document.body.style.userSelect = "";
|
|
59
|
+
isResizing.value = false;
|
|
60
|
+
persist();
|
|
61
|
+
}
|
|
62
|
+
function onDoubleClick() {
|
|
63
|
+
width.value = defaultWidth;
|
|
64
|
+
persist();
|
|
65
|
+
}
|
|
66
|
+
function reset() {
|
|
67
|
+
width.value = defaultWidth;
|
|
68
|
+
persist();
|
|
69
|
+
}
|
|
70
|
+
const style = computed(() => ({
|
|
71
|
+
maxWidth: `min(${width.value}px, ${maxFraction * 100}vw)`,
|
|
72
|
+
width: `min(${width.value}px, ${maxFraction * 100}vw)`
|
|
73
|
+
}));
|
|
74
|
+
onBeforeUnmount(() => {
|
|
75
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
76
|
+
document.removeEventListener("touchmove", onTouchMove);
|
|
77
|
+
});
|
|
78
|
+
return {
|
|
79
|
+
width,
|
|
80
|
+
isResizing,
|
|
81
|
+
style,
|
|
82
|
+
onMouseDown,
|
|
83
|
+
onTouchStart,
|
|
84
|
+
onDoubleClick,
|
|
85
|
+
reset
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -7,16 +7,25 @@
|
|
|
7
7
|
* Usage:
|
|
8
8
|
* const { serverName, serverVersion, healthy, iceServers, refresh } = useServerInfo()
|
|
9
9
|
*/
|
|
10
|
+
import type { ReadyzStatus } from '@abraca/dabra';
|
|
10
11
|
export declare function _initServerInfo(client: any): void;
|
|
11
12
|
export declare function _destroyServerInfo(): void;
|
|
12
13
|
declare function refresh(): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Hit `/readyz` — the deep-readiness endpoint. HTTP 200 → status `ready`,
|
|
16
|
+
* HTTP 503 → status `unready`. The SDK normalizes both into
|
|
17
|
+
* {@link ReadyzStatus} rather than throwing on 503, since 503 is a valid
|
|
18
|
+
* "not ready yet" answer (mid-startup, DB pinging, etc.). The last result
|
|
19
|
+
* stays in `readiness` until the next call.
|
|
20
|
+
*/
|
|
21
|
+
declare function checkReadiness(): Promise<ReadyzStatus | null>;
|
|
13
22
|
export declare function useServerInfo(): {
|
|
14
23
|
/** Server display name. */
|
|
15
24
|
serverName: import("vue").Ref<string | null, string | null>;
|
|
16
25
|
/** Server version string. */
|
|
17
26
|
serverVersion: import("vue").Ref<string | null, string | null>;
|
|
18
|
-
/**
|
|
19
|
-
|
|
27
|
+
/** Reserved server-root document ID. */
|
|
28
|
+
rootDocId: import("vue").Ref<string | null, string | null>;
|
|
20
29
|
/** Whether the server is healthy. */
|
|
21
30
|
healthy: import("vue").Ref<boolean, boolean>;
|
|
22
31
|
/** ICE servers from server (STUN/TURN). */
|
|
@@ -25,7 +34,13 @@ export declare function useServerInfo(): {
|
|
|
25
34
|
loading: import("vue").Ref<boolean, boolean>;
|
|
26
35
|
/** Last error message. */
|
|
27
36
|
error: import("vue").Ref<string | null, string | null>;
|
|
37
|
+
/** Last `/readyz` result, or null. */
|
|
38
|
+
readiness: import("vue").ShallowRef<ReadyzStatus | null, ReadyzStatus | null>;
|
|
39
|
+
/** Whether a `checkReadiness()` is in flight. */
|
|
40
|
+
checkingReadiness: import("vue").Ref<boolean, boolean>;
|
|
28
41
|
/** Re-fetch server info. */
|
|
29
42
|
refresh: typeof refresh;
|
|
43
|
+
/** Hit `/readyz` and update `readiness`. Returns the status (or null on failure). */
|
|
44
|
+
checkReadiness: typeof checkReadiness;
|
|
30
45
|
};
|
|
31
46
|
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ref, shallowRef } from "vue";
|
|
2
2
|
const serverName = ref(null);
|
|
3
3
|
const serverVersion = ref(null);
|
|
4
|
-
const
|
|
4
|
+
const rootDocId = ref(null);
|
|
5
5
|
const healthy = ref(false);
|
|
6
6
|
const iceServers = shallowRef([]);
|
|
7
7
|
const loading = ref(false);
|
|
8
8
|
const error = ref(null);
|
|
9
|
+
const readiness = shallowRef(null);
|
|
10
|
+
const checkingReadiness = ref(false);
|
|
9
11
|
let _fetched = false;
|
|
10
12
|
let _client = null;
|
|
11
13
|
export function _initServerInfo(client) {
|
|
@@ -18,10 +20,12 @@ export function _destroyServerInfo() {
|
|
|
18
20
|
_fetched = false;
|
|
19
21
|
serverName.value = null;
|
|
20
22
|
serverVersion.value = null;
|
|
21
|
-
|
|
23
|
+
rootDocId.value = null;
|
|
22
24
|
healthy.value = false;
|
|
23
25
|
iceServers.value = [];
|
|
24
26
|
error.value = null;
|
|
27
|
+
readiness.value = null;
|
|
28
|
+
checkingReadiness.value = false;
|
|
25
29
|
}
|
|
26
30
|
async function _fetchAll() {
|
|
27
31
|
if (!_client || loading.value) return;
|
|
@@ -40,7 +44,7 @@ async function _fetchAll() {
|
|
|
40
44
|
const info = infoResult.value;
|
|
41
45
|
serverName.value = info?.name ?? null;
|
|
42
46
|
serverVersion.value = info?.version ?? null;
|
|
43
|
-
|
|
47
|
+
rootDocId.value = info?.root_doc_id ?? null;
|
|
44
48
|
}
|
|
45
49
|
if (iceResult.status === "fulfilled") {
|
|
46
50
|
iceServers.value = iceResult.value ?? [];
|
|
@@ -55,6 +59,20 @@ async function _fetchAll() {
|
|
|
55
59
|
async function refresh() {
|
|
56
60
|
await _fetchAll();
|
|
57
61
|
}
|
|
62
|
+
async function checkReadiness() {
|
|
63
|
+
if (!_client) return null;
|
|
64
|
+
checkingReadiness.value = true;
|
|
65
|
+
try {
|
|
66
|
+
const result = await _client.readyz();
|
|
67
|
+
readiness.value = result;
|
|
68
|
+
return result;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
error.value = e?.message ?? "Failed to check readiness";
|
|
71
|
+
return null;
|
|
72
|
+
} finally {
|
|
73
|
+
checkingReadiness.value = false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
58
76
|
export function useServerInfo() {
|
|
59
77
|
if (!_fetched && _client && !loading.value) {
|
|
60
78
|
_fetchAll();
|
|
@@ -64,8 +82,8 @@ export function useServerInfo() {
|
|
|
64
82
|
serverName,
|
|
65
83
|
/** Server version string. */
|
|
66
84
|
serverVersion,
|
|
67
|
-
/**
|
|
68
|
-
|
|
85
|
+
/** Reserved server-root document ID. */
|
|
86
|
+
rootDocId,
|
|
69
87
|
/** Whether the server is healthy. */
|
|
70
88
|
healthy,
|
|
71
89
|
/** ICE servers from server (STUN/TURN). */
|
|
@@ -74,7 +92,13 @@ export function useServerInfo() {
|
|
|
74
92
|
loading,
|
|
75
93
|
/** Last error message. */
|
|
76
94
|
error,
|
|
95
|
+
/** Last `/readyz` result, or null. */
|
|
96
|
+
readiness,
|
|
97
|
+
/** Whether a `checkReadiness()` is in flight. */
|
|
98
|
+
checkingReadiness,
|
|
77
99
|
/** Re-fetch server info. */
|
|
78
|
-
refresh
|
|
100
|
+
refresh,
|
|
101
|
+
/** Hit `/readyz` and update `readiness`. Returns the status (or null on failure). */
|
|
102
|
+
checkReadiness
|
|
79
103
|
};
|
|
80
104
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useServerSearch
|
|
3
|
+
*
|
|
4
|
+
* Server-side full-text document search. Wraps `client.searchDocs`
|
|
5
|
+
* (FTS5 on SQLite, tsvector on Postgres). Distinct from
|
|
6
|
+
* `useDocsSearch` (vendored Nuxt UI docs-site search) and
|
|
7
|
+
* `useSearchIndex` (client-side IDB trigram index).
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* const { results, isSearching, error, search, cancel } = useServerSearch()
|
|
11
|
+
* await search('query string', { limit: 20 })
|
|
12
|
+
*/
|
|
13
|
+
import type { DocSearchHit } from '@abraca/dabra';
|
|
14
|
+
declare function cancel(): void;
|
|
15
|
+
declare function search(query: string, opts?: {
|
|
16
|
+
limit?: number;
|
|
17
|
+
debounceMs?: number;
|
|
18
|
+
}): Promise<DocSearchHit[]>;
|
|
19
|
+
declare function clear(): void;
|
|
20
|
+
export declare function useServerSearch(): {
|
|
21
|
+
/** Latest hits (best-first). Empty until `search()` resolves. */
|
|
22
|
+
results: import("vue").ShallowRef<DocSearchHit[], DocSearchHit[]>;
|
|
23
|
+
/** Whether a request is in flight. */
|
|
24
|
+
isSearching: import("vue").Ref<boolean, boolean>;
|
|
25
|
+
/** Last error message, or null. */
|
|
26
|
+
error: import("vue").Ref<string | null, string | null>;
|
|
27
|
+
/** The query string currently driving `results`. */
|
|
28
|
+
lastQuery: import("vue").Ref<string, string>;
|
|
29
|
+
/** Run a search. Debounced; consecutive calls cancel earlier ones. */
|
|
30
|
+
search: typeof search;
|
|
31
|
+
/** Cancel any in-flight or debounced query. */
|
|
32
|
+
cancel: typeof cancel;
|
|
33
|
+
/** Clear results + last error + cancel anything pending. */
|
|
34
|
+
clear: typeof clear;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ref, shallowRef } from "vue";
|
|
2
|
+
import { useAbracadabra } from "#imports";
|
|
3
|
+
const DEFAULT_DEBOUNCE_MS = 200;
|
|
4
|
+
const results = shallowRef([]);
|
|
5
|
+
const isSearching = ref(false);
|
|
6
|
+
const error = ref(null);
|
|
7
|
+
const lastQuery = ref("");
|
|
8
|
+
let _aborter = null;
|
|
9
|
+
let _debounceTimer = null;
|
|
10
|
+
function cancel() {
|
|
11
|
+
if (_debounceTimer) {
|
|
12
|
+
clearTimeout(_debounceTimer);
|
|
13
|
+
_debounceTimer = null;
|
|
14
|
+
}
|
|
15
|
+
if (_aborter) {
|
|
16
|
+
_aborter.abort();
|
|
17
|
+
_aborter = null;
|
|
18
|
+
}
|
|
19
|
+
isSearching.value = false;
|
|
20
|
+
}
|
|
21
|
+
async function _runSearch(query, opts = {}) {
|
|
22
|
+
const abra = useAbracadabra();
|
|
23
|
+
if (!abra.client.value) {
|
|
24
|
+
results.value = [];
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
cancel();
|
|
28
|
+
const aborter = new AbortController();
|
|
29
|
+
_aborter = aborter;
|
|
30
|
+
isSearching.value = true;
|
|
31
|
+
error.value = null;
|
|
32
|
+
lastQuery.value = query;
|
|
33
|
+
try {
|
|
34
|
+
const hits = await abra.client.value.searchDocs(query, { limit: opts.limit });
|
|
35
|
+
if (aborter.signal.aborted) return [];
|
|
36
|
+
results.value = hits;
|
|
37
|
+
return hits;
|
|
38
|
+
} catch (e) {
|
|
39
|
+
if (aborter.signal.aborted) return [];
|
|
40
|
+
error.value = e instanceof Error ? e.message : "Search failed";
|
|
41
|
+
results.value = [];
|
|
42
|
+
return [];
|
|
43
|
+
} finally {
|
|
44
|
+
if (_aborter === aborter) {
|
|
45
|
+
_aborter = null;
|
|
46
|
+
isSearching.value = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function search(query, opts = {}) {
|
|
51
|
+
const trimmed = query.trim();
|
|
52
|
+
if (!trimmed) {
|
|
53
|
+
cancel();
|
|
54
|
+
results.value = [];
|
|
55
|
+
lastQuery.value = "";
|
|
56
|
+
return Promise.resolve([]);
|
|
57
|
+
}
|
|
58
|
+
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
59
|
+
if (debounceMs <= 0) return _runSearch(trimmed, opts);
|
|
60
|
+
if (_debounceTimer) clearTimeout(_debounceTimer);
|
|
61
|
+
return new Promise((resolve) => {
|
|
62
|
+
_debounceTimer = setTimeout(() => {
|
|
63
|
+
_debounceTimer = null;
|
|
64
|
+
_runSearch(trimmed, opts).then(resolve);
|
|
65
|
+
}, debounceMs);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function clear() {
|
|
69
|
+
cancel();
|
|
70
|
+
results.value = [];
|
|
71
|
+
lastQuery.value = "";
|
|
72
|
+
error.value = null;
|
|
73
|
+
}
|
|
74
|
+
export function useServerSearch() {
|
|
75
|
+
return {
|
|
76
|
+
/** Latest hits (best-first). Empty until `search()` resolves. */
|
|
77
|
+
results,
|
|
78
|
+
/** Whether a request is in flight. */
|
|
79
|
+
isSearching,
|
|
80
|
+
/** Last error message, or null. */
|
|
81
|
+
error,
|
|
82
|
+
/** The query string currently driving `results`. */
|
|
83
|
+
lastQuery,
|
|
84
|
+
/** Run a search. Debounced; consecutive calls cancel earlier ones. */
|
|
85
|
+
search,
|
|
86
|
+
/** Cancel any in-flight or debounced query. */
|
|
87
|
+
cancel,
|
|
88
|
+
/** Clear results + last error + cancel anything pending. */
|
|
89
|
+
clear
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useServerTrash
|
|
3
|
+
*
|
|
4
|
+
* Server-side soft-delete (K-A) trash drawer. Distinct from the Y.Map-based
|
|
5
|
+
* client trash in `useTrash`: this one talks to the REST API. Wraps
|
|
6
|
+
* `client.restoreDoc(id)` and tracks ids the local user has soft-deleted
|
|
7
|
+
* (via `trackDeletion`) in localStorage so the drawer has something to
|
|
8
|
+
* show until a `GET /docs?include_deleted=true` endpoint lands.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* const { items, refresh, trackDeletion, restore, forget } = useServerTrash()
|
|
12
|
+
* await client.deleteDoc(id); trackDeletion(id, meta)
|
|
13
|
+
* await restore(id)
|
|
14
|
+
*/
|
|
15
|
+
import type { DocumentMeta } from '@abraca/dabra';
|
|
16
|
+
export interface ServerTrashEntry {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
parent_id: string | null;
|
|
20
|
+
kind: string | null;
|
|
21
|
+
/** When the local user soft-deleted this doc (epoch ms). */
|
|
22
|
+
deletedAt: number;
|
|
23
|
+
}
|
|
24
|
+
declare function refresh(): Promise<void>;
|
|
25
|
+
declare function trackDeletion(id: string, meta?: {
|
|
26
|
+
label?: string | null;
|
|
27
|
+
parent_id?: string | null;
|
|
28
|
+
kind?: string | null;
|
|
29
|
+
}): void;
|
|
30
|
+
declare function forget(id: string): void;
|
|
31
|
+
declare function restore(id: string): Promise<void>;
|
|
32
|
+
declare function purgeExpired(): Promise<void>;
|
|
33
|
+
export declare function useServerTrash(): {
|
|
34
|
+
/** Doc metadata for tracked soft-deleted docs (refreshed via `refresh()`). */
|
|
35
|
+
items: import("vue").ShallowRef<DocumentMeta[], DocumentMeta[]>;
|
|
36
|
+
/** Local tracking entries (id + cached label, deletedAt). */
|
|
37
|
+
tracked: import("vue").Ref<{
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
parent_id: string | null;
|
|
41
|
+
kind: string | null;
|
|
42
|
+
deletedAt: number;
|
|
43
|
+
}[], ServerTrashEntry[] | {
|
|
44
|
+
id: string;
|
|
45
|
+
label: string;
|
|
46
|
+
parent_id: string | null;
|
|
47
|
+
kind: string | null;
|
|
48
|
+
deletedAt: number;
|
|
49
|
+
}[]>;
|
|
50
|
+
/** Convenience count. */
|
|
51
|
+
count: import("vue").ComputedRef<number>;
|
|
52
|
+
/** Whether `refresh()` is in flight. */
|
|
53
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
54
|
+
/** Last error message, or null. */
|
|
55
|
+
error: import("vue").Ref<string | null, string | null>;
|
|
56
|
+
/** Re-fetch metadata for every tracked id. Drops entries that 404. */
|
|
57
|
+
refresh: typeof refresh;
|
|
58
|
+
/** Record a doc the local user just soft-deleted. */
|
|
59
|
+
trackDeletion: typeof trackDeletion;
|
|
60
|
+
/** Forget a tracked entry without restoring (e.g. after permanent delete). */
|
|
61
|
+
forget: typeof forget;
|
|
62
|
+
/** Restore a soft-deleted doc and forget the tracking entry. */
|
|
63
|
+
restore: typeof restore;
|
|
64
|
+
/** Drop tracked entries older than the retention window (30 days). */
|
|
65
|
+
purgeExpired: typeof purgeExpired;
|
|
66
|
+
};
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { computed, ref, shallowRef } from "vue";
|
|
2
|
+
import { useAbracadabra } from "#imports";
|
|
3
|
+
const STORAGE_KEY = "abracadabra_server_trash";
|
|
4
|
+
const RETENTION_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
5
|
+
const tracked = ref([]);
|
|
6
|
+
const items = shallowRef([]);
|
|
7
|
+
const isLoading = ref(false);
|
|
8
|
+
const error = ref(null);
|
|
9
|
+
let _hydrated = false;
|
|
10
|
+
function loadTracked() {
|
|
11
|
+
if (typeof localStorage === "undefined") return [];
|
|
12
|
+
try {
|
|
13
|
+
const raw = localStorage.getItem(STORAGE_KEY);
|
|
14
|
+
if (!raw) return [];
|
|
15
|
+
const parsed = JSON.parse(raw);
|
|
16
|
+
if (!Array.isArray(parsed)) return [];
|
|
17
|
+
const cutoff = Date.now() - RETENTION_MS;
|
|
18
|
+
return parsed.filter((e) => e?.id && e.deletedAt > cutoff);
|
|
19
|
+
} catch {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function saveTracked(entries) {
|
|
24
|
+
if (typeof localStorage === "undefined") return;
|
|
25
|
+
try {
|
|
26
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(entries));
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async function refresh() {
|
|
31
|
+
const abra = useAbracadabra();
|
|
32
|
+
const client = abra.client.value;
|
|
33
|
+
if (!client) {
|
|
34
|
+
items.value = [];
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!_hydrated) {
|
|
38
|
+
tracked.value = loadTracked();
|
|
39
|
+
_hydrated = true;
|
|
40
|
+
}
|
|
41
|
+
isLoading.value = true;
|
|
42
|
+
error.value = null;
|
|
43
|
+
try {
|
|
44
|
+
const next = [];
|
|
45
|
+
const stillValid = [];
|
|
46
|
+
for (const entry of tracked.value) {
|
|
47
|
+
try {
|
|
48
|
+
const meta = await client.getDoc(entry.id);
|
|
49
|
+
next.push(meta);
|
|
50
|
+
stillValid.push(entry);
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
items.value = next;
|
|
55
|
+
if (stillValid.length !== tracked.value.length) {
|
|
56
|
+
tracked.value = stillValid;
|
|
57
|
+
saveTracked(stillValid);
|
|
58
|
+
}
|
|
59
|
+
} catch (e) {
|
|
60
|
+
error.value = e instanceof Error ? e.message : "Failed to load trash";
|
|
61
|
+
} finally {
|
|
62
|
+
isLoading.value = false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function trackDeletion(id, meta) {
|
|
66
|
+
if (!_hydrated) {
|
|
67
|
+
tracked.value = loadTracked();
|
|
68
|
+
_hydrated = true;
|
|
69
|
+
}
|
|
70
|
+
const without = tracked.value.filter((e) => e.id !== id);
|
|
71
|
+
const entry = {
|
|
72
|
+
id,
|
|
73
|
+
label: meta?.label ?? "Untitled",
|
|
74
|
+
parent_id: meta?.parent_id ?? null,
|
|
75
|
+
kind: meta?.kind ?? null,
|
|
76
|
+
deletedAt: Date.now()
|
|
77
|
+
};
|
|
78
|
+
tracked.value = [entry, ...without];
|
|
79
|
+
saveTracked(tracked.value);
|
|
80
|
+
}
|
|
81
|
+
function forget(id) {
|
|
82
|
+
tracked.value = tracked.value.filter((e) => e.id !== id);
|
|
83
|
+
items.value = items.value.filter((m) => m.id !== id);
|
|
84
|
+
saveTracked(tracked.value);
|
|
85
|
+
}
|
|
86
|
+
async function restore(id) {
|
|
87
|
+
const abra = useAbracadabra();
|
|
88
|
+
const client = abra.client.value;
|
|
89
|
+
if (!client) throw new Error("Not connected");
|
|
90
|
+
await client.restoreDoc(id);
|
|
91
|
+
forget(id);
|
|
92
|
+
}
|
|
93
|
+
async function purgeExpired() {
|
|
94
|
+
const cutoff = Date.now() - RETENTION_MS;
|
|
95
|
+
const next = tracked.value.filter((e) => e.deletedAt > cutoff);
|
|
96
|
+
if (next.length === tracked.value.length) return;
|
|
97
|
+
tracked.value = next;
|
|
98
|
+
saveTracked(next);
|
|
99
|
+
await refresh();
|
|
100
|
+
}
|
|
101
|
+
export function useServerTrash() {
|
|
102
|
+
if (!_hydrated && typeof window !== "undefined") {
|
|
103
|
+
tracked.value = loadTracked();
|
|
104
|
+
_hydrated = true;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
/** Doc metadata for tracked soft-deleted docs (refreshed via `refresh()`). */
|
|
108
|
+
items,
|
|
109
|
+
/** Local tracking entries (id + cached label, deletedAt). */
|
|
110
|
+
tracked,
|
|
111
|
+
/** Convenience count. */
|
|
112
|
+
count: computed(() => items.value.length),
|
|
113
|
+
/** Whether `refresh()` is in flight. */
|
|
114
|
+
isLoading,
|
|
115
|
+
/** Last error message, or null. */
|
|
116
|
+
error,
|
|
117
|
+
/** Re-fetch metadata for every tracked id. Drops entries that 404. */
|
|
118
|
+
refresh,
|
|
119
|
+
/** Record a doc the local user just soft-deleted. */
|
|
120
|
+
trackDeletion,
|
|
121
|
+
/** Forget a tracked entry without restoring (e.g. after permanent delete). */
|
|
122
|
+
forget,
|
|
123
|
+
/** Restore a soft-deleted doc and forget the tracking entry. */
|
|
124
|
+
restore,
|
|
125
|
+
/** Drop tracked entries older than the retention window (30 days). */
|
|
126
|
+
purgeExpired
|
|
127
|
+
};
|
|
128
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
import type { CellAddress, SelectionRange } from './useSheetsSelection.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manages clipboard operations (copy, cut, paste) for the sheets renderer.
|
|
5
|
+
* Integrates with the system clipboard using TSV format (compatible with Excel/Google Sheets).
|
|
6
|
+
*/
|
|
7
|
+
export declare function useSheetsClipboard(opts: {
|
|
8
|
+
activeCell: Ref<CellAddress | null>;
|
|
9
|
+
normalizedRange: ComputedRef<SelectionRange | null>;
|
|
10
|
+
getCellValue: (colIdx: number, rowIdx: number) => string;
|
|
11
|
+
commitCellValue: (colIdx: number, rowIdx: number, value: string) => void;
|
|
12
|
+
/** Write a cell without triggering formula recalc (for batch ops). Falls back to commitCellValue. */
|
|
13
|
+
writeCellValue?: (colIdx: number, rowIdx: number, value: string) => void;
|
|
14
|
+
clearCell: (colIdx: number, rowIdx: number) => void;
|
|
15
|
+
/** Clear a cell without triggering formula recalc (for batch ops). Falls back to clearCell. */
|
|
16
|
+
clearCellValue?: (colIdx: number, rowIdx: number) => void;
|
|
17
|
+
transact: (fn: () => void) => void;
|
|
18
|
+
/** Recalculate all formulas (called once after batch operations). */
|
|
19
|
+
recalcFormulas?: () => void;
|
|
20
|
+
/** Called after a mutating clipboard action (paste, cut-paste) settles.
|
|
21
|
+
* Use this to close the undo captureTimeout so the action becomes one undo step. */
|
|
22
|
+
onCommit?: () => void;
|
|
23
|
+
}): {
|
|
24
|
+
cutRange: Ref<{
|
|
25
|
+
startCol: number;
|
|
26
|
+
startRow: number;
|
|
27
|
+
endCol: number;
|
|
28
|
+
endRow: number;
|
|
29
|
+
} | null, SelectionRange | {
|
|
30
|
+
startCol: number;
|
|
31
|
+
startRow: number;
|
|
32
|
+
endCol: number;
|
|
33
|
+
endRow: number;
|
|
34
|
+
} | null>;
|
|
35
|
+
copy: () => Promise<void>;
|
|
36
|
+
cut: () => Promise<void>;
|
|
37
|
+
paste: () => Promise<void>;
|
|
38
|
+
pasteText: (text: string) => void;
|
|
39
|
+
onPaste: (e: ClipboardEvent) => void;
|
|
40
|
+
onCopy: (e: ClipboardEvent) => void;
|
|
41
|
+
onCut: (e: ClipboardEvent) => void;
|
|
42
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
export function useSheetsClipboard(opts) {
|
|
3
|
+
const cutRange = ref(null);
|
|
4
|
+
function getEffectiveRange() {
|
|
5
|
+
const r = opts.normalizedRange.value;
|
|
6
|
+
if (r) return r;
|
|
7
|
+
const a = opts.activeCell.value;
|
|
8
|
+
if (!a) return null;
|
|
9
|
+
return { startCol: a.colIdx, startRow: a.rowIdx, endCol: a.colIdx, endRow: a.rowIdx };
|
|
10
|
+
}
|
|
11
|
+
function buildTSV(range) {
|
|
12
|
+
const rows = [];
|
|
13
|
+
for (let r = range.startRow; r <= range.endRow; r++) {
|
|
14
|
+
const cells = [];
|
|
15
|
+
for (let c = range.startCol; c <= range.endCol; c++) {
|
|
16
|
+
cells.push(opts.getCellValue(c, r));
|
|
17
|
+
}
|
|
18
|
+
rows.push(cells.join(" "));
|
|
19
|
+
}
|
|
20
|
+
return rows.join("\n");
|
|
21
|
+
}
|
|
22
|
+
async function copy() {
|
|
23
|
+
const range = getEffectiveRange();
|
|
24
|
+
if (!range) return;
|
|
25
|
+
const tsv = buildTSV(range);
|
|
26
|
+
cutRange.value = null;
|
|
27
|
+
try {
|
|
28
|
+
await navigator.clipboard.writeText(tsv);
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function cut() {
|
|
33
|
+
const range = getEffectiveRange();
|
|
34
|
+
if (!range) return;
|
|
35
|
+
const tsv = buildTSV(range);
|
|
36
|
+
cutRange.value = { ...range };
|
|
37
|
+
try {
|
|
38
|
+
await navigator.clipboard.writeText(tsv);
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function pasteText(text) {
|
|
43
|
+
const anchor = opts.activeCell.value;
|
|
44
|
+
if (!anchor) return;
|
|
45
|
+
const rows = text.split("\n").filter((line) => line.length > 0);
|
|
46
|
+
const parsed = rows.map((row) => row.split(" "));
|
|
47
|
+
const write = opts.writeCellValue ?? opts.commitCellValue;
|
|
48
|
+
const clear = opts.clearCellValue ?? opts.clearCell;
|
|
49
|
+
opts.transact(() => {
|
|
50
|
+
if (cutRange.value) {
|
|
51
|
+
const cr = cutRange.value;
|
|
52
|
+
for (let c = cr.startCol; c <= cr.endCol; c++) {
|
|
53
|
+
for (let r = cr.startRow; r <= cr.endRow; r++) {
|
|
54
|
+
clear(c, r);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
cutRange.value = null;
|
|
58
|
+
}
|
|
59
|
+
for (let r = 0; r < parsed.length; r++) {
|
|
60
|
+
const row = parsed[r];
|
|
61
|
+
for (let c = 0; c < row.length; c++) {
|
|
62
|
+
const value = row[c];
|
|
63
|
+
write(anchor.colIdx + c, anchor.rowIdx + r, value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
opts.recalcFormulas?.();
|
|
67
|
+
});
|
|
68
|
+
opts.onCommit?.();
|
|
69
|
+
}
|
|
70
|
+
async function paste() {
|
|
71
|
+
try {
|
|
72
|
+
const text = await navigator.clipboard.readText();
|
|
73
|
+
if (text) pasteText(text);
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function onPaste(e) {
|
|
78
|
+
if (!opts.activeCell.value) return;
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
const text = e.clipboardData?.getData("text/plain");
|
|
81
|
+
if (text) pasteText(text);
|
|
82
|
+
}
|
|
83
|
+
function onCopy(e) {
|
|
84
|
+
const range = getEffectiveRange();
|
|
85
|
+
if (!range) return;
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
const tsv = buildTSV(range);
|
|
88
|
+
e.clipboardData?.setData("text/plain", tsv);
|
|
89
|
+
cutRange.value = null;
|
|
90
|
+
}
|
|
91
|
+
function onCut(e) {
|
|
92
|
+
const range = getEffectiveRange();
|
|
93
|
+
if (!range) return;
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
const tsv = buildTSV(range);
|
|
96
|
+
e.clipboardData?.setData("text/plain", tsv);
|
|
97
|
+
cutRange.value = { ...range };
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
cutRange,
|
|
101
|
+
copy,
|
|
102
|
+
cut,
|
|
103
|
+
paste,
|
|
104
|
+
pasteText,
|
|
105
|
+
onPaste,
|
|
106
|
+
onCopy,
|
|
107
|
+
onCut
|
|
108
|
+
};
|
|
109
|
+
}
|