niuma-ui 1.1.12 → 1.2.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/CHANGELOG.md +28 -18
- package/README.en.md +12 -9
- package/README.md +13 -10
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/RsAlert.css +111 -0
- package/dist/components/RsAlert.d.ts +32 -0
- package/dist/components/RsAlert.impl.js +83 -0
- package/dist/components/RsAlert.js +8 -0
- package/dist/components/RsAvatar.css +60 -0
- package/dist/components/RsAvatar.d.ts +30 -0
- package/dist/components/RsAvatar.impl.js +59 -0
- package/dist/components/RsAvatar.js +7 -0
- package/dist/components/RsBadge.css +41 -0
- package/dist/components/RsBadge.d.ts +18 -0
- package/dist/components/RsBadge.impl.js +13 -0
- package/dist/components/RsBadge.js +8 -0
- package/dist/components/RsBreadcrumb.css +37 -0
- package/dist/components/RsBreadcrumb.d.ts +11 -0
- package/dist/components/RsBreadcrumb.impl.js +26 -0
- package/dist/components/RsBreadcrumb.js +7 -0
- package/dist/components/RsBreadcrumbItems.d.ts +8 -0
- package/dist/components/RsBreadcrumbItems.impl.js +40 -0
- package/dist/components/RsBreadcrumbItems.js +5 -0
- package/dist/components/RsButton.css +298 -0
- package/dist/components/RsButton.d.ts +56 -0
- package/dist/components/RsButton.impl.js +244 -0
- package/dist/components/RsButton.js +8 -0
- package/dist/components/RsCalendarGrid.css +99 -0
- package/dist/components/RsCalendarGrid.d.ts +30 -0
- package/dist/components/RsCalendarGrid.impl.js +182 -0
- package/dist/components/RsCalendarGrid.js +8 -0
- package/dist/components/RsCard.css +282 -0
- package/dist/components/RsCard.d.ts +78 -0
- package/dist/components/RsCard.impl.js +104 -0
- package/dist/components/RsCard.js +7 -0
- package/dist/components/RsCheckbox.css +104 -0
- package/dist/components/RsCheckbox.d.ts +36 -0
- package/dist/components/RsCheckbox.impl.js +86 -0
- package/dist/components/RsCheckbox.js +7 -0
- package/dist/components/RsCodeBlock.css +102 -0
- package/dist/components/RsCodeBlock.d.ts +34 -0
- package/dist/components/RsCodeBlock.impl.js +173 -0
- package/dist/components/RsCodeBlock.js +8 -0
- package/dist/components/RsCodeEditor.css +214 -0
- package/dist/components/RsCodeEditor.d.ts +88 -0
- package/dist/components/RsCodeEditor.impl.js +308 -0
- package/dist/components/RsCodeEditor.js +8 -0
- package/dist/components/RsConfigProvider.css +7 -0
- package/dist/components/RsConfigProvider.d.ts +36 -0
- package/dist/components/RsConfigProvider.impl.js +49 -0
- package/dist/components/RsConfigProvider.js +8 -0
- package/dist/components/RsConfirmDialog.css +118 -0
- package/dist/components/RsConfirmDialog.d.ts +72 -0
- package/dist/components/RsConfirmDialog.impl.js +207 -0
- package/dist/components/RsConfirmDialog.js +7 -0
- package/dist/components/RsContainer.css +94 -0
- package/dist/components/RsContainer.d.ts +52 -0
- package/dist/components/RsContainer.impl.js +99 -0
- package/dist/components/RsContainer.js +8 -0
- package/dist/components/RsContextMenu.css +178 -0
- package/dist/components/RsContextMenu.d.ts +35 -0
- package/dist/components/RsContextMenu.impl.js +81 -0
- package/dist/components/RsContextMenu.js +7 -0
- package/dist/components/RsContextMenuItems.d.ts +11 -0
- package/dist/components/RsContextMenuItems.impl.js +90 -0
- package/dist/components/RsContextMenuItems.js +5 -0
- package/dist/components/RsDatePicker-1.css +157 -0
- package/dist/components/RsDatePicker.css +100 -0
- package/dist/components/RsDatePicker.d.ts +72 -0
- package/dist/components/RsDatePicker.impl.js +719 -0
- package/dist/components/RsDatePicker.js +10 -0
- package/dist/components/RsDateTimePicker.d.ts +50 -0
- package/dist/components/RsDateTimePicker.impl.js +70 -0
- package/dist/components/RsDateTimePicker.js +5 -0
- package/dist/components/RsDescriptions.css +86 -0
- package/dist/components/RsDescriptions.d.ts +34 -0
- package/dist/components/RsDescriptions.impl.js +69 -0
- package/dist/components/RsDescriptions.js +7 -0
- package/dist/components/RsDescriptionsItem.d.ts +21 -0
- package/dist/components/RsDescriptionsItem.impl.js +26 -0
- package/dist/components/RsDescriptionsItem.js +5 -0
- package/dist/components/RsDialog.css +298 -0
- package/dist/components/RsDialog.d.ts +143 -0
- package/dist/components/RsDialog.impl.js +410 -0
- package/dist/components/RsDialog.js +7 -0
- package/dist/components/RsDivider.css +51 -0
- package/dist/components/RsDivider.d.ts +20 -0
- package/dist/components/RsDivider.impl.js +31 -0
- package/dist/components/RsDivider.js +8 -0
- package/dist/components/RsDrawer.css +368 -0
- package/dist/components/RsDrawer.d.ts +104 -0
- package/dist/components/RsDrawer.impl.js +497 -0
- package/dist/components/RsDrawer.js +7 -0
- package/dist/components/RsDropdown.css +157 -0
- package/dist/components/RsDropdown.d.ts +34 -0
- package/dist/components/RsDropdown.impl.js +100 -0
- package/dist/components/RsDropdown.js +7 -0
- package/dist/components/RsDropdownItems.d.ts +15 -0
- package/dist/components/RsDropdownItems.impl.js +99 -0
- package/dist/components/RsDropdownItems.js +5 -0
- package/dist/components/RsDynamicTags.css +148 -0
- package/dist/components/RsDynamicTags.d.ts +71 -0
- package/dist/components/RsDynamicTags.impl.js +313 -0
- package/dist/components/RsDynamicTags.js +8 -0
- package/dist/components/RsEmpty.css +52 -0
- package/dist/components/RsEmpty.d.ts +32 -0
- package/dist/components/RsEmpty.impl.js +43 -0
- package/dist/components/RsEmpty.js +7 -0
- package/dist/components/RsForm.css +30 -0
- package/dist/components/RsForm.d.ts +80 -0
- package/dist/components/RsForm.impl.js +188 -0
- package/dist/components/RsForm.js +8 -0
- package/dist/components/RsFormItem.css +52 -0
- package/dist/components/RsFormItem.d.ts +78 -0
- package/dist/components/RsFormItem.impl.js +288 -0
- package/dist/components/RsFormItem.js +8 -0
- package/dist/components/RsFormItemControl.d.ts +21 -0
- package/dist/components/RsFormItemControl.impl.js +19 -0
- package/dist/components/RsFormItemControl.js +5 -0
- package/dist/components/RsFormList.d.ts +23 -0
- package/dist/components/RsFormList.impl.js +86 -0
- package/dist/components/RsFormList.js +5 -0
- package/dist/components/RsIcon.css +14 -0
- package/dist/components/RsIcon.d.ts +24 -0
- package/dist/components/RsIcon.impl.js +77 -0
- package/dist/components/RsIcon.js +8 -0
- package/dist/components/RsInput.css +528 -0
- package/dist/components/RsInput.d.ts +147 -0
- package/dist/components/RsInput.impl.js +439 -0
- package/dist/components/RsInput.js +8 -0
- package/dist/components/RsInputNumber.css +163 -0
- package/dist/components/RsInputNumber.d.ts +88 -0
- package/dist/components/RsInputNumber.impl.js +375 -0
- package/dist/components/RsInputNumber.js +8 -0
- package/dist/components/RsLabel.css +33 -0
- package/dist/components/RsLabel.d.ts +25 -0
- package/dist/components/RsLabel.impl.js +45 -0
- package/dist/components/RsLabel.js +8 -0
- package/dist/components/RsLink.css +45 -0
- package/dist/components/RsLink.d.ts +25 -0
- package/dist/components/RsLink.impl.js +59 -0
- package/dist/components/RsLink.js +7 -0
- package/dist/components/RsLoading.css +106 -0
- package/dist/components/RsLoading.d.ts +24 -0
- package/dist/components/RsLoading.impl.js +72 -0
- package/dist/components/RsLoading.js +7 -0
- package/dist/components/RsLoadingBar.css +20 -0
- package/dist/components/RsLoadingBar.d.ts +31 -0
- package/dist/components/RsLoadingBar.impl.js +111 -0
- package/dist/components/RsLoadingBar.js +8 -0
- package/dist/components/RsMarkdown.css +214 -0
- package/dist/components/RsMarkdown.d.ts +36 -0
- package/dist/components/RsMarkdown.impl.js +139 -0
- package/dist/components/RsMarkdown.js +7 -0
- package/dist/components/RsMenu.css +200 -0
- package/dist/components/RsMenu.d.ts +28 -0
- package/dist/components/RsMenu.impl.js +108 -0
- package/dist/components/RsMenu.js +7 -0
- package/dist/components/RsMenuItems.d.ts +25 -0
- package/dist/components/RsMenuItems.impl.js +282 -0
- package/dist/components/RsMenuItems.js +5 -0
- package/dist/components/RsMonacoEditor.css +28 -0
- package/dist/components/RsMonacoEditor.d.ts +105 -0
- package/dist/components/RsMonacoEditor.impl.js +353 -0
- package/dist/components/RsMonacoEditor.js +8 -0
- package/dist/components/RsPagination.css +83 -0
- package/dist/components/RsPagination.d.ts +44 -0
- package/dist/components/RsPagination.impl.js +208 -0
- package/dist/components/RsPagination.js +8 -0
- package/dist/components/RsPopover.css +24 -0
- package/dist/components/RsPopover.d.ts +43 -0
- package/dist/components/RsPopover.impl.js +71 -0
- package/dist/components/RsPopover.js +7 -0
- package/dist/components/RsProseEditor.css +19 -0
- package/dist/components/RsProseEditor.d.ts +38 -0
- package/dist/components/RsProseEditor.impl.js +137 -0
- package/dist/components/RsProseEditor.js +8 -0
- package/dist/components/RsRadio.css +19 -0
- package/dist/components/RsRadio.d.ts +34 -0
- package/dist/components/RsRadio.impl.js +66 -0
- package/dist/components/RsRadio.js +7 -0
- package/dist/components/RsRadioItem.css +90 -0
- package/dist/components/RsRadioItem.d.ts +23 -0
- package/dist/components/RsRadioItem.impl.js +55 -0
- package/dist/components/RsRadioItem.js +7 -0
- package/dist/components/RsScrollbar.css +68 -0
- package/dist/components/RsScrollbar.d.ts +31 -0
- package/dist/components/RsScrollbar.impl.js +81 -0
- package/dist/components/RsScrollbar.js +7 -0
- package/dist/components/RsSelect.css +233 -0
- package/dist/components/RsSelect.d.ts +148 -0
- package/dist/components/RsSelect.impl.js +506 -0
- package/dist/components/RsSelect.js +8 -0
- package/dist/components/RsSidebar.css +61 -0
- package/dist/components/RsSidebar.d.ts +44 -0
- package/dist/components/RsSidebar.impl.js +63 -0
- package/dist/components/RsSidebar.js +8 -0
- package/dist/components/RsSidebarGroup.css +15 -0
- package/dist/components/RsSidebarGroup.d.ts +17 -0
- package/dist/components/RsSidebarGroup.impl.js +22 -0
- package/dist/components/RsSidebarGroup.js +8 -0
- package/dist/components/RsSidebarItem.css +45 -0
- package/dist/components/RsSidebarItem.d.ts +20 -0
- package/dist/components/RsSidebarItem.impl.js +41 -0
- package/dist/components/RsSidebarItem.js +8 -0
- package/dist/components/RsSplitPane.css +183 -0
- package/dist/components/RsSplitPane.d.ts +51 -0
- package/dist/components/RsSplitPane.impl.js +408 -0
- package/dist/components/RsSplitPane.js +7 -0
- package/dist/components/RsStatCard.css +51 -0
- package/dist/components/RsStatCard.d.ts +26 -0
- package/dist/components/RsStatCard.impl.js +41 -0
- package/dist/components/RsStatCard.js +8 -0
- package/dist/components/RsSteps.css +83 -0
- package/dist/components/RsSteps.d.ts +22 -0
- package/dist/components/RsSteps.impl.js +55 -0
- package/dist/components/RsSteps.js +8 -0
- package/dist/components/RsSwitch.css +101 -0
- package/dist/components/RsSwitch.d.ts +41 -0
- package/dist/components/RsSwitch.impl.js +92 -0
- package/dist/components/RsSwitch.js +7 -0
- package/dist/components/RsTable.d.ts +139 -0
- package/dist/components/RsTable.impl.js +676 -0
- package/dist/components/RsTable.js +5 -0
- package/dist/components/RsTabs.css +616 -0
- package/dist/components/RsTabs.d.ts +92 -0
- package/dist/components/RsTabs.impl.js +526 -0
- package/dist/components/RsTabs.js +7 -0
- package/dist/components/RsTag.css +94 -0
- package/dist/components/RsTag.d.ts +33 -0
- package/dist/components/RsTag.impl.js +70 -0
- package/dist/components/RsTag.js +8 -0
- package/dist/components/RsTerminal.css +119 -0
- package/dist/components/RsTerminal.d.ts +85 -0
- package/dist/components/RsTerminal.impl.js +525 -0
- package/dist/components/RsTerminal.js +8 -0
- package/dist/components/RsTimePicker-1.css +98 -0
- package/dist/components/RsTimePicker.css +106 -0
- package/dist/components/RsTimePicker.d.ts +41 -0
- package/dist/components/RsTimePicker.impl.js +374 -0
- package/dist/components/RsTimePicker.js +10 -0
- package/dist/components/RsTimePickerColumns.css +104 -0
- package/dist/components/RsTimePickerColumns.d.ts +30 -0
- package/dist/components/RsTimePickerColumns.impl.js +172 -0
- package/dist/components/RsTimePickerColumns.js +8 -0
- package/dist/components/RsToaster.css +329 -0
- package/dist/components/RsToaster.d.ts +17 -0
- package/dist/components/RsToaster.impl.js +67 -0
- package/dist/components/RsToaster.js +7 -0
- package/dist/components/RsToolbar.css +61 -0
- package/dist/components/RsToolbar.d.ts +43 -0
- package/dist/components/RsToolbar.impl.js +57 -0
- package/dist/components/RsToolbar.js +7 -0
- package/dist/components/RsTooltip.css +59 -0
- package/dist/components/RsTooltip.d.ts +47 -0
- package/dist/components/RsTooltip.impl.js +88 -0
- package/dist/components/RsTooltip.js +7 -0
- package/dist/components/RsTooltipProvider.d.ts +26 -0
- package/dist/components/RsTooltipProvider.impl.js +32 -0
- package/dist/components/RsTooltipProvider.js +5 -0
- package/dist/components/RsTree.css +308 -0
- package/dist/components/RsTree.d.ts +131 -0
- package/dist/components/RsTree.impl.js +762 -0
- package/dist/components/RsTree.js +8 -0
- package/dist/components/RsUpload.css +191 -0
- package/dist/components/RsUpload.d.ts +38 -0
- package/dist/components/RsUpload.impl.js +198 -0
- package/dist/components/RsUpload.js +8 -0
- package/dist/components/RsVNodeHost.d.ts +18 -0
- package/dist/components/RsVNodeHost.impl.js +18 -0
- package/dist/components/RsVNodeHost.js +5 -0
- package/dist/components/RsVirtualList.css +29 -0
- package/dist/components/RsVirtualList.d.ts +37 -0
- package/dist/components/RsVirtualList.impl.js +138 -0
- package/dist/components/RsVirtualList.js +8 -0
- package/dist/components/avatar-utils.d.ts +11 -0
- package/dist/components/avatar-utils.js +13 -0
- package/dist/components/breadcrumb-utils.d.ts +12 -0
- package/dist/components/breadcrumb-utils.js +12 -0
- package/dist/components/button-utils.d.ts +17 -0
- package/dist/components/button-utils.js +13 -0
- package/dist/components/class-utils.d.ts +2 -0
- package/dist/components/code-editor-utils.d.ts +33 -0
- package/dist/components/code-editor-utils.js +64 -0
- package/dist/components/code-mirror-completion.d.ts +5 -0
- package/dist/components/code-mirror-completion.js +37 -0
- package/dist/components/code-mirror-diagnostics.d.ts +6 -0
- package/dist/components/code-mirror-diagnostics.js +35 -0
- package/dist/components/code-mirror-ghost.d.ts +8 -0
- package/dist/components/code-mirror-ghost.js +133 -0
- package/dist/components/code-mirror-inline-edit.d.ts +11 -0
- package/dist/components/code-mirror-inline-edit.js +51 -0
- package/dist/components/code-mirror-intel.d.ts +22 -0
- package/dist/components/code-mirror-intel.js +62 -0
- package/dist/components/code-mirror-lang.d.ts +10 -0
- package/dist/components/code-mirror-lang.js +113 -0
- package/dist/components/context-menu-utils.d.ts +21 -0
- package/dist/components/context-menu-utils.js +8 -0
- package/dist/components/date-picker-utils.d.ts +115 -0
- package/dist/components/date-picker-utils.js +270 -0
- package/dist/components/date-range-validation.d.ts +15 -0
- package/dist/components/date-range-validation.js +16 -0
- package/dist/components/date-validation.d.ts +15 -0
- package/dist/components/date-validation.js +46 -0
- package/dist/components/descriptions-utils.d.ts +18 -0
- package/dist/components/descriptions-utils.js +4 -0
- package/dist/components/dialog-utils.d.ts +95 -0
- package/dist/components/dialog-utils.js +58 -0
- package/dist/components/dialog-viewport.d.ts +14 -0
- package/dist/components/dialog-viewport.js +38 -0
- package/dist/components/dialog-window.d.ts +45 -0
- package/dist/components/dialog-window.js +275 -0
- package/dist/components/drawer-utils.d.ts +37 -0
- package/dist/components/drawer-utils.js +59 -0
- package/dist/components/dropdown-utils.d.ts +13 -0
- package/dist/components/dropdown-utils.js +12 -0
- package/dist/components/form-item-control.d.ts +7 -0
- package/dist/components/form-item-control.js +46 -0
- package/dist/components/form-path.d.ts +29 -0
- package/dist/components/form-path.js +78 -0
- package/dist/components/form-rules.d.ts +82 -0
- package/dist/components/form-rules.js +130 -0
- package/dist/components/form-utils.d.ts +120 -0
- package/dist/components/form-utils.js +67 -0
- package/dist/components/input-number-utils.d.ts +36 -0
- package/dist/components/input-number-utils.js +74 -0
- package/dist/components/input-rules.d.ts +15 -0
- package/dist/components/input-rules.js +59 -0
- package/dist/components/loading-utils.d.ts +6 -0
- package/dist/components/markdown-utils.d.ts +16 -0
- package/dist/components/markdown-utils.js +143 -0
- package/dist/components/menu-utils.d.ts +16 -0
- package/dist/components/menu-utils.js +29 -0
- package/dist/components/overlay-utils.d.ts +23 -0
- package/dist/components/overlay-utils.js +17 -0
- package/dist/components/pagination-utils.d.ts +9 -0
- package/dist/components/pagination-utils.js +53 -0
- package/dist/components/popover-utils.d.ts +6 -0
- package/dist/components/radio-utils.d.ts +9 -0
- package/dist/components/radio-utils.js +4 -0
- package/dist/components/reka.d.ts +2 -0
- package/dist/components/reka.js +2 -0
- package/dist/components/resolve-radius.d.ts +9 -0
- package/dist/components/resolve-radius.js +18 -0
- package/dist/components/resolve-size.d.ts +10 -0
- package/dist/components/resolve-size.js +20 -0
- package/dist/components/scrollbar-utils.d.ts +3 -0
- package/dist/components/scrollbar-utils.js +7 -0
- package/dist/components/select-utils.d.ts +83 -0
- package/dist/components/select-utils.js +211 -0
- package/dist/components/split-pane-utils.d.ts +74 -0
- package/dist/components/split-pane-utils.js +135 -0
- package/dist/components/steps-utils.d.ts +12 -0
- package/dist/components/steps-utils.js +12 -0
- package/dist/components/table/RsTableBody.d.ts +47 -0
- package/dist/components/table/RsTableBody.impl.js +312 -0
- package/dist/components/table/RsTableBody.js +5 -0
- package/dist/components/table/RsTableBodyRow.d.ts +149 -0
- package/dist/components/table/RsTableBodyRow.impl.js +438 -0
- package/dist/components/table/RsTableBodyRow.js +5 -0
- package/dist/components/table/RsTableCell.d.ts +59 -0
- package/dist/components/table/RsTableCell.impl.js +213 -0
- package/dist/components/table/RsTableCell.js +5 -0
- package/dist/components/table/RsTableCellContent.d.ts +19 -0
- package/dist/components/table/RsTableCellContent.js +25 -0
- package/dist/components/table/RsTableCellEditor.d.ts +46 -0
- package/dist/components/table/RsTableCellEditor.impl.js +341 -0
- package/dist/components/table/RsTableCellEditor.js +5 -0
- package/dist/components/table/RsTableColGroup.d.ts +18 -0
- package/dist/components/table/RsTableColGroup.impl.js +58 -0
- package/dist/components/table/RsTableColGroup.js +5 -0
- package/dist/components/table/RsTableEditGutter.d.ts +17 -0
- package/dist/components/table/RsTableEditGutter.impl.js +52 -0
- package/dist/components/table/RsTableEditGutter.js +5 -0
- package/dist/components/table/RsTableHeader.d.ts +22 -0
- package/dist/components/table/RsTableHeader.impl.js +184 -0
- package/dist/components/table/RsTableHeader.js +5 -0
- package/dist/components/table/RsTableHeaderFilter.css +24 -0
- package/dist/components/table/RsTableHeaderFilter.d.ts +19 -0
- package/dist/components/table/RsTableHeaderFilter.impl.js +102 -0
- package/dist/components/table/RsTableHeaderFilter.js +8 -0
- package/dist/components/table/RsTableRowStatus.css +30 -0
- package/dist/components/table/RsTableRowStatus.d.ts +14 -0
- package/dist/components/table/RsTableRowStatus.impl.js +44 -0
- package/dist/components/table/RsTableRowStatus.js +8 -0
- package/dist/components/table/RsTableSummaryRow.d.ts +37 -0
- package/dist/components/table/RsTableSummaryRow.impl.js +57 -0
- package/dist/components/table/RsTableSummaryRow.js +5 -0
- package/dist/components/table/rs-table-api.d.ts +65 -0
- package/dist/components/table/rs-table-api.js +22 -0
- package/dist/components/table/rs-table-compat-matrix.d.ts +24 -0
- package/dist/components/table/rs-table-compat-matrix.js +64 -0
- package/dist/components/table/rs-table-echarts-adapter.d.ts +47 -0
- package/dist/components/table/rs-table-echarts-adapter.js +49 -0
- package/dist/components/table/rs-table-feature-host.d.ts +61 -0
- package/dist/components/table/rs-table-feature-host.js +97 -0
- package/dist/components/table/rs-table-grid-nav.d.ts +22 -0
- package/dist/components/table/rs-table-grid-nav.js +80 -0
- package/dist/components/table/rs-table-header-types.d.ts +45 -0
- package/dist/components/table/rs-table-module-registry.d.ts +37 -0
- package/dist/components/table/rs-table-module-registry.js +51 -0
- package/dist/components/table/rs-table-props.d.ts +315 -0
- package/dist/components/table/rs-table-props.js +64 -0
- package/dist/components/table/rs-table-view-context.d.ts +218 -0
- package/dist/components/table/rs-table-view-context.js +47 -0
- package/dist/components/table/table-chart-utils.d.ts +62 -0
- package/dist/components/table/table-chart-utils.js +91 -0
- package/dist/components/table/table-context-menu.d.ts +13 -0
- package/dist/components/table/table-context-menu.js +30 -0
- package/dist/components/table/table-edit-utils.d.ts +94 -0
- package/dist/components/table/table-edit-utils.js +282 -0
- package/dist/components/table/table-features.d.ts +149 -0
- package/dist/components/table/table-features.js +119 -0
- package/dist/components/table/table-keys.d.ts +5 -0
- package/dist/components/table/table-keys.js +6 -0
- package/dist/components/table/table-summary-utils.d.ts +90 -0
- package/dist/components/table/table-summary-utils.js +97 -0
- package/dist/components/table-drag.d.ts +39 -0
- package/dist/components/table-drag.js +130 -0
- package/dist/components/table-utils.d.ts +440 -0
- package/dist/components/table-utils.js +722 -0
- package/dist/components/tabs-utils.d.ts +71 -0
- package/dist/components/tabs-utils.js +147 -0
- package/dist/components/terminal-utils.d.ts +59 -0
- package/dist/components/terminal-utils.js +210 -0
- package/dist/components/terminal-wheel.d.ts +24 -0
- package/dist/components/terminal-wheel.js +42 -0
- package/dist/components/time-picker-utils.d.ts +51 -0
- package/dist/components/time-picker-utils.js +158 -0
- package/dist/components/time-range-validation.d.ts +11 -0
- package/dist/components/time-range-validation.js +15 -0
- package/dist/components/time-validation.d.ts +11 -0
- package/dist/components/time-validation.js +22 -0
- package/dist/components/tree-utils.d.ts +112 -0
- package/dist/components/tree-utils.js +310 -0
- package/dist/components/upload-utils.d.ts +26 -0
- package/dist/components/upload-utils.js +177 -0
- package/dist/components/use-rs-select.d.ts +78 -0
- package/dist/components/use-rs-select.js +266 -0
- package/dist/components/virtual-list-utils.d.ts +7 -0
- package/dist/components/virtual-list-utils.js +28 -0
- package/dist/composables/assembleRsTableApi.d.ts +34 -0
- package/dist/composables/assembleRsTableApi.js +26 -0
- package/dist/composables/bindRsTableViewContext.d.ts +73 -0
- package/dist/composables/bindRsTableViewContext.js +104 -0
- package/dist/composables/createRsDialog.d.ts +77 -0
- package/dist/composables/createRsDialog.js +263 -0
- package/dist/composables/createRsTableEditEmitBridge.d.ts +16 -0
- package/dist/composables/createRsTableEditEmitBridge.js +25 -0
- package/dist/composables/useClickOutside.d.ts +2 -0
- package/dist/composables/useRsConfig.d.ts +26 -0
- package/dist/composables/useRsConfig.js +55 -0
- package/dist/composables/useRsI18n.d.ts +9 -0
- package/dist/composables/useRsI18n.js +25 -0
- package/dist/composables/useRsLoadingBar.d.ts +13 -0
- package/dist/composables/useRsLoadingBar.js +30 -0
- package/dist/composables/useRsTable.d.ts +61 -0
- package/dist/composables/useRsTable.js +57 -0
- package/dist/composables/useRsTableA11y.d.ts +35 -0
- package/dist/composables/useRsTableA11y.js +34 -0
- package/dist/composables/useRsTableChartBridge.d.ts +37 -0
- package/dist/composables/useRsTableChartBridge.js +47 -0
- package/dist/composables/useRsTableColumnLayout.d.ts +75 -0
- package/dist/composables/useRsTableColumnLayout.js +250 -0
- package/dist/composables/useRsTableColumnResize.d.ts +35 -0
- package/dist/composables/useRsTableColumnResize.js +182 -0
- package/dist/composables/useRsTableColumnVirtual.d.ts +76 -0
- package/dist/composables/useRsTableColumnVirtual.js +116 -0
- package/dist/composables/useRsTableColumns.d.ts +70 -0
- package/dist/composables/useRsTableColumns.js +132 -0
- package/dist/composables/useRsTableContextMenu.d.ts +83 -0
- package/dist/composables/useRsTableContextMenu.js +152 -0
- package/dist/composables/useRsTableCore.d.ts +177 -0
- package/dist/composables/useRsTableCore.js +164 -0
- package/dist/composables/useRsTableEditActions.d.ts +129 -0
- package/dist/composables/useRsTableEditActions.js +376 -0
- package/dist/composables/useRsTableEditLayer.d.ts +228 -0
- package/dist/composables/useRsTableEditLayer.js +146 -0
- package/dist/composables/useRsTableEngine.d.ts +115 -0
- package/dist/composables/useRsTableEngine.js +225 -0
- package/dist/composables/useRsTableGridKeyboard.d.ts +38 -0
- package/dist/composables/useRsTableGridKeyboard.js +70 -0
- package/dist/composables/useRsTableHeadless.d.ts +138 -0
- package/dist/composables/useRsTableHeadless.js +105 -0
- package/dist/composables/useRsTableInteraction.d.ts +145 -0
- package/dist/composables/useRsTableInteraction.js +249 -0
- package/dist/composables/useRsTableScrollHost.d.ts +25 -0
- package/dist/composables/useRsTableScrollHost.js +42 -0
- package/dist/composables/useRsTableScrollLayout.d.ts +42 -0
- package/dist/composables/useRsTableScrollLayout.js +195 -0
- package/dist/composables/useRsTableSelectionSource.d.ts +38 -0
- package/dist/composables/useRsTableSelectionSource.js +57 -0
- package/dist/composables/useRsTableShell.d.ts +380 -0
- package/dist/composables/useRsTableShell.js +237 -0
- package/dist/composables/useRsTableShellChrome.d.ts +126 -0
- package/dist/composables/useRsTableShellChrome.js +110 -0
- package/dist/composables/useRsTableSummary.d.ts +44 -0
- package/dist/composables/useRsTableSummary.js +52 -0
- package/dist/composables/useRsTableViewProvide.d.ts +111 -0
- package/dist/composables/useRsTableViewProvide.js +93 -0
- package/dist/composables/useRsTableVirtual.d.ts +75 -0
- package/dist/composables/useRsTableVirtual.js +83 -0
- package/dist/composables/useRsTabsNav.d.ts +33 -0
- package/dist/composables/useRsTabsNav.js +137 -0
- package/dist/composables/useRsToast.d.ts +15 -0
- package/dist/composables/useRsToast.js +30 -0
- package/dist/composables/useTableCellTooltip.d.ts +28 -0
- package/dist/composables/useTableCellTooltip.js +177 -0
- package/dist/composables/useTableEdit.d.ts +63 -0
- package/dist/composables/useTableEdit.js +176 -0
- package/dist/composables/useTableRowHighlight.d.ts +14 -0
- package/dist/composables/useTableRowHighlight.js +35 -0
- package/dist/dev/vite-codemirror-deps.d.ts +20 -0
- package/dist/dev/vite-codemirror-deps.js +16 -0
- package/dist/dev/vite-xterm-deps.d.ts +8 -0
- package/dist/dev/vite-xterm-deps.js +3 -0
- package/dist/icons/custom/api.d.ts +37 -0
- package/dist/icons/custom/api.js +56 -0
- package/dist/icons/custom/clickhouse.d.ts +37 -0
- package/dist/icons/custom/clickhouse.js +61 -0
- package/dist/icons/custom/dameng.d.ts +37 -0
- package/dist/icons/custom/dameng.js +81 -0
- package/dist/icons/custom/ftp.d.ts +37 -0
- package/dist/icons/custom/ftp.js +62 -0
- package/dist/icons/custom/kingbase.d.ts +37 -0
- package/dist/icons/custom/kingbase.js +61 -0
- package/dist/icons/custom/mongodb.d.ts +37 -0
- package/dist/icons/custom/mongodb.js +59 -0
- package/dist/icons/custom/mysql.d.ts +37 -0
- package/dist/icons/custom/mysql.js +60 -0
- package/dist/icons/custom/oracle.d.ts +37 -0
- package/dist/icons/custom/oracle.js +61 -0
- package/dist/icons/custom/postgres.d.ts +37 -0
- package/dist/icons/custom/postgres.js +61 -0
- package/dist/icons/custom/redis.d.ts +38 -0
- package/dist/icons/custom/redis.js +60 -0
- package/dist/icons/custom/sqlite.d.ts +37 -0
- package/dist/icons/custom/sqlite.js +59 -0
- package/dist/icons/custom/sqlserver.d.ts +37 -0
- package/dist/icons/custom/sqlserver.js +61 -0
- package/dist/icons/custom/vastbase.d.ts +37 -0
- package/dist/icons/custom/vastbase.js +67 -0
- package/dist/icons/lucide.d.ts +7 -0
- package/dist/icons/lucide.js +74 -0
- package/dist/icons/registry.d.ts +3 -0
- package/dist/icons/registry.js +31 -0
- package/dist/index.d.ts +209 -0
- package/dist/index.js +156 -0
- package/dist/lib/iso-local-datetime.d.ts +17 -0
- package/dist/lib/iso-local-datetime.js +103 -0
- package/dist/lib/rs-dayjs.d.ts +15 -0
- package/dist/lib/rs-dayjs.js +41 -0
- package/dist/locale/interpolate.d.ts +14 -0
- package/dist/locale/interpolate.js +24 -0
- package/dist/locale/messages.d.ts +7 -0
- package/dist/locale/messages.js +407 -0
- package/dist/locale/types.d.ts +3 -0
- package/dist/locale/types.js +4 -0
- package/dist/monaco/debug-decorations.d.ts +21 -0
- package/dist/monaco/debug-decorations2.js +44 -0
- package/dist/monaco/index.d.ts +5 -0
- package/dist/monaco/languages/index.d.ts +3 -0
- package/dist/monaco/languages/mongodb-shell.d.ts +7 -0
- package/dist/monaco/languages/mongodb-shell.js +222 -0
- package/dist/monaco/languages/types.d.ts +30 -0
- package/dist/monaco/languages/types.js +25 -0
- package/dist/monaco/setup.d.ts +9 -0
- package/dist/monaco/setup.js +53 -0
- package/dist/styles.css +2006 -0
- package/dist/theme/apply.d.ts +6 -0
- package/dist/theme/apply.js +10 -0
- package/dist/theme/css-token.d.ts +27 -0
- package/dist/theme/css-token.js +72 -0
- package/dist/theme/presets.d.ts +7 -0
- package/dist/theme/presets.js +74 -0
- package/dist/theme/types.d.ts +97 -0
- package/dist/theme/types.js +65 -0
- package/dist/utils/rs-clipboard.d.ts +17 -0
- package/dist/utils/rs-clipboard.js +187 -0
- package/dist/vite-plugins/monaco-zh-nls.d.ts +7 -0
- package/dist/vite-plugins/monaco-zh-nls.js +84 -0
- package/dist/vite-plugins/niuma-ui-host.d.ts +22 -0
- package/dist/vite-plugins/niuma-ui-host.js +254 -0
- package/dist/vite-plugins/rewrite-named-imports.d.ts +5 -0
- package/dist/vite-plugins/rewrite-named-imports.js +5 -0
- package/dist/vite-plugins/silence-antlr-parse-console.d.ts +19 -0
- package/dist/vite-plugins/silence-antlr-parse-console.js +35 -0
- package/package.json +58 -16
- package/src/__tests__/RsBadge.spec.ts +0 -40
- package/src/__tests__/RsBreadcrumb.spec.ts +0 -172
- package/src/__tests__/RsButton.spec.ts +0 -188
- package/src/__tests__/RsCalendarGrid.spec.ts +0 -101
- package/src/__tests__/RsCard.spec.ts +0 -256
- package/src/__tests__/RsCheckbox.spec.ts +0 -36
- package/src/__tests__/RsCodeEditor.spec.ts +0 -111
- package/src/__tests__/RsConfirmDialog.spec.ts +0 -285
- package/src/__tests__/RsContainer.spec.ts +0 -89
- package/src/__tests__/RsContextMenu.spec.ts +0 -130
- package/src/__tests__/RsDatePicker.spec.ts +0 -109
- package/src/__tests__/RsDateTimePicker.spec.ts +0 -80
- package/src/__tests__/RsDescriptions.spec.ts +0 -50
- package/src/__tests__/RsDialog.spec.ts +0 -595
- package/src/__tests__/RsDrawer.spec.ts +0 -292
- package/src/__tests__/RsDropdown.spec.ts +0 -135
- package/src/__tests__/RsDynamicTags.spec.ts +0 -52
- package/src/__tests__/RsEmpty.spec.ts +0 -99
- package/src/__tests__/RsForm.spec.ts +0 -417
- package/src/__tests__/RsFormItem.spec.ts +0 -478
- package/src/__tests__/RsFormList.spec.ts +0 -109
- package/src/__tests__/RsIcon.spec.ts +0 -258
- package/src/__tests__/RsInput.spec.ts +0 -377
- package/src/__tests__/RsInputNumber.spec.ts +0 -151
- package/src/__tests__/RsLabel.spec.ts +0 -106
- package/src/__tests__/RsLink.spec.ts +0 -49
- package/src/__tests__/RsLoading.spec.ts +0 -84
- package/src/__tests__/RsMarkdown.spec.ts +0 -180
- package/src/__tests__/RsMenu.spec.ts +0 -511
- package/src/__tests__/RsNewComponents.spec.ts +0 -17
- package/src/__tests__/RsPagination.spec.ts +0 -223
- package/src/__tests__/RsPopover.spec.ts +0 -140
- package/src/__tests__/RsScrollbar.spec.ts +0 -53
- package/src/__tests__/RsSelect.spec.ts +0 -850
- package/src/__tests__/RsSidebar.spec.ts +0 -119
- package/src/__tests__/RsSplitPane.spec.ts +0 -177
- package/src/__tests__/RsStatCard.spec.ts +0 -79
- package/src/__tests__/RsSteps.spec.ts +0 -125
- package/src/__tests__/RsSwitch.spec.ts +0 -74
- package/src/__tests__/RsTable.a11y.spec.ts +0 -83
- package/src/__tests__/RsTable.dom-baseline.spec.ts +0 -87
- package/src/__tests__/RsTable.perf.spec.ts +0 -122
- package/src/__tests__/RsTable.spec.ts +0 -1207
- package/src/__tests__/RsTable.ssr.spec.ts +0 -71
- package/src/__tests__/RsTable.summary.spec.ts +0 -45
- package/src/__tests__/RsTabs.spec.ts +0 -426
- package/src/__tests__/RsTerminal.spec.ts +0 -218
- package/src/__tests__/RsTimePicker.spec.ts +0 -97
- package/src/__tests__/RsToaster.spec.ts +0 -95
- package/src/__tests__/RsToolbar.spec.ts +0 -75
- package/src/__tests__/RsTooltip.spec.ts +0 -154
- package/src/__tests__/RsTree.spec.ts +0 -573
- package/src/__tests__/RsUpload.spec.ts +0 -216
- package/src/__tests__/RsVirtualList.spec.ts +0 -77
- package/src/__tests__/createRsDialog.spec.ts +0 -158
- package/src/__tests__/css-token.spec.ts +0 -51
- package/src/__tests__/date-picker-utils.spec.ts +0 -119
- package/src/__tests__/dialog-utils.spec.ts +0 -43
- package/src/__tests__/dialog-viewport.spec.ts +0 -38
- package/src/__tests__/form-path.spec.ts +0 -46
- package/src/__tests__/form-rules.spec.ts +0 -139
- package/src/__tests__/iso-local-datetime.spec.ts +0 -58
- package/src/__tests__/perf-budgets.ts +0 -32
- package/src/__tests__/rs-clipboard.spec.ts +0 -142
- package/src/__tests__/rs-select-model.types.spec.ts +0 -28
- package/src/__tests__/rs-table-api.spec.ts +0 -206
- package/src/__tests__/rs-table-compat-matrix.spec.ts +0 -108
- package/src/__tests__/rs-table-echarts-adapter.spec.ts +0 -43
- package/src/__tests__/rs-table-grid-nav.spec.ts +0 -63
- package/src/__tests__/rs-table-isolation.spec.ts +0 -158
- package/src/__tests__/rs-table-slots.types.spec.ts +0 -20
- package/src/__tests__/setup.ts +0 -12
- package/src/__tests__/split-pane-utils.spec.ts +0 -157
- package/src/__tests__/table-chart-utils.spec.ts +0 -88
- package/src/__tests__/table-drag.spec.ts +0 -35
- package/src/__tests__/table-edit-utils.spec.ts +0 -194
- package/src/__tests__/table-summary-utils.spec.ts +0 -62
- package/src/__tests__/table-utils.spec.ts +0 -410
- package/src/__tests__/theme.spec.ts +0 -49
- package/src/__tests__/tree-utils.spec.ts +0 -234
- package/src/__tests__/useRsTableColumnResize.spec.ts +0 -25
- package/src/__tests__/useRsTableCore.perf.spec.ts +0 -170
- package/src/__tests__/useTableCellTooltip.spec.ts +0 -101
- package/src/components/RsAlert.vue +0 -212
- package/src/components/RsAvatar.vue +0 -115
- package/src/components/RsBadge.vue +0 -59
- package/src/components/RsBreadcrumb.vue +0 -65
- package/src/components/RsBreadcrumbItems.vue +0 -36
- package/src/components/RsButton.vue +0 -596
- package/src/components/RsCalendarGrid.vue +0 -318
- package/src/components/RsCard.vue +0 -421
- package/src/components/RsCheckbox.vue +0 -189
- package/src/components/RsCodeBlock.vue +0 -327
- package/src/components/RsCodeEditor.vue +0 -597
- package/src/components/RsConfigProvider.vue +0 -92
- package/src/components/RsConfirmDialog.vue +0 -365
- package/src/components/RsContainer.vue +0 -235
- package/src/components/RsContextMenu.vue +0 -277
- package/src/components/RsContextMenuItems.vue +0 -77
- package/src/components/RsDatePicker.vue +0 -1033
- package/src/components/RsDateTimePicker.vue +0 -67
- package/src/components/RsDescriptions.vue +0 -186
- package/src/components/RsDescriptionsItem.vue +0 -32
- package/src/components/RsDialog.vue +0 -813
- package/src/components/RsDivider.vue +0 -89
- package/src/components/RsDrawer.vue +0 -979
- package/src/components/RsDropdown.vue +0 -283
- package/src/components/RsDropdownItems.vue +0 -90
- package/src/components/RsDynamicTags.vue +0 -531
- package/src/components/RsEmpty.vue +0 -107
- package/src/components/RsForm.vue +0 -287
- package/src/components/RsFormItem.vue +0 -423
- package/src/components/RsFormItemControl.vue +0 -21
- package/src/components/RsFormList.vue +0 -117
- package/src/components/RsIcon.vue +0 -104
- package/src/components/RsInput.vue +0 -1508
- package/src/components/RsInputNumber.vue +0 -582
- package/src/components/RsLabel.vue +0 -69
- package/src/components/RsLink.vue +0 -106
- package/src/components/RsLoading.vue +0 -171
- package/src/components/RsLoadingBar.vue +0 -151
- package/src/components/RsMarkdown.vue +0 -348
- package/src/components/RsMenu.vue +0 -314
- package/src/components/RsMenuItems.vue +0 -263
- package/src/components/RsMonacoEditor.vue +0 -567
- package/src/components/RsPagination.vue +0 -263
- package/src/components/RsPopover.vue +0 -79
- package/src/components/RsProseEditor.vue +0 -160
- package/src/components/RsRadio.vue +0 -81
- package/src/components/RsRadioItem.vue +0 -156
- package/src/components/RsScrollbar.vue +0 -171
- package/src/components/RsSelect.vue +0 -786
- package/src/components/RsSidebar.vue +0 -121
- package/src/components/RsSidebarGroup.vue +0 -32
- package/src/components/RsSidebarItem.vue +0 -72
- package/src/components/RsSplitPane.vue +0 -714
- package/src/components/RsStatCard.vue +0 -85
- package/src/components/RsSteps.vue +0 -138
- package/src/components/RsSwitch.vue +0 -192
- package/src/components/RsTable.vue +0 -762
- package/src/components/RsTabs.vue +0 -1283
- package/src/components/RsTag.vue +0 -191
- package/src/components/RsTerminal.vue +0 -840
- package/src/components/RsTimePicker.vue +0 -617
- package/src/components/RsTimePickerColumns.vue +0 -285
- package/src/components/RsToaster.vue +0 -436
- package/src/components/RsToolbar.vue +0 -135
- package/src/components/RsTooltip.vue +0 -151
- package/src/components/RsTooltipProvider.vue +0 -30
- package/src/components/RsTree.vue +0 -1270
- package/src/components/RsUpload.vue +0 -412
- package/src/components/RsVNodeHost.vue +0 -20
- package/src/components/RsVirtualList.vue +0 -217
- package/src/components/avatar-utils.ts +0 -19
- package/src/components/breadcrumb-utils.ts +0 -19
- package/src/components/button-utils.ts +0 -39
- package/src/components/class-utils.ts +0 -29
- package/src/components/code-editor-utils.ts +0 -106
- package/src/components/code-mirror-completion.ts +0 -40
- package/src/components/code-mirror-diagnostics.ts +0 -52
- package/src/components/code-mirror-ghost.ts +0 -158
- package/src/components/code-mirror-inline-edit.ts +0 -55
- package/src/components/code-mirror-intel.ts +0 -81
- package/src/components/code-mirror-lang.ts +0 -128
- package/src/components/context-menu-utils.ts +0 -26
- package/src/components/date-picker-utils.ts +0 -475
- package/src/components/date-range-validation.ts +0 -29
- package/src/components/date-validation.ts +0 -38
- package/src/components/descriptions-utils.ts +0 -24
- package/src/components/dialog-utils.ts +0 -183
- package/src/components/dialog-viewport.ts +0 -48
- package/src/components/dialog-window.ts +0 -318
- package/src/components/drawer-utils.ts +0 -109
- package/src/components/dropdown-utils.ts +0 -31
- package/src/components/form-item-control.ts +0 -55
- package/src/components/form-path.ts +0 -92
- package/src/components/form-rules.ts +0 -311
- package/src/components/form-utils.ts +0 -219
- package/src/components/input-number-utils.ts +0 -128
- package/src/components/input-rules.ts +0 -84
- package/src/components/loading-utils.ts +0 -8
- package/src/components/markdown-utils.ts +0 -174
- package/src/components/menu-utils.ts +0 -59
- package/src/components/overlay-utils.ts +0 -50
- package/src/components/pagination-utils.ts +0 -38
- package/src/components/popover-utils.ts +0 -8
- package/src/components/radio-utils.ts +0 -12
- package/src/components/reka.ts +0 -111
- package/src/components/resolve-radius.ts +0 -22
- package/src/components/resolve-size.ts +0 -29
- package/src/components/scrollbar-utils.ts +0 -10
- package/src/components/select-utils.ts +0 -372
- package/src/components/split-pane-utils.ts +0 -254
- package/src/components/steps-utils.ts +0 -22
- package/src/components/table/RsTableBody.vue +0 -217
- package/src/components/table/RsTableBodyRow.vue +0 -376
- package/src/components/table/RsTableCell.vue +0 -239
- package/src/components/table/RsTableCellContent.ts +0 -18
- package/src/components/table/RsTableCellEditor.vue +0 -352
- package/src/components/table/RsTableColGroup.vue +0 -41
- package/src/components/table/RsTableEditGutter.vue +0 -54
- package/src/components/table/RsTableHeader.vue +0 -158
- package/src/components/table/RsTableHeaderFilter.vue +0 -107
- package/src/components/table/RsTableRowStatus.vue +0 -69
- package/src/components/table/RsTableSummaryRow.vue +0 -52
- package/src/components/table/rs-table-api.ts +0 -99
- package/src/components/table/rs-table-compat-matrix.ts +0 -71
- package/src/components/table/rs-table-echarts-adapter.ts +0 -81
- package/src/components/table/rs-table-feature-host.ts +0 -178
- package/src/components/table/rs-table-grid-nav.ts +0 -122
- package/src/components/table/rs-table-header-types.ts +0 -47
- package/src/components/table/rs-table-module-registry.ts +0 -72
- package/src/components/table/rs-table-props.ts +0 -340
- package/src/components/table/rs-table-view-context.ts +0 -258
- package/src/components/table/table-chart-utils.ts +0 -165
- package/src/components/table/table-context-menu.ts +0 -53
- package/src/components/table/table-edit-utils.ts +0 -496
- package/src/components/table/table-features.ts +0 -284
- package/src/components/table/table-keys.ts +0 -12
- package/src/components/table/table-summary-utils.ts +0 -194
- package/src/components/table-drag.ts +0 -215
- package/src/components/table-utils.ts +0 -1400
- package/src/components/tabs-utils.ts +0 -247
- package/src/components/terminal-utils.ts +0 -323
- package/src/components/terminal-wheel.ts +0 -74
- package/src/components/time-picker-utils.ts +0 -240
- package/src/components/time-range-validation.ts +0 -23
- package/src/components/time-validation.ts +0 -20
- package/src/components/tree-utils.ts +0 -518
- package/src/components/upload-utils.ts +0 -177
- package/src/components/use-rs-select.ts +0 -451
- package/src/components/virtual-list-utils.ts +0 -30
- package/src/composables/assembleRsTableApi.ts +0 -79
- package/src/composables/bindRsTableViewContext.ts +0 -269
- package/src/composables/createRsDialog.ts +0 -408
- package/src/composables/createRsTableEditEmitBridge.ts +0 -38
- package/src/composables/useClickOutside.ts +0 -22
- package/src/composables/useRsConfig.ts +0 -98
- package/src/composables/useRsI18n.ts +0 -33
- package/src/composables/useRsLoadingBar.ts +0 -36
- package/src/composables/useRsTable.ts +0 -134
- package/src/composables/useRsTableA11y.ts +0 -52
- package/src/composables/useRsTableChartBridge.ts +0 -79
- package/src/composables/useRsTableColumnLayout.ts +0 -320
- package/src/composables/useRsTableColumnResize.ts +0 -244
- package/src/composables/useRsTableColumnVirtual.ts +0 -180
- package/src/composables/useRsTableColumns.ts +0 -200
- package/src/composables/useRsTableContextMenu.ts +0 -257
- package/src/composables/useRsTableCore.ts +0 -258
- package/src/composables/useRsTableEditActions.ts +0 -606
- package/src/composables/useRsTableEditLayer.ts +0 -251
- package/src/composables/useRsTableEngine.ts +0 -357
- package/src/composables/useRsTableGridKeyboard.ts +0 -123
- package/src/composables/useRsTableHeadless.ts +0 -145
- package/src/composables/useRsTableInteraction.ts +0 -433
- package/src/composables/useRsTableScrollHost.ts +0 -75
- package/src/composables/useRsTableScrollLayout.ts +0 -255
- package/src/composables/useRsTableSelectionSource.ts +0 -89
- package/src/composables/useRsTableShell.ts +0 -416
- package/src/composables/useRsTableShellChrome.ts +0 -170
- package/src/composables/useRsTableSummary.ts +0 -113
- package/src/composables/useRsTableViewProvide.ts +0 -263
- package/src/composables/useRsTableVirtual.ts +0 -154
- package/src/composables/useRsTabsNav.ts +0 -191
- package/src/composables/useRsToast.ts +0 -48
- package/src/composables/useTableCellTooltip.ts +0 -240
- package/src/composables/useTableEdit.ts +0 -271
- package/src/composables/useTableRowHighlight.ts +0 -50
- package/src/dev/vite-codemirror-deps.ts +0 -20
- package/src/dev/vite-xterm-deps.ts +0 -8
- package/src/icons/custom/api.ts +0 -54
- package/src/icons/custom/clickhouse.ts +0 -52
- package/src/icons/custom/dameng.ts +0 -83
- package/src/icons/custom/ftp.ts +0 -61
- package/src/icons/custom/kingbase.ts +0 -52
- package/src/icons/custom/mongodb.ts +0 -50
- package/src/icons/custom/mysql.ts +0 -51
- package/src/icons/custom/oracle.ts +0 -52
- package/src/icons/custom/postgres.ts +0 -52
- package/src/icons/custom/redis.ts +0 -51
- package/src/icons/custom/sqlite.ts +0 -50
- package/src/icons/custom/sqlserver.ts +0 -52
- package/src/icons/custom/vastbase.ts +0 -57
- package/src/icons/lucide.ts +0 -94
- package/src/icons/registry.ts +0 -35
- package/src/index.ts +0 -813
- package/src/lib/iso-local-datetime.ts +0 -152
- package/src/lib/rs-dayjs.ts +0 -56
- package/src/locale/interpolate.ts +0 -32
- package/src/locale/messages.ts +0 -408
- package/src/locale/types.ts +0 -5
- package/src/monaco/debug-decorations.ts +0 -70
- package/src/monaco/index.ts +0 -23
- package/src/monaco/languages/index.ts +0 -22
- package/src/monaco/languages/mongodb-shell.ts +0 -125
- package/src/monaco/languages/types.ts +0 -59
- package/src/monaco/setup.ts +0 -101
- package/src/styles.css +0 -1364
- package/src/theme/apply.ts +0 -12
- package/src/theme/css-token.ts +0 -107
- package/src/theme/presets.ts +0 -73
- package/src/theme/types.ts +0 -149
- package/src/utils/rs-clipboard.ts +0 -272
- package/src/vite-env.d.ts +0 -7
- package/vite-plugins/monaco-zh-nls.ts +0 -101
- package/vite-plugins/silence-antlr-parse-console.ts +0 -29
- /package/{src → dist}/components/table/rs-table.css +0 -0
- /package/{src → dist}/monaco/debug-decorations.css +0 -0
- /package/{src → dist}/theme/brand.example.css +0 -0
|
@@ -1,840 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { FitAddon } from '@xterm/addon-fit'
|
|
3
|
-
import type { ITheme } from '@xterm/xterm'
|
|
4
|
-
import { Terminal } from '@xterm/xterm'
|
|
5
|
-
import '@xterm/xterm/css/xterm.css'
|
|
6
|
-
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
7
|
-
import { useRsI18n } from '../composables/useRsI18n'
|
|
8
|
-
import {
|
|
9
|
-
readTerminalFontFamily,
|
|
10
|
-
readTerminalFontSizePx,
|
|
11
|
-
readTerminalFontWeight,
|
|
12
|
-
readTerminalFontWeightBold,
|
|
13
|
-
} from '../theme/css-token'
|
|
14
|
-
import {
|
|
15
|
-
beginClipboardPrefetch,
|
|
16
|
-
copyTextToClipboard,
|
|
17
|
-
readClipboardText,
|
|
18
|
-
} from '../utils/rs-clipboard'
|
|
19
|
-
import RsContextMenu from './RsContextMenu.vue'
|
|
20
|
-
import type { RsContextMenuItem } from './context-menu-utils'
|
|
21
|
-
import RsLoading from './RsLoading.vue'
|
|
22
|
-
import {
|
|
23
|
-
containsTuiRefreshSequence,
|
|
24
|
-
mergeTerminalTheme,
|
|
25
|
-
prepareTerminalForPtyWrite,
|
|
26
|
-
resolveTerminalTheme,
|
|
27
|
-
terminalShortcutLabel,
|
|
28
|
-
type RsTerminalAction,
|
|
29
|
-
type RsTerminalExpose,
|
|
30
|
-
type RsTerminalGeometry,
|
|
31
|
-
type RsTerminalThemeMode,
|
|
32
|
-
} from './terminal-utils'
|
|
33
|
-
import {
|
|
34
|
-
attachWheelScrollGuard,
|
|
35
|
-
isAlternateTerminalBuffer,
|
|
36
|
-
type RsTerminalWheelScrollModifier,
|
|
37
|
-
} from './terminal-wheel'
|
|
38
|
-
|
|
39
|
-
/** 单元格高度倍率(xterm options.lineHeight)。中文比 Canvas 测的西文高,1 会裁到下一行。 */
|
|
40
|
-
const TERMINAL_LINE_HEIGHT = 1.2
|
|
41
|
-
|
|
42
|
-
/** 令牌缺省字号;仅在挂载前(含 SSR)占位,挂载后由 syncResolvedFontSize 换成实测值。 */
|
|
43
|
-
const FALLBACK_FONT_SIZE_PX = 14
|
|
44
|
-
|
|
45
|
-
// class / style 需要落在 .rs-terminal 上;根节点是 RsContextMenu 的 as-child 触发器,
|
|
46
|
-
// 交给自动透传会落到触发器上,消费方只能在外面再套一层控制尺寸。
|
|
47
|
-
defineOptions({ inheritAttrs: false })
|
|
48
|
-
|
|
49
|
-
type RsTerminalFontWeight =
|
|
50
|
-
| 'normal'
|
|
51
|
-
| 'bold'
|
|
52
|
-
| '100'
|
|
53
|
-
| '200'
|
|
54
|
-
| '300'
|
|
55
|
-
| '400'
|
|
56
|
-
| '500'
|
|
57
|
-
| '600'
|
|
58
|
-
| '700'
|
|
59
|
-
| '800'
|
|
60
|
-
| '900'
|
|
61
|
-
|
|
62
|
-
const props = withDefaults(
|
|
63
|
-
defineProps<{
|
|
64
|
-
loading?: boolean
|
|
65
|
-
overlay?: string
|
|
66
|
-
inputEnabled?: boolean
|
|
67
|
-
cursorBlink?: boolean
|
|
68
|
-
/** 缺省读取 `--rs-terminal-font-family` / `--rs-font-mono` */
|
|
69
|
-
fontFamily?: string
|
|
70
|
-
/** 缺省读取 `--rs-terminal-font-size`(对齐 `--rs-font-size-sm`) */
|
|
71
|
-
fontSize?: number
|
|
72
|
-
/** 缺省读取 `--rs-terminal-font-weight` */
|
|
73
|
-
fontWeight?: RsTerminalFontWeight
|
|
74
|
-
/** 缺省读取 `--rs-terminal-font-weight-bold` */
|
|
75
|
-
fontWeightBold?: RsTerminalFontWeight
|
|
76
|
-
allowTransparency?: boolean
|
|
77
|
-
/** auto 跟随 data-rs-theme;也可强制 light / dark */
|
|
78
|
-
themeMode?: RsTerminalThemeMode
|
|
79
|
-
/** 覆盖内置调色板中的部分 token */
|
|
80
|
-
theme?: Partial<ITheme>
|
|
81
|
-
contextMenu?: boolean
|
|
82
|
-
/** 右键菜单是否展示「询问 AI」(仅 emit,业务侧自行处理) */
|
|
83
|
-
showAskAi?: boolean
|
|
84
|
-
/**
|
|
85
|
-
* 右键是否自动选中光标下单词。
|
|
86
|
-
* SSH/vim/less 等 TUI 场景建议 false,避免冲掉用户已拖选的大段文本。
|
|
87
|
-
*/
|
|
88
|
-
rightClickSelectsWord?: boolean
|
|
89
|
-
shortcuts?: boolean
|
|
90
|
-
scrollback?: number
|
|
91
|
-
/** 将裸 \\n 当作换行;PTY/SSH 建议 false,避免破坏 ncurses(top/vim) */
|
|
92
|
-
convertEol?: boolean
|
|
93
|
-
/** 奇数行斑马纹底色,提升长日志可读性 */
|
|
94
|
-
zebraStripes?: boolean
|
|
95
|
-
/**
|
|
96
|
-
* none:滚轮始终翻 scrollback。
|
|
97
|
-
* shift:普通 shell 翻 scrollback;仅 vim/top 等备用屏把滚轮转成方向键。
|
|
98
|
-
*/
|
|
99
|
-
wheelScrollModifier?: RsTerminalWheelScrollModifier
|
|
100
|
-
/** TUI 全屏刷新时若视口不在底部,自动滚回底部(修复 top 表头丢失) */
|
|
101
|
-
snapViewportOnTuiWrite?: boolean
|
|
102
|
-
}>(),
|
|
103
|
-
{
|
|
104
|
-
loading: false,
|
|
105
|
-
overlay: '',
|
|
106
|
-
inputEnabled: true,
|
|
107
|
-
cursorBlink: true,
|
|
108
|
-
allowTransparency: false,
|
|
109
|
-
themeMode: 'auto',
|
|
110
|
-
theme: () => ({}),
|
|
111
|
-
contextMenu: true,
|
|
112
|
-
showAskAi: false,
|
|
113
|
-
rightClickSelectsWord: true,
|
|
114
|
-
shortcuts: true,
|
|
115
|
-
scrollback: 5000,
|
|
116
|
-
convertEol: false,
|
|
117
|
-
zebraStripes: true,
|
|
118
|
-
wheelScrollModifier: 'none',
|
|
119
|
-
snapViewportOnTuiWrite: true,
|
|
120
|
-
},
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
const emit = defineEmits<{
|
|
124
|
-
ready: []
|
|
125
|
-
data: [data: string]
|
|
126
|
-
resize: [payload: { cols: number; rows: number }]
|
|
127
|
-
action: [action: RsTerminalAction]
|
|
128
|
-
/** 询问 AI:携带右键菜单打开时快照的选区(避免菜单点击后选区被清空) */
|
|
129
|
-
askAi: [text: string]
|
|
130
|
-
/** 选区变化,携带当前选中文本(无选区时为空串) */
|
|
131
|
-
selectionChange: [text: string]
|
|
132
|
-
}>()
|
|
133
|
-
|
|
134
|
-
const { t } = useRsI18n()
|
|
135
|
-
const hostEl = ref<HTMLElement | null>(null)
|
|
136
|
-
const terminalReady = ref(false)
|
|
137
|
-
const hasSelection = ref(false)
|
|
138
|
-
/** 右键菜单打开瞬间的选区快照(capture 阶段,早于 xterm word-select) */
|
|
139
|
-
const menuSelectionSnapshot = ref('')
|
|
140
|
-
const resolvedThemeMode = ref(resolveTerminalTheme(props.themeMode))
|
|
141
|
-
/** fit 后量一次真实行高,避免亚像素漂移;非每帧更新 */
|
|
142
|
-
const zebraRowStepPx = ref<number | null>(null)
|
|
143
|
-
/** 令牌字号的实测缓存:读 CSS 变量是 DOM 操作,不能放进 computed */
|
|
144
|
-
const resolvedFontSizePx = ref(props.fontSize ?? FALLBACK_FONT_SIZE_PX)
|
|
145
|
-
|
|
146
|
-
const showLoading = computed(() => !terminalReady.value || props.loading)
|
|
147
|
-
|
|
148
|
-
function asTerminalFontWeight(value: string): RsTerminalFontWeight {
|
|
149
|
-
return value as RsTerminalFontWeight
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function resolveTerminalFontFamily(): string {
|
|
153
|
-
return props.fontFamily || readTerminalFontFamily(hostEl.value)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function resolveTerminalFontSize(): number {
|
|
157
|
-
return props.fontSize ?? readTerminalFontSizePx(hostEl.value)
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function resolveTerminalFontWeight(): RsTerminalFontWeight {
|
|
161
|
-
return props.fontWeight ?? asTerminalFontWeight(readTerminalFontWeight(hostEl.value))
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function resolveTerminalFontWeightBold(): RsTerminalFontWeight {
|
|
165
|
-
return props.fontWeightBold ?? asTerminalFontWeight(readTerminalFontWeightBold(hostEl.value))
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function syncResolvedFontSize(): void {
|
|
169
|
-
resolvedFontSizePx.value = resolveTerminalFontSize()
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
const zebraStyle = computed((): Record<string, string> | undefined => {
|
|
173
|
-
if (!props.zebraStripes) {
|
|
174
|
-
return undefined
|
|
175
|
-
}
|
|
176
|
-
const fontSize = resolvedFontSizePx.value
|
|
177
|
-
const step = zebraRowStepPx.value ?? fontSize * TERMINAL_LINE_HEIGHT
|
|
178
|
-
return {
|
|
179
|
-
'--rs-terminal-font-size': `${fontSize}px`,
|
|
180
|
-
'--rs-terminal-line-height': String(TERMINAL_LINE_HEIGHT),
|
|
181
|
-
'--rs-terminal-zebra-step': `${step}px`,
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
const contextMenuItems = computed<RsContextMenuItem[]>(() => {
|
|
186
|
-
const items: RsContextMenuItem[] = [
|
|
187
|
-
{
|
|
188
|
-
key: 'copy',
|
|
189
|
-
label: t('terminal.copy', 'Copy'),
|
|
190
|
-
icon: 'copy',
|
|
191
|
-
shortcut: terminalShortcutLabel('C'),
|
|
192
|
-
disabled: false,
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
key: 'paste',
|
|
196
|
-
label: t('terminal.paste', 'Paste'),
|
|
197
|
-
icon: 'clipboard-paste',
|
|
198
|
-
shortcut: terminalShortcutLabel('V'),
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
key: 'selectAll',
|
|
202
|
-
label: t('terminal.selectAll', 'Select All'),
|
|
203
|
-
icon: 'square-mouse-pointer',
|
|
204
|
-
shortcut: terminalShortcutLabel('A'),
|
|
205
|
-
},
|
|
206
|
-
]
|
|
207
|
-
if (props.showAskAi) {
|
|
208
|
-
items.push(
|
|
209
|
-
{ key: 'sep-ai', label: '', separator: true },
|
|
210
|
-
{
|
|
211
|
-
key: 'askAi',
|
|
212
|
-
label: t('terminal.askAi', 'Ask AI'),
|
|
213
|
-
icon: 'bot',
|
|
214
|
-
disabled: !hasSelection.value && !menuSelectionSnapshot.value,
|
|
215
|
-
},
|
|
216
|
-
)
|
|
217
|
-
}
|
|
218
|
-
items.push(
|
|
219
|
-
{ key: 'sep-1', label: '', separator: true },
|
|
220
|
-
{
|
|
221
|
-
key: 'clear',
|
|
222
|
-
label: t('terminal.clear', 'Clear Terminal'),
|
|
223
|
-
icon: 'eraser',
|
|
224
|
-
shortcut: terminalShortcutLabel('K'),
|
|
225
|
-
danger: true,
|
|
226
|
-
},
|
|
227
|
-
)
|
|
228
|
-
return items
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
let terminal: Terminal | null = null
|
|
232
|
-
let fitAddon: FitAddon | null = null
|
|
233
|
-
let resizeObserver: ResizeObserver | null = null
|
|
234
|
-
let themeObserver: MutationObserver | null = null
|
|
235
|
-
let detachWheelGuard: (() => void) | null = null
|
|
236
|
-
let lastGeometry = { cols: 0, rows: 0 }
|
|
237
|
-
let fitRaf = 0
|
|
238
|
-
let didInitialFit = false
|
|
239
|
-
|
|
240
|
-
function resolveAllowTransparency(): boolean {
|
|
241
|
-
return props.allowTransparency || props.zebraStripes
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function buildXtermTheme(): ITheme {
|
|
245
|
-
// 主题背景保持不透明:反色行 (xterm-fg/bg-257) 依赖 opaque(background);
|
|
246
|
-
// 斑马纹通过 allowTransparency 让默认单元格透出底层 CSS 渐变。
|
|
247
|
-
return mergeTerminalTheme(resolvedThemeMode.value, props.theme)
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
function applyThemeToTerminal(): void {
|
|
251
|
-
if (!terminal) {
|
|
252
|
-
return
|
|
253
|
-
}
|
|
254
|
-
terminal.options.theme = buildXtermTheme()
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function syncZebraRowStepFromDom(): void {
|
|
258
|
-
zebraRowStepPx.value = null
|
|
259
|
-
if (!props.zebraStripes || !hostEl.value) {
|
|
260
|
-
return
|
|
261
|
-
}
|
|
262
|
-
const rowEl = hostEl.value.querySelector<HTMLElement>('.xterm-rows > div, .xterm-row')
|
|
263
|
-
const height = rowEl?.offsetHeight ?? 0
|
|
264
|
-
if (height > 0) {
|
|
265
|
-
zebraRowStepPx.value = height
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function attachWheelGuard(): void {
|
|
270
|
-
detachWheelGuard?.()
|
|
271
|
-
detachWheelGuard = null
|
|
272
|
-
if (!hostEl.value || props.wheelScrollModifier === 'none') {
|
|
273
|
-
return
|
|
274
|
-
}
|
|
275
|
-
detachWheelGuard = attachWheelScrollGuard(hostEl.value, {
|
|
276
|
-
modifier: () => props.wheelScrollModifier,
|
|
277
|
-
inputEnabled: () => props.inputEnabled,
|
|
278
|
-
isAlternateBuffer: () => isAlternateTerminalBuffer(terminal),
|
|
279
|
-
onArrowKeys: (data) => {
|
|
280
|
-
if (props.inputEnabled) {
|
|
281
|
-
emit('data', data)
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
})
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function refreshResolvedTheme(): void {
|
|
288
|
-
resolvedThemeMode.value = resolveTerminalTheme(props.themeMode)
|
|
289
|
-
applyThemeToTerminal()
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function currentGeometry(): RsTerminalGeometry | null {
|
|
293
|
-
if (!terminal) {
|
|
294
|
-
return null
|
|
295
|
-
}
|
|
296
|
-
return {
|
|
297
|
-
cols: terminal.cols || 80,
|
|
298
|
-
rows: terminal.rows || 24,
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
async function rafTwice(): Promise<void> {
|
|
303
|
-
await new Promise<void>((resolve) => {
|
|
304
|
-
requestAnimationFrame(() => requestAnimationFrame(() => resolve()))
|
|
305
|
-
})
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
function emitResizeIfChanged(): void {
|
|
309
|
-
const geometry = currentGeometry()
|
|
310
|
-
if (!geometry) {
|
|
311
|
-
return
|
|
312
|
-
}
|
|
313
|
-
if (geometry.cols === lastGeometry.cols && geometry.rows === lastGeometry.rows) {
|
|
314
|
-
return
|
|
315
|
-
}
|
|
316
|
-
lastGeometry = geometry
|
|
317
|
-
emit('resize', geometry)
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
async function fit(): Promise<void> {
|
|
321
|
-
if (!fitAddon || !terminal || !hostEl.value) {
|
|
322
|
-
return
|
|
323
|
-
}
|
|
324
|
-
const { clientWidth, clientHeight } = hostEl.value
|
|
325
|
-
if (clientWidth <= 0 || clientHeight <= 0) {
|
|
326
|
-
return
|
|
327
|
-
}
|
|
328
|
-
if (!didInitialFit) {
|
|
329
|
-
if (typeof document !== 'undefined' && document.fonts?.ready) {
|
|
330
|
-
await document.fonts.ready
|
|
331
|
-
}
|
|
332
|
-
await nextTick()
|
|
333
|
-
await rafTwice()
|
|
334
|
-
}
|
|
335
|
-
if (!fitAddon || !terminal) {
|
|
336
|
-
return
|
|
337
|
-
}
|
|
338
|
-
try {
|
|
339
|
-
fitAddon.fit()
|
|
340
|
-
} catch {
|
|
341
|
-
return
|
|
342
|
-
}
|
|
343
|
-
didInitialFit = true
|
|
344
|
-
emitResizeIfChanged()
|
|
345
|
-
syncZebraRowStepFromDom()
|
|
346
|
-
syncResolvedFontSize()
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function scheduleFit(): void {
|
|
350
|
-
if (fitRaf) {
|
|
351
|
-
return
|
|
352
|
-
}
|
|
353
|
-
fitRaf = requestAnimationFrame(() => {
|
|
354
|
-
fitRaf = 0
|
|
355
|
-
void fit()
|
|
356
|
-
})
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
function write(data: string): void {
|
|
360
|
-
const term = terminal
|
|
361
|
-
if (!term) {
|
|
362
|
-
return
|
|
363
|
-
}
|
|
364
|
-
if (props.snapViewportOnTuiWrite && containsTuiRefreshSequence(data)) {
|
|
365
|
-
prepareTerminalForPtyWrite(term, data)
|
|
366
|
-
}
|
|
367
|
-
term.write(data)
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
function clear(): void {
|
|
371
|
-
terminal?.clear()
|
|
372
|
-
terminal?.clearSelection()
|
|
373
|
-
syncSelectionState()
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
function focus(): void {
|
|
377
|
-
terminal?.focus()
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
function getSelectionText(): string {
|
|
381
|
-
return String(terminal?.getSelection?.() ?? '')
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
function syncSelectionState(): void {
|
|
385
|
-
hasSelection.value = Boolean(terminal?.hasSelection())
|
|
386
|
-
emit('selectionChange', getSelectionText())
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/** 优先活选区;若被右键 word-select / 失焦冲掉,则回退菜单快照。 */
|
|
390
|
-
function resolveMenuSelectionText(): string {
|
|
391
|
-
const live = getSelectionText().trim()
|
|
392
|
-
const snap = menuSelectionSnapshot.value.trim()
|
|
393
|
-
if (live && (!snap || live.length >= snap.length)) {
|
|
394
|
-
return live
|
|
395
|
-
}
|
|
396
|
-
return snap
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
async function copySelection(): Promise<void> {
|
|
400
|
-
const text = resolveMenuSelectionText()
|
|
401
|
-
if (!text) {
|
|
402
|
-
return
|
|
403
|
-
}
|
|
404
|
-
if (await copyTextToClipboard(text)) {
|
|
405
|
-
emit('action', 'copy')
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
async function pasteFromClipboard(): Promise<void> {
|
|
410
|
-
if (!terminal || !props.inputEnabled) {
|
|
411
|
-
return
|
|
412
|
-
}
|
|
413
|
-
terminal.focus()
|
|
414
|
-
const textarea = terminal.element?.querySelector('textarea')
|
|
415
|
-
if (textarea instanceof HTMLTextAreaElement) {
|
|
416
|
-
textarea.focus()
|
|
417
|
-
}
|
|
418
|
-
const text = await readClipboardText()
|
|
419
|
-
if (!text) {
|
|
420
|
-
return
|
|
421
|
-
}
|
|
422
|
-
terminal.paste(text)
|
|
423
|
-
emit('action', 'paste')
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
function onTerminalContextMenu(): void {
|
|
427
|
-
void beginClipboardPrefetch()
|
|
428
|
-
// capture 早于 xterm 的 rightClickSelectsWord,先保住用户拖选(vim/less 大段文本)
|
|
429
|
-
const existing = getSelectionText().trim()
|
|
430
|
-
if (existing) {
|
|
431
|
-
menuSelectionSnapshot.value = existing
|
|
432
|
-
hasSelection.value = true
|
|
433
|
-
} else {
|
|
434
|
-
menuSelectionSnapshot.value = ''
|
|
435
|
-
}
|
|
436
|
-
// xterm 在 target 阶段才 rightClickSelect,延后同步;无先验选区时采用 word-select 结果
|
|
437
|
-
void nextTick(() => {
|
|
438
|
-
syncSelectionState()
|
|
439
|
-
const after = getSelectionText().trim()
|
|
440
|
-
// 仅在无快照,或 word-select 反而选出更长文本时更新;避免冲掉用户拖选
|
|
441
|
-
if (after && (!menuSelectionSnapshot.value || after.length > menuSelectionSnapshot.value.length)) {
|
|
442
|
-
menuSelectionSnapshot.value = after
|
|
443
|
-
}
|
|
444
|
-
if (menuSelectionSnapshot.value) {
|
|
445
|
-
hasSelection.value = true
|
|
446
|
-
}
|
|
447
|
-
})
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
function selectAll(): void {
|
|
451
|
-
terminal?.selectAll()
|
|
452
|
-
syncSelectionState()
|
|
453
|
-
emit('action', 'selectAll')
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
function clearTerminal(): void {
|
|
457
|
-
clear()
|
|
458
|
-
emit('action', 'clear')
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
async function runTerminalAction(action: RsTerminalAction): Promise<void> {
|
|
462
|
-
if (action === 'copy') {
|
|
463
|
-
await copySelection()
|
|
464
|
-
return
|
|
465
|
-
}
|
|
466
|
-
if (action === 'paste') {
|
|
467
|
-
await pasteFromClipboard()
|
|
468
|
-
return
|
|
469
|
-
}
|
|
470
|
-
if (action === 'selectAll') {
|
|
471
|
-
selectAll()
|
|
472
|
-
return
|
|
473
|
-
}
|
|
474
|
-
if (action === 'clear') {
|
|
475
|
-
clearTerminal()
|
|
476
|
-
return
|
|
477
|
-
}
|
|
478
|
-
if (action === 'askAi') {
|
|
479
|
-
const text = resolveMenuSelectionText()
|
|
480
|
-
emit('askAi', text)
|
|
481
|
-
emit('action', 'askAi')
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
function onContextMenuSelect(key: string): void {
|
|
486
|
-
void runTerminalAction(key as RsTerminalAction)
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// xterm 只有一个 handler 槽位且无法卸载,所以恒定挂载、由 handler 内部实时读 props.shortcuts,
|
|
490
|
-
// 这样该 prop 关得掉也开得回来。
|
|
491
|
-
function attachShortcuts(): void {
|
|
492
|
-
if (!terminal) {
|
|
493
|
-
return
|
|
494
|
-
}
|
|
495
|
-
terminal.attachCustomKeyEventHandler((event) => {
|
|
496
|
-
if (!props.shortcuts || event.type !== 'keydown') {
|
|
497
|
-
return true
|
|
498
|
-
}
|
|
499
|
-
const mod = event.metaKey || event.ctrlKey
|
|
500
|
-
if (!mod) {
|
|
501
|
-
return true
|
|
502
|
-
}
|
|
503
|
-
const key = event.key.toLowerCase()
|
|
504
|
-
if (key === 'c' && terminal?.hasSelection()) {
|
|
505
|
-
event.preventDefault()
|
|
506
|
-
event.stopPropagation()
|
|
507
|
-
void copySelection()
|
|
508
|
-
return false
|
|
509
|
-
}
|
|
510
|
-
if (key === 'v') {
|
|
511
|
-
event.preventDefault()
|
|
512
|
-
event.stopPropagation()
|
|
513
|
-
void pasteFromClipboard()
|
|
514
|
-
return false
|
|
515
|
-
}
|
|
516
|
-
if (key === 'a') {
|
|
517
|
-
event.preventDefault()
|
|
518
|
-
event.stopPropagation()
|
|
519
|
-
selectAll()
|
|
520
|
-
return false
|
|
521
|
-
}
|
|
522
|
-
if (key === 'k') {
|
|
523
|
-
event.preventDefault()
|
|
524
|
-
event.stopPropagation()
|
|
525
|
-
clearTerminal()
|
|
526
|
-
return false
|
|
527
|
-
}
|
|
528
|
-
return true
|
|
529
|
-
})
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
// 逐项 watch:改字体会让 xterm 清空 WidthCache 并全量重测,不能被其他 prop 的变化连带触发。
|
|
533
|
-
watch(
|
|
534
|
-
() => [props.fontFamily, props.fontSize, props.fontWeight, props.fontWeightBold] as const,
|
|
535
|
-
() => {
|
|
536
|
-
if (!terminal) {
|
|
537
|
-
return
|
|
538
|
-
}
|
|
539
|
-
terminal.options.fontFamily = resolveTerminalFontFamily()
|
|
540
|
-
terminal.options.fontSize = resolveTerminalFontSize()
|
|
541
|
-
terminal.options.fontWeight = resolveTerminalFontWeight()
|
|
542
|
-
terminal.options.fontWeightBold = resolveTerminalFontWeightBold()
|
|
543
|
-
void fit()
|
|
544
|
-
},
|
|
545
|
-
)
|
|
546
|
-
|
|
547
|
-
watch(
|
|
548
|
-
() => props.cursorBlink,
|
|
549
|
-
(value) => {
|
|
550
|
-
if (terminal) {
|
|
551
|
-
terminal.options.cursorBlink = value
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
)
|
|
555
|
-
|
|
556
|
-
watch(
|
|
557
|
-
() => props.convertEol,
|
|
558
|
-
(value) => {
|
|
559
|
-
if (terminal) {
|
|
560
|
-
terminal.options.convertEol = value
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
)
|
|
564
|
-
|
|
565
|
-
watch(
|
|
566
|
-
() => props.scrollback,
|
|
567
|
-
(value) => {
|
|
568
|
-
if (terminal) {
|
|
569
|
-
terminal.options.scrollback = value
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
)
|
|
573
|
-
|
|
574
|
-
watch(
|
|
575
|
-
() => props.rightClickSelectsWord,
|
|
576
|
-
(value) => {
|
|
577
|
-
if (terminal) {
|
|
578
|
-
terminal.options.rightClickSelectsWord = value
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
)
|
|
582
|
-
|
|
583
|
-
watch(
|
|
584
|
-
() => [props.allowTransparency, props.zebraStripes] as const,
|
|
585
|
-
() => {
|
|
586
|
-
if (!terminal) {
|
|
587
|
-
return
|
|
588
|
-
}
|
|
589
|
-
terminal.options.allowTransparency = resolveAllowTransparency()
|
|
590
|
-
void fit()
|
|
591
|
-
},
|
|
592
|
-
)
|
|
593
|
-
|
|
594
|
-
// deep 只用于 theme 这一个对象 prop,避免把内联字面量的重建放大成全量重设。
|
|
595
|
-
watch(() => [props.themeMode, props.theme] as const, refreshResolvedTheme, { deep: true })
|
|
596
|
-
|
|
597
|
-
watch(() => props.wheelScrollModifier, attachWheelGuard)
|
|
598
|
-
|
|
599
|
-
onMounted(async () => {
|
|
600
|
-
if (!hostEl.value) {
|
|
601
|
-
return
|
|
602
|
-
}
|
|
603
|
-
refreshResolvedTheme()
|
|
604
|
-
terminal = new Terminal({
|
|
605
|
-
cursorBlink: props.cursorBlink,
|
|
606
|
-
fontFamily: resolveTerminalFontFamily(),
|
|
607
|
-
fontSize: resolveTerminalFontSize(),
|
|
608
|
-
fontWeight: resolveTerminalFontWeight(),
|
|
609
|
-
fontWeightBold: resolveTerminalFontWeightBold(),
|
|
610
|
-
lineHeight: TERMINAL_LINE_HEIGHT,
|
|
611
|
-
letterSpacing: 0,
|
|
612
|
-
allowTransparency: resolveAllowTransparency(),
|
|
613
|
-
drawBoldTextInBrightColors: true,
|
|
614
|
-
scrollback: props.scrollback,
|
|
615
|
-
convertEol: props.convertEol,
|
|
616
|
-
rightClickSelectsWord: props.rightClickSelectsWord,
|
|
617
|
-
theme: buildXtermTheme(),
|
|
618
|
-
})
|
|
619
|
-
fitAddon = new FitAddon()
|
|
620
|
-
terminal.loadAddon(fitAddon)
|
|
621
|
-
terminal.open(hostEl.value)
|
|
622
|
-
terminal.onData((data: string) => {
|
|
623
|
-
if (props.inputEnabled) {
|
|
624
|
-
emit('data', data)
|
|
625
|
-
}
|
|
626
|
-
})
|
|
627
|
-
terminal.onSelectionChange(() => {
|
|
628
|
-
syncSelectionState()
|
|
629
|
-
})
|
|
630
|
-
attachShortcuts()
|
|
631
|
-
await nextTick()
|
|
632
|
-
attachWheelGuard()
|
|
633
|
-
terminalReady.value = true
|
|
634
|
-
await fit()
|
|
635
|
-
emit('ready')
|
|
636
|
-
|
|
637
|
-
resizeObserver = new ResizeObserver(() => {
|
|
638
|
-
scheduleFit()
|
|
639
|
-
})
|
|
640
|
-
resizeObserver.observe(hostEl.value)
|
|
641
|
-
|
|
642
|
-
themeObserver = new MutationObserver(() => {
|
|
643
|
-
if (props.themeMode === 'auto') {
|
|
644
|
-
refreshResolvedTheme()
|
|
645
|
-
}
|
|
646
|
-
})
|
|
647
|
-
themeObserver.observe(document.documentElement, {
|
|
648
|
-
attributes: true,
|
|
649
|
-
attributeFilter: ['data-rs-theme'],
|
|
650
|
-
})
|
|
651
|
-
})
|
|
652
|
-
|
|
653
|
-
onBeforeUnmount(() => {
|
|
654
|
-
themeObserver?.disconnect()
|
|
655
|
-
themeObserver = null
|
|
656
|
-
resizeObserver?.disconnect()
|
|
657
|
-
resizeObserver = null
|
|
658
|
-
detachWheelGuard?.()
|
|
659
|
-
detachWheelGuard = null
|
|
660
|
-
if (fitRaf) {
|
|
661
|
-
cancelAnimationFrame(fitRaf)
|
|
662
|
-
fitRaf = 0
|
|
663
|
-
}
|
|
664
|
-
terminal?.dispose()
|
|
665
|
-
terminal = null
|
|
666
|
-
fitAddon = null
|
|
667
|
-
didInitialFit = false
|
|
668
|
-
})
|
|
669
|
-
|
|
670
|
-
const exposed: RsTerminalExpose = {
|
|
671
|
-
write,
|
|
672
|
-
clear,
|
|
673
|
-
focus,
|
|
674
|
-
fit,
|
|
675
|
-
copySelection,
|
|
676
|
-
pasteFromClipboard,
|
|
677
|
-
selectAll,
|
|
678
|
-
getSelection: getSelectionText,
|
|
679
|
-
hasSelection: () => hasSelection.value,
|
|
680
|
-
getGeometry: currentGeometry,
|
|
681
|
-
getTerminal: () => terminal,
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
defineExpose(exposed)
|
|
685
|
-
</script>
|
|
686
|
-
|
|
687
|
-
<template>
|
|
688
|
-
<RsContextMenu
|
|
689
|
-
:disabled="!contextMenu"
|
|
690
|
-
:items="contextMenuItems"
|
|
691
|
-
@select="onContextMenuSelect"
|
|
692
|
-
>
|
|
693
|
-
<section
|
|
694
|
-
v-bind="$attrs"
|
|
695
|
-
class="rs-terminal"
|
|
696
|
-
:class="{ 'rs-terminal--zebra': zebraStripes }"
|
|
697
|
-
:style="zebraStyle"
|
|
698
|
-
@click="focus"
|
|
699
|
-
@contextmenu.capture="onTerminalContextMenu"
|
|
700
|
-
>
|
|
701
|
-
<div ref="hostEl" class="rs-terminal__host" />
|
|
702
|
-
<RsLoading v-if="showLoading" class="rs-terminal__loading" />
|
|
703
|
-
<output v-if="overlay" class="rs-terminal__overlay">
|
|
704
|
-
{{ overlay }}
|
|
705
|
-
</output>
|
|
706
|
-
</section>
|
|
707
|
-
</RsContextMenu>
|
|
708
|
-
</template>
|
|
709
|
-
|
|
710
|
-
<style scoped>
|
|
711
|
-
.rs-terminal {
|
|
712
|
-
position: relative;
|
|
713
|
-
height: 100%;
|
|
714
|
-
min-height: 0;
|
|
715
|
-
/* 作为 flex/grid 项时,xterm 行盒的固有宽度不得撑开轨道,
|
|
716
|
-
否则容器收窄后列数降不下来、行尾字符会被 overflow 裁掉。 */
|
|
717
|
-
min-width: 0;
|
|
718
|
-
border: 1px solid var(--rs-terminal-border);
|
|
719
|
-
border-radius: var(--rs-radius-md);
|
|
720
|
-
background: var(--rs-terminal-shell-bg, var(--rs-terminal-bg));
|
|
721
|
-
color: var(--rs-terminal-fg);
|
|
722
|
-
box-shadow:
|
|
723
|
-
inset 0 1px 0 color-mix(in srgb, var(--rs-terminal-fg) 5%, transparent),
|
|
724
|
-
inset 0 0 0 1px color-mix(in srgb, var(--rs-terminal-fg) 4%, transparent),
|
|
725
|
-
0 1px 3px color-mix(in srgb, #000 32%, transparent);
|
|
726
|
-
overflow: hidden;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
[data-rs-theme='light'] .rs-terminal {
|
|
730
|
-
box-shadow:
|
|
731
|
-
inset 0 1px 0 color-mix(in srgb, #fff 80%, transparent),
|
|
732
|
-
inset 0 0 0 1px color-mix(in srgb, #000 4%, transparent),
|
|
733
|
-
0 1px 4px color-mix(in srgb, #000 8%, transparent);
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.rs-terminal__host {
|
|
737
|
-
position: relative;
|
|
738
|
-
width: 100%;
|
|
739
|
-
height: 100%;
|
|
740
|
-
min-height: 0;
|
|
741
|
-
/* FitAddon 取整余量露底时,与单元格同色(勿用 shell 灰底) */
|
|
742
|
-
background: var(--rs-terminal-bg);
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.rs-terminal__loading,
|
|
746
|
-
.rs-terminal__overlay {
|
|
747
|
-
position: absolute;
|
|
748
|
-
inset: 0;
|
|
749
|
-
display: flex;
|
|
750
|
-
align-items: center;
|
|
751
|
-
justify-content: center;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
.rs-terminal__overlay {
|
|
755
|
-
padding: var(--rs-space-lg);
|
|
756
|
-
color: color-mix(in srgb, var(--rs-terminal-fg) 92%, #fff 8%);
|
|
757
|
-
background: color-mix(in srgb, var(--rs-terminal-bg) 84%, transparent);
|
|
758
|
-
text-align: center;
|
|
759
|
-
pointer-events: none;
|
|
760
|
-
font-family: var(--rs-font-mono);
|
|
761
|
-
font-size: var(--rs-font-size-xs);
|
|
762
|
-
font-weight: var(--rs-font-weight-regular);
|
|
763
|
-
line-height: var(--rs-line-height-normal);
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
/*
|
|
767
|
-
* letter-spacing 必须在终端内归零:宿主应用常在祖先上设负字距(NiuMa 的 .nm-app 是 -0.011em)。
|
|
768
|
-
* 它会继承进 xterm 隐藏的字宽测量元素(.xterm-helpers 下的 WidthCache),使 offsetWidth 量到的
|
|
769
|
-
* 字形比实际渲染窄;而 CharSizeService 走 canvas measureText 不受 CSS 影响、单元格宽是准的。
|
|
770
|
-
* DOM 渲染器于是按 `cellWidth - 测量值` 给每个字符补正字距,行盒却仍是 cols × cellWidth,
|
|
771
|
-
* 逐列累积后整行溢出十几到几十像素,被行盒的 overflow:hidden 切掉行尾几个字符。
|
|
772
|
-
*/
|
|
773
|
-
.rs-terminal :deep(.xterm) {
|
|
774
|
-
width: 100%;
|
|
775
|
-
height: 100%;
|
|
776
|
-
line-height: normal;
|
|
777
|
-
letter-spacing: normal;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/*
|
|
781
|
-
* xterm 6 官方仍给空的 .xterm-viewport 写 overflow-y:scroll + 背景 #000。
|
|
782
|
-
* 真正滚动的是 .xterm-scrollable-element;空层滚动条会挡住最后一列。
|
|
783
|
-
*/
|
|
784
|
-
.rs-terminal :deep(.xterm .xterm-viewport) {
|
|
785
|
-
overflow: hidden;
|
|
786
|
-
background-color: transparent;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
/*
|
|
790
|
-
* xterm 兜底的滑块是占满 14px 轨道的直角块,配色取终端前景色 20% 不透明度,与 RsScrollbar
|
|
791
|
-
* 的圆角胶囊不一致。轨道宽度由 overviewRuler.width 决定,改它会给每个终端实例多建一块
|
|
792
|
-
* overview ruler 画布,因此只重绘滑块:热区仍是 14px,靠透明边框内缩出 10px 可见胶囊。
|
|
793
|
-
*/
|
|
794
|
-
.rs-terminal :deep(.xterm-scrollable-element > .scrollbar > .slider) {
|
|
795
|
-
box-sizing: border-box;
|
|
796
|
-
border: var(--rs-scrollbar-padding, 2px) solid transparent;
|
|
797
|
-
border-radius: var(--rs-radius-full);
|
|
798
|
-
background-color: color-mix(in srgb, var(--rs-muted) 60%, transparent);
|
|
799
|
-
background-clip: padding-box;
|
|
800
|
-
transition: background-color var(--rs-transition-fast);
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
.rs-terminal :deep(.xterm-scrollable-element > .scrollbar > .slider:hover) {
|
|
804
|
-
background-color: color-mix(in srgb, var(--rs-primary) 40%, var(--rs-muted));
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
.rs-terminal :deep(.xterm-scrollable-element > .scrollbar > .slider.active) {
|
|
808
|
-
background-color: color-mix(in srgb, var(--rs-primary) 55%, var(--rs-muted));
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
.rs-terminal--zebra :deep(.xterm-rows),
|
|
812
|
-
.rs-terminal--zebra :deep(.xterm-rows > div),
|
|
813
|
-
.rs-terminal--zebra :deep(.xterm-row) {
|
|
814
|
-
background-color: transparent !important;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.rs-terminal--zebra :deep(.xterm-scrollable-element) {
|
|
818
|
-
background-color: transparent !important;
|
|
819
|
-
background-image: repeating-linear-gradient(
|
|
820
|
-
to bottom,
|
|
821
|
-
var(--rs-terminal-bg) 0,
|
|
822
|
-
var(--rs-terminal-bg) var(--rs-terminal-zebra-step, 1lh),
|
|
823
|
-
var(--rs-terminal-row-stripe) var(--rs-terminal-zebra-step, 1lh),
|
|
824
|
-
var(--rs-terminal-row-stripe) calc(var(--rs-terminal-zebra-step, 1lh) * 2)
|
|
825
|
-
);
|
|
826
|
-
background-attachment: local;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
.rs-terminal--zebra :deep(.xterm-screen) {
|
|
830
|
-
background-color: transparent !important;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.rs-terminal :deep(.xterm-fg-257) {
|
|
834
|
-
color: var(--rs-terminal-bg) !important;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
.rs-terminal :deep(.xterm-bg-257) {
|
|
838
|
-
background-color: var(--rs-terminal-fg) !important;
|
|
839
|
-
}
|
|
840
|
-
</style>
|