@abraca/nuxt 1.8.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/dist/module.d.mts +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +50 -4
- package/dist/runtime/components/ADocumentTree.vue +1 -1
- package/dist/runtime/components/AEditor.d.vue.ts +26 -1
- package/dist/runtime/components/AEditor.vue +153 -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/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/ADocsNavigation.d.vue.ts +155 -0
- package/dist/runtime/components/docs/ADocsNavigation.vue +154 -0
- package/dist/runtime/components/docs/ADocsNavigation.vue.d.ts +155 -0
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +249 -0
- package/dist/runtime/components/docs/ADocsSearch.vue +187 -0
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +249 -0
- package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +253 -0
- package/dist/runtime/components/docs/ADocsSearchButton.vue +99 -0
- package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +253 -0
- package/dist/runtime/components/docs/ADocsSurround.d.vue.ts +56 -0
- package/dist/runtime/components/docs/ADocsSurround.vue +68 -0
- package/dist/runtime/components/docs/ADocsSurround.vue.d.ts +56 -0
- package/dist/runtime/components/docs/ADocsToc.d.vue.ts +117 -0
- package/dist/runtime/components/docs/ADocsToc.vue +194 -0
- package/dist/runtime/components/docs/ADocsToc.vue.d.ts +117 -0
- package/dist/runtime/components/editor/ADocLinkPopover.vue +1 -5
- 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/AMediaRenderer.vue +1 -1
- 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/ACalendarToolbar.d.vue.ts +4 -4
- package/dist/runtime/components/renderers/calendar/ACalendarToolbar.vue.d.ts +4 -4
- 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/media/MediaTransportBar.d.vue.ts +2 -2
- package/dist/runtime/components/renderers/media/MediaTransportBar.vue.d.ts +2 -2
- 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 +34 -4
- package/dist/runtime/components/shell/ADocPanelSettings.vue +289 -2
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +34 -4
- 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/useDocsSearch.d.ts +24 -0
- package/dist/runtime/composables/useDocsSearch.js +34 -0
- package/dist/runtime/composables/useEditorDragHandle.d.ts +7 -0
- package/dist/runtime/composables/useEditorDragHandle.js +19 -1
- package/dist/runtime/composables/useEditorSuggestions.js +26 -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/doc-embed.js +2 -1
- package/dist/runtime/extensions/doc-link-drop.js +4 -4
- package/dist/runtime/extensions/doc-link.d.ts +12 -0
- package/dist/runtime/extensions/doc-link.js +60 -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/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/DocEmbedView.vue +18 -3
- package/dist/runtime/extensions/views/DocLinkView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DocLinkView.vue +71 -0
- package/dist/runtime/extensions/views/DocLinkView.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/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 +251 -38
- package/dist/runtime/plugin-abracadabra.server.js +0 -1
- package/dist/runtime/plugins/core.plugin.js +76 -4
- package/dist/runtime/server/plugins/abracadabra-service.js +4 -2
- 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/theme/content/_shared.d.ts +6 -0
- package/dist/runtime/theme/content/_shared.js +6 -0
- package/dist/runtime/theme/content/content-navigation.d.ts +120 -0
- package/dist/runtime/theme/content/content-navigation.js +155 -0
- package/dist/runtime/theme/content/content-search-button.d.ts +16 -0
- package/dist/runtime/theme/content/content-search-button.js +15 -0
- package/dist/runtime/theme/content/content-search.d.ts +24 -0
- package/dist/runtime/theme/content/content-search.js +23 -0
- package/dist/runtime/theme/content/content-surround.d.ts +22 -0
- package/dist/runtime/theme/content/content-surround.js +23 -0
- package/dist/runtime/theme/content/content-toc.d.ts +84 -0
- package/dist/runtime/theme/content/content-toc.js +94 -0
- package/dist/runtime/theme/content/index.d.ts +5 -0
- package/dist/runtime/theme/content/index.js +5 -0
- 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 +19 -0
- package/dist/runtime/utils/content.js +23 -0
- package/dist/runtime/utils/docReferenceEdges.js +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/time.d.ts +15 -0
- package/dist/runtime/utils/time.js +5 -0
- package/dist/types.d.mts +4 -0
- package/package.json +38 -20
|
@@ -6,12 +6,11 @@ const error = ref(null);
|
|
|
6
6
|
export function useSpaces() {
|
|
7
7
|
const abra = useAbracadabra();
|
|
8
8
|
const spaces = computed(() => abra.currentServerSpaces.value ?? []);
|
|
9
|
-
const spacesEnabled = computed(() => abra.currentServerSpacesEnabled.value ?? false);
|
|
10
9
|
const currentSpace = computed(() => {
|
|
11
10
|
const route = useRoute();
|
|
12
11
|
const docId = route.params.docId;
|
|
13
12
|
if (!docId) return spaces.value[0] ?? null;
|
|
14
|
-
return spaces.value.find((s) => s.
|
|
13
|
+
return spaces.value.find((s) => s.id === docId) ?? null;
|
|
15
14
|
});
|
|
16
15
|
async function refresh() {
|
|
17
16
|
loading.value = true;
|
|
@@ -36,7 +35,7 @@ export function useSpaces() {
|
|
|
36
35
|
async function update(id, opts) {
|
|
37
36
|
error.value = null;
|
|
38
37
|
try {
|
|
39
|
-
|
|
38
|
+
await abra.updateSpace(id, opts);
|
|
40
39
|
} catch (e) {
|
|
41
40
|
error.value = e.message ?? "Failed to update space";
|
|
42
41
|
throw e;
|
|
@@ -63,8 +62,6 @@ export function useSpaces() {
|
|
|
63
62
|
return {
|
|
64
63
|
/** All spaces on the current server. */
|
|
65
64
|
spaces,
|
|
66
|
-
/** Whether the current server supports spaces. */
|
|
67
|
-
spacesEnabled,
|
|
68
65
|
/** The currently active space. */
|
|
69
66
|
currentSpace,
|
|
70
67
|
/** Whether space operations are in progress. */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useTiptapHistory
|
|
3
|
+
*
|
|
4
|
+
* Reactive `{ canUndo, canRedo, undo, redo }` for a TipTap editor instance.
|
|
5
|
+
* Editor-only — no dependency on `useTreeUndoManager`. If you need coordinated
|
|
6
|
+
* tree+editor undo, use `useUndoRedo` instead.
|
|
7
|
+
*
|
|
8
|
+
* Accepts a Ref<Editor | null> so the editor can change (e.g. doc navigation)
|
|
9
|
+
* without re-creating the consumer.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* const history = useTiptapHistory(editorRef)
|
|
13
|
+
* <UButton :disabled="!history.canUndo.value" @click="history.undo" />
|
|
14
|
+
*/
|
|
15
|
+
import { type MaybeRef } from 'vue';
|
|
16
|
+
import type { Editor } from '@tiptap/vue-3';
|
|
17
|
+
export declare function useTiptapHistory(editor: MaybeRef<Editor | null | undefined>): {
|
|
18
|
+
canUndo: import("vue").ComputedRef<boolean>;
|
|
19
|
+
canRedo: import("vue").ComputedRef<boolean>;
|
|
20
|
+
undo: () => void;
|
|
21
|
+
redo: () => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { computed, unref } from "vue";
|
|
2
|
+
export function useTiptapHistory(editor) {
|
|
3
|
+
const canUndo = computed(() => !!unref(editor)?.can?.().undo?.());
|
|
4
|
+
const canRedo = computed(() => !!unref(editor)?.can?.().redo?.());
|
|
5
|
+
function undo() {
|
|
6
|
+
unref(editor)?.commands?.undo?.();
|
|
7
|
+
}
|
|
8
|
+
function redo() {
|
|
9
|
+
unref(editor)?.commands?.redo?.();
|
|
10
|
+
}
|
|
11
|
+
return { canUndo, canRedo, undo, redo };
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { TreeEntry } from './useChildTree.js';
|
|
3
|
+
export interface FlatTreeItem {
|
|
4
|
+
id: string;
|
|
5
|
+
entry: TreeEntry;
|
|
6
|
+
depth: number;
|
|
7
|
+
hasChildren: boolean;
|
|
8
|
+
expanded: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseTreeExpansionOptions {
|
|
11
|
+
storageKey: string;
|
|
12
|
+
childrenOf: (parentId: string | null) => TreeEntry[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Tree expand/collapse state with localStorage persistence and a flat
|
|
16
|
+
* iterator that lazy-walks only into expanded nodes.
|
|
17
|
+
*
|
|
18
|
+
* Ported 1:1 from cou-sh/app/composables/useTreeExpansion.ts.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useTreeExpansion(opts: UseTreeExpansionOptions): {
|
|
21
|
+
expandedIds: import("vue").ShallowRef<Set<string>, Set<string>>;
|
|
22
|
+
toggle: (id: string) => void;
|
|
23
|
+
expand: (id: string) => void;
|
|
24
|
+
collapse: (id: string) => void;
|
|
25
|
+
expandMany: (ids: Iterable<string>) => void;
|
|
26
|
+
collapseAll: () => void;
|
|
27
|
+
flatItems: ComputedRef<FlatTreeItem[]>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { computed, shallowRef, triggerRef, watch } from "vue";
|
|
2
|
+
export function useTreeExpansion(opts) {
|
|
3
|
+
function load() {
|
|
4
|
+
if (!import.meta.client) return /* @__PURE__ */ new Set();
|
|
5
|
+
try {
|
|
6
|
+
const raw = localStorage.getItem(opts.storageKey);
|
|
7
|
+
if (raw) return new Set(JSON.parse(raw));
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ new Set();
|
|
11
|
+
}
|
|
12
|
+
const expandedIds = shallowRef(load());
|
|
13
|
+
let saveTimer = null;
|
|
14
|
+
watch(expandedIds, (ids) => {
|
|
15
|
+
if (!import.meta.client) return;
|
|
16
|
+
if (saveTimer) clearTimeout(saveTimer);
|
|
17
|
+
saveTimer = setTimeout(() => {
|
|
18
|
+
try {
|
|
19
|
+
localStorage.setItem(opts.storageKey, JSON.stringify([...ids]));
|
|
20
|
+
} catch {
|
|
21
|
+
}
|
|
22
|
+
}, 300);
|
|
23
|
+
});
|
|
24
|
+
function toggle(id) {
|
|
25
|
+
if (expandedIds.value.has(id)) expandedIds.value.delete(id);
|
|
26
|
+
else expandedIds.value.add(id);
|
|
27
|
+
triggerRef(expandedIds);
|
|
28
|
+
}
|
|
29
|
+
function expand(id) {
|
|
30
|
+
if (expandedIds.value.has(id)) return;
|
|
31
|
+
expandedIds.value.add(id);
|
|
32
|
+
triggerRef(expandedIds);
|
|
33
|
+
}
|
|
34
|
+
function collapse(id) {
|
|
35
|
+
if (!expandedIds.value.has(id)) return;
|
|
36
|
+
expandedIds.value.delete(id);
|
|
37
|
+
triggerRef(expandedIds);
|
|
38
|
+
}
|
|
39
|
+
function expandMany(ids) {
|
|
40
|
+
let changed = false;
|
|
41
|
+
for (const id of ids) {
|
|
42
|
+
if (!expandedIds.value.has(id)) {
|
|
43
|
+
expandedIds.value.add(id);
|
|
44
|
+
changed = true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (changed) triggerRef(expandedIds);
|
|
48
|
+
}
|
|
49
|
+
function collapseAll() {
|
|
50
|
+
if (!expandedIds.value.size) return;
|
|
51
|
+
expandedIds.value = /* @__PURE__ */ new Set();
|
|
52
|
+
}
|
|
53
|
+
const flatItems = computed(() => {
|
|
54
|
+
const out = [];
|
|
55
|
+
const roots = opts.childrenOf(null);
|
|
56
|
+
const stack = [
|
|
57
|
+
{ items: roots, idx: 0, depth: 0 }
|
|
58
|
+
];
|
|
59
|
+
const seen = /* @__PURE__ */ new Set();
|
|
60
|
+
while (stack.length) {
|
|
61
|
+
const frame = stack[stack.length - 1];
|
|
62
|
+
if (frame.idx >= frame.items.length) {
|
|
63
|
+
stack.pop();
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const node = frame.items[frame.idx++];
|
|
67
|
+
if (seen.has(node.id)) continue;
|
|
68
|
+
seen.add(node.id);
|
|
69
|
+
const children = opts.childrenOf(node.id);
|
|
70
|
+
const hasChildren = children.length > 0;
|
|
71
|
+
const expanded = expandedIds.value.has(node.id);
|
|
72
|
+
out.push({
|
|
73
|
+
id: node.id,
|
|
74
|
+
entry: node,
|
|
75
|
+
depth: frame.depth,
|
|
76
|
+
hasChildren,
|
|
77
|
+
expanded
|
|
78
|
+
});
|
|
79
|
+
if (hasChildren && expanded) {
|
|
80
|
+
stack.push({ items: children, idx: 0, depth: frame.depth + 1 });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return out;
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
expandedIds,
|
|
87
|
+
toggle,
|
|
88
|
+
expand,
|
|
89
|
+
collapse,
|
|
90
|
+
expandMany,
|
|
91
|
+
collapseAll,
|
|
92
|
+
flatItems
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -156,6 +156,7 @@ export function useAwarenessOf(provider) {
|
|
|
156
156
|
const update = () => {
|
|
157
157
|
if (_rafId === null) _rafId = requestAnimationFrame(flush);
|
|
158
158
|
};
|
|
159
|
+
let _attachedAwareness = null;
|
|
159
160
|
watch(provider, (p, oldP) => {
|
|
160
161
|
if (oldP?.awareness) oldP.awareness.off("change", update);
|
|
161
162
|
if (_rafId !== null) {
|
|
@@ -164,11 +165,21 @@ export function useAwarenessOf(provider) {
|
|
|
164
165
|
}
|
|
165
166
|
if (p?.awareness) {
|
|
166
167
|
p.awareness.on("change", update);
|
|
168
|
+
_attachedAwareness = p.awareness;
|
|
167
169
|
flush();
|
|
170
|
+
} else {
|
|
171
|
+
_attachedAwareness = null;
|
|
168
172
|
}
|
|
169
173
|
}, { immediate: true });
|
|
170
174
|
onBeforeUnmount(() => {
|
|
171
|
-
if (
|
|
175
|
+
if (_attachedAwareness) {
|
|
176
|
+
_attachedAwareness.off("change", update);
|
|
177
|
+
_attachedAwareness = null;
|
|
178
|
+
}
|
|
179
|
+
if (_rafId !== null) {
|
|
180
|
+
cancelAnimationFrame(_rafId);
|
|
181
|
+
_rafId = null;
|
|
182
|
+
}
|
|
172
183
|
});
|
|
173
184
|
const setLocalState = (state) => {
|
|
174
185
|
if (!provider.value) return;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import ButtonView from "./views/ButtonView.vue";
|
|
4
|
+
import ButtonGroupView from "./views/ButtonGroupView.vue";
|
|
5
|
+
export const Button = Node.create({
|
|
6
|
+
name: "button",
|
|
7
|
+
group: "block",
|
|
8
|
+
atom: true,
|
|
9
|
+
selectable: true,
|
|
10
|
+
draggable: true,
|
|
11
|
+
addAttributes() {
|
|
12
|
+
return {
|
|
13
|
+
label: { default: "Button" },
|
|
14
|
+
to: { default: "" },
|
|
15
|
+
variant: { default: "solid" },
|
|
16
|
+
color: { default: "primary" },
|
|
17
|
+
icon: { default: "" }
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
parseHTML() {
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
tag: "div[data-component-button]",
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
getAttrs: (el) => ({
|
|
26
|
+
label: el.getAttribute("data-label") || "Button",
|
|
27
|
+
to: el.getAttribute("data-to") || "",
|
|
28
|
+
variant: el.getAttribute("data-variant") || "solid",
|
|
29
|
+
color: el.getAttribute("data-color") || "primary",
|
|
30
|
+
icon: el.getAttribute("data-icon") || ""
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
},
|
|
35
|
+
renderHTML({ HTMLAttributes }) {
|
|
36
|
+
return ["div", mergeAttributes({
|
|
37
|
+
"data-component-button": "",
|
|
38
|
+
"data-label": HTMLAttributes.label,
|
|
39
|
+
"data-to": HTMLAttributes.to,
|
|
40
|
+
"data-variant": HTMLAttributes.variant,
|
|
41
|
+
"data-color": HTMLAttributes.color,
|
|
42
|
+
"data-icon": HTMLAttributes.icon
|
|
43
|
+
})];
|
|
44
|
+
},
|
|
45
|
+
addNodeView() {
|
|
46
|
+
return VueNodeViewRenderer(ButtonView);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export const ButtonGroup = Node.create({
|
|
50
|
+
name: "buttonGroup",
|
|
51
|
+
group: "block",
|
|
52
|
+
content: "button+",
|
|
53
|
+
parseHTML() {
|
|
54
|
+
return [{ tag: "div[data-button-group]" }];
|
|
55
|
+
},
|
|
56
|
+
renderHTML() {
|
|
57
|
+
return ["div", { "data-button-group": "" }, 0];
|
|
58
|
+
},
|
|
59
|
+
addNodeView() {
|
|
60
|
+
return VueNodeViewRenderer(ButtonGroupView);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import ColorSwatchView from "./views/ColorSwatchView.vue";
|
|
4
|
+
export const ColorSwatch = Node.create({
|
|
5
|
+
name: "colorSwatch",
|
|
6
|
+
group: "inline",
|
|
7
|
+
inline: true,
|
|
8
|
+
atom: true,
|
|
9
|
+
addAttributes() {
|
|
10
|
+
return {
|
|
11
|
+
color: { default: "#6366f1" }
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
parseHTML() {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
tag: "span[data-color-swatch]",
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
getAttrs: (el) => ({
|
|
20
|
+
color: el.getAttribute("data-color") || "#6366f1"
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
},
|
|
25
|
+
renderHTML({ HTMLAttributes }) {
|
|
26
|
+
return ["span", mergeAttributes({
|
|
27
|
+
"data-color-swatch": "",
|
|
28
|
+
"data-color": HTMLAttributes.color
|
|
29
|
+
})];
|
|
30
|
+
},
|
|
31
|
+
addNodeView() {
|
|
32
|
+
return VueNodeViewRenderer(ColorSwatchView);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import DiffView from "./views/DiffView.vue";
|
|
4
|
+
export const Diff = Node.create({
|
|
5
|
+
name: "diff",
|
|
6
|
+
group: "block",
|
|
7
|
+
atom: true,
|
|
8
|
+
draggable: true,
|
|
9
|
+
addAttributes() {
|
|
10
|
+
return {
|
|
11
|
+
before: { default: "" },
|
|
12
|
+
after: { default: "" },
|
|
13
|
+
language: { default: "text" }
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
parseHTML() {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
tag: "div[data-diff]",
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
getAttrs: (el) => ({
|
|
22
|
+
before: el.getAttribute("data-before") || "",
|
|
23
|
+
after: el.getAttribute("data-after") || "",
|
|
24
|
+
language: el.getAttribute("data-language") || "text"
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
},
|
|
29
|
+
renderHTML({ HTMLAttributes }) {
|
|
30
|
+
return ["div", mergeAttributes({
|
|
31
|
+
"data-diff": "",
|
|
32
|
+
"data-before": HTMLAttributes.before,
|
|
33
|
+
"data-after": HTMLAttributes.after,
|
|
34
|
+
"data-language": HTMLAttributes.language
|
|
35
|
+
})];
|
|
36
|
+
},
|
|
37
|
+
addNodeView() {
|
|
38
|
+
return VueNodeViewRenderer(DiffView);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import DividerView from "./views/DividerView.vue";
|
|
4
|
+
export const Divider = Node.create({
|
|
5
|
+
name: "divider",
|
|
6
|
+
group: "block",
|
|
7
|
+
atom: true,
|
|
8
|
+
addAttributes() {
|
|
9
|
+
return {
|
|
10
|
+
label: { default: "" }
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
parseHTML() {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
tag: "div[data-divider]",
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
getAttrs: (el) => ({
|
|
19
|
+
label: el.getAttribute("data-label") || ""
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
},
|
|
24
|
+
renderHTML({ HTMLAttributes }) {
|
|
25
|
+
return ["div", mergeAttributes({
|
|
26
|
+
"data-divider": "",
|
|
27
|
+
"data-label": HTMLAttributes.label
|
|
28
|
+
})];
|
|
29
|
+
},
|
|
30
|
+
addNodeView() {
|
|
31
|
+
return VueNodeViewRenderer(DividerView);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -39,10 +39,10 @@ export const DocLinkDrop = Extension.create({
|
|
|
39
39
|
if (dropPos == null) return true;
|
|
40
40
|
const { schema, tr } = view.state;
|
|
41
41
|
if (de.altKey) {
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
const
|
|
45
|
-
tr.insert(dropPos,
|
|
42
|
+
const linkType = schema.nodes.docLink;
|
|
43
|
+
if (!linkType) return true;
|
|
44
|
+
const node = linkType.create({ docId: data.id });
|
|
45
|
+
tr.insert(dropPos, node);
|
|
46
46
|
} else {
|
|
47
47
|
const nodeType = schema.nodes.docEmbed;
|
|
48
48
|
if (!nodeType) return true;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
declare module '@tiptap/core' {
|
|
3
|
+
interface Commands<ReturnType> {
|
|
4
|
+
docLink: {
|
|
5
|
+
insertDocLink: (attrs: {
|
|
6
|
+
docId: string;
|
|
7
|
+
}) => ReturnType;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare const DocLink: Node<any, any>;
|
|
12
|
+
export default DocLink;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Node, mergeAttributes, nodePasteRule, nodeInputRule } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import DocLinkView from "./views/DocLinkView.vue";
|
|
4
|
+
const INLINE_REGEX = /(?<!!)\[\[([a-f0-9-]{36})(?:\|[^\]]+)?\]\]/gi;
|
|
5
|
+
export const DocLink = Node.create({
|
|
6
|
+
name: "docLink",
|
|
7
|
+
group: "inline",
|
|
8
|
+
inline: true,
|
|
9
|
+
atom: true,
|
|
10
|
+
selectable: true,
|
|
11
|
+
draggable: true,
|
|
12
|
+
addAttributes() {
|
|
13
|
+
return {
|
|
14
|
+
docId: { default: null }
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
parseHTML() {
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
tag: "span[data-doc-link]",
|
|
21
|
+
getAttrs: (el) => ({ docId: el.getAttribute("data-doc-id") })
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
},
|
|
25
|
+
renderHTML({ HTMLAttributes }) {
|
|
26
|
+
return ["span", mergeAttributes({
|
|
27
|
+
"data-doc-link": "",
|
|
28
|
+
"data-doc-id": HTMLAttributes.docId
|
|
29
|
+
})];
|
|
30
|
+
},
|
|
31
|
+
addNodeView() {
|
|
32
|
+
return VueNodeViewRenderer(DocLinkView);
|
|
33
|
+
},
|
|
34
|
+
addCommands() {
|
|
35
|
+
return {
|
|
36
|
+
insertDocLink: (attrs) => ({ commands }) => {
|
|
37
|
+
return commands.insertContent({ type: this.name, attrs });
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
addInputRules() {
|
|
42
|
+
return [
|
|
43
|
+
nodeInputRule({
|
|
44
|
+
find: INLINE_REGEX,
|
|
45
|
+
type: this.type,
|
|
46
|
+
getAttributes: (match) => ({ docId: match[1] })
|
|
47
|
+
})
|
|
48
|
+
];
|
|
49
|
+
},
|
|
50
|
+
addPasteRules() {
|
|
51
|
+
return [
|
|
52
|
+
nodePasteRule({
|
|
53
|
+
find: INLINE_REGEX,
|
|
54
|
+
type: this.type,
|
|
55
|
+
getAttributes: (match) => ({ docId: match[1] })
|
|
56
|
+
})
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export default DocLink;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import EmbedView from "./views/EmbedView.vue";
|
|
4
|
+
export const Embed = Node.create({
|
|
5
|
+
name: "embed",
|
|
6
|
+
group: "block",
|
|
7
|
+
atom: true,
|
|
8
|
+
draggable: true,
|
|
9
|
+
addAttributes() {
|
|
10
|
+
return {
|
|
11
|
+
src: { default: "" },
|
|
12
|
+
title: { default: "" },
|
|
13
|
+
aspectRatio: { default: "16/9" }
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
parseHTML() {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
tag: "div[data-embed]",
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
getAttrs: (el) => ({
|
|
22
|
+
src: el.getAttribute("data-src") || "",
|
|
23
|
+
title: el.getAttribute("data-title") || "",
|
|
24
|
+
aspectRatio: el.getAttribute("data-aspect") || "16/9"
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
},
|
|
29
|
+
renderHTML({ HTMLAttributes }) {
|
|
30
|
+
return ["div", mergeAttributes({
|
|
31
|
+
"data-embed": "",
|
|
32
|
+
"data-src": HTMLAttributes.src,
|
|
33
|
+
"data-title": HTMLAttributes.title,
|
|
34
|
+
"data-aspect": HTMLAttributes.aspectRatio
|
|
35
|
+
})];
|
|
36
|
+
},
|
|
37
|
+
addNodeView() {
|
|
38
|
+
return VueNodeViewRenderer(EmbedView);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import FigureView from "./views/FigureView.vue";
|
|
4
|
+
export const Figure = Node.create({
|
|
5
|
+
name: "figure",
|
|
6
|
+
group: "block",
|
|
7
|
+
atom: true,
|
|
8
|
+
draggable: true,
|
|
9
|
+
selectable: true,
|
|
10
|
+
addAttributes() {
|
|
11
|
+
return {
|
|
12
|
+
src: { default: "" },
|
|
13
|
+
alt: { default: "" },
|
|
14
|
+
caption: { default: "" }
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
parseHTML() {
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
tag: "figure[data-figure]",
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
getAttrs: (el) => ({
|
|
23
|
+
src: el.getAttribute("data-src") || el.querySelector("img")?.getAttribute("src") || "",
|
|
24
|
+
alt: el.getAttribute("data-alt") || el.querySelector("img")?.getAttribute("alt") || "",
|
|
25
|
+
caption: el.getAttribute("data-caption") || el.querySelector("figcaption")?.textContent || ""
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
},
|
|
30
|
+
renderHTML({ HTMLAttributes }) {
|
|
31
|
+
const attrs = mergeAttributes({
|
|
32
|
+
"data-figure": "",
|
|
33
|
+
"data-src": HTMLAttributes.src,
|
|
34
|
+
"data-alt": HTMLAttributes.alt,
|
|
35
|
+
"data-caption": HTMLAttributes.caption
|
|
36
|
+
});
|
|
37
|
+
const children = [];
|
|
38
|
+
if (HTMLAttributes.src) {
|
|
39
|
+
children.push(["img", { src: HTMLAttributes.src, alt: HTMLAttributes.alt || "" }]);
|
|
40
|
+
}
|
|
41
|
+
if (HTMLAttributes.caption) {
|
|
42
|
+
children.push(["figcaption", {}, HTMLAttributes.caption]);
|
|
43
|
+
}
|
|
44
|
+
return ["figure", attrs, ...children];
|
|
45
|
+
},
|
|
46
|
+
addNodeView() {
|
|
47
|
+
return VueNodeViewRenderer(FigureView);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
/**
|
|
3
|
+
* Math extensions — block and inline LaTeX rendering.
|
|
4
|
+
*
|
|
5
|
+
* The extensions themselves have NO runtime dependency on KaTeX. The peer
|
|
6
|
+
* dependency lives only in the NodeView components, which try-import KaTeX
|
|
7
|
+
* lazily and degrade to a raw-LaTeX fallback if it's not installed.
|
|
8
|
+
*
|
|
9
|
+
* To enable rich math rendering, the consuming app installs:
|
|
10
|
+
* pnpm add katex
|
|
11
|
+
* // and somewhere in the app:
|
|
12
|
+
* import 'katex/dist/katex.min.css'
|
|
13
|
+
*/
|
|
14
|
+
export declare const MathBlock: Node<any, any>;
|
|
15
|
+
export declare const MathInline: Node<any, any>;
|