@abraca/nuxt 1.9.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +9 -1
- package/dist/runtime/components/ADocumentTree.vue +1 -1
- package/dist/runtime/components/AEditor.d.vue.ts +26 -1
- package/dist/runtime/components/AEditor.vue +158 -4
- package/dist/runtime/components/AEditor.vue.d.ts +26 -1
- package/dist/runtime/components/AIdentityModal.d.vue.ts +46 -0
- package/dist/runtime/components/AIdentityModal.vue +157 -0
- package/dist/runtime/components/AIdentityModal.vue.d.ts +46 -0
- package/dist/runtime/components/AMnemonicLoginModal.d.vue.ts +35 -0
- package/dist/runtime/components/AMnemonicLoginModal.vue +173 -0
- package/dist/runtime/components/AMnemonicLoginModal.vue.d.ts +35 -0
- package/dist/runtime/components/ANodePanel.d.vue.ts +29 -2
- package/dist/runtime/components/ANodePanel.vue +148 -27
- package/dist/runtime/components/ANodePanel.vue.d.ts +29 -2
- package/dist/runtime/components/ANodePanelHeader.d.vue.ts +64 -0
- package/dist/runtime/components/ANodePanelHeader.vue +105 -0
- package/dist/runtime/components/ANodePanelHeader.vue.d.ts +64 -0
- package/dist/runtime/components/ANodeSettingsPanel.d.vue.ts +49 -0
- package/dist/runtime/components/ANodeSettingsPanel.vue +59 -0
- package/dist/runtime/components/ANodeSettingsPanel.vue.d.ts +49 -0
- package/dist/runtime/components/ANotificationBell.d.vue.ts +26 -0
- package/dist/runtime/components/ANotificationBell.vue +55 -0
- package/dist/runtime/components/ANotificationBell.vue.d.ts +26 -0
- package/dist/runtime/components/AOfflineSync.d.vue.ts +11 -0
- package/dist/runtime/components/AOfflineSync.vue +217 -0
- package/dist/runtime/components/AOfflineSync.vue.d.ts +11 -0
- package/dist/runtime/components/ARecoveryPhraseDisplay.d.vue.ts +26 -0
- package/dist/runtime/components/ARecoveryPhraseDisplay.vue +94 -0
- package/dist/runtime/components/ARecoveryPhraseDisplay.vue.d.ts +26 -0
- package/dist/runtime/components/AServerInfoModal.d.vue.ts +43 -0
- package/dist/runtime/components/AServerInfoModal.vue +150 -0
- package/dist/runtime/components/AServerInfoModal.vue.d.ts +43 -0
- package/dist/runtime/components/ASpaceFormModal.vue +1 -1
- package/dist/runtime/components/ASubPageList.d.vue.ts +66 -0
- package/dist/runtime/components/ASubPageList.vue +147 -0
- package/dist/runtime/components/ASubPageList.vue.d.ts +66 -0
- package/dist/runtime/components/aware/AAccordion.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AAccordion.vue +107 -0
- package/dist/runtime/components/aware/AAccordion.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AArea.vue +24 -11
- package/dist/runtime/components/aware/AAvatar.d.vue.ts +6 -0
- package/dist/runtime/components/aware/AAvatar.vue +33 -3
- package/dist/runtime/components/aware/AAvatar.vue.d.ts +6 -0
- package/dist/runtime/components/aware/AAvatarGroup.d.vue.ts +10 -0
- package/dist/runtime/components/aware/AAvatarGroup.vue +30 -0
- package/dist/runtime/components/aware/AAvatarGroup.vue.d.ts +10 -0
- package/dist/runtime/components/aware/AButton.d.vue.ts +4 -2
- package/dist/runtime/components/aware/AButton.vue +46 -14
- package/dist/runtime/components/aware/AButton.vue.d.ts +4 -2
- package/dist/runtime/components/aware/ACalendar.d.vue.ts +17 -0
- package/dist/runtime/components/aware/ACalendar.vue +145 -0
- package/dist/runtime/components/aware/ACalendar.vue.d.ts +17 -0
- package/dist/runtime/components/aware/ACarousel.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ACarousel.vue +39 -0
- package/dist/runtime/components/aware/ACarousel.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ACheckbox.d.vue.ts +11 -0
- package/dist/runtime/components/aware/ACheckbox.vue +74 -0
- package/dist/runtime/components/aware/ACheckbox.vue.d.ts +11 -0
- package/dist/runtime/components/aware/ACheckboxGroup.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ACheckboxGroup.vue +79 -0
- package/dist/runtime/components/aware/ACheckboxGroup.vue.d.ts +27 -0
- package/dist/runtime/components/aware/ACollapsible.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ACollapsible.vue +45 -0
- package/dist/runtime/components/aware/ACollapsible.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AColorPicker.d.vue.ts +15 -0
- package/dist/runtime/components/aware/AColorPicker.vue +48 -0
- package/dist/runtime/components/aware/AColorPicker.vue.d.ts +15 -0
- package/dist/runtime/components/aware/ACommandPalette.d.vue.ts +33 -0
- package/dist/runtime/components/aware/ACommandPalette.vue +123 -0
- package/dist/runtime/components/aware/ACommandPalette.vue.d.ts +33 -0
- package/dist/runtime/components/aware/AContextMenu.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AContextMenu.vue +63 -0
- package/dist/runtime/components/aware/AContextMenu.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ADrawer.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ADrawer.vue +57 -0
- package/dist/runtime/components/aware/ADrawer.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ADropdownMenu.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ADropdownMenu.vue +63 -0
- package/dist/runtime/components/aware/ADropdownMenu.vue.d.ts +25 -0
- package/dist/runtime/components/aware/AFileUpload.d.vue.ts +27 -0
- package/dist/runtime/components/aware/AFileUpload.vue +67 -0
- package/dist/runtime/components/aware/AFileUpload.vue.d.ts +27 -0
- package/dist/runtime/components/aware/AFollowBar.d.vue.ts +21 -0
- package/dist/runtime/components/aware/AFollowBar.vue +62 -0
- package/dist/runtime/components/aware/AFollowBar.vue.d.ts +21 -0
- package/dist/runtime/components/aware/AFollowScroll.d.vue.ts +7 -0
- package/dist/runtime/components/aware/AFollowScroll.vue +17 -0
- package/dist/runtime/components/aware/AFollowScroll.vue.d.ts +7 -0
- package/dist/runtime/components/aware/AFormSync.d.vue.ts +21 -0
- package/dist/runtime/components/aware/AFormSync.vue +52 -0
- package/dist/runtime/components/aware/AFormSync.vue.d.ts +21 -0
- package/dist/runtime/components/aware/AGlobalFocusLayer.d.vue.ts +3 -0
- package/dist/runtime/components/aware/AGlobalFocusLayer.vue +90 -0
- package/dist/runtime/components/aware/AGlobalFocusLayer.vue.d.ts +3 -0
- package/dist/runtime/components/aware/AHoverItem.d.vue.ts +27 -0
- package/dist/runtime/components/aware/AHoverItem.vue +124 -0
- package/dist/runtime/components/aware/AHoverItem.vue.d.ts +27 -0
- package/dist/runtime/components/aware/AInput.d.vue.ts +12 -2
- package/dist/runtime/components/aware/AInput.vue +72 -19
- package/dist/runtime/components/aware/AInput.vue.d.ts +12 -2
- package/dist/runtime/components/aware/AInputMenu.d.vue.ts +17 -0
- package/dist/runtime/components/aware/AInputMenu.vue +138 -0
- package/dist/runtime/components/aware/AInputMenu.vue.d.ts +17 -0
- package/dist/runtime/components/aware/AInputNumber.d.vue.ts +15 -0
- package/dist/runtime/components/aware/AInputNumber.vue +67 -0
- package/dist/runtime/components/aware/AInputNumber.vue.d.ts +15 -0
- package/dist/runtime/components/aware/AInputTags.d.vue.ts +15 -0
- package/dist/runtime/components/aware/AInputTags.vue +67 -0
- package/dist/runtime/components/aware/AInputTags.vue.d.ts +15 -0
- package/dist/runtime/components/aware/AKeyHint.d.vue.ts +3 -0
- package/dist/runtime/components/aware/AKeyHint.vue +23 -0
- package/dist/runtime/components/aware/AKeyHint.vue.d.ts +3 -0
- package/dist/runtime/components/aware/AMedia.d.vue.ts +19 -0
- package/dist/runtime/components/aware/AMedia.vue +85 -0
- package/dist/runtime/components/aware/AMedia.vue.d.ts +19 -0
- package/dist/runtime/components/aware/AModal.d.vue.ts +33 -0
- package/dist/runtime/components/aware/AModal.vue +110 -0
- package/dist/runtime/components/aware/AModal.vue.d.ts +33 -0
- package/dist/runtime/components/aware/ANavigationMenu.d.vue.ts +25 -0
- package/dist/runtime/components/aware/ANavigationMenu.vue +82 -0
- package/dist/runtime/components/aware/ANavigationMenu.vue.d.ts +25 -0
- package/dist/runtime/components/aware/APagination.d.vue.ts +13 -0
- package/dist/runtime/components/aware/APagination.vue +53 -0
- package/dist/runtime/components/aware/APagination.vue.d.ts +13 -0
- package/dist/runtime/components/aware/APeerCaretLayer.d.vue.ts +10 -0
- package/dist/runtime/components/aware/APeerCaretLayer.vue +133 -0
- package/dist/runtime/components/aware/APeerCaretLayer.vue.d.ts +10 -0
- package/dist/runtime/components/aware/APinInput.d.vue.ts +15 -0
- package/dist/runtime/components/aware/APinInput.vue +48 -0
- package/dist/runtime/components/aware/APinInput.vue.d.ts +15 -0
- package/dist/runtime/components/aware/APopover.d.vue.ts +25 -0
- package/dist/runtime/components/aware/APopover.vue +57 -0
- package/dist/runtime/components/aware/APopover.vue.d.ts +25 -0
- package/dist/runtime/components/aware/APresenceBlobs.d.vue.ts +3 -0
- package/dist/runtime/components/aware/APresenceBlobs.vue +69 -0
- package/dist/runtime/components/aware/APresenceBlobs.vue.d.ts +3 -0
- package/dist/runtime/components/aware/APresenceCursors.d.vue.ts +20 -0
- package/dist/runtime/components/aware/APresenceCursors.vue +47 -0
- package/dist/runtime/components/aware/APresenceCursors.vue.d.ts +20 -0
- package/dist/runtime/components/aware/ARadioGroup.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ARadioGroup.vue +86 -0
- package/dist/runtime/components/aware/ARadioGroup.vue.d.ts +27 -0
- package/dist/runtime/components/aware/AScroll.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AScroll.vue +87 -0
- package/dist/runtime/components/aware/AScroll.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ASelect.d.vue.ts +12 -2
- package/dist/runtime/components/aware/ASelect.vue +146 -22
- package/dist/runtime/components/aware/ASelect.vue.d.ts +12 -2
- package/dist/runtime/components/aware/ASelectMenu.d.vue.ts +17 -0
- package/dist/runtime/components/aware/ASelectMenu.vue +139 -0
- package/dist/runtime/components/aware/ASelectMenu.vue.d.ts +17 -0
- package/dist/runtime/components/aware/ASlideover.d.vue.ts +33 -0
- package/dist/runtime/components/aware/ASlideover.vue +110 -0
- package/dist/runtime/components/aware/ASlideover.vue.d.ts +33 -0
- package/dist/runtime/components/aware/ASlider.d.vue.ts +19 -0
- package/dist/runtime/components/aware/ASlider.vue +77 -0
- package/dist/runtime/components/aware/ASlider.vue.d.ts +19 -0
- package/dist/runtime/components/aware/AStepper.d.vue.ts +25 -0
- package/dist/runtime/components/aware/AStepper.vue +82 -0
- package/dist/runtime/components/aware/AStepper.vue.d.ts +25 -0
- package/dist/runtime/components/aware/ASwitch.d.vue.ts +11 -0
- package/dist/runtime/components/aware/ASwitch.vue +75 -0
- package/dist/runtime/components/aware/ASwitch.vue.d.ts +11 -0
- package/dist/runtime/components/aware/ATable.d.vue.ts +23 -0
- package/dist/runtime/components/aware/ATable.vue +97 -0
- package/dist/runtime/components/aware/ATable.vue.d.ts +23 -0
- package/dist/runtime/components/aware/ATabs.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ATabs.vue +128 -0
- package/dist/runtime/components/aware/ATabs.vue.d.ts +27 -0
- package/dist/runtime/components/aware/ATextarea.d.vue.ts +12 -2
- package/dist/runtime/components/aware/ATextarea.vue +72 -19
- package/dist/runtime/components/aware/ATextarea.vue.d.ts +12 -2
- package/dist/runtime/components/aware/AToggleGroup.d.vue.ts +27 -0
- package/dist/runtime/components/aware/AToggleGroup.vue +79 -0
- package/dist/runtime/components/aware/AToggleGroup.vue.d.ts +27 -0
- package/dist/runtime/components/aware/ATree.d.vue.ts +27 -0
- package/dist/runtime/components/aware/ATree.vue +111 -0
- package/dist/runtime/components/aware/ATree.vue.d.ts +27 -0
- package/dist/runtime/components/chat/AChatPanel.d.vue.ts +6 -6
- package/dist/runtime/components/chat/AChatPanel.vue.d.ts +6 -6
- package/dist/runtime/components/chat/ANodeChatPanel.d.vue.ts +42 -0
- package/dist/runtime/components/chat/ANodeChatPanel.vue +53 -0
- package/dist/runtime/components/chat/ANodeChatPanel.vue.d.ts +42 -0
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +2 -2
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +2 -2
- package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +3 -3
- package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +3 -3
- package/dist/runtime/components/editor/AEditorRedoButton.d.vue.ts +26 -0
- package/dist/runtime/components/editor/AEditorRedoButton.vue +38 -0
- package/dist/runtime/components/editor/AEditorRedoButton.vue.d.ts +26 -0
- package/dist/runtime/components/editor/AEditorUndoButton.d.vue.ts +26 -0
- package/dist/runtime/components/editor/AEditorUndoButton.vue +38 -0
- package/dist/runtime/components/editor/AEditorUndoButton.vue.d.ts +26 -0
- package/dist/runtime/components/editor/AIconPickerPopover.d.vue.ts +24 -0
- package/dist/runtime/components/editor/AIconPickerPopover.vue +113 -0
- package/dist/runtime/components/editor/AIconPickerPopover.vue.d.ts +24 -0
- package/dist/runtime/components/editor/ANodeInlineLabel.d.vue.ts +24 -0
- package/dist/runtime/components/editor/ANodeInlineLabel.vue +101 -0
- package/dist/runtime/components/editor/ANodeInlineLabel.vue.d.ts +24 -0
- package/dist/runtime/components/renderers/ADocLoadError.d.vue.ts +3 -0
- package/dist/runtime/components/renderers/ADocLoadError.vue +11 -0
- package/dist/runtime/components/renderers/ADocLoadError.vue.d.ts +3 -0
- package/dist/runtime/components/renderers/ADocLoadingSkeleton.d.vue.ts +3 -0
- package/dist/runtime/components/renderers/ADocLoadingSkeleton.vue +5 -0
- package/dist/runtime/components/renderers/ADocLoadingSkeleton.vue.d.ts +3 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.d.vue.ts +22 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.vue +1041 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.vue.d.ts +22 -0
- package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +23 -0
- package/dist/runtime/components/renderers/AProseRenderer.vue +31 -0
- package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +23 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.d.vue.ts +19 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.vue +865 -0
- package/dist/runtime/components/renderers/ASheetsRenderer.client.vue.d.ts +19 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.d.vue.ts +14 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue +45 -15
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue.d.ts +14 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.vue +93 -20
- package/dist/runtime/components/renderers/calendar/ACalendarDayView.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue +31 -2
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.vue +94 -21
- package/dist/runtime/components/renderers/calendar/ACalendarWeekView.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/sheets/ASheetsCell.d.vue.ts +45 -0
- package/dist/runtime/components/renderers/sheets/ASheetsCell.vue +123 -0
- package/dist/runtime/components/renderers/sheets/ASheetsCell.vue.d.ts +45 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.d.vue.ts +111 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue +737 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue.d.ts +111 -0
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.d.vue.ts +26 -0
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue +100 -0
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue.d.ts +26 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.d.vue.ts +48 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue +243 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue.d.ts +48 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.d.vue.ts +1 -0
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.vue +13 -32
- package/dist/runtime/components/renderers/table/cells/ATableCellColor.vue.d.ts +1 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue +34 -4
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue.d.ts +6 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.d.vue.ts +16 -0
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue +14 -3
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue.d.ts +16 -0
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.d.vue.ts +13 -1
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue +114 -47
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue.d.ts +13 -1
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.d.vue.ts +4 -0
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.vue +21 -4
- package/dist/runtime/components/renderers/timeline/ATimelineMilestone.vue.d.ts +4 -0
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.d.vue.ts +2 -2
- package/dist/runtime/components/renderers/timeline/ATimelineToolbar.vue.d.ts +2 -2
- package/dist/runtime/components/settings/ASettingsSpacesPanel.vue +7 -25
- package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +3 -3
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +3 -3
- package/dist/runtime/components/shell/ASyncStatus.d.vue.ts +1 -1
- package/dist/runtime/components/shell/ASyncStatus.vue.d.ts +1 -1
- package/dist/runtime/components/shell/AUserMenu.d.vue.ts +2 -2
- package/dist/runtime/components/shell/AUserMenu.vue.d.ts +2 -2
- package/dist/runtime/components/shell/AWelcomeScreen.d.vue.ts +1 -1
- package/dist/runtime/components/shell/AWelcomeScreen.vue.d.ts +1 -1
- package/dist/runtime/composables/useAACaret.d.ts +29 -0
- package/dist/runtime/composables/useAACaret.js +64 -0
- package/dist/runtime/composables/useAAEphemeral.d.ts +32 -0
- package/dist/runtime/composables/useAAEphemeral.js +33 -0
- package/dist/runtime/composables/useAAField.d.ts +10 -2
- package/dist/runtime/composables/useAAField.js +31 -2
- package/dist/runtime/composables/useAAFieldValue.d.ts +26 -0
- package/dist/runtime/composables/useAAFieldValue.js +32 -0
- package/dist/runtime/composables/useAAFocus.d.ts +68 -0
- package/dist/runtime/composables/useAAFocus.js +174 -0
- package/dist/runtime/composables/useAAFollowAnchor.d.ts +25 -0
- package/dist/runtime/composables/useAAFollowAnchor.js +69 -0
- package/dist/runtime/composables/useAAFollowPeer.d.ts +29 -0
- package/dist/runtime/composables/useAAFollowPeer.js +75 -0
- package/dist/runtime/composables/useAAKey.d.ts +22 -0
- package/dist/runtime/composables/useAAKey.js +24 -0
- package/dist/runtime/composables/useAAPointer.d.ts +30 -0
- package/dist/runtime/composables/useAAPointer.js +53 -0
- package/dist/runtime/composables/useAAUIState.d.ts +29 -0
- package/dist/runtime/composables/useAAUIState.js +28 -0
- package/dist/runtime/composables/useAAViewport.d.ts +22 -0
- package/dist/runtime/composables/useAAViewport.js +50 -0
- package/dist/runtime/composables/useAbraAdmin.d.ts +54 -0
- package/dist/runtime/composables/useAbraAdmin.js +115 -0
- package/dist/runtime/composables/useAbracadabraAuth.d.ts +8 -0
- package/dist/runtime/composables/useAbracadabraAuth.js +8 -0
- package/dist/runtime/composables/useAggregatedPresence.d.ts +23 -0
- package/dist/runtime/composables/useAggregatedPresence.js +140 -0
- package/dist/runtime/composables/useChat.d.ts +16 -2
- package/dist/runtime/composables/useChat.js +257 -66
- package/dist/runtime/composables/useChatUsers.d.ts +2 -0
- package/dist/runtime/composables/useChatUsers.js +2 -1
- package/dist/runtime/composables/useDocLookup.d.ts +4 -0
- package/dist/runtime/composables/useDocLookup.js +25 -0
- package/dist/runtime/composables/useDocSnapshots.d.ts +79 -0
- package/dist/runtime/composables/useDocSnapshots.js +234 -0
- package/dist/runtime/composables/useEditorDragHandle.d.ts +7 -0
- package/dist/runtime/composables/useEditorDragHandle.js +19 -1
- package/dist/runtime/composables/useEditorSuggestions.js +27 -1
- package/dist/runtime/composables/useEditorToolbar.js +9 -1
- package/dist/runtime/composables/useEmailVerification.d.ts +33 -0
- package/dist/runtime/composables/useEmailVerification.js +58 -0
- package/dist/runtime/composables/useIdentityDoc.js +0 -3
- package/dist/runtime/composables/useItemPresence.d.ts +47 -0
- package/dist/runtime/composables/useItemPresence.js +73 -0
- package/dist/runtime/composables/useResizableWidth.d.ts +24 -0
- package/dist/runtime/composables/useResizableWidth.js +87 -0
- package/dist/runtime/composables/useServerInfo.d.ts +17 -2
- package/dist/runtime/composables/useServerInfo.js +30 -6
- package/dist/runtime/composables/useServerSearch.d.ts +36 -0
- package/dist/runtime/composables/useServerSearch.js +91 -0
- package/dist/runtime/composables/useServerTrash.d.ts +67 -0
- package/dist/runtime/composables/useServerTrash.js +128 -0
- package/dist/runtime/composables/useSheetsClipboard.d.ts +42 -0
- package/dist/runtime/composables/useSheetsClipboard.js +109 -0
- package/dist/runtime/composables/useSheetsFormulas.d.ts +38 -0
- package/dist/runtime/composables/useSheetsFormulas.js +725 -0
- package/dist/runtime/composables/useSheetsSelection.d.ts +68 -0
- package/dist/runtime/composables/useSheetsSelection.js +390 -0
- package/dist/runtime/composables/useSheetsView.d.ts +31 -0
- package/dist/runtime/composables/useSheetsView.js +77 -0
- package/dist/runtime/composables/useSpaceConnections.d.ts +43 -0
- package/dist/runtime/composables/useSpaceConnections.js +72 -0
- package/dist/runtime/composables/useSpaces.d.ts +1 -3
- package/dist/runtime/composables/useSpaces.js +2 -5
- package/dist/runtime/composables/useTiptapHistory.d.ts +22 -0
- package/dist/runtime/composables/useTiptapHistory.js +12 -0
- package/dist/runtime/composables/useTreeExpansion.d.ts +28 -0
- package/dist/runtime/composables/useTreeExpansion.js +94 -0
- package/dist/runtime/composables/useYDoc.js +12 -1
- package/dist/runtime/extensions/button.d.ts +3 -0
- package/dist/runtime/extensions/button.js +62 -0
- package/dist/runtime/extensions/color-swatch.d.ts +2 -0
- package/dist/runtime/extensions/color-swatch.js +34 -0
- package/dist/runtime/extensions/diff.d.ts +2 -0
- package/dist/runtime/extensions/diff.js +40 -0
- package/dist/runtime/extensions/divider.d.ts +2 -0
- package/dist/runtime/extensions/divider.js +33 -0
- package/dist/runtime/extensions/embed.d.ts +2 -0
- package/dist/runtime/extensions/embed.js +40 -0
- package/dist/runtime/extensions/figure.d.ts +2 -0
- package/dist/runtime/extensions/figure.js +49 -0
- package/dist/runtime/extensions/math.d.ts +15 -0
- package/dist/runtime/extensions/math.js +66 -0
- package/dist/runtime/extensions/progress.d.ts +2 -0
- package/dist/runtime/extensions/progress.js +43 -0
- package/dist/runtime/extensions/quote.d.ts +2 -0
- package/dist/runtime/extensions/quote.js +39 -0
- package/dist/runtime/extensions/spoiler.d.ts +2 -0
- package/dist/runtime/extensions/spoiler.js +36 -0
- package/dist/runtime/extensions/stat.d.ts +3 -0
- package/dist/runtime/extensions/stat.js +58 -0
- package/dist/runtime/extensions/svg-embed.d.ts +23 -0
- package/dist/runtime/extensions/svg-embed.js +33 -0
- package/dist/runtime/extensions/video.d.ts +2 -0
- package/dist/runtime/extensions/video.js +40 -0
- package/dist/runtime/extensions/views/ButtonGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ButtonGroupView.vue +25 -0
- package/dist/runtime/extensions/views/ButtonGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/ButtonView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ButtonView.vue +171 -0
- package/dist/runtime/extensions/views/ButtonView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/ColorSwatchView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ColorSwatchView.vue +134 -0
- package/dist/runtime/extensions/views/ColorSwatchView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/DiffView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DiffView.vue +163 -0
- package/dist/runtime/extensions/views/DiffView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/DividerView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DividerView.vue +40 -0
- package/dist/runtime/extensions/views/DividerView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/EmbedView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/EmbedView.vue +166 -0
- package/dist/runtime/extensions/views/EmbedView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FigureView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/FigureView.vue +122 -0
- package/dist/runtime/extensions/views/FigureView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/FileNodeView.vue +21 -24
- package/dist/runtime/extensions/views/MathBlockView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/MathBlockView.vue +151 -0
- package/dist/runtime/extensions/views/MathBlockView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/MathInlineView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/MathInlineView.vue +149 -0
- package/dist/runtime/extensions/views/MathInlineView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/MetaFieldView.vue +1129 -550
- package/dist/runtime/extensions/views/ProgressView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/ProgressView.vue +156 -0
- package/dist/runtime/extensions/views/ProgressView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/QuoteView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/QuoteView.vue +128 -0
- package/dist/runtime/extensions/views/QuoteView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/SpoilerView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/SpoilerView.vue +62 -0
- package/dist/runtime/extensions/views/SpoilerView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/StatGroupView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/StatGroupView.vue +25 -0
- package/dist/runtime/extensions/views/StatGroupView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/StatView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/StatView.vue +89 -0
- package/dist/runtime/extensions/views/StatView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/SvgEmbedView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/SvgEmbedView.vue +120 -0
- package/dist/runtime/extensions/views/SvgEmbedView.vue.d.ts +4 -0
- package/dist/runtime/extensions/views/VideoView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/VideoView.vue +190 -0
- package/dist/runtime/extensions/views/VideoView.vue.d.ts +4 -0
- package/dist/runtime/locale.d.ts +133 -0
- package/dist/runtime/locale.js +121 -2
- package/dist/runtime/plugin-abracadabra.client.js +233 -36
- package/dist/runtime/plugin-abracadabra.server.js +0 -1
- package/dist/runtime/plugins/core.plugin.js +77 -4
- package/dist/runtime/server/plugins/abracadabra-service.js +84 -6
- package/dist/runtime/server/utils/rpcHandler.d.ts +74 -0
- package/dist/runtime/server/utils/rpcHandler.js +74 -0
- package/dist/runtime/server/utils/spaceManager.js +10 -9
- package/dist/runtime/types.d.ts +63 -10
- package/dist/runtime/utils/awareRingStyle.d.ts +22 -0
- package/dist/runtime/utils/awareRingStyle.js +16 -0
- package/dist/runtime/utils/caretCoordinates.d.ts +41 -0
- package/dist/runtime/utils/caretCoordinates.js +126 -0
- package/dist/runtime/utils/content.d.ts +1 -1
- package/dist/runtime/utils/docTypes.js +44 -13
- package/dist/runtime/utils/domPath.d.ts +42 -0
- package/dist/runtime/utils/domPath.js +89 -0
- package/dist/runtime/utils/loadKatex.d.ts +1 -0
- package/dist/runtime/utils/loadKatex.js +29 -0
- package/dist/runtime/utils/lucideIcons.d.ts +16 -0
- package/dist/runtime/utils/lucideIcons.js +451 -0
- package/dist/runtime/utils/sanitizeSvg.d.ts +19 -0
- package/dist/runtime/utils/sanitizeSvg.js +87 -0
- package/dist/runtime/utils/time.d.ts +15 -0
- package/dist/runtime/utils/time.js +5 -0
- package/dist/types.d.mts +4 -0
- package/package.json +26 -16
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, watch, nextTick, useTemplateRef } from "vue";
|
|
3
|
+
import { useVirtualizer } from "@tanstack/vue-virtual";
|
|
4
|
+
import { useMediaQuery } from "@vueuse/core";
|
|
5
|
+
import ASheetsCell from "./ASheetsCell.vue";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
columnPositions: { type: Array, required: true },
|
|
8
|
+
dataColumns: { type: Array, required: true },
|
|
9
|
+
rowCount: { type: Number, required: true },
|
|
10
|
+
displayRowCount: { type: Number, required: true },
|
|
11
|
+
getRowHeight: { type: Function, required: true },
|
|
12
|
+
defaultRowHeight: { type: Number, required: true },
|
|
13
|
+
getCellValue: { type: Function, required: true },
|
|
14
|
+
getCellEntry: { type: Function, required: true },
|
|
15
|
+
activeCell: { type: [Object, null], required: true },
|
|
16
|
+
editMode: { type: Boolean, required: true },
|
|
17
|
+
editValue: { type: String, required: true },
|
|
18
|
+
selectionRange: { type: [Object, null], required: true },
|
|
19
|
+
cutRange: { type: [Object, null], required: true },
|
|
20
|
+
showGridlines: { type: Boolean, required: true },
|
|
21
|
+
editable: { type: Boolean, required: true },
|
|
22
|
+
remoteEditors: { type: Map, required: true },
|
|
23
|
+
remoteActiveCells: { type: Map, required: false },
|
|
24
|
+
remoteSelections: { type: Array, required: false },
|
|
25
|
+
cellContextItems: { type: Array, required: true },
|
|
26
|
+
colHeaderContextItems: { type: Function, required: true },
|
|
27
|
+
rowHeaderContextItems: { type: Function, required: true },
|
|
28
|
+
formulaRefMode: { type: Boolean, required: true },
|
|
29
|
+
formulaRefHighlights: { type: Map, required: true },
|
|
30
|
+
fillPreview: { type: [Object, null], required: true }
|
|
31
|
+
});
|
|
32
|
+
const emit = defineEmits(["selectCell", "activateCell", "update:editValue", "commitEdit", "cancelEdit", "resizeColumn", "renameColumn", "selectRow", "selectColumn", "beginDrag", "continueDrag", "endDrag", "setRange", "formulaRefClick", "formulaRefDragStart", "formulaRefDragMove", "formulaRefDragEnd", "fillDragStart", "fillDragMove", "fillDragEnd", "autoFitColumn", "keydown", "paste", "copy", "cut"]);
|
|
33
|
+
const isMobile = useMediaQuery("(max-width: 640px)");
|
|
34
|
+
const ROW_HEADER_WIDTH = 48;
|
|
35
|
+
const scrollRef = useTemplateRef("scrollRef");
|
|
36
|
+
const editInputRef = useTemplateRef("editInputRef");
|
|
37
|
+
const normalizedSelection = computed(() => {
|
|
38
|
+
const r = props.selectionRange;
|
|
39
|
+
if (!r) return null;
|
|
40
|
+
return {
|
|
41
|
+
minCol: Math.min(r.startCol, r.endCol),
|
|
42
|
+
maxCol: Math.max(r.startCol, r.endCol),
|
|
43
|
+
minRow: Math.min(r.startRow, r.endRow),
|
|
44
|
+
maxRow: Math.max(r.startRow, r.endRow)
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const normalizedCut = computed(() => {
|
|
48
|
+
const r = props.cutRange;
|
|
49
|
+
if (!r) return null;
|
|
50
|
+
return {
|
|
51
|
+
minCol: Math.min(r.startCol, r.endCol),
|
|
52
|
+
maxCol: Math.max(r.startCol, r.endCol),
|
|
53
|
+
minRow: Math.min(r.startRow, r.endRow),
|
|
54
|
+
maxRow: Math.max(r.startRow, r.endRow)
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const rowVirtualizer = useVirtualizer(computed(() => ({
|
|
58
|
+
count: props.displayRowCount,
|
|
59
|
+
getScrollElement: () => scrollRef.value,
|
|
60
|
+
estimateSize: (idx) => props.getRowHeight(idx),
|
|
61
|
+
overscan: 8
|
|
62
|
+
})));
|
|
63
|
+
const virtualRows = computed(() => rowVirtualizer.value.getVirtualItems());
|
|
64
|
+
const totalHeight = computed(() => rowVirtualizer.value.getTotalSize());
|
|
65
|
+
const totalWidth = computed(() => {
|
|
66
|
+
const cols = props.columnPositions;
|
|
67
|
+
if (!cols.length) return 0;
|
|
68
|
+
const last = cols[cols.length - 1];
|
|
69
|
+
return last.start + last.size;
|
|
70
|
+
});
|
|
71
|
+
const scrollLeft = ref(0);
|
|
72
|
+
let scrollRafId = 0;
|
|
73
|
+
function onScroll() {
|
|
74
|
+
if (scrollRafId) return;
|
|
75
|
+
scrollRafId = requestAnimationFrame(() => {
|
|
76
|
+
scrollLeft.value = scrollRef.value?.scrollLeft ?? 0;
|
|
77
|
+
scrollRafId = 0;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const visibleColsReactive = computed(() => {
|
|
81
|
+
const sl = scrollLeft.value;
|
|
82
|
+
const el = scrollRef.value;
|
|
83
|
+
if (!el) return props.columnPositions;
|
|
84
|
+
const viewRight = sl + el.clientWidth + 200;
|
|
85
|
+
const viewLeft = Math.max(0, sl - 200);
|
|
86
|
+
return props.columnPositions.filter((c) => c.start + c.size > viewLeft && c.start < viewRight);
|
|
87
|
+
});
|
|
88
|
+
watch(() => props.editMode, (v) => {
|
|
89
|
+
if (v) {
|
|
90
|
+
if (isMobile.value && props.activeCell) {
|
|
91
|
+
nextTick(() => {
|
|
92
|
+
const { colIdx, rowIdx } = props.activeCell;
|
|
93
|
+
scrollToCell(colIdx, rowIdx);
|
|
94
|
+
requestAnimationFrame(() => editInputRef.value?.focus());
|
|
95
|
+
});
|
|
96
|
+
} else {
|
|
97
|
+
nextTick(() => editInputRef.value?.focus());
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
const editOverlayStyle = computed(() => {
|
|
102
|
+
if (!props.editMode || !props.activeCell) return null;
|
|
103
|
+
const col = props.columnPositions[props.activeCell.colIdx];
|
|
104
|
+
if (!col) return null;
|
|
105
|
+
const vRows = virtualRows.value;
|
|
106
|
+
const vRow = vRows.find((r) => r.index === props.activeCell.rowIdx);
|
|
107
|
+
if (!vRow) return null;
|
|
108
|
+
return {
|
|
109
|
+
position: "absolute",
|
|
110
|
+
top: `${vRow.start + props.defaultRowHeight}px`,
|
|
111
|
+
left: `${col.start + ROW_HEADER_WIDTH}px`,
|
|
112
|
+
width: `${col.size}px`,
|
|
113
|
+
height: `${vRow.size}px`,
|
|
114
|
+
zIndex: 30
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
function isInCutRange(colIdx, rowIdx) {
|
|
118
|
+
const r = normalizedCut.value;
|
|
119
|
+
if (!r) return false;
|
|
120
|
+
return colIdx >= r.minCol && colIdx <= r.maxCol && rowIdx >= r.minRow && rowIdx <= r.maxRow;
|
|
121
|
+
}
|
|
122
|
+
function cellInSelection(colIdx, rowIdx) {
|
|
123
|
+
const r = normalizedSelection.value;
|
|
124
|
+
if (!r) return false;
|
|
125
|
+
return colIdx >= r.minCol && colIdx <= r.maxCol && rowIdx >= r.minRow && rowIdx <= r.maxRow;
|
|
126
|
+
}
|
|
127
|
+
let resizeState = null;
|
|
128
|
+
function onResizeStart(e, colId, currentWidth) {
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
e.stopPropagation();
|
|
131
|
+
resizeState = { colId, startX: e.clientX, startWidth: currentWidth };
|
|
132
|
+
const onMove = (ev) => {
|
|
133
|
+
if (!resizeState) return;
|
|
134
|
+
const newWidth = Math.max(40, resizeState.startWidth + (ev.clientX - resizeState.startX));
|
|
135
|
+
emit("resizeColumn", resizeState.colId, newWidth);
|
|
136
|
+
};
|
|
137
|
+
const onUp = () => {
|
|
138
|
+
resizeState = null;
|
|
139
|
+
document.removeEventListener("pointermove", onMove);
|
|
140
|
+
document.removeEventListener("pointerup", onUp);
|
|
141
|
+
};
|
|
142
|
+
document.addEventListener("pointermove", onMove);
|
|
143
|
+
document.addEventListener("pointerup", onUp);
|
|
144
|
+
}
|
|
145
|
+
const renamingColId = ref(null);
|
|
146
|
+
const renameValue = ref("");
|
|
147
|
+
function startColRename(colId, label) {
|
|
148
|
+
renamingColId.value = colId;
|
|
149
|
+
renameValue.value = label;
|
|
150
|
+
nextTick(() => {
|
|
151
|
+
const el = document.querySelector(`[data-col-rename="${colId}"]`);
|
|
152
|
+
el?.focus();
|
|
153
|
+
el?.select();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function commitColRename() {
|
|
157
|
+
if (renamingColId.value) {
|
|
158
|
+
emit("renameColumn", renamingColId.value, renameValue.value);
|
|
159
|
+
renamingColId.value = null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function onEditKeydown(e) {
|
|
163
|
+
if (e.key === "Escape") {
|
|
164
|
+
e.preventDefault();
|
|
165
|
+
e.stopPropagation();
|
|
166
|
+
emit("cancelEdit");
|
|
167
|
+
nextTick(() => scrollRef.value?.focus());
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (e.key === "Enter" || e.key === "Tab") {
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
e.stopPropagation();
|
|
173
|
+
emit("keydown", e);
|
|
174
|
+
nextTick(() => scrollRef.value?.focus());
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const formulaRefDragging = ref(false);
|
|
179
|
+
let touchState = null;
|
|
180
|
+
const LONG_PRESS_MS = 500;
|
|
181
|
+
const TAP_MOVE_TOLERANCE = 10;
|
|
182
|
+
function clearTouchState() {
|
|
183
|
+
if (touchState) {
|
|
184
|
+
clearTimeout(touchState.longPressTimer);
|
|
185
|
+
touchState = null;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function onCellPointerDown(e, colIdx, rowIdx) {
|
|
189
|
+
if (e.button !== 0) return;
|
|
190
|
+
if (props.formulaRefMode) {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
e.stopPropagation();
|
|
193
|
+
formulaRefDragging.value = true;
|
|
194
|
+
emit("formulaRefDragStart", colIdx, rowIdx);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (e.shiftKey) {
|
|
198
|
+
emit("selectCell", colIdx, rowIdx, true);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (e.pointerType === "touch") {
|
|
202
|
+
clearTouchState();
|
|
203
|
+
const target = e.target;
|
|
204
|
+
const timer = window.setTimeout(() => {
|
|
205
|
+
if (!touchState || touchState.moved) return;
|
|
206
|
+
emit("selectCell", colIdx, rowIdx, false);
|
|
207
|
+
const el = target;
|
|
208
|
+
if (el) {
|
|
209
|
+
el.dispatchEvent(new MouseEvent("contextmenu", {
|
|
210
|
+
bubbles: true,
|
|
211
|
+
cancelable: true,
|
|
212
|
+
clientX: touchState.startX,
|
|
213
|
+
clientY: touchState.startY
|
|
214
|
+
}));
|
|
215
|
+
}
|
|
216
|
+
clearTouchState();
|
|
217
|
+
}, LONG_PRESS_MS);
|
|
218
|
+
touchState = {
|
|
219
|
+
colIdx,
|
|
220
|
+
rowIdx,
|
|
221
|
+
startX: e.clientX,
|
|
222
|
+
startY: e.clientY,
|
|
223
|
+
moved: false,
|
|
224
|
+
pointerId: e.pointerId,
|
|
225
|
+
longPressTimer: timer,
|
|
226
|
+
startedAt: Date.now(),
|
|
227
|
+
target
|
|
228
|
+
};
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
emit("beginDrag", colIdx, rowIdx);
|
|
232
|
+
}
|
|
233
|
+
function onCellPointerMove(e) {
|
|
234
|
+
if (!touchState || e.pointerId !== touchState.pointerId) return;
|
|
235
|
+
const dx = e.clientX - touchState.startX;
|
|
236
|
+
const dy = e.clientY - touchState.startY;
|
|
237
|
+
if (Math.abs(dx) > TAP_MOVE_TOLERANCE || Math.abs(dy) > TAP_MOVE_TOLERANCE) {
|
|
238
|
+
touchState.moved = true;
|
|
239
|
+
clearTimeout(touchState.longPressTimer);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function onCellPointerUp(e, colIdx, rowIdx) {
|
|
243
|
+
if (!touchState || e.pointerId !== touchState.pointerId) return;
|
|
244
|
+
if (!touchState.moved) {
|
|
245
|
+
emit("selectCell", colIdx, rowIdx, false);
|
|
246
|
+
}
|
|
247
|
+
clearTouchState();
|
|
248
|
+
}
|
|
249
|
+
function onCellPointerEnter(colIdx, rowIdx) {
|
|
250
|
+
if (formulaRefDragging.value) {
|
|
251
|
+
emit("formulaRefDragMove", colIdx, rowIdx);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (fillDragging.value) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
emit("continueDrag", colIdx, rowIdx);
|
|
258
|
+
}
|
|
259
|
+
function onGridPointerUp() {
|
|
260
|
+
if (formulaRefDragging.value) {
|
|
261
|
+
formulaRefDragging.value = false;
|
|
262
|
+
emit("formulaRefDragEnd");
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
if (fillDragging.value) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
emit("endDrag");
|
|
269
|
+
}
|
|
270
|
+
const fillDragging = ref(false);
|
|
271
|
+
const fillHandleStyle = computed(() => {
|
|
272
|
+
if (props.editMode || !props.activeCell || !props.editable) return null;
|
|
273
|
+
const range = props.selectionRange;
|
|
274
|
+
const targetCol = range ? Math.max(range.startCol, range.endCol) : props.activeCell.colIdx;
|
|
275
|
+
const targetRow = range ? Math.max(range.startRow, range.endRow) : props.activeCell.rowIdx;
|
|
276
|
+
const col = props.columnPositions[targetCol];
|
|
277
|
+
if (!col) return null;
|
|
278
|
+
const vRow = virtualRows.value.find((r) => r.index === targetRow);
|
|
279
|
+
if (!vRow) return null;
|
|
280
|
+
const touchOffset = isMobile.value ? 22 : 0;
|
|
281
|
+
return {
|
|
282
|
+
position: "absolute",
|
|
283
|
+
top: `${vRow.start + vRow.size + props.defaultRowHeight + touchOffset}px`,
|
|
284
|
+
left: `${col.start + col.size + ROW_HEADER_WIDTH + touchOffset}px`,
|
|
285
|
+
transform: "translate(-50%, -50%)",
|
|
286
|
+
touchAction: "none",
|
|
287
|
+
zIndex: 25
|
|
288
|
+
};
|
|
289
|
+
});
|
|
290
|
+
function rowIndexAtY(clientX, clientY) {
|
|
291
|
+
const hit = cellAtPoint(clientX, clientY);
|
|
292
|
+
if (hit) return hit.rowIdx;
|
|
293
|
+
const el = scrollRef.value;
|
|
294
|
+
if (!el) return 0;
|
|
295
|
+
const rect = el.getBoundingClientRect();
|
|
296
|
+
const relY = clientY - rect.top - props.defaultRowHeight + el.scrollTop;
|
|
297
|
+
const max = Math.max(0, props.displayRowCount - 1);
|
|
298
|
+
if (relY <= 0) return 0;
|
|
299
|
+
let y = 0;
|
|
300
|
+
for (let i = 0; i <= max; i++) {
|
|
301
|
+
y += props.getRowHeight(i);
|
|
302
|
+
if (y > relY) return i;
|
|
303
|
+
}
|
|
304
|
+
return max;
|
|
305
|
+
}
|
|
306
|
+
const fillPreviewStyle = computed(() => {
|
|
307
|
+
const p = props.fillPreview;
|
|
308
|
+
if (!p) return null;
|
|
309
|
+
const startColPos = props.columnPositions[p.startCol];
|
|
310
|
+
const endColPos = props.columnPositions[p.endCol];
|
|
311
|
+
if (!startColPos || !endColPos) return null;
|
|
312
|
+
let top;
|
|
313
|
+
let bottom;
|
|
314
|
+
const vFrom = virtualRows.value.find((r) => r.index === p.fromRow);
|
|
315
|
+
if (vFrom) {
|
|
316
|
+
top = vFrom.start;
|
|
317
|
+
} else {
|
|
318
|
+
top = 0;
|
|
319
|
+
for (let i = 0; i < p.fromRow; i++) top += props.getRowHeight(i);
|
|
320
|
+
}
|
|
321
|
+
const vTo = virtualRows.value.find((r) => r.index === p.toRow);
|
|
322
|
+
if (vTo) {
|
|
323
|
+
bottom = vTo.start + vTo.size;
|
|
324
|
+
} else {
|
|
325
|
+
bottom = top;
|
|
326
|
+
for (let i = p.fromRow; i <= p.toRow; i++) bottom += props.getRowHeight(i);
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
position: "absolute",
|
|
330
|
+
top: `${top + props.defaultRowHeight}px`,
|
|
331
|
+
left: `${startColPos.start + ROW_HEADER_WIDTH}px`,
|
|
332
|
+
width: `${endColPos.start + endColPos.size - startColPos.start}px`,
|
|
333
|
+
height: `${bottom - top}px`,
|
|
334
|
+
border: "1.5px dashed var(--ui-primary)",
|
|
335
|
+
backgroundColor: "color-mix(in oklab, var(--ui-primary) 8%, transparent)",
|
|
336
|
+
pointerEvents: "none",
|
|
337
|
+
zIndex: 6
|
|
338
|
+
};
|
|
339
|
+
});
|
|
340
|
+
function onFillHandleDown(e) {
|
|
341
|
+
e.preventDefault();
|
|
342
|
+
e.stopPropagation();
|
|
343
|
+
const ac = props.activeCell;
|
|
344
|
+
if (!ac) return;
|
|
345
|
+
fillDragging.value = true;
|
|
346
|
+
emit("fillDragStart", ac.rowIdx);
|
|
347
|
+
const pointerId = e.pointerId;
|
|
348
|
+
const target = e.target;
|
|
349
|
+
target.setPointerCapture?.(pointerId);
|
|
350
|
+
const onMove = (ev) => {
|
|
351
|
+
if (ev.pointerId !== pointerId) return;
|
|
352
|
+
ev.preventDefault();
|
|
353
|
+
autoScrollNearEdge(ev.clientX, ev.clientY);
|
|
354
|
+
emit("fillDragMove", rowIndexAtY(ev.clientX, ev.clientY));
|
|
355
|
+
};
|
|
356
|
+
const onEnd = (ev) => {
|
|
357
|
+
if (ev.pointerId !== pointerId) return;
|
|
358
|
+
document.removeEventListener("pointermove", onMove);
|
|
359
|
+
document.removeEventListener("pointerup", onEnd);
|
|
360
|
+
document.removeEventListener("pointercancel", onEnd);
|
|
361
|
+
target.releasePointerCapture?.(pointerId);
|
|
362
|
+
if (fillDragging.value) {
|
|
363
|
+
fillDragging.value = false;
|
|
364
|
+
emit("fillDragEnd");
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
document.addEventListener("pointermove", onMove, { passive: false });
|
|
368
|
+
document.addEventListener("pointerup", onEnd);
|
|
369
|
+
document.addEventListener("pointercancel", onEnd);
|
|
370
|
+
}
|
|
371
|
+
const showSelectionHandles = computed(() => {
|
|
372
|
+
if (!isMobile.value || !props.editable) return false;
|
|
373
|
+
if (props.editMode) return false;
|
|
374
|
+
return !!props.activeCell;
|
|
375
|
+
});
|
|
376
|
+
const selectionBounds = computed(() => {
|
|
377
|
+
const r = normalizedSelection.value;
|
|
378
|
+
if (r) return r;
|
|
379
|
+
const ac = props.activeCell;
|
|
380
|
+
if (!ac) return null;
|
|
381
|
+
return { minCol: ac.colIdx, maxCol: ac.colIdx, minRow: ac.rowIdx, maxRow: ac.rowIdx };
|
|
382
|
+
});
|
|
383
|
+
function cornerStyle(colIdx, rowIdx, corner) {
|
|
384
|
+
const col = props.columnPositions[colIdx];
|
|
385
|
+
if (!col) return null;
|
|
386
|
+
const vRow = virtualRows.value.find((r) => r.index === rowIdx);
|
|
387
|
+
if (!vRow) return null;
|
|
388
|
+
const x = corner === "nw" ? col.start : col.start + col.size;
|
|
389
|
+
const y = corner === "nw" ? vRow.start : vRow.start + vRow.size;
|
|
390
|
+
return {
|
|
391
|
+
position: "absolute",
|
|
392
|
+
top: `${y + props.defaultRowHeight}px`,
|
|
393
|
+
left: `${x + ROW_HEADER_WIDTH}px`,
|
|
394
|
+
zIndex: 26,
|
|
395
|
+
transform: "translate(-50%, -50%)",
|
|
396
|
+
touchAction: "none"
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
const handleNwStyle = computed(() => {
|
|
400
|
+
if (!showSelectionHandles.value) return null;
|
|
401
|
+
const b = selectionBounds.value;
|
|
402
|
+
if (!b) return null;
|
|
403
|
+
return cornerStyle(b.minCol, b.minRow, "nw");
|
|
404
|
+
});
|
|
405
|
+
const handleSeStyle = computed(() => {
|
|
406
|
+
if (!showSelectionHandles.value) return null;
|
|
407
|
+
const b = selectionBounds.value;
|
|
408
|
+
if (!b) return null;
|
|
409
|
+
return cornerStyle(b.maxCol, b.maxRow, "se");
|
|
410
|
+
});
|
|
411
|
+
let handleDrag = null;
|
|
412
|
+
function cellAtPoint(clientX, clientY) {
|
|
413
|
+
const el = document.elementFromPoint(clientX, clientY);
|
|
414
|
+
if (!el) return null;
|
|
415
|
+
const cellEl = el.closest("[data-cell-col][data-cell-row]");
|
|
416
|
+
if (!cellEl) return null;
|
|
417
|
+
const colIdx = Number(cellEl.dataset.cellCol);
|
|
418
|
+
const rowIdx = Number(cellEl.dataset.cellRow);
|
|
419
|
+
if (Number.isNaN(colIdx) || Number.isNaN(rowIdx)) return null;
|
|
420
|
+
return { colIdx, rowIdx };
|
|
421
|
+
}
|
|
422
|
+
function autoScrollNearEdge(clientX, clientY) {
|
|
423
|
+
const el = scrollRef.value;
|
|
424
|
+
if (!el) return;
|
|
425
|
+
const rect = el.getBoundingClientRect();
|
|
426
|
+
const edge = 36;
|
|
427
|
+
const speed = 14;
|
|
428
|
+
let dx = 0, dy = 0;
|
|
429
|
+
if (clientY - rect.top < edge) dy = -speed;
|
|
430
|
+
else if (rect.bottom - clientY < edge) dy = speed;
|
|
431
|
+
if (clientX - rect.left < edge) dx = -speed;
|
|
432
|
+
else if (rect.right - clientX < edge) dx = speed;
|
|
433
|
+
if (dx || dy) el.scrollBy({ left: dx, top: dy });
|
|
434
|
+
}
|
|
435
|
+
function onSelectionHandleDown(e, corner) {
|
|
436
|
+
e.preventDefault();
|
|
437
|
+
e.stopPropagation();
|
|
438
|
+
const b = selectionBounds.value;
|
|
439
|
+
if (!b) return;
|
|
440
|
+
const anchorCol = corner === "nw" ? b.maxCol : b.minCol;
|
|
441
|
+
const anchorRow = corner === "nw" ? b.maxRow : b.minRow;
|
|
442
|
+
handleDrag = { corner, pointerId: e.pointerId, anchorCol, anchorRow };
|
|
443
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
444
|
+
const onMove = (ev) => {
|
|
445
|
+
if (!handleDrag || ev.pointerId !== handleDrag.pointerId) return;
|
|
446
|
+
ev.preventDefault();
|
|
447
|
+
autoScrollNearEdge(ev.clientX, ev.clientY);
|
|
448
|
+
const hit = cellAtPoint(ev.clientX, ev.clientY);
|
|
449
|
+
if (!hit) return;
|
|
450
|
+
emit("setRange", handleDrag.anchorCol, handleDrag.anchorRow, hit.colIdx, hit.rowIdx);
|
|
451
|
+
};
|
|
452
|
+
const onUp = (ev) => {
|
|
453
|
+
if (!handleDrag || ev.pointerId !== handleDrag.pointerId) return;
|
|
454
|
+
handleDrag = null;
|
|
455
|
+
document.removeEventListener("pointermove", onMove);
|
|
456
|
+
document.removeEventListener("pointerup", onUp);
|
|
457
|
+
document.removeEventListener("pointercancel", onUp);
|
|
458
|
+
};
|
|
459
|
+
document.addEventListener("pointermove", onMove, { passive: false });
|
|
460
|
+
document.addEventListener("pointerup", onUp);
|
|
461
|
+
document.addEventListener("pointercancel", onUp);
|
|
462
|
+
}
|
|
463
|
+
const contextColIdx = ref(0);
|
|
464
|
+
const contextRowIdx = ref(0);
|
|
465
|
+
const contextMenuOpen = ref(false);
|
|
466
|
+
const contextMenuType = ref("cell");
|
|
467
|
+
const contextMenuItems = computed(() => {
|
|
468
|
+
if (contextMenuType.value === "col") return props.colHeaderContextItems(contextColIdx.value);
|
|
469
|
+
if (contextMenuType.value === "row") return props.rowHeaderContextItems(contextRowIdx.value);
|
|
470
|
+
return props.cellContextItems;
|
|
471
|
+
});
|
|
472
|
+
function onCellContextMenu(_e, colIdx, rowIdx) {
|
|
473
|
+
contextColIdx.value = colIdx;
|
|
474
|
+
contextRowIdx.value = rowIdx;
|
|
475
|
+
contextMenuType.value = "cell";
|
|
476
|
+
if (!cellInSelection(colIdx, rowIdx) && !(props.activeCell?.colIdx === colIdx && props.activeCell?.rowIdx === rowIdx)) {
|
|
477
|
+
emit("selectCell", colIdx, rowIdx, false);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function onColHeaderContextMenu(_e, colIdx) {
|
|
481
|
+
contextColIdx.value = colIdx;
|
|
482
|
+
contextMenuType.value = "col";
|
|
483
|
+
}
|
|
484
|
+
function onRowHeaderContextMenu(_e, rowIdx) {
|
|
485
|
+
contextRowIdx.value = rowIdx;
|
|
486
|
+
contextMenuType.value = "row";
|
|
487
|
+
}
|
|
488
|
+
function onGridContextMenu(_e) {
|
|
489
|
+
}
|
|
490
|
+
function onContextMenuOpenChange(open) {
|
|
491
|
+
contextMenuOpen.value = open;
|
|
492
|
+
}
|
|
493
|
+
const ROW_HEADER_WIDTH_SEL = 48;
|
|
494
|
+
const remoteSelectionOverlays = computed(() => {
|
|
495
|
+
if (!props.remoteSelections?.length) return [];
|
|
496
|
+
const vRows = virtualRows.value;
|
|
497
|
+
if (!vRows.length) return [];
|
|
498
|
+
const cols = props.columnPositions;
|
|
499
|
+
if (!cols.length) return [];
|
|
500
|
+
return props.remoteSelections.map((sel) => {
|
|
501
|
+
const startCol = cols[sel.minCol];
|
|
502
|
+
const endCol = cols[sel.maxCol];
|
|
503
|
+
if (!startCol || !endCol) return null;
|
|
504
|
+
const startRow = vRows.find((r) => r.index === sel.minRow);
|
|
505
|
+
const endRow = vRows.find((r) => r.index === sel.maxRow);
|
|
506
|
+
if (!startRow || !endRow) return null;
|
|
507
|
+
return {
|
|
508
|
+
color: sel.color,
|
|
509
|
+
name: sel.name,
|
|
510
|
+
top: startRow.start + props.defaultRowHeight,
|
|
511
|
+
left: startCol.start + ROW_HEADER_WIDTH_SEL,
|
|
512
|
+
width: endCol.start + endCol.size - startCol.start,
|
|
513
|
+
height: endRow.start + endRow.size - startRow.start
|
|
514
|
+
};
|
|
515
|
+
}).filter(Boolean);
|
|
516
|
+
});
|
|
517
|
+
function scrollToCell(colIdx, rowIdx) {
|
|
518
|
+
const el = scrollRef.value;
|
|
519
|
+
if (!el) return;
|
|
520
|
+
rowVirtualizer.value.scrollToIndex(rowIdx, { align: "center" });
|
|
521
|
+
const col = props.columnPositions[colIdx];
|
|
522
|
+
if (col) {
|
|
523
|
+
const targetLeft = col.start - el.clientWidth / 2 + col.size / 2;
|
|
524
|
+
el.scrollTo({ left: Math.max(0, targetLeft), behavior: "smooth" });
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
defineExpose({ scrollToCell });
|
|
528
|
+
</script>
|
|
529
|
+
|
|
530
|
+
<template>
|
|
531
|
+
<UContextMenu :items="contextMenuItems" @update:open="onContextMenuOpenChange">
|
|
532
|
+
<div
|
|
533
|
+
ref="scrollRef"
|
|
534
|
+
class="flex-1 min-h-0 overflow-auto relative focus:outline-none"
|
|
535
|
+
tabindex="0"
|
|
536
|
+
@keydown="emit('keydown', $event)"
|
|
537
|
+
@scroll="onScroll"
|
|
538
|
+
@pointerup="onGridPointerUp"
|
|
539
|
+
@paste="emit('paste', $event)"
|
|
540
|
+
@copy="emit('copy', $event)"
|
|
541
|
+
@cut="emit('cut', $event)"
|
|
542
|
+
@contextmenu="onGridContextMenu"
|
|
543
|
+
>
|
|
544
|
+
<!-- Spacer for total scroll area -->
|
|
545
|
+
<div
|
|
546
|
+
:style="{
|
|
547
|
+
width: `${totalWidth + ROW_HEADER_WIDTH}px`,
|
|
548
|
+
height: `${totalHeight + defaultRowHeight}px`,
|
|
549
|
+
position: 'relative'
|
|
550
|
+
}"
|
|
551
|
+
>
|
|
552
|
+
<!-- ── Column header row (sticky top, includes corner) ─────────────── -->
|
|
553
|
+
<div
|
|
554
|
+
class="sticky top-0 z-20"
|
|
555
|
+
:style="{ height: `${defaultRowHeight}px` }"
|
|
556
|
+
>
|
|
557
|
+
<!-- Corner cell -->
|
|
558
|
+
<div
|
|
559
|
+
class="sticky left-0 inline-block align-top z-30 bg-(--ui-bg)"
|
|
560
|
+
:class="showGridlines ? 'border-b border-r border-(--ui-border)' : ''"
|
|
561
|
+
:style="{ width: `${ROW_HEADER_WIDTH}px`, height: `${defaultRowHeight}px` }"
|
|
562
|
+
/>
|
|
563
|
+
|
|
564
|
+
<!-- Column headers -->
|
|
565
|
+
<template v-for="col in visibleColsReactive" :key="col.id">
|
|
566
|
+
<div
|
|
567
|
+
class="absolute top-0 flex items-center justify-center text-xs font-medium text-(--ui-text-muted) select-none bg-(--ui-bg) group cursor-pointer"
|
|
568
|
+
:class="showGridlines ? 'border-b border-r border-(--ui-border)' : ''"
|
|
569
|
+
:style="{
|
|
570
|
+
left: `${col.start + ROW_HEADER_WIDTH}px`,
|
|
571
|
+
width: `${col.size}px`,
|
|
572
|
+
height: `${defaultRowHeight}px`
|
|
573
|
+
}"
|
|
574
|
+
@click="emit('selectColumn', col.idx)"
|
|
575
|
+
@contextmenu="onColHeaderContextMenu($event, col.idx)"
|
|
576
|
+
@dblclick="editable && dataColumns.find((c) => c.id === col.id) ? startColRename(col.id, col.label) : void 0"
|
|
577
|
+
>
|
|
578
|
+
<input
|
|
579
|
+
v-if="renamingColId === col.id"
|
|
580
|
+
v-model="renameValue"
|
|
581
|
+
:data-col-rename="col.id"
|
|
582
|
+
class="w-full text-center bg-transparent outline-none text-xs font-medium"
|
|
583
|
+
@blur="commitColRename"
|
|
584
|
+
@keydown.enter="commitColRename"
|
|
585
|
+
@keydown.escape="renamingColId = null"
|
|
586
|
+
@click.stop
|
|
587
|
+
>
|
|
588
|
+
<span v-else class="truncate px-1">{{ col.label }}</span>
|
|
589
|
+
|
|
590
|
+
<!-- Resize handle (wider hit target on touch; visible marker on mobile) -->
|
|
591
|
+
<div
|
|
592
|
+
v-if="editable"
|
|
593
|
+
class="absolute right-0 top-0 bottom-0 cursor-col-resize"
|
|
594
|
+
:class="isMobile ? 'w-3' : 'w-1.5 opacity-0 group-hover:opacity-100 hover:bg-(--ui-primary)/20'"
|
|
595
|
+
:style="{ touchAction: 'none' }"
|
|
596
|
+
@pointerdown="onResizeStart($event, col.id, col.size)"
|
|
597
|
+
@dblclick.stop="emit('autoFitColumn', col.id)"
|
|
598
|
+
>
|
|
599
|
+
<div
|
|
600
|
+
v-if="isMobile"
|
|
601
|
+
class="absolute top-1/2 right-0.5 -translate-y-1/2 w-0.5 h-4 rounded-full bg-(--ui-border-accented)/70"
|
|
602
|
+
/>
|
|
603
|
+
</div>
|
|
604
|
+
</div>
|
|
605
|
+
</template>
|
|
606
|
+
</div>
|
|
607
|
+
|
|
608
|
+
<!-- ── Row headers (sticky left, scrolls vertically) ────────────────── -->
|
|
609
|
+
<div
|
|
610
|
+
class="sticky left-0 z-10"
|
|
611
|
+
:style="{ width: `${ROW_HEADER_WIDTH}px`, height: 0 }"
|
|
612
|
+
>
|
|
613
|
+
<template v-for="vRow in virtualRows" :key="vRow.index">
|
|
614
|
+
<div
|
|
615
|
+
class="absolute flex items-center justify-center text-xs text-(--ui-text-dimmed) select-none bg-(--ui-bg) cursor-pointer"
|
|
616
|
+
:class="showGridlines ? 'border-b border-r border-(--ui-border)' : ''"
|
|
617
|
+
:style="{
|
|
618
|
+
top: `${vRow.start}px`,
|
|
619
|
+
width: `${ROW_HEADER_WIDTH}px`,
|
|
620
|
+
height: `${vRow.size}px`
|
|
621
|
+
}"
|
|
622
|
+
@click="emit('selectRow', vRow.index)"
|
|
623
|
+
@contextmenu="onRowHeaderContextMenu($event, vRow.index)"
|
|
624
|
+
>
|
|
625
|
+
{{ vRow.index + 1 }}
|
|
626
|
+
</div>
|
|
627
|
+
</template>
|
|
628
|
+
</div>
|
|
629
|
+
|
|
630
|
+
<!-- ── Cells ───────────────────────────────────────────────────────── -->
|
|
631
|
+
<div
|
|
632
|
+
:style="{
|
|
633
|
+
position: 'absolute',
|
|
634
|
+
top: `${defaultRowHeight}px`,
|
|
635
|
+
left: `${ROW_HEADER_WIDTH}px`
|
|
636
|
+
}"
|
|
637
|
+
>
|
|
638
|
+
<template v-for="vRow in virtualRows" :key="vRow.index">
|
|
639
|
+
<template v-for="col in visibleColsReactive" :key="`${vRow.index}:${col.id}`">
|
|
640
|
+
<ASheetsCell
|
|
641
|
+
:col-idx="col.idx"
|
|
642
|
+
:row-idx="vRow.index"
|
|
643
|
+
:top="vRow.start"
|
|
644
|
+
:left="col.start"
|
|
645
|
+
:width="col.size"
|
|
646
|
+
:height="vRow.size"
|
|
647
|
+
:value="getCellValue(col.idx, vRow.index)"
|
|
648
|
+
:entry="getCellEntry(col.idx, vRow.index)"
|
|
649
|
+
:is-active="activeCell?.colIdx === col.idx && activeCell?.rowIdx === vRow.index"
|
|
650
|
+
:is-selected="cellInSelection(col.idx, vRow.index)"
|
|
651
|
+
:is-cut="isInCutRange(col.idx, vRow.index)"
|
|
652
|
+
:is-editing="editMode && activeCell?.colIdx === col.idx && activeCell?.rowIdx === vRow.index"
|
|
653
|
+
:highlight="formulaRefHighlights.get(`${col.idx}:${vRow.index}`) ?? null"
|
|
654
|
+
:remote="remoteEditors.get(`${col.idx}:${vRow.index}`) ?? null"
|
|
655
|
+
:remote-active="remoteActiveCells?.get(`${col.idx}:${vRow.index}`) ?? null"
|
|
656
|
+
:show-gridlines="showGridlines"
|
|
657
|
+
:editable="editable"
|
|
658
|
+
@pointerdown="onCellPointerDown($event, col.idx, vRow.index)"
|
|
659
|
+
@pointermove="onCellPointerMove"
|
|
660
|
+
@pointerup="onCellPointerUp($event, col.idx, vRow.index)"
|
|
661
|
+
@pointercancel="clearTouchState"
|
|
662
|
+
@pointerenter="onCellPointerEnter(col.idx, vRow.index)"
|
|
663
|
+
@contextmenu="onCellContextMenu($event, col.idx, vRow.index)"
|
|
664
|
+
@dblclick="editable ? emit('activateCell', col.idx, vRow.index) : void 0"
|
|
665
|
+
/>
|
|
666
|
+
</template>
|
|
667
|
+
</template>
|
|
668
|
+
</div>
|
|
669
|
+
|
|
670
|
+
<!-- ── Fill-preview overlay ──────────────────────────────────────── -->
|
|
671
|
+
<div
|
|
672
|
+
v-if="fillPreviewStyle"
|
|
673
|
+
:style="fillPreviewStyle"
|
|
674
|
+
/>
|
|
675
|
+
|
|
676
|
+
<!-- ── Remote selection overlays ──────────────────────────────────── -->
|
|
677
|
+
<div
|
|
678
|
+
v-for="(sel, idx) in remoteSelectionOverlays"
|
|
679
|
+
:key="`rsel-${idx}`"
|
|
680
|
+
class="absolute pointer-events-none"
|
|
681
|
+
:style="{
|
|
682
|
+
top: `${sel.top}px`,
|
|
683
|
+
left: `${sel.left}px`,
|
|
684
|
+
width: `${sel.width}px`,
|
|
685
|
+
height: `${sel.height}px`,
|
|
686
|
+
backgroundColor: `${sel.color}18`,
|
|
687
|
+
border: `1px solid ${sel.color}60`,
|
|
688
|
+
zIndex: 3
|
|
689
|
+
}"
|
|
690
|
+
/>
|
|
691
|
+
|
|
692
|
+
<!-- ── Edit overlay input ──────────────────────────────────────────── -->
|
|
693
|
+
<input
|
|
694
|
+
v-if="editMode && activeCell && editOverlayStyle"
|
|
695
|
+
ref="editInputRef"
|
|
696
|
+
enterkeyhint="done"
|
|
697
|
+
autocomplete="off"
|
|
698
|
+
autocorrect="off"
|
|
699
|
+
autocapitalize="off"
|
|
700
|
+
spellcheck="false"
|
|
701
|
+
class="bg-(--ui-bg) px-1.5 text-base md:text-sm outline-none ring-2 ring-(--ui-primary)"
|
|
702
|
+
:style="editOverlayStyle"
|
|
703
|
+
:value="editValue"
|
|
704
|
+
@input="emit('update:editValue', $event.target.value)"
|
|
705
|
+
@blur="emit('commitEdit')"
|
|
706
|
+
@keydown="onEditKeydown"
|
|
707
|
+
@click.stop
|
|
708
|
+
>
|
|
709
|
+
|
|
710
|
+
<!-- ── Fill handle ────────────────────────────────────────────────── -->
|
|
711
|
+
<div
|
|
712
|
+
v-if="fillHandleStyle"
|
|
713
|
+
class="bg-(--ui-primary) cursor-crosshair border border-white rounded-sm"
|
|
714
|
+
:class="isMobile ? 'size-5' : 'size-2'"
|
|
715
|
+
:style="fillHandleStyle"
|
|
716
|
+
@pointerdown="onFillHandleDown"
|
|
717
|
+
/>
|
|
718
|
+
|
|
719
|
+
<!-- ── Touch selection handles (NW, SE corners) ───────────────────── -->
|
|
720
|
+
<div
|
|
721
|
+
v-if="handleNwStyle"
|
|
722
|
+
class="size-5 rounded-full bg-(--ui-primary) ring-2 ring-white shadow-md"
|
|
723
|
+
:style="handleNwStyle"
|
|
724
|
+
aria-label="Selection handle"
|
|
725
|
+
@pointerdown="onSelectionHandleDown($event, 'nw')"
|
|
726
|
+
/>
|
|
727
|
+
<div
|
|
728
|
+
v-if="handleSeStyle"
|
|
729
|
+
class="size-5 rounded-full bg-(--ui-primary) ring-2 ring-white shadow-md"
|
|
730
|
+
:style="handleSeStyle"
|
|
731
|
+
aria-label="Selection handle"
|
|
732
|
+
@pointerdown="onSelectionHandleDown($event, 'se')"
|
|
733
|
+
/>
|
|
734
|
+
</div>
|
|
735
|
+
</div>
|
|
736
|
+
</UContextMenu>
|
|
737
|
+
</template>
|