@slexn/codecenter-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/README.md +148 -0
- package/components.json +20 -0
- package/dist/codecenter-ui.cjs +10 -0
- package/dist/codecenter-ui.js +17995 -0
- package/dist/components/ui/accordion/Accordion.vue.d.ts +28 -0
- package/dist/components/ui/accordion/AccordionContent.vue.d.ts +22 -0
- package/dist/components/ui/accordion/AccordionItem.vue.d.ts +24 -0
- package/dist/components/ui/accordion/AccordionTrigger.vue.d.ts +22 -0
- package/dist/components/ui/accordion/index.d.ts +4 -0
- package/dist/components/ui/alert/Alert.vue.d.ts +32 -0
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +24 -0
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +24 -0
- package/dist/components/ui/alert/index.d.ts +4 -0
- package/dist/components/ui/alert/variants.d.ts +5 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/variants.d.ts +6 -0
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +25 -0
- package/dist/components/ui/button-group/index.d.ts +2 -0
- package/dist/components/ui/card/Card.vue.d.ts +21 -0
- package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
- package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
- package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
- package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
- package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +6 -0
- package/dist/components/ui/chart/Chart.vue.d.ts +92 -0
- package/dist/components/ui/chart/index.d.ts +2 -0
- package/dist/components/ui/chat/Chat.vue.d.ts +190 -0
- package/dist/components/ui/chat/ChatAttachments.vue.d.ts +11 -0
- package/dist/components/ui/chat/ChatCodeBlock.vue.d.ts +16 -0
- package/dist/components/ui/chat/code-block.d.ts +27 -0
- package/dist/components/ui/chat/index.d.ts +6 -0
- package/dist/components/ui/chat/types.d.ts +15 -0
- package/dist/components/ui/checkbox/Checkbox.vue.d.ts +29 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/commit/Commit.vue.d.ts +62 -0
- package/dist/components/ui/commit/index.d.ts +2 -0
- package/dist/components/ui/contribution-graph/ContributionGraph.vue.d.ts +87 -0
- package/dist/components/ui/contribution-graph/index.d.ts +2 -0
- package/dist/components/ui/data-table/DataTable.vue.d.ts +109 -0
- package/dist/components/ui/data-table/index.d.ts +2 -0
- package/dist/components/ui/date-picker/DatePicker.vue.d.ts +37 -0
- package/dist/components/ui/date-picker/index.d.ts +2 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dialog/index.d.ts +10 -0
- package/dist/components/ui/diff/DiffTool.vue.d.ts +21 -0
- package/dist/components/ui/diff/diff-parser.d.ts +30 -0
- package/dist/components/ui/diff/diff-tool.d.ts +36 -0
- package/dist/components/ui/diff/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +24 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +29 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +36 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +26 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +27 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +21 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +38 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/components/ui/gauge/Gauge.vue.d.ts +62 -0
- package/dist/components/ui/gauge/index.d.ts +2 -0
- package/dist/components/ui/git-graph/GitGraph.vue.d.ts +59 -0
- package/dist/components/ui/git-graph/index.d.ts +2 -0
- package/dist/components/ui/incident-timeline/IncidentTimeline.vue.d.ts +50 -0
- package/dist/components/ui/incident-timeline/index.d.ts +2 -0
- package/dist/components/ui/input/Input.vue.d.ts +14 -0
- package/dist/components/ui/input/InputControl.vue.d.ts +14 -0
- package/dist/components/ui/input/InputFieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/input/index.d.ts +4 -0
- package/dist/components/ui/input/types.d.ts +31 -0
- package/dist/components/ui/kpi-card/KpiCard.vue.d.ts +46 -0
- package/dist/components/ui/kpi-card/index.d.ts +2 -0
- package/dist/components/ui/kpi-line-card/KpiLineCard.vue.d.ts +66 -0
- package/dist/components/ui/kpi-line-card/index.d.ts +2 -0
- package/dist/components/ui/model-selector/ModelSelector.vue.d.ts +41 -0
- package/dist/components/ui/model-selector/index.d.ts +2 -0
- package/dist/components/ui/model-selector/types.d.ts +12 -0
- package/dist/components/ui/network-graph/NetworkGraph.vue.d.ts +75 -0
- package/dist/components/ui/network-graph/index.d.ts +2 -0
- package/dist/components/ui/pagination/Pagination.vue.d.ts +29 -0
- package/dist/components/ui/pagination/PaginationContent.vue.d.ts +29 -0
- package/dist/components/ui/pagination/PaginationEllipsis.vue.d.ts +22 -0
- package/dist/components/ui/pagination/PaginationFirst.vue.d.ts +26 -0
- package/dist/components/ui/pagination/PaginationItem.vue.d.ts +28 -0
- package/dist/components/ui/pagination/PaginationLast.vue.d.ts +26 -0
- package/dist/components/ui/pagination/PaginationNext.vue.d.ts +26 -0
- package/dist/components/ui/pagination/PaginationPrevious.vue.d.ts +26 -0
- package/dist/components/ui/pagination/index.d.ts +8 -0
- package/dist/components/ui/profile/Profile.vue.d.ts +30 -0
- package/dist/components/ui/profile/ProfileGroup.vue.d.ts +37 -0
- package/dist/components/ui/profile/index.d.ts +4 -0
- package/dist/components/ui/progress/Progress.vue.d.ts +36 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/prompt-input/PromptInput.vue.d.ts +150 -0
- package/dist/components/ui/prompt-input/index.d.ts +2 -0
- package/dist/components/ui/prompt-input/types.d.ts +61 -0
- package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +30 -0
- package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +12 -0
- package/dist/components/ui/radio-group/RadioGroupOption.vue.d.ts +28 -0
- package/dist/components/ui/radio-group/index.d.ts +3 -0
- package/dist/components/ui/reasoning/Reasoning.vue.d.ts +40 -0
- package/dist/components/ui/reasoning/index.d.ts +2 -0
- package/dist/components/ui/reasoning/types.d.ts +26 -0
- package/dist/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +46 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +26 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/search.d.ts +18 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +6 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/types.d.ts +7 -0
- package/dist/components/ui/shimmer/Shimmer.vue.d.ts +37 -0
- package/dist/components/ui/shimmer/index.d.ts +2 -0
- package/dist/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +36 -0
- package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/context.d.ts +19 -0
- package/dist/components/ui/sidebar/index.d.ts +26 -0
- package/dist/components/ui/sidebar/types.d.ts +11 -0
- package/dist/components/ui/sidebar/variants.d.ts +6 -0
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +18 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/sonner/Sonner.vue.d.ts +5 -0
- package/dist/components/ui/sonner/index.d.ts +2 -0
- package/dist/components/ui/spinner/Spinner.vue.d.ts +11 -0
- package/dist/components/ui/spinner/index.d.ts +1 -0
- package/dist/components/ui/stepper/Stepper.vue.d.ts +38 -0
- package/dist/components/ui/stepper/StepperDescription.vue.d.ts +22 -0
- package/dist/components/ui/stepper/StepperIndicator.vue.d.ts +30 -0
- package/dist/components/ui/stepper/StepperItem.vue.d.ts +24 -0
- package/dist/components/ui/stepper/StepperSeparator.vue.d.ts +7 -0
- package/dist/components/ui/stepper/StepperTitle.vue.d.ts +22 -0
- package/dist/components/ui/stepper/StepperTrigger.vue.d.ts +22 -0
- package/dist/components/ui/stepper/index.d.ts +7 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +12 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/table/Table.vue.d.ts +22 -0
- package/dist/components/ui/table/TableBody.vue.d.ts +21 -0
- package/dist/components/ui/table/TableCaption.vue.d.ts +21 -0
- package/dist/components/ui/table/TableCell.vue.d.ts +22 -0
- package/dist/components/ui/table/TableEmpty.vue.d.ts +24 -0
- package/dist/components/ui/table/TableFooter.vue.d.ts +21 -0
- package/dist/components/ui/table/TableHead.vue.d.ts +21 -0
- package/dist/components/ui/table/TableHeader.vue.d.ts +21 -0
- package/dist/components/ui/table/TableRow.vue.d.ts +21 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/tabs/Tabs.vue.d.ts +28 -0
- package/dist/components/ui/tabs/TabsContent.vue.d.ts +22 -0
- package/dist/components/ui/tabs/TabsList.vue.d.ts +22 -0
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +22 -0
- package/dist/components/ui/tabs/index.d.ts +4 -0
- package/dist/components/ui/tag/Tag.vue.d.ts +35 -0
- package/dist/components/ui/tag/index.d.ts +2 -0
- package/dist/components/ui/tag/variants.d.ts +6 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +14 -0
- package/dist/components/ui/textarea/TextareaControl.vue.d.ts +14 -0
- package/dist/components/ui/textarea/TextareaFieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/textarea/index.d.ts +4 -0
- package/dist/components/ui/textarea/types.d.ts +32 -0
- package/dist/components/ui/tool/Tool.vue.d.ts +61 -0
- package/dist/components/ui/tool/index.d.ts +2 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +32 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/docs/component-docs.d.ts +18 -0
- package/dist/docs/markdown.d.ts +27 -0
- package/dist/index.d.ts +45 -0
- package/dist/lib/code-highlight.d.ts +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/styles.css +3 -0
- package/package.json +76 -0
- package/public/r/accordion.json +52 -0
- package/public/r/alert.json +51 -0
- package/public/r/button-group.json +31 -0
- package/public/r/button.json +39 -0
- package/public/r/card.json +61 -0
- package/public/r/chart.json +31 -0
- package/public/r/chat.json +186 -0
- package/public/r/checkbox.json +34 -0
- package/public/r/commit.json +32 -0
- package/public/r/contribution-graph.json +63 -0
- package/public/r/data-table.json +197 -0
- package/public/r/date-picker.json +33 -0
- package/public/r/dialog.json +88 -0
- package/public/r/diff.json +71 -0
- package/public/r/dropdown-menu.json +112 -0
- package/public/r/gauge.json +31 -0
- package/public/r/git-graph.json +32 -0
- package/public/r/incident-timeline.json +64 -0
- package/public/r/input.json +49 -0
- package/public/r/kpi-card.json +32 -0
- package/public/r/kpi-line-card.json +32 -0
- package/public/r/model-selector.json +148 -0
- package/public/r/network-graph.json +33 -0
- package/public/r/pagination.json +95 -0
- package/public/r/profile.json +37 -0
- package/public/r/progress.json +31 -0
- package/public/r/prompt-input.json +293 -0
- package/public/r/radio-group.json +45 -0
- package/public/r/reasoning.json +38 -0
- package/public/r/registry.json +2512 -0
- package/public/r/select.json +100 -0
- package/public/r/separator.json +37 -0
- package/public/r/shimmer.json +31 -0
- package/public/r/sidebar.json +221 -0
- package/public/r/skeleton.json +31 -0
- package/public/r/sonner.json +33 -0
- package/public/r/spinner.json +31 -0
- package/public/r/stepper.json +70 -0
- package/public/r/switch.json +33 -0
- package/public/r/table.json +79 -0
- package/public/r/tabs.json +51 -0
- package/public/r/tag.json +39 -0
- package/public/r/textarea.json +49 -0
- package/public/r/tool.json +32 -0
- package/public/r/tooltip.json +51 -0
- package/registry.json +2512 -0
- package/src/components/docs/MarkdownContent.vue +106 -0
- package/src/components/ui/accordion/Accordion.vue +24 -0
- package/src/components/ui/accordion/AccordionContent.vue +62 -0
- package/src/components/ui/accordion/AccordionItem.vue +23 -0
- package/src/components/ui/accordion/AccordionTrigger.vue +38 -0
- package/src/components/ui/accordion/index.ts +4 -0
- package/src/components/ui/alert/Alert.vue +40 -0
- package/src/components/ui/alert/AlertDescription.vue +24 -0
- package/src/components/ui/alert/AlertTitle.vue +24 -0
- package/src/components/ui/alert/index.ts +4 -0
- package/src/components/ui/alert/variants.ts +19 -0
- package/src/components/ui/button/Button.vue +27 -0
- package/src/components/ui/button/index.ts +2 -0
- package/src/components/ui/button/variants.ts +32 -0
- package/src/components/ui/button-group/ButtonGroup.vue +31 -0
- package/src/components/ui/button-group/index.ts +2 -0
- package/src/components/ui/card/Card.vue +17 -0
- package/src/components/ui/card/CardContent.vue +14 -0
- package/src/components/ui/card/CardDescription.vue +14 -0
- package/src/components/ui/card/CardFooter.vue +14 -0
- package/src/components/ui/card/CardHeader.vue +17 -0
- package/src/components/ui/card/CardTitle.vue +14 -0
- package/src/components/ui/card/index.ts +6 -0
- package/src/components/ui/chart/Chart.vue +1042 -0
- package/src/components/ui/chart/index.ts +13 -0
- package/src/components/ui/chat/Chat.vue +1297 -0
- package/src/components/ui/chat/ChatAttachments.vue +278 -0
- package/src/components/ui/chat/ChatCodeBlock.vue +283 -0
- package/src/components/ui/chat/code-block.ts +30 -0
- package/src/components/ui/chat/index.ts +24 -0
- package/src/components/ui/chat/types.ts +23 -0
- package/src/components/ui/checkbox/Checkbox.vue +38 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/commit/Commit.vue +423 -0
- package/src/components/ui/commit/index.ts +9 -0
- package/src/components/ui/contribution-graph/ContributionGraph.vue +719 -0
- package/src/components/ui/contribution-graph/index.ts +9 -0
- package/src/components/ui/data-table/DataTable.vue +534 -0
- package/src/components/ui/data-table/index.ts +9 -0
- package/src/components/ui/date-picker/DatePicker.vue +649 -0
- package/src/components/ui/date-picker/index.ts +7 -0
- package/src/components/ui/dialog/Dialog.vue +19 -0
- package/src/components/ui/dialog/DialogClose.vue +17 -0
- package/src/components/ui/dialog/DialogContent.vue +60 -0
- package/src/components/ui/dialog/DialogDescription.vue +23 -0
- package/src/components/ui/dialog/DialogFooter.vue +17 -0
- package/src/components/ui/dialog/DialogHeader.vue +17 -0
- package/src/components/ui/dialog/DialogOverlay.vue +23 -0
- package/src/components/ui/dialog/DialogScrollContent.vue +69 -0
- package/src/components/ui/dialog/DialogTitle.vue +23 -0
- package/src/components/ui/dialog/DialogTrigger.vue +17 -0
- package/src/components/ui/dialog/index.ts +10 -0
- package/src/components/ui/diff/DiffTool.vue +513 -0
- package/src/components/ui/diff/diff-parser.ts +423 -0
- package/src/components/ui/diff/diff-tool.ts +39 -0
- package/src/components/ui/diff/index.ts +5 -0
- package/src/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/src/components/ui/dropdown-menu/index.ts +16 -0
- package/src/components/ui/gauge/Gauge.vue +725 -0
- package/src/components/ui/gauge/index.ts +9 -0
- package/src/components/ui/git-graph/GitGraph.vue +715 -0
- package/src/components/ui/git-graph/index.ts +9 -0
- package/src/components/ui/incident-timeline/IncidentTimeline.vue +360 -0
- package/src/components/ui/incident-timeline/index.ts +7 -0
- package/src/components/ui/input/Input.vue +159 -0
- package/src/components/ui/input/InputControl.vue +135 -0
- package/src/components/ui/input/InputFieldGroup.vue +14 -0
- package/src/components/ui/input/index.ts +9 -0
- package/src/components/ui/input/types.ts +34 -0
- package/src/components/ui/kpi-card/KpiCard.vue +268 -0
- package/src/components/ui/kpi-card/index.ts +9 -0
- package/src/components/ui/kpi-line-card/KpiLineCard.vue +622 -0
- package/src/components/ui/kpi-line-card/index.ts +11 -0
- package/src/components/ui/model-selector/ModelSelector.vue +328 -0
- package/src/components/ui/model-selector/index.ts +6 -0
- package/src/components/ui/model-selector/types.ts +15 -0
- package/src/components/ui/network-graph/NetworkGraph.vue +902 -0
- package/src/components/ui/network-graph/index.ts +7 -0
- package/src/components/ui/pagination/Pagination.vue +26 -0
- package/src/components/ui/pagination/PaginationContent.vue +24 -0
- package/src/components/ui/pagination/PaginationEllipsis.vue +27 -0
- package/src/components/ui/pagination/PaginationFirst.vue +33 -0
- package/src/components/ui/pagination/PaginationItem.vue +39 -0
- package/src/components/ui/pagination/PaginationLast.vue +33 -0
- package/src/components/ui/pagination/PaginationNext.vue +33 -0
- package/src/components/ui/pagination/PaginationPrevious.vue +33 -0
- package/src/components/ui/pagination/index.ts +8 -0
- package/src/components/ui/profile/Profile.vue +226 -0
- package/src/components/ui/profile/ProfileGroup.vue +96 -0
- package/src/components/ui/profile/index.ts +8 -0
- package/src/components/ui/progress/Progress.vue +271 -0
- package/src/components/ui/progress/index.ts +9 -0
- package/src/components/ui/prompt-input/PromptInput.vue +1094 -0
- package/src/components/ui/prompt-input/index.ts +14 -0
- package/src/components/ui/prompt-input/types.ts +78 -0
- package/src/components/ui/radio-group/RadioGroup.vue +36 -0
- package/src/components/ui/radio-group/RadioGroupItem.vue +45 -0
- package/src/components/ui/radio-group/RadioGroupOption.vue +80 -0
- package/src/components/ui/radio-group/index.ts +3 -0
- package/src/components/ui/reasoning/Reasoning.vue +278 -0
- package/src/components/ui/reasoning/index.ts +8 -0
- package/src/components/ui/reasoning/types.ts +29 -0
- package/src/components/ui/select/Select.vue +19 -0
- package/src/components/ui/select/SelectContent.vue +166 -0
- package/src/components/ui/select/SelectGroup.vue +23 -0
- package/src/components/ui/select/SelectItem.vue +97 -0
- package/src/components/ui/select/SelectItemText.vue +15 -0
- package/src/components/ui/select/SelectLabel.vue +17 -0
- package/src/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/src/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/src/components/ui/select/SelectSeparator.vue +19 -0
- package/src/components/ui/select/SelectTrigger.vue +33 -0
- package/src/components/ui/select/SelectValue.vue +15 -0
- package/src/components/ui/select/index.ts +11 -0
- package/src/components/ui/select/search.ts +26 -0
- package/src/components/ui/separator/Separator.vue +30 -0
- package/src/components/ui/separator/index.ts +5 -0
- package/src/components/ui/separator/types.ts +9 -0
- package/src/components/ui/shimmer/Shimmer.vue +110 -0
- package/src/components/ui/shimmer/index.ts +5 -0
- package/src/components/ui/sidebar/Sidebar.vue +142 -0
- package/src/components/ui/sidebar/SidebarContent.vue +18 -0
- package/src/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/src/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/src/components/ui/sidebar/SidebarGroupAction.vue +31 -0
- package/src/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/src/components/ui/sidebar/SidebarGroupLabel.vue +30 -0
- package/src/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/src/components/ui/sidebar/SidebarInput.vue +26 -0
- package/src/components/ui/sidebar/SidebarInset.vue +23 -0
- package/src/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuAction.vue +34 -0
- package/src/components/ui/sidebar/SidebarMenuBadge.vue +25 -0
- package/src/components/ui/sidebar/SidebarMenuButton.vue +37 -0
- package/src/components/ui/sidebar/SidebarMenuButtonChild.vue +38 -0
- package/src/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuSub.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/src/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/src/components/ui/sidebar/SidebarProvider.vue +119 -0
- package/src/components/ui/sidebar/SidebarRail.vue +35 -0
- package/src/components/ui/sidebar/SidebarSeparator.vue +18 -0
- package/src/components/ui/sidebar/SidebarTrigger.vue +28 -0
- package/src/components/ui/sidebar/context.ts +39 -0
- package/src/components/ui/sidebar/index.ts +43 -0
- package/src/components/ui/sidebar/types.ts +13 -0
- package/src/components/ui/sidebar/variants.ts +25 -0
- package/src/components/ui/skeleton/Skeleton.vue +53 -0
- package/src/components/ui/skeleton/index.ts +5 -0
- package/src/components/ui/sonner/Sonner.vue +69 -0
- package/src/components/ui/sonner/index.ts +12 -0
- package/src/components/ui/spinner/Spinner.vue +33 -0
- package/src/components/ui/spinner/index.ts +1 -0
- package/src/components/ui/stepper/Stepper.vue +29 -0
- package/src/components/ui/stepper/StepperDescription.vue +30 -0
- package/src/components/ui/stepper/StepperIndicator.vue +50 -0
- package/src/components/ui/stepper/StepperItem.vue +28 -0
- package/src/components/ui/stepper/StepperSeparator.vue +25 -0
- package/src/components/ui/stepper/StepperTitle.vue +27 -0
- package/src/components/ui/stepper/StepperTrigger.vue +27 -0
- package/src/components/ui/stepper/index.ts +7 -0
- package/src/components/ui/switch/Switch.vue +41 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/table/Table.vue +23 -0
- package/src/components/ui/table/TableBody.vue +17 -0
- package/src/components/ui/table/TableCaption.vue +17 -0
- package/src/components/ui/table/TableCell.vue +24 -0
- package/src/components/ui/table/TableEmpty.vue +31 -0
- package/src/components/ui/table/TableFooter.vue +17 -0
- package/src/components/ui/table/TableHead.vue +22 -0
- package/src/components/ui/table/TableHeader.vue +17 -0
- package/src/components/ui/table/TableRow.vue +22 -0
- package/src/components/ui/table/index.ts +9 -0
- package/src/components/ui/tabs/Tabs.vue +24 -0
- package/src/components/ui/tabs/TabsContent.vue +22 -0
- package/src/components/ui/tabs/TabsList.vue +27 -0
- package/src/components/ui/tabs/TabsTrigger.vue +27 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/tag/Tag.vue +55 -0
- package/src/components/ui/tag/index.ts +2 -0
- package/src/components/ui/tag/variants.ts +29 -0
- package/src/components/ui/textarea/Textarea.vue +159 -0
- package/src/components/ui/textarea/TextareaControl.vue +120 -0
- package/src/components/ui/textarea/TextareaFieldGroup.vue +14 -0
- package/src/components/ui/textarea/index.ts +10 -0
- package/src/components/ui/textarea/types.ts +35 -0
- package/src/components/ui/tool/Tool.vue +304 -0
- package/src/components/ui/tool/index.ts +7 -0
- package/src/components/ui/tooltip/Tooltip.vue +19 -0
- package/src/components/ui/tooltip/TooltipContent.vue +44 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/lib/code-highlight.ts +220 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles.css +684 -0
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onBeforeUnmount, ref, watch } from "vue"
|
|
3
|
+
import { CheckIcon, CopyIcon, Maximize2Icon, Minimize2Icon } from "@lucide/vue"
|
|
4
|
+
import { Button } from "@/components/ui/button"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
import {
|
|
7
|
+
diffToolDefaults,
|
|
8
|
+
type DiffToolEmits,
|
|
9
|
+
type DiffToolProps,
|
|
10
|
+
} from "./diff-tool"
|
|
11
|
+
import { createSplitDiffModel, splitDiffCopyText } from "./diff-parser"
|
|
12
|
+
|
|
13
|
+
const props = withDefaults(
|
|
14
|
+
defineProps<DiffToolProps>(),
|
|
15
|
+
diffToolDefaults,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
const emit = defineEmits<DiffToolEmits>()
|
|
19
|
+
|
|
20
|
+
const copied = ref(false)
|
|
21
|
+
const expanded = ref(false)
|
|
22
|
+
let copiedTimer: ReturnType<typeof setTimeout> | undefined
|
|
23
|
+
let previousBodyOverflow: string | undefined
|
|
24
|
+
let syncingPaneScroll = false
|
|
25
|
+
|
|
26
|
+
const diffModel = computed(() => createSplitDiffModel({
|
|
27
|
+
code: props.code,
|
|
28
|
+
highlight: props.highlight,
|
|
29
|
+
language: props.language,
|
|
30
|
+
leftCode: props.leftCode,
|
|
31
|
+
leftLabel: props.leftLabel,
|
|
32
|
+
rightCode: props.rightCode,
|
|
33
|
+
rightLabel: props.rightLabel,
|
|
34
|
+
}))
|
|
35
|
+
const visibleLineCount = computed(() =>
|
|
36
|
+
Math.max(1, Math.trunc(props.maxVisibleLines)),
|
|
37
|
+
)
|
|
38
|
+
const shouldScroll = computed(() => diffModel.value.rows.length > visibleLineCount.value)
|
|
39
|
+
const lineStyle = computed(() => ({
|
|
40
|
+
gridTemplateColumns: props.lineNumbers
|
|
41
|
+
? `${diffModel.value.lineNumberWidth} max-content`
|
|
42
|
+
: "max-content",
|
|
43
|
+
}))
|
|
44
|
+
const collapsedScrollStyle = computed(() => shouldScroll.value
|
|
45
|
+
? {
|
|
46
|
+
maxHeight: `calc(${visibleLineCount.value} * 1.5rem + 2.5rem)`,
|
|
47
|
+
}
|
|
48
|
+
: undefined)
|
|
49
|
+
const languageLabel = computed(() => diffModel.value.language || props.language || props.label)
|
|
50
|
+
const copyText = computed(() => splitDiffCopyText(diffModel.value))
|
|
51
|
+
|
|
52
|
+
async function copyDiff() {
|
|
53
|
+
try {
|
|
54
|
+
if (typeof navigator !== "undefined") {
|
|
55
|
+
await navigator.clipboard?.writeText(copyText.value)
|
|
56
|
+
}
|
|
57
|
+
} catch {
|
|
58
|
+
// Clipboard permissions vary by browser; the component still reports intent.
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
emit("copy", copyText.value)
|
|
62
|
+
copied.value = true
|
|
63
|
+
|
|
64
|
+
if (copiedTimer) clearTimeout(copiedTimer)
|
|
65
|
+
copiedTimer = setTimeout(() => {
|
|
66
|
+
copied.value = false
|
|
67
|
+
}, 1200)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function openExpanded() {
|
|
71
|
+
expanded.value = true
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function closeExpanded() {
|
|
75
|
+
expanded.value = false
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
79
|
+
if (event.key === "Escape") closeExpanded()
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function syncPaneScroll(event: Event) {
|
|
83
|
+
if (syncingPaneScroll || !(event.currentTarget instanceof HTMLElement)) return
|
|
84
|
+
|
|
85
|
+
const sourcePane = event.currentTarget
|
|
86
|
+
const scrollContainer = sourcePane.closest('[data-slot="diff-tool-scroll"]')
|
|
87
|
+
const panes = scrollContainer?.querySelectorAll<HTMLElement>('[data-slot="diff-tool-pane"]')
|
|
88
|
+
|
|
89
|
+
if (!panes) return
|
|
90
|
+
|
|
91
|
+
syncingPaneScroll = true
|
|
92
|
+
|
|
93
|
+
panes.forEach((pane) => {
|
|
94
|
+
if (pane !== sourcePane) {
|
|
95
|
+
pane.scrollLeft = sourcePane.scrollLeft
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
requestAnimationFrame(() => {
|
|
100
|
+
syncingPaneScroll = false
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
watch(expanded, (isExpanded) => {
|
|
105
|
+
if (typeof document === "undefined" || typeof window === "undefined") return
|
|
106
|
+
|
|
107
|
+
if (isExpanded) {
|
|
108
|
+
previousBodyOverflow = document.body.style.overflow
|
|
109
|
+
document.body.style.overflow = "hidden"
|
|
110
|
+
window.addEventListener("keydown", handleKeydown)
|
|
111
|
+
return
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
document.body.style.overflow = previousBodyOverflow ?? ""
|
|
115
|
+
previousBodyOverflow = undefined
|
|
116
|
+
window.removeEventListener("keydown", handleKeydown)
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
onBeforeUnmount(() => {
|
|
120
|
+
if (copiedTimer) clearTimeout(copiedTimer)
|
|
121
|
+
|
|
122
|
+
if (typeof document !== "undefined") {
|
|
123
|
+
document.body.style.overflow = previousBodyOverflow ?? ""
|
|
124
|
+
}
|
|
125
|
+
if (typeof window !== "undefined") {
|
|
126
|
+
window.removeEventListener("keydown", handleKeydown)
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<template>
|
|
132
|
+
<div
|
|
133
|
+
data-slot="diff-tool"
|
|
134
|
+
:data-scrollable="shouldScroll ? '' : undefined"
|
|
135
|
+
:class="
|
|
136
|
+
cn(
|
|
137
|
+
'relative w-full min-w-0 overflow-hidden rounded-xl border font-mono text-[13px] leading-6 shadow-sm',
|
|
138
|
+
props.class,
|
|
139
|
+
)
|
|
140
|
+
"
|
|
141
|
+
>
|
|
142
|
+
<div
|
|
143
|
+
data-slot="diff-tool-toolbar"
|
|
144
|
+
class="flex h-11 items-center justify-between gap-3 border-b px-3"
|
|
145
|
+
>
|
|
146
|
+
<div class="flex min-w-0 items-center gap-2">
|
|
147
|
+
<span
|
|
148
|
+
data-slot="diff-tool-label"
|
|
149
|
+
class="truncate text-xs font-medium"
|
|
150
|
+
>
|
|
151
|
+
{{ props.label }}
|
|
152
|
+
</span>
|
|
153
|
+
<span
|
|
154
|
+
data-slot="diff-tool-language"
|
|
155
|
+
class="shrink-0 text-xs"
|
|
156
|
+
>
|
|
157
|
+
{{ languageLabel }}
|
|
158
|
+
</span>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="flex shrink-0 items-center gap-1">
|
|
161
|
+
<Button
|
|
162
|
+
data-slot="diff-tool-copy"
|
|
163
|
+
type="button"
|
|
164
|
+
variant="ghost"
|
|
165
|
+
size="icon-sm"
|
|
166
|
+
class="size-7 rounded-md"
|
|
167
|
+
:aria-label="copied ? props.copiedLabel : props.copyLabel"
|
|
168
|
+
:title="copied ? props.copiedLabel : props.copyLabel"
|
|
169
|
+
@click="copyDiff"
|
|
170
|
+
>
|
|
171
|
+
<CheckIcon v-if="copied" />
|
|
172
|
+
<CopyIcon v-else />
|
|
173
|
+
</Button>
|
|
174
|
+
<Button
|
|
175
|
+
data-slot="diff-tool-expand-trigger"
|
|
176
|
+
type="button"
|
|
177
|
+
variant="ghost"
|
|
178
|
+
size="icon-sm"
|
|
179
|
+
class="size-7 rounded-md"
|
|
180
|
+
:aria-label="props.expandLabel"
|
|
181
|
+
:title="props.expandLabel"
|
|
182
|
+
@click="openExpanded"
|
|
183
|
+
>
|
|
184
|
+
<Maximize2Icon />
|
|
185
|
+
</Button>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div
|
|
190
|
+
data-slot="diff-tool-scroll"
|
|
191
|
+
:data-scrollable="shouldScroll ? '' : undefined"
|
|
192
|
+
class="min-w-0 max-w-full overflow-y-auto overflow-x-hidden [tab-size:2]"
|
|
193
|
+
:style="collapsedScrollStyle"
|
|
194
|
+
>
|
|
195
|
+
<div
|
|
196
|
+
data-slot="diff-tool-header-row"
|
|
197
|
+
class="sticky top-0 z-10 grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)]"
|
|
198
|
+
>
|
|
199
|
+
<div
|
|
200
|
+
data-slot="diff-tool-side-header"
|
|
201
|
+
class="min-w-0 border-b px-3 py-2 text-left text-xs font-medium"
|
|
202
|
+
>
|
|
203
|
+
{{ diffModel.leftLabel }}
|
|
204
|
+
</div>
|
|
205
|
+
<div
|
|
206
|
+
data-slot="diff-tool-side-header"
|
|
207
|
+
data-side="right"
|
|
208
|
+
class="min-w-0 border-b border-l px-3 py-2 text-left text-xs font-medium"
|
|
209
|
+
>
|
|
210
|
+
{{ diffModel.rightLabel }}
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div
|
|
214
|
+
data-slot="diff-tool-panes"
|
|
215
|
+
class="grid min-w-0 grid-cols-[minmax(0,1fr)_minmax(0,1fr)]"
|
|
216
|
+
>
|
|
217
|
+
<div
|
|
218
|
+
data-slot="diff-tool-pane"
|
|
219
|
+
class="min-w-0 overflow-x-auto overflow-y-hidden"
|
|
220
|
+
@scroll="syncPaneScroll"
|
|
221
|
+
>
|
|
222
|
+
<div
|
|
223
|
+
data-slot="diff-tool-pane-content"
|
|
224
|
+
class="inline-block min-w-full"
|
|
225
|
+
>
|
|
226
|
+
<div
|
|
227
|
+
v-for="row in diffModel.rows"
|
|
228
|
+
:key="`${row.key}-left`"
|
|
229
|
+
data-slot="diff-tool-row"
|
|
230
|
+
data-side="left"
|
|
231
|
+
class="w-max min-w-full"
|
|
232
|
+
>
|
|
233
|
+
<div
|
|
234
|
+
data-slot="diff-tool-cell"
|
|
235
|
+
:data-diff="row.left.kind"
|
|
236
|
+
class="w-max min-w-full"
|
|
237
|
+
>
|
|
238
|
+
<div
|
|
239
|
+
data-slot="diff-tool-line"
|
|
240
|
+
class="grid w-max min-w-full"
|
|
241
|
+
:style="lineStyle"
|
|
242
|
+
>
|
|
243
|
+
<span
|
|
244
|
+
v-if="props.lineNumbers"
|
|
245
|
+
data-slot="diff-tool-line-number"
|
|
246
|
+
aria-hidden="true"
|
|
247
|
+
class="select-none border-r pl-2 pr-3 text-right tabular-nums"
|
|
248
|
+
>
|
|
249
|
+
{{ row.left.lineNumber }}
|
|
250
|
+
</span>
|
|
251
|
+
<code
|
|
252
|
+
data-slot="diff-tool-line-content"
|
|
253
|
+
class="block min-h-[1lh] min-w-max pl-3 pr-4 whitespace-pre"
|
|
254
|
+
><span
|
|
255
|
+
v-if="row.left.isEmpty"
|
|
256
|
+
aria-hidden="true"
|
|
257
|
+
> </span><span
|
|
258
|
+
v-else
|
|
259
|
+
data-slot="diff-tool-token"
|
|
260
|
+
v-html="row.left.html"
|
|
261
|
+
/></code>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
<div
|
|
268
|
+
data-slot="diff-tool-pane"
|
|
269
|
+
data-side="right"
|
|
270
|
+
class="min-w-0 overflow-x-auto overflow-y-hidden border-l"
|
|
271
|
+
@scroll="syncPaneScroll"
|
|
272
|
+
>
|
|
273
|
+
<div
|
|
274
|
+
data-slot="diff-tool-pane-content"
|
|
275
|
+
class="inline-block min-w-full"
|
|
276
|
+
>
|
|
277
|
+
<div
|
|
278
|
+
v-for="row in diffModel.rows"
|
|
279
|
+
:key="`${row.key}-right`"
|
|
280
|
+
data-slot="diff-tool-row"
|
|
281
|
+
data-side="right"
|
|
282
|
+
class="w-max min-w-full"
|
|
283
|
+
>
|
|
284
|
+
<div
|
|
285
|
+
data-slot="diff-tool-cell"
|
|
286
|
+
data-side="right"
|
|
287
|
+
:data-diff="row.right.kind"
|
|
288
|
+
class="w-max min-w-full"
|
|
289
|
+
>
|
|
290
|
+
<div
|
|
291
|
+
data-slot="diff-tool-line"
|
|
292
|
+
class="grid w-max min-w-full"
|
|
293
|
+
:style="lineStyle"
|
|
294
|
+
>
|
|
295
|
+
<span
|
|
296
|
+
v-if="props.lineNumbers"
|
|
297
|
+
data-slot="diff-tool-line-number"
|
|
298
|
+
aria-hidden="true"
|
|
299
|
+
class="select-none border-r pl-2 pr-3 text-right tabular-nums"
|
|
300
|
+
>
|
|
301
|
+
{{ row.right.lineNumber }}
|
|
302
|
+
</span>
|
|
303
|
+
<code
|
|
304
|
+
data-slot="diff-tool-line-content"
|
|
305
|
+
class="block min-h-[1lh] min-w-max pl-3 pr-4 whitespace-pre"
|
|
306
|
+
><span
|
|
307
|
+
v-if="row.right.isEmpty"
|
|
308
|
+
aria-hidden="true"
|
|
309
|
+
> </span><span
|
|
310
|
+
v-else
|
|
311
|
+
data-slot="diff-tool-token"
|
|
312
|
+
v-html="row.right.html"
|
|
313
|
+
/></code>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<Teleport to="body">
|
|
324
|
+
<div
|
|
325
|
+
v-if="expanded"
|
|
326
|
+
data-slot="diff-tool-dialog-overlay"
|
|
327
|
+
class="fixed inset-0 z-50 flex items-center justify-center p-4"
|
|
328
|
+
@click.self="closeExpanded"
|
|
329
|
+
>
|
|
330
|
+
<section
|
|
331
|
+
data-slot="diff-tool-dialog"
|
|
332
|
+
role="dialog"
|
|
333
|
+
aria-modal="true"
|
|
334
|
+
:aria-label="props.expandLabel"
|
|
335
|
+
class="grid w-full max-w-7xl grid-rows-[auto_minmax(0,1fr)] overflow-hidden rounded-2xl border shadow-2xl"
|
|
336
|
+
>
|
|
337
|
+
<h2 class="sr-only">
|
|
338
|
+
{{ props.expandLabel }}
|
|
339
|
+
</h2>
|
|
340
|
+
<div
|
|
341
|
+
data-slot="diff-tool-dialog-header"
|
|
342
|
+
class="flex h-11 items-center justify-between gap-3 border-b px-4"
|
|
343
|
+
>
|
|
344
|
+
<span
|
|
345
|
+
data-slot="diff-tool-label"
|
|
346
|
+
class="min-w-0 truncate text-xs font-medium"
|
|
347
|
+
>
|
|
348
|
+
{{ props.label }}
|
|
349
|
+
</span>
|
|
350
|
+
<div class="flex shrink-0 items-center gap-1">
|
|
351
|
+
<Button
|
|
352
|
+
data-slot="diff-tool-copy"
|
|
353
|
+
type="button"
|
|
354
|
+
variant="ghost"
|
|
355
|
+
size="icon-sm"
|
|
356
|
+
class="size-8 rounded-md"
|
|
357
|
+
:aria-label="copied ? props.copiedLabel : props.copyLabel"
|
|
358
|
+
:title="copied ? props.copiedLabel : props.copyLabel"
|
|
359
|
+
@click="copyDiff"
|
|
360
|
+
>
|
|
361
|
+
<CheckIcon v-if="copied" />
|
|
362
|
+
<CopyIcon v-else />
|
|
363
|
+
</Button>
|
|
364
|
+
<Button
|
|
365
|
+
data-slot="diff-tool-collapse-trigger"
|
|
366
|
+
type="button"
|
|
367
|
+
variant="ghost"
|
|
368
|
+
size="icon-sm"
|
|
369
|
+
class="size-8 rounded-md"
|
|
370
|
+
:aria-label="props.closeLabel"
|
|
371
|
+
:title="props.closeLabel"
|
|
372
|
+
@click="closeExpanded"
|
|
373
|
+
>
|
|
374
|
+
<Minimize2Icon />
|
|
375
|
+
</Button>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
<div
|
|
380
|
+
data-slot="diff-tool-scroll"
|
|
381
|
+
data-expanded
|
|
382
|
+
class="min-w-0 max-w-full max-h-[calc(90vh-4rem)] overflow-y-auto overflow-x-hidden [tab-size:2]"
|
|
383
|
+
>
|
|
384
|
+
<div
|
|
385
|
+
data-slot="diff-tool-header-row"
|
|
386
|
+
class="sticky top-0 z-10 grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)]"
|
|
387
|
+
>
|
|
388
|
+
<div
|
|
389
|
+
data-slot="diff-tool-side-header"
|
|
390
|
+
class="min-w-0 border-b px-3 py-2 text-left text-xs font-medium"
|
|
391
|
+
>
|
|
392
|
+
{{ diffModel.leftLabel }}
|
|
393
|
+
</div>
|
|
394
|
+
<div
|
|
395
|
+
data-slot="diff-tool-side-header"
|
|
396
|
+
data-side="right"
|
|
397
|
+
class="min-w-0 border-b border-l px-3 py-2 text-left text-xs font-medium"
|
|
398
|
+
>
|
|
399
|
+
{{ diffModel.rightLabel }}
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
<div
|
|
403
|
+
data-slot="diff-tool-panes"
|
|
404
|
+
class="grid min-w-0 grid-cols-[minmax(0,1fr)_minmax(0,1fr)]"
|
|
405
|
+
>
|
|
406
|
+
<div
|
|
407
|
+
data-slot="diff-tool-pane"
|
|
408
|
+
class="min-w-0 overflow-x-auto overflow-y-hidden"
|
|
409
|
+
@scroll="syncPaneScroll"
|
|
410
|
+
>
|
|
411
|
+
<div
|
|
412
|
+
data-slot="diff-tool-pane-content"
|
|
413
|
+
class="inline-block min-w-full"
|
|
414
|
+
>
|
|
415
|
+
<div
|
|
416
|
+
v-for="row in diffModel.rows"
|
|
417
|
+
:key="`${row.key}-dialog-left`"
|
|
418
|
+
data-slot="diff-tool-row"
|
|
419
|
+
data-side="left"
|
|
420
|
+
class="w-max min-w-full"
|
|
421
|
+
>
|
|
422
|
+
<div
|
|
423
|
+
data-slot="diff-tool-cell"
|
|
424
|
+
:data-diff="row.left.kind"
|
|
425
|
+
class="w-max min-w-full"
|
|
426
|
+
>
|
|
427
|
+
<div
|
|
428
|
+
data-slot="diff-tool-line"
|
|
429
|
+
class="grid w-max min-w-full"
|
|
430
|
+
:style="lineStyle"
|
|
431
|
+
>
|
|
432
|
+
<span
|
|
433
|
+
v-if="props.lineNumbers"
|
|
434
|
+
data-slot="diff-tool-line-number"
|
|
435
|
+
aria-hidden="true"
|
|
436
|
+
class="select-none border-r pl-2 pr-3 text-right tabular-nums"
|
|
437
|
+
>
|
|
438
|
+
{{ row.left.lineNumber }}
|
|
439
|
+
</span>
|
|
440
|
+
<code
|
|
441
|
+
data-slot="diff-tool-line-content"
|
|
442
|
+
class="block min-h-[1lh] min-w-max pl-3 pr-4 whitespace-pre"
|
|
443
|
+
><span
|
|
444
|
+
v-if="row.left.isEmpty"
|
|
445
|
+
aria-hidden="true"
|
|
446
|
+
> </span><span
|
|
447
|
+
v-else
|
|
448
|
+
data-slot="diff-tool-token"
|
|
449
|
+
v-html="row.left.html"
|
|
450
|
+
/></code>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
<div
|
|
457
|
+
data-slot="diff-tool-pane"
|
|
458
|
+
data-side="right"
|
|
459
|
+
class="min-w-0 overflow-x-auto overflow-y-hidden border-l"
|
|
460
|
+
@scroll="syncPaneScroll"
|
|
461
|
+
>
|
|
462
|
+
<div
|
|
463
|
+
data-slot="diff-tool-pane-content"
|
|
464
|
+
class="inline-block min-w-full"
|
|
465
|
+
>
|
|
466
|
+
<div
|
|
467
|
+
v-for="row in diffModel.rows"
|
|
468
|
+
:key="`${row.key}-dialog-right`"
|
|
469
|
+
data-slot="diff-tool-row"
|
|
470
|
+
data-side="right"
|
|
471
|
+
class="w-max min-w-full"
|
|
472
|
+
>
|
|
473
|
+
<div
|
|
474
|
+
data-slot="diff-tool-cell"
|
|
475
|
+
data-side="right"
|
|
476
|
+
:data-diff="row.right.kind"
|
|
477
|
+
class="w-max min-w-full"
|
|
478
|
+
>
|
|
479
|
+
<div
|
|
480
|
+
data-slot="diff-tool-line"
|
|
481
|
+
class="grid w-max min-w-full"
|
|
482
|
+
:style="lineStyle"
|
|
483
|
+
>
|
|
484
|
+
<span
|
|
485
|
+
v-if="props.lineNumbers"
|
|
486
|
+
data-slot="diff-tool-line-number"
|
|
487
|
+
aria-hidden="true"
|
|
488
|
+
class="select-none border-r pl-2 pr-3 text-right tabular-nums"
|
|
489
|
+
>
|
|
490
|
+
{{ row.right.lineNumber }}
|
|
491
|
+
</span>
|
|
492
|
+
<code
|
|
493
|
+
data-slot="diff-tool-line-content"
|
|
494
|
+
class="block min-h-[1lh] min-w-max pl-3 pr-4 whitespace-pre"
|
|
495
|
+
><span
|
|
496
|
+
v-if="row.right.isEmpty"
|
|
497
|
+
aria-hidden="true"
|
|
498
|
+
> </span><span
|
|
499
|
+
v-else
|
|
500
|
+
data-slot="diff-tool-token"
|
|
501
|
+
v-html="row.right.html"
|
|
502
|
+
/></code>
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
</section>
|
|
511
|
+
</div>
|
|
512
|
+
</Teleport>
|
|
513
|
+
</template>
|