@abraca/nuxt 1.9.1 → 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/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 +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/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/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 +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 +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/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/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 +233 -36
- package/dist/runtime/plugin-abracadabra.server.js +0 -1
- package/dist/runtime/plugins/core.plugin.js +73 -4
- package/dist/runtime/server/plugins/abracadabra-service.js +1 -1
- 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/time.d.ts +15 -0
- package/dist/runtime/utils/time.js +5 -0
- package/dist/types.d.mts +4 -0
- package/package.json +27 -16
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export interface CellAddress {
|
|
3
|
+
colIdx: number;
|
|
4
|
+
rowIdx: number;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectionRange {
|
|
7
|
+
startCol: number;
|
|
8
|
+
startRow: number;
|
|
9
|
+
endCol: number;
|
|
10
|
+
endRow: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Manages spreadsheet cell selection, range selection, keyboard navigation, and edit mode.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useSheetsSelection(opts: {
|
|
16
|
+
colCount: Ref<number>;
|
|
17
|
+
rowCount: Ref<number>;
|
|
18
|
+
getCellValue: (colIdx: number, rowIdx: number) => string;
|
|
19
|
+
commitValue: (colIdx: number, rowIdx: number, value: string) => void;
|
|
20
|
+
clearCell: (colIdx: number, rowIdx: number) => void;
|
|
21
|
+
/** Clear a cell without triggering formula recalc (for batch ops). Falls back to clearCell. */
|
|
22
|
+
clearCellValue?: (colIdx: number, rowIdx: number) => void;
|
|
23
|
+
transact?: (fn: () => void) => void;
|
|
24
|
+
/** Recalculate all formulas (called once after batch operations). */
|
|
25
|
+
recalcFormulas?: () => void;
|
|
26
|
+
pageSize?: Ref<number>;
|
|
27
|
+
}): {
|
|
28
|
+
activeCell: Ref<{
|
|
29
|
+
colIdx: number;
|
|
30
|
+
rowIdx: number;
|
|
31
|
+
} | null, CellAddress | {
|
|
32
|
+
colIdx: number;
|
|
33
|
+
rowIdx: number;
|
|
34
|
+
} | null>;
|
|
35
|
+
editMode: Ref<boolean, boolean>;
|
|
36
|
+
editValue: Ref<string, string>;
|
|
37
|
+
selectionRange: Ref<{
|
|
38
|
+
startCol: number;
|
|
39
|
+
startRow: number;
|
|
40
|
+
endCol: number;
|
|
41
|
+
endRow: number;
|
|
42
|
+
} | null, SelectionRange | {
|
|
43
|
+
startCol: number;
|
|
44
|
+
startRow: number;
|
|
45
|
+
endCol: number;
|
|
46
|
+
endRow: number;
|
|
47
|
+
} | null>;
|
|
48
|
+
normalizedRange: import("vue").ComputedRef<SelectionRange | null>;
|
|
49
|
+
isDragging: Ref<boolean, boolean>;
|
|
50
|
+
isInRange: (colIdx: number, rowIdx: number) => boolean;
|
|
51
|
+
selectCell: (colIdx: number, rowIdx: number, shiftKey?: boolean) => void;
|
|
52
|
+
activateCell: (colIdx: number, rowIdx: number) => void;
|
|
53
|
+
startEdit: (preserveContent?: boolean) => void;
|
|
54
|
+
commitEdit: () => void;
|
|
55
|
+
cancelEdit: () => void;
|
|
56
|
+
moveTo: (colIdx: number, rowIdx: number) => void;
|
|
57
|
+
moveBy: (dCol: number, dRow: number) => void;
|
|
58
|
+
beginDrag: (colIdx: number, rowIdx: number) => void;
|
|
59
|
+
continueDrag: (colIdx: number, rowIdx: number) => void;
|
|
60
|
+
endDrag: () => void;
|
|
61
|
+
setRange: (startCol: number, startRow: number, endCol: number, endRow: number) => void;
|
|
62
|
+
selectRow: (rowIdx: number) => void;
|
|
63
|
+
selectColumn: (colIdx: number) => void;
|
|
64
|
+
selectAll: () => void;
|
|
65
|
+
clearRange: () => void;
|
|
66
|
+
onKeydown: (e: KeyboardEvent) => void;
|
|
67
|
+
isActive: (colIdx: number, rowIdx: number) => boolean;
|
|
68
|
+
};
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
export function useSheetsSelection(opts) {
|
|
3
|
+
const activeCell = ref(null);
|
|
4
|
+
const editMode = ref(false);
|
|
5
|
+
const editValue = ref("");
|
|
6
|
+
const selectionRange = ref(null);
|
|
7
|
+
const isDragging = ref(false);
|
|
8
|
+
const normalizedRange = computed(() => {
|
|
9
|
+
const r = selectionRange.value;
|
|
10
|
+
if (!r) return null;
|
|
11
|
+
return {
|
|
12
|
+
startCol: Math.min(r.startCol, r.endCol),
|
|
13
|
+
startRow: Math.min(r.startRow, r.endRow),
|
|
14
|
+
endCol: Math.max(r.startCol, r.endCol),
|
|
15
|
+
endRow: Math.max(r.startRow, r.endRow)
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
function isInRange(colIdx, rowIdx) {
|
|
19
|
+
const r = normalizedRange.value;
|
|
20
|
+
if (!r) return false;
|
|
21
|
+
return colIdx >= r.startCol && colIdx <= r.endCol && rowIdx >= r.startRow && rowIdx <= r.endRow;
|
|
22
|
+
}
|
|
23
|
+
function clamp(colIdx, rowIdx) {
|
|
24
|
+
return {
|
|
25
|
+
colIdx: Math.max(0, Math.min(colIdx, opts.colCount.value - 1)),
|
|
26
|
+
rowIdx: Math.max(0, Math.min(rowIdx, opts.rowCount.value - 1))
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function moveTo(colIdx, rowIdx) {
|
|
30
|
+
if (editMode.value) commitEdit();
|
|
31
|
+
selectionRange.value = null;
|
|
32
|
+
activeCell.value = clamp(colIdx, rowIdx);
|
|
33
|
+
}
|
|
34
|
+
function moveBy(dCol, dRow) {
|
|
35
|
+
if (!activeCell.value) {
|
|
36
|
+
activeCell.value = { colIdx: 0, rowIdx: 0 };
|
|
37
|
+
selectionRange.value = null;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
moveTo(activeCell.value.colIdx + dCol, activeCell.value.rowIdx + dRow);
|
|
41
|
+
}
|
|
42
|
+
function extendSelection(dCol, dRow) {
|
|
43
|
+
if (!activeCell.value) return;
|
|
44
|
+
const r = selectionRange.value ?? {
|
|
45
|
+
startCol: activeCell.value.colIdx,
|
|
46
|
+
startRow: activeCell.value.rowIdx,
|
|
47
|
+
endCol: activeCell.value.colIdx,
|
|
48
|
+
endRow: activeCell.value.rowIdx
|
|
49
|
+
};
|
|
50
|
+
const end = clamp(r.endCol + dCol, r.endRow + dRow);
|
|
51
|
+
selectionRange.value = {
|
|
52
|
+
startCol: r.startCol,
|
|
53
|
+
startRow: r.startRow,
|
|
54
|
+
endCol: end.colIdx,
|
|
55
|
+
endRow: end.rowIdx
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function startEdit(preserveContent = true) {
|
|
59
|
+
if (!activeCell.value) return;
|
|
60
|
+
editMode.value = true;
|
|
61
|
+
if (preserveContent) {
|
|
62
|
+
editValue.value = opts.getCellValue(activeCell.value.colIdx, activeCell.value.rowIdx);
|
|
63
|
+
} else {
|
|
64
|
+
editValue.value = "";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function commitEdit() {
|
|
68
|
+
if (!activeCell.value || !editMode.value) return;
|
|
69
|
+
opts.commitValue(activeCell.value.colIdx, activeCell.value.rowIdx, editValue.value);
|
|
70
|
+
editMode.value = false;
|
|
71
|
+
}
|
|
72
|
+
function cancelEdit() {
|
|
73
|
+
editMode.value = false;
|
|
74
|
+
editValue.value = "";
|
|
75
|
+
}
|
|
76
|
+
function selectCell(colIdx, rowIdx, shiftKey = false) {
|
|
77
|
+
if (editMode.value) commitEdit();
|
|
78
|
+
editMode.value = false;
|
|
79
|
+
if (shiftKey && activeCell.value) {
|
|
80
|
+
selectionRange.value = {
|
|
81
|
+
startCol: activeCell.value.colIdx,
|
|
82
|
+
startRow: activeCell.value.rowIdx,
|
|
83
|
+
endCol: colIdx,
|
|
84
|
+
endRow: rowIdx
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
activeCell.value = { colIdx, rowIdx };
|
|
88
|
+
selectionRange.value = null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function activateCell(colIdx, rowIdx) {
|
|
92
|
+
activeCell.value = { colIdx, rowIdx };
|
|
93
|
+
selectionRange.value = null;
|
|
94
|
+
startEdit(true);
|
|
95
|
+
}
|
|
96
|
+
function beginDrag(colIdx, rowIdx) {
|
|
97
|
+
if (editMode.value) commitEdit();
|
|
98
|
+
editMode.value = false;
|
|
99
|
+
isDragging.value = true;
|
|
100
|
+
activeCell.value = { colIdx, rowIdx };
|
|
101
|
+
selectionRange.value = {
|
|
102
|
+
startCol: colIdx,
|
|
103
|
+
startRow: rowIdx,
|
|
104
|
+
endCol: colIdx,
|
|
105
|
+
endRow: rowIdx
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function continueDrag(colIdx, rowIdx) {
|
|
109
|
+
if (!isDragging.value || !selectionRange.value) return;
|
|
110
|
+
selectionRange.value = {
|
|
111
|
+
...selectionRange.value,
|
|
112
|
+
endCol: colIdx,
|
|
113
|
+
endRow: rowIdx
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function endDrag() {
|
|
117
|
+
isDragging.value = false;
|
|
118
|
+
const r = normalizedRange.value;
|
|
119
|
+
if (r && r.startCol === r.endCol && r.startRow === r.endRow) {
|
|
120
|
+
selectionRange.value = null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function setRange(startCol, startRow, endCol, endRow) {
|
|
124
|
+
if (editMode.value) commitEdit();
|
|
125
|
+
const sc = clamp(startCol, startRow);
|
|
126
|
+
const ec = clamp(endCol, endRow);
|
|
127
|
+
selectionRange.value = {
|
|
128
|
+
startCol: sc.colIdx,
|
|
129
|
+
startRow: sc.rowIdx,
|
|
130
|
+
endCol: ec.colIdx,
|
|
131
|
+
endRow: ec.rowIdx
|
|
132
|
+
};
|
|
133
|
+
if (!activeCell.value) activeCell.value = { colIdx: sc.colIdx, rowIdx: sc.rowIdx };
|
|
134
|
+
}
|
|
135
|
+
function selectRow(rowIdx) {
|
|
136
|
+
if (editMode.value) commitEdit();
|
|
137
|
+
editMode.value = false;
|
|
138
|
+
activeCell.value = { colIdx: 0, rowIdx };
|
|
139
|
+
selectionRange.value = {
|
|
140
|
+
startCol: 0,
|
|
141
|
+
startRow: rowIdx,
|
|
142
|
+
endCol: opts.colCount.value - 1,
|
|
143
|
+
endRow: rowIdx
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function selectColumn(colIdx) {
|
|
147
|
+
if (editMode.value) commitEdit();
|
|
148
|
+
editMode.value = false;
|
|
149
|
+
activeCell.value = { colIdx, rowIdx: 0 };
|
|
150
|
+
selectionRange.value = {
|
|
151
|
+
startCol: colIdx,
|
|
152
|
+
startRow: 0,
|
|
153
|
+
endCol: colIdx,
|
|
154
|
+
endRow: opts.rowCount.value - 1
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function selectAll() {
|
|
158
|
+
if (editMode.value) commitEdit();
|
|
159
|
+
editMode.value = false;
|
|
160
|
+
activeCell.value = { colIdx: 0, rowIdx: 0 };
|
|
161
|
+
selectionRange.value = {
|
|
162
|
+
startCol: 0,
|
|
163
|
+
startRow: 0,
|
|
164
|
+
endCol: opts.colCount.value - 1,
|
|
165
|
+
endRow: opts.rowCount.value - 1
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function clearRange() {
|
|
169
|
+
const r = normalizedRange.value;
|
|
170
|
+
if (!r) {
|
|
171
|
+
if (activeCell.value) opts.clearCell(activeCell.value.colIdx, activeCell.value.rowIdx);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const clear = opts.clearCellValue ?? opts.clearCell;
|
|
175
|
+
const run = () => {
|
|
176
|
+
for (let c = r.startCol; c <= r.endCol; c++) {
|
|
177
|
+
for (let row = r.startRow; row <= r.endRow; row++) {
|
|
178
|
+
clear(c, row);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
opts.recalcFormulas?.();
|
|
182
|
+
};
|
|
183
|
+
if (opts.transact) opts.transact(run);
|
|
184
|
+
else run();
|
|
185
|
+
}
|
|
186
|
+
function findDataEdge(colIdx, rowIdx, dCol, dRow) {
|
|
187
|
+
let c = colIdx;
|
|
188
|
+
let r = rowIdx;
|
|
189
|
+
const currentEmpty = opts.getCellValue(c, r) === "";
|
|
190
|
+
const maxCol = opts.colCount.value - 1;
|
|
191
|
+
const maxRow = opts.rowCount.value - 1;
|
|
192
|
+
if (currentEmpty) {
|
|
193
|
+
while (true) {
|
|
194
|
+
c += dCol;
|
|
195
|
+
r += dRow;
|
|
196
|
+
if (c < 0 || c > maxCol || r < 0 || r > maxRow) {
|
|
197
|
+
return clamp(c - dCol, r - dRow);
|
|
198
|
+
}
|
|
199
|
+
if (opts.getCellValue(c, r) !== "") return { colIdx: c, rowIdx: r };
|
|
200
|
+
}
|
|
201
|
+
} else {
|
|
202
|
+
while (true) {
|
|
203
|
+
const nc = c + dCol;
|
|
204
|
+
const nr = r + dRow;
|
|
205
|
+
if (nc < 0 || nc > maxCol || nr < 0 || nr > maxRow) return { colIdx: c, rowIdx: r };
|
|
206
|
+
if (opts.getCellValue(nc, nr) === "") {
|
|
207
|
+
if (nc === colIdx + dCol && nr === rowIdx + dRow) {
|
|
208
|
+
return findDataEdge(nc, nr, dCol, dRow);
|
|
209
|
+
}
|
|
210
|
+
return { colIdx: c, rowIdx: r };
|
|
211
|
+
}
|
|
212
|
+
c = nc;
|
|
213
|
+
r = nr;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function extendSelectionTo(target) {
|
|
218
|
+
if (!activeCell.value) return;
|
|
219
|
+
selectionRange.value = {
|
|
220
|
+
startCol: activeCell.value.colIdx,
|
|
221
|
+
startRow: activeCell.value.rowIdx,
|
|
222
|
+
endCol: target.colIdx,
|
|
223
|
+
endRow: target.rowIdx
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function onKeydown(e) {
|
|
227
|
+
const mod = e.ctrlKey || e.metaKey;
|
|
228
|
+
if (editMode.value) {
|
|
229
|
+
if (e.key === "Escape") {
|
|
230
|
+
e.preventDefault();
|
|
231
|
+
cancelEdit();
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (e.key === "Enter") {
|
|
235
|
+
e.preventDefault();
|
|
236
|
+
commitEdit();
|
|
237
|
+
moveBy(0, e.shiftKey ? -1 : 1);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (e.key === "Tab") {
|
|
241
|
+
e.preventDefault();
|
|
242
|
+
commitEdit();
|
|
243
|
+
moveBy(e.shiftKey ? -1 : 1, 0);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (mod && e.key === "a") {
|
|
249
|
+
e.preventDefault();
|
|
250
|
+
selectAll();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (mod && (e.key === "c" || e.key === "x" || e.key === "v")) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
if (mod && (e.key === "z" || e.key === "y")) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (mod && e.key === "Home") {
|
|
260
|
+
e.preventDefault();
|
|
261
|
+
moveTo(0, 0);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (mod && e.key === "End") {
|
|
265
|
+
e.preventDefault();
|
|
266
|
+
moveTo(opts.colCount.value - 1, opts.rowCount.value - 1);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
if (mod && ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(e.key)) {
|
|
270
|
+
e.preventDefault();
|
|
271
|
+
if (!activeCell.value) {
|
|
272
|
+
activeCell.value = { colIdx: 0, rowIdx: 0 };
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
const dCol = e.key === "ArrowLeft" ? -1 : e.key === "ArrowRight" ? 1 : 0;
|
|
276
|
+
const dRow = e.key === "ArrowUp" ? -1 : e.key === "ArrowDown" ? 1 : 0;
|
|
277
|
+
const target = findDataEdge(activeCell.value.colIdx, activeCell.value.rowIdx, dCol, dRow);
|
|
278
|
+
if (e.shiftKey) {
|
|
279
|
+
extendSelectionTo(target);
|
|
280
|
+
} else {
|
|
281
|
+
moveTo(target.colIdx, target.rowIdx);
|
|
282
|
+
}
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
switch (e.key) {
|
|
286
|
+
case "ArrowUp":
|
|
287
|
+
e.preventDefault();
|
|
288
|
+
if (e.shiftKey) extendSelection(0, -1);
|
|
289
|
+
else moveBy(0, -1);
|
|
290
|
+
break;
|
|
291
|
+
case "ArrowDown":
|
|
292
|
+
e.preventDefault();
|
|
293
|
+
if (e.shiftKey) extendSelection(0, 1);
|
|
294
|
+
else moveBy(0, 1);
|
|
295
|
+
break;
|
|
296
|
+
case "ArrowLeft":
|
|
297
|
+
e.preventDefault();
|
|
298
|
+
if (e.shiftKey) extendSelection(-1, 0);
|
|
299
|
+
else moveBy(-1, 0);
|
|
300
|
+
break;
|
|
301
|
+
case "ArrowRight":
|
|
302
|
+
e.preventDefault();
|
|
303
|
+
if (e.shiftKey) extendSelection(1, 0);
|
|
304
|
+
else moveBy(1, 0);
|
|
305
|
+
break;
|
|
306
|
+
case "Tab":
|
|
307
|
+
e.preventDefault();
|
|
308
|
+
moveBy(e.shiftKey ? -1 : 1, 0);
|
|
309
|
+
break;
|
|
310
|
+
case "Enter":
|
|
311
|
+
e.preventDefault();
|
|
312
|
+
if (e.shiftKey) {
|
|
313
|
+
moveBy(0, -1);
|
|
314
|
+
} else {
|
|
315
|
+
startEdit(true);
|
|
316
|
+
}
|
|
317
|
+
break;
|
|
318
|
+
case "F2":
|
|
319
|
+
e.preventDefault();
|
|
320
|
+
startEdit(true);
|
|
321
|
+
break;
|
|
322
|
+
case "Delete":
|
|
323
|
+
case "Backspace":
|
|
324
|
+
e.preventDefault();
|
|
325
|
+
clearRange();
|
|
326
|
+
break;
|
|
327
|
+
case "Home":
|
|
328
|
+
e.preventDefault();
|
|
329
|
+
if (activeCell.value) moveTo(0, activeCell.value.rowIdx);
|
|
330
|
+
break;
|
|
331
|
+
case "End":
|
|
332
|
+
e.preventDefault();
|
|
333
|
+
if (activeCell.value) moveTo(opts.colCount.value - 1, activeCell.value.rowIdx);
|
|
334
|
+
break;
|
|
335
|
+
case "PageUp":
|
|
336
|
+
e.preventDefault();
|
|
337
|
+
moveBy(0, -(opts.pageSize?.value ?? 20));
|
|
338
|
+
break;
|
|
339
|
+
case "PageDown":
|
|
340
|
+
e.preventDefault();
|
|
341
|
+
moveBy(0, opts.pageSize?.value ?? 20);
|
|
342
|
+
break;
|
|
343
|
+
case "Escape":
|
|
344
|
+
e.preventDefault();
|
|
345
|
+
if (selectionRange.value) {
|
|
346
|
+
selectionRange.value = null;
|
|
347
|
+
} else {
|
|
348
|
+
activeCell.value = null;
|
|
349
|
+
}
|
|
350
|
+
break;
|
|
351
|
+
default:
|
|
352
|
+
if (e.key.length === 1 && !mod && !e.altKey) {
|
|
353
|
+
e.preventDefault();
|
|
354
|
+
selectionRange.value = null;
|
|
355
|
+
editValue.value = e.key;
|
|
356
|
+
editMode.value = true;
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function isActive(colIdx, rowIdx) {
|
|
362
|
+
return activeCell.value?.colIdx === colIdx && activeCell.value?.rowIdx === rowIdx;
|
|
363
|
+
}
|
|
364
|
+
return {
|
|
365
|
+
activeCell,
|
|
366
|
+
editMode,
|
|
367
|
+
editValue,
|
|
368
|
+
selectionRange,
|
|
369
|
+
normalizedRange,
|
|
370
|
+
isDragging,
|
|
371
|
+
isInRange,
|
|
372
|
+
selectCell,
|
|
373
|
+
activateCell,
|
|
374
|
+
startEdit,
|
|
375
|
+
commitEdit,
|
|
376
|
+
cancelEdit,
|
|
377
|
+
moveTo,
|
|
378
|
+
moveBy,
|
|
379
|
+
beginDrag,
|
|
380
|
+
continueDrag,
|
|
381
|
+
endDrag,
|
|
382
|
+
setRange,
|
|
383
|
+
selectRow,
|
|
384
|
+
selectColumn,
|
|
385
|
+
selectAll,
|
|
386
|
+
clearRange,
|
|
387
|
+
onKeydown,
|
|
388
|
+
isActive
|
|
389
|
+
};
|
|
390
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DocPageMeta } from './useChildTree.js';
|
|
2
|
+
/**
|
|
3
|
+
* Manages the sheets view configuration stored on the SHEET document's own meta.
|
|
4
|
+
* Reads/writes sheetsColumnWidths, sheetsRowHeights, sheetsDefaultColWidth, etc.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useSheetsView(tree: ReturnType<typeof import('./useChildTree').useChildTree>, sheetsDocId: string): {
|
|
7
|
+
sheetsMeta: import("vue").ComputedRef<DocPageMeta>;
|
|
8
|
+
defaultColWidth: import("vue").ComputedRef<number>;
|
|
9
|
+
defaultRowHeight: import("vue").ComputedRef<number>;
|
|
10
|
+
columnWidths: import("vue").ComputedRef<Record<string, number>>;
|
|
11
|
+
rowHeights: import("vue").ComputedRef<Record<string, number>>;
|
|
12
|
+
showGridlines: import("vue").ComputedRef<boolean>;
|
|
13
|
+
getColWidth: (colId: string) => number;
|
|
14
|
+
setColWidth: (colId: string, width: number) => void;
|
|
15
|
+
getRowHeight: (rowIdx: number) => number;
|
|
16
|
+
setRowHeight: (rowIdx: number, height: number) => void;
|
|
17
|
+
indexToColLetter: (n: number) => string;
|
|
18
|
+
colLetterToIndex: (s: string) => number;
|
|
19
|
+
getColumnPositions: (columns: {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[], minCols: number) => {
|
|
23
|
+
idx: number;
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
start: number;
|
|
27
|
+
size: number;
|
|
28
|
+
letter: string;
|
|
29
|
+
}[];
|
|
30
|
+
updateSheetsMeta: (patch: Partial<DocPageMeta>) => void;
|
|
31
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export function useSheetsView(tree, sheetsDocId) {
|
|
3
|
+
const sheetsMeta = computed(() => {
|
|
4
|
+
const entry = tree.treeMap.data[sheetsDocId];
|
|
5
|
+
return entry?.meta ?? {};
|
|
6
|
+
});
|
|
7
|
+
const defaultColWidth = computed(() => sheetsMeta.value.sheetsDefaultColWidth ?? 100);
|
|
8
|
+
const columnWidths = computed(() => sheetsMeta.value.sheetsColumnWidths ?? {});
|
|
9
|
+
function getColWidth(colId) {
|
|
10
|
+
return columnWidths.value[colId] ?? defaultColWidth.value;
|
|
11
|
+
}
|
|
12
|
+
function setColWidth(colId, width) {
|
|
13
|
+
updateSheetsMeta({
|
|
14
|
+
sheetsColumnWidths: { ...columnWidths.value, [colId]: Math.max(40, width) }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const defaultRowHeight = computed(() => sheetsMeta.value.sheetsDefaultRowHeight ?? 28);
|
|
18
|
+
const rowHeights = computed(() => sheetsMeta.value.sheetsRowHeights ?? {});
|
|
19
|
+
function getRowHeight(rowIdx) {
|
|
20
|
+
return rowHeights.value[String(rowIdx)] ?? defaultRowHeight.value;
|
|
21
|
+
}
|
|
22
|
+
function setRowHeight(rowIdx, height) {
|
|
23
|
+
updateSheetsMeta({
|
|
24
|
+
sheetsRowHeights: { ...rowHeights.value, [String(rowIdx)]: Math.max(20, height) }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const showGridlines = computed(() => sheetsMeta.value.sheetsShowGridlines !== false);
|
|
28
|
+
function indexToColLetter(n) {
|
|
29
|
+
let result = "";
|
|
30
|
+
let idx = n;
|
|
31
|
+
while (idx >= 0) {
|
|
32
|
+
result = String.fromCharCode(65 + idx % 26) + result;
|
|
33
|
+
idx = Math.floor(idx / 26) - 1;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function colLetterToIndex(s) {
|
|
38
|
+
let result = 0;
|
|
39
|
+
for (let i = 0; i < s.length; i++) {
|
|
40
|
+
result = result * 26 + (s.charCodeAt(i) - 64);
|
|
41
|
+
}
|
|
42
|
+
return result - 1;
|
|
43
|
+
}
|
|
44
|
+
function updateSheetsMeta(patch) {
|
|
45
|
+
tree.updateMeta(sheetsDocId, patch);
|
|
46
|
+
}
|
|
47
|
+
function getColumnPositions(columns, minCols) {
|
|
48
|
+
const count = Math.max(columns.length, minCols);
|
|
49
|
+
const result = [];
|
|
50
|
+
let offset = 0;
|
|
51
|
+
for (let i = 0; i < count; i++) {
|
|
52
|
+
const col = columns[i];
|
|
53
|
+
const id = col?.id ?? `__empty_${i}`;
|
|
54
|
+
const label = col?.label || indexToColLetter(i);
|
|
55
|
+
const size = col ? getColWidth(col.id) : defaultColWidth.value;
|
|
56
|
+
result.push({ idx: i, id, label, start: offset, size, letter: indexToColLetter(i) });
|
|
57
|
+
offset += size;
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
sheetsMeta,
|
|
63
|
+
defaultColWidth,
|
|
64
|
+
defaultRowHeight,
|
|
65
|
+
columnWidths,
|
|
66
|
+
rowHeights,
|
|
67
|
+
showGridlines,
|
|
68
|
+
getColWidth,
|
|
69
|
+
setColWidth,
|
|
70
|
+
getRowHeight,
|
|
71
|
+
setRowHeight,
|
|
72
|
+
indexToColLetter,
|
|
73
|
+
colLetterToIndex,
|
|
74
|
+
getColumnPositions,
|
|
75
|
+
updateSheetsMeta
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useSpaceConnections — Single-space adapter.
|
|
3
|
+
*
|
|
4
|
+
* cou-sh has a multi-space `useSpaceConnections` (1073 LOC) that manages
|
|
5
|
+
* one provider per connected space. The Nuxt module is single-space — we
|
|
6
|
+
* always have exactly one active provider tied to `spaceDocId`.
|
|
7
|
+
*
|
|
8
|
+
* This adapter wraps that single connection in the same `Map<spaceId, conn>`
|
|
9
|
+
* shape, so consumers like `useDocLookup` and `useAggregatedPresence` can
|
|
10
|
+
* iterate it the same way as in cou-sh. When (if ever) the module gains
|
|
11
|
+
* multi-space, swap the implementation; the API stays.
|
|
12
|
+
*
|
|
13
|
+
* Why a Map for a single entry? It keeps the cou-sh ports near-1:1 — they
|
|
14
|
+
* iterate `for (const [, conn] of connections)` and read
|
|
15
|
+
* `conn.provider?.awareness`. Forcing them to special-case "single space"
|
|
16
|
+
* adds noise without changing behavior.
|
|
17
|
+
*/
|
|
18
|
+
import { type Ref } from 'vue';
|
|
19
|
+
import * as Y from 'yjs';
|
|
20
|
+
export interface SpaceTreeEntry {
|
|
21
|
+
label: string;
|
|
22
|
+
parentId: string | null;
|
|
23
|
+
order: number;
|
|
24
|
+
type?: string;
|
|
25
|
+
meta?: Record<string, unknown>;
|
|
26
|
+
createdAt?: number;
|
|
27
|
+
updatedAt?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface SpaceConnection {
|
|
30
|
+
spaceId: string;
|
|
31
|
+
doc: Y.Doc;
|
|
32
|
+
provider: unknown | null;
|
|
33
|
+
client: unknown | null;
|
|
34
|
+
treeData: Ref<Record<string, SpaceTreeEntry>>;
|
|
35
|
+
trashData: Ref<Record<string, unknown>>;
|
|
36
|
+
status: Ref<'disconnected' | 'connecting' | 'connected'>;
|
|
37
|
+
isReady: Ref<boolean>;
|
|
38
|
+
}
|
|
39
|
+
interface SpaceConnectionsApi {
|
|
40
|
+
connections: Map<string, SpaceConnection>;
|
|
41
|
+
}
|
|
42
|
+
export declare function useSpaceConnections(): SpaceConnectionsApi;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { shallowReactive, ref, watch } from "vue";
|
|
2
|
+
import * as Y from "yjs";
|
|
3
|
+
import { useAbracadabra } from "./useAbracadabra.js";
|
|
4
|
+
let _singleton = null;
|
|
5
|
+
function _build() {
|
|
6
|
+
const state = useAbracadabra();
|
|
7
|
+
const connections = shallowReactive(/* @__PURE__ */ new Map());
|
|
8
|
+
const treeData = ref({});
|
|
9
|
+
const trashData = ref({});
|
|
10
|
+
let detachTree = null;
|
|
11
|
+
let detachTrash = null;
|
|
12
|
+
function syncMap(map, target) {
|
|
13
|
+
const obj = {};
|
|
14
|
+
map.forEach((val, key) => {
|
|
15
|
+
obj[key] = val instanceof Y.Map ? val.toJSON() : val;
|
|
16
|
+
});
|
|
17
|
+
target.value = obj;
|
|
18
|
+
}
|
|
19
|
+
function attachObservers(doc) {
|
|
20
|
+
detachTree?.();
|
|
21
|
+
detachTrash?.();
|
|
22
|
+
const tree = doc.getMap("doc-tree");
|
|
23
|
+
const trash = doc.getMap("doc-trash");
|
|
24
|
+
syncMap(tree, treeData);
|
|
25
|
+
syncMap(trash, trashData);
|
|
26
|
+
const onTree = () => syncMap(tree, treeData);
|
|
27
|
+
const onTrash = () => syncMap(trash, trashData);
|
|
28
|
+
tree.observe(onTree);
|
|
29
|
+
trash.observe(onTrash);
|
|
30
|
+
detachTree = () => tree.unobserve(onTree);
|
|
31
|
+
detachTrash = () => trash.unobserve(onTrash);
|
|
32
|
+
}
|
|
33
|
+
if (import.meta.client) {
|
|
34
|
+
watch(
|
|
35
|
+
() => [
|
|
36
|
+
state.spaceDocId.value,
|
|
37
|
+
state.doc.value,
|
|
38
|
+
state.provider.value,
|
|
39
|
+
state.client.value
|
|
40
|
+
],
|
|
41
|
+
([spaceId, doc, provider, client]) => {
|
|
42
|
+
connections.clear();
|
|
43
|
+
if (!spaceId || !doc) {
|
|
44
|
+
detachTree?.();
|
|
45
|
+
detachTrash?.();
|
|
46
|
+
detachTree = null;
|
|
47
|
+
detachTrash = null;
|
|
48
|
+
treeData.value = {};
|
|
49
|
+
trashData.value = {};
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
attachObservers(doc);
|
|
53
|
+
connections.set(spaceId, {
|
|
54
|
+
spaceId,
|
|
55
|
+
doc,
|
|
56
|
+
provider,
|
|
57
|
+
client,
|
|
58
|
+
treeData,
|
|
59
|
+
trashData,
|
|
60
|
+
status: state.status,
|
|
61
|
+
isReady: state.isReady
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
{ immediate: true }
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return { connections };
|
|
68
|
+
}
|
|
69
|
+
export function useSpaceConnections() {
|
|
70
|
+
if (!_singleton) _singleton = _build();
|
|
71
|
+
return _singleton;
|
|
72
|
+
}
|
|
@@ -11,8 +11,6 @@ import type { SpaceMeta } from '../types.js';
|
|
|
11
11
|
export declare function useSpaces(): {
|
|
12
12
|
/** All spaces on the current server. */
|
|
13
13
|
spaces: import("vue").ComputedRef<SpaceMeta[]>;
|
|
14
|
-
/** Whether the current server supports spaces. */
|
|
15
|
-
spacesEnabled: import("vue").ComputedRef<boolean>;
|
|
16
14
|
/** The currently active space. */
|
|
17
15
|
currentSpace: import("vue").ComputedRef<SpaceMeta | null>;
|
|
18
16
|
/** Whether space operations are in progress. */
|
|
@@ -29,7 +27,7 @@ export declare function useSpaces(): {
|
|
|
29
27
|
id?: string;
|
|
30
28
|
}) => Promise<SpaceMeta>;
|
|
31
29
|
/** Update an existing space. */
|
|
32
|
-
update: (id: string, opts: Partial<Pick<SpaceMeta, "name" | "description" | "visibility"
|
|
30
|
+
update: (id: string, opts: Partial<Pick<SpaceMeta, "name" | "description" | "visibility">>) => Promise<void>;
|
|
33
31
|
/** Delete a space. */
|
|
34
32
|
remove: (id: string) => Promise<void>;
|
|
35
33
|
/** Switch to a different space. */
|