@oneclick.dev/cms-kit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/components/ui/apple-emoji/AppleEmoji.vue +32 -0
- package/components/ui/apple-emoji/index.ts +1 -0
- package/components/ui/avatar/Avatar.vue +18 -0
- package/components/ui/avatar/AvatarFallback.vue +23 -0
- package/components/ui/avatar/AvatarImage.vue +16 -0
- package/components/ui/avatar/index.ts +3 -0
- package/components/ui/badge/Badge.vue +39 -0
- package/components/ui/badge/index.ts +1 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbEllipsis.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +20 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +20 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +22 -0
- package/components/ui/breadcrumb/index.ts +7 -0
- package/components/ui/button/Button.vue +39 -0
- package/components/ui/button/index.ts +36 -0
- package/components/ui/calendar/Calendar.vue +63 -0
- package/components/ui/calendar/CalendarCell.vue +25 -0
- package/components/ui/calendar/CalendarCellTrigger.vue +41 -0
- package/components/ui/calendar/CalendarGrid.vue +25 -0
- package/components/ui/calendar/CalendarGridBody.vue +14 -0
- package/components/ui/calendar/CalendarGridHead.vue +15 -0
- package/components/ui/calendar/CalendarGridRow.vue +24 -0
- package/components/ui/calendar/CalendarHeadCell.vue +25 -0
- package/components/ui/calendar/CalendarHeader.vue +25 -0
- package/components/ui/calendar/CalendarHeading.vue +32 -0
- package/components/ui/calendar/CalendarNextButton.vue +34 -0
- package/components/ui/calendar/CalendarPrevButton.vue +34 -0
- package/components/ui/calendar/index.ts +12 -0
- package/components/ui/card/Card.vue +22 -0
- package/components/ui/card/CardAction.vue +17 -0
- package/components/ui/card/CardContent.vue +17 -0
- package/components/ui/card/CardDescription.vue +17 -0
- package/components/ui/card/CardFooter.vue +17 -0
- package/components/ui/card/CardHeader.vue +17 -0
- package/components/ui/card/CardTitle.vue +17 -0
- package/components/ui/card/index.ts +7 -0
- package/components/ui/checkbox/Checkbox.vue +37 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/code-editor/CodeEditor.vue +88 -0
- package/components/ui/code-editor/index.ts +1 -0
- package/components/ui/code-editor/interpolationHighlight.ts +39 -0
- package/components/ui/collapsible/Collapsible.vue +19 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +14 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/combobox/Combobox.vue +17 -0
- package/components/ui/combobox/ComboboxAnchor.vue +26 -0
- package/components/ui/combobox/ComboboxEmpty.vue +24 -0
- package/components/ui/combobox/ComboboxGroup.vue +30 -0
- package/components/ui/combobox/ComboboxInput.vue +47 -0
- package/components/ui/combobox/ComboboxItem.vue +27 -0
- package/components/ui/combobox/ComboboxItemIndicator.vue +26 -0
- package/components/ui/combobox/ComboboxList.vue +31 -0
- package/components/ui/combobox/ComboboxSeparator.vue +24 -0
- package/components/ui/combobox/ComboboxTrigger.vue +27 -0
- package/components/ui/combobox/ComboboxViewport.vue +26 -0
- package/components/ui/combobox/index.ts +12 -0
- package/components/ui/command/Command.vue +93 -0
- package/components/ui/command/CommandDialog.vue +31 -0
- package/components/ui/command/CommandEmpty.vue +29 -0
- package/components/ui/command/CommandGroup.vue +47 -0
- package/components/ui/command/CommandInput.vue +41 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/CommandShortcut.vue +17 -0
- package/components/ui/command/index.ts +25 -0
- package/components/ui/context-menu/ContextMenu.vue +18 -0
- package/components/ui/context-menu/ContextMenuCheckboxItem.vue +41 -0
- package/components/ui/context-menu/ContextMenuContent.vue +37 -0
- package/components/ui/context-menu/ContextMenuGroup.vue +14 -0
- package/components/ui/context-menu/ContextMenuItem.vue +42 -0
- package/components/ui/context-menu/ContextMenuLabel.vue +24 -0
- package/components/ui/context-menu/ContextMenuPortal.vue +14 -0
- package/components/ui/context-menu/ContextMenuRadioGroup.vue +22 -0
- package/components/ui/context-menu/ContextMenuRadioItem.vue +41 -0
- package/components/ui/context-menu/ContextMenuSeparator.vue +24 -0
- package/components/ui/context-menu/ContextMenuShortcut.vue +17 -0
- package/components/ui/context-menu/ContextMenuSub.vue +22 -0
- package/components/ui/context-menu/ContextMenuSubContent.vue +36 -0
- package/components/ui/context-menu/ContextMenuSubTrigger.vue +35 -0
- package/components/ui/context-menu/ContextMenuTrigger.vue +16 -0
- package/components/ui/context-menu/index.ts +14 -0
- package/components/ui/custom-dialog/CustomDialog.vue +31 -0
- package/components/ui/custom-dialog/index.ts +1 -0
- package/components/ui/dialog/Dialog.vue +17 -0
- package/components/ui/dialog/DialogClose.vue +14 -0
- package/components/ui/dialog/DialogContent.vue +49 -0
- package/components/ui/dialog/DialogDescription.vue +25 -0
- package/components/ui/dialog/DialogFooter.vue +15 -0
- package/components/ui/dialog/DialogHeader.vue +17 -0
- package/components/ui/dialog/DialogOverlay.vue +23 -0
- package/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/components/ui/dialog/DialogTitle.vue +25 -0
- package/components/ui/dialog/DialogTrigger.vue +14 -0
- package/components/ui/dialog/index.ts +10 -0
- package/components/ui/drawer/Drawer.vue +22 -0
- package/components/ui/drawer/DrawerClose.vue +15 -0
- package/components/ui/drawer/DrawerContent.vue +34 -0
- package/components/ui/drawer/DrawerDescription.vue +24 -0
- package/components/ui/drawer/DrawerFooter.vue +17 -0
- package/components/ui/drawer/DrawerHeader.vue +17 -0
- package/components/ui/drawer/DrawerOverlay.vue +22 -0
- package/components/ui/drawer/DrawerTitle.vue +24 -0
- package/components/ui/drawer/DrawerTrigger.vue +15 -0
- package/components/ui/drawer/index.ts +9 -0
- package/components/ui/dropdown-menu/DropdownMenu.vue +17 -0
- package/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +41 -0
- package/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/components/ui/dropdown-menu/DropdownMenuGroup.vue +14 -0
- package/components/ui/dropdown-menu/DropdownMenuItem.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuLabel.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +42 -0
- package/components/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
- package/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuSubContent.vue +31 -0
- package/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuTrigger.vue +16 -0
- package/components/ui/dropdown-menu/index.ts +16 -0
- package/components/ui/emoji-picker/EmojiPicker.vue +71 -0
- package/components/ui/emoji-picker/index.ts +1 -0
- package/components/ui/flow-builder/FlowBuilder.vue +48 -0
- package/components/ui/flow-builder/FlowBuilderSelect.vue +33 -0
- package/components/ui/flow-builder/components/Builder.vue +287 -0
- package/components/ui/flow-builder/components/DropzoneBackground.vue +13 -0
- package/components/ui/flow-builder/components/EdgeEditor.vue +36 -0
- package/components/ui/flow-builder/components/Menu.vue +78 -0
- package/components/ui/flow-builder/components/NodeEditor.vue +181 -0
- package/components/ui/flow-builder/components/edge-editor/DataEdgeEditor.vue +64 -0
- package/components/ui/flow-builder/components/edges/DataEdge.vue +87 -0
- package/components/ui/flow-builder/components/node-editor/ApiRequestEditor.vue +150 -0
- package/components/ui/flow-builder/components/node-editor/ConfettiEditor.vue +23 -0
- package/components/ui/flow-builder/components/node-editor/ConfirmEditor.vue +30 -0
- package/components/ui/flow-builder/components/node-editor/FinishFlowEditor.vue +33 -0
- package/components/ui/flow-builder/components/node-editor/IntegrationActionEditor.vue +50 -0
- package/components/ui/flow-builder/components/node-editor/SetVariableEditor.vue +71 -0
- package/components/ui/flow-builder/components/node-editor/ShowDialogEditor.vue +26 -0
- package/components/ui/flow-builder/components/node-editor/ShowModuleEditor.vue +92 -0
- package/components/ui/flow-builder/components/node-editor/ShowToastEditor.vue +28 -0
- package/components/ui/flow-builder/components/node-editor/TransformDataEditor.vue +27 -0
- package/components/ui/flow-builder/components/node-editor/VisitUrlEditor.vue +31 -0
- package/components/ui/flow-builder/components/nodes/ApiRequestNode.vue +45 -0
- package/components/ui/flow-builder/components/nodes/ConfettiNode.vue +32 -0
- package/components/ui/flow-builder/components/nodes/ConfirmNode.vue +45 -0
- package/components/ui/flow-builder/components/nodes/EmptyNode.vue +26 -0
- package/components/ui/flow-builder/components/nodes/FinishFlowNode.vue +30 -0
- package/components/ui/flow-builder/components/nodes/IntegrationActionNode.vue +52 -0
- package/components/ui/flow-builder/components/nodes/SetVariableNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowDialogNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowModuleNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowToastNode.vue +35 -0
- package/components/ui/flow-builder/components/nodes/StartNode.vue +27 -0
- package/components/ui/flow-builder/components/nodes/TransformDataNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/VisitUrlNode.vue +34 -0
- package/components/ui/flow-builder/components/toolbars/ApiRequestToolbar.vue +45 -0
- package/components/ui/flow-builder/components/toolbars/ConfirmToolbar.vue +45 -0
- package/components/ui/flow-builder/components/toolbars/DefaultToolbar.vue +42 -0
- package/components/ui/flow-builder/components/toolbars/IntegrationActionToolbar.vue +45 -0
- package/components/ui/flow-builder/components/variables/Widget.vue +137 -0
- package/components/ui/flow-builder/composables/outputRegistry.ts +33 -0
- package/components/ui/flow-builder/composables/taskHandlers.js +185 -0
- package/components/ui/flow-builder/composables/useLayout.js +60 -0
- package/components/ui/flow-builder/composables/useProcessNodeLogic.js +55 -0
- package/components/ui/flow-builder/composables/useRunProcess.js +267 -0
- package/components/ui/flow-builder/index.ts +5 -0
- package/components/ui/flow-builder/types.ts +7 -0
- package/components/ui/form/FormControl.vue +17 -0
- package/components/ui/form/FormDescription.vue +21 -0
- package/components/ui/form/FormItem.vue +22 -0
- package/components/ui/form/FormLabel.vue +25 -0
- package/components/ui/form/FormMessage.vue +22 -0
- package/components/ui/form/index.ts +7 -0
- package/components/ui/form/injectionKeys.ts +4 -0
- package/components/ui/form/useFormField.ts +30 -0
- package/components/ui/form-builder/FormBuilder.vue +45 -0
- package/components/ui/form-builder/FormBuilderSelect.vue +42 -0
- package/components/ui/form-builder/FormDisplayer.vue +39 -0
- package/components/ui/form-builder/components/AdminElementEditor.vue +48 -0
- package/components/ui/form-builder/components/AdminToolbar.vue +60 -0
- package/components/ui/form-builder/components/AdminToolbarView.vue +19 -0
- package/components/ui/form-builder/components/CustomDashboard.vue +312 -0
- package/components/ui/form-builder/components/FormBuilderWrapper.vue +333 -0
- package/components/ui/form-builder/components/admin/Transformer.vue +25 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Button.vue +30 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Checkbox.vue +23 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Label.vue +13 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Radios.vue +85 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Scanner.vue +15 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Select.vue +75 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Text.vue +13 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Textarea.vue +20 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Textfield.vue +20 -0
- package/components/ui/form-builder/components/admin/element-setting-views/index.ts +21 -0
- package/components/ui/form-builder/components/admin/setting-views/ApiActionsView.vue +111 -0
- package/components/ui/form-builder/components/admin/setting-views/NewElementView.vue +200 -0
- package/components/ui/form-builder/components/admin/setting-views/VariablesView.vue +19 -0
- package/components/ui/form-builder/components/admin/setting-views/new-element-view/DraggableElement.vue +107 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/ApiActionVariables.vue +27 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/RouteQueryParams.vue +47 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/Transformers.vue +61 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/Variables.vue +74 -0
- package/components/ui/form-builder/components/elements/button/Button.vue +60 -0
- package/components/ui/form-builder/components/elements/button/index.ts +1 -0
- package/components/ui/form-builder/components/elements/checkbox/Checkbox.vue +40 -0
- package/components/ui/form-builder/components/elements/checkbox/index.ts +1 -0
- package/components/ui/form-builder/components/elements/file/File.vue +6 -0
- package/components/ui/form-builder/components/elements/file/index.ts +1 -0
- package/components/ui/form-builder/components/elements/images/Images.vue +28 -0
- package/components/ui/form-builder/components/elements/images/index.ts +1 -0
- package/components/ui/form-builder/components/elements/index.ts +31 -0
- package/components/ui/form-builder/components/elements/items/Items.vue +6 -0
- package/components/ui/form-builder/components/elements/items/index.ts +1 -0
- package/components/ui/form-builder/components/elements/label/Label.vue +20 -0
- package/components/ui/form-builder/components/elements/label/index.ts +1 -0
- package/components/ui/form-builder/components/elements/location/Location.vue +6 -0
- package/components/ui/form-builder/components/elements/location/index.ts +1 -0
- package/components/ui/form-builder/components/elements/radios/Radios.vue +42 -0
- package/components/ui/form-builder/components/elements/radios/index.ts +1 -0
- package/components/ui/form-builder/components/elements/richtext/Richtext.vue +6 -0
- package/components/ui/form-builder/components/elements/richtext/index.ts +1 -0
- package/components/ui/form-builder/components/elements/scanner/Scanner.vue +173 -0
- package/components/ui/form-builder/components/elements/scanner/index.ts +1 -0
- package/components/ui/form-builder/components/elements/select/Select.vue +49 -0
- package/components/ui/form-builder/components/elements/select/index.ts +1 -0
- package/components/ui/form-builder/components/elements/text/Text.vue +20 -0
- package/components/ui/form-builder/components/elements/text/index.ts +1 -0
- package/components/ui/form-builder/components/elements/textarea/Textarea.vue +30 -0
- package/components/ui/form-builder/components/elements/textarea/index.ts +1 -0
- package/components/ui/form-builder/components/elements/textfield/Textfield.vue +30 -0
- package/components/ui/form-builder/components/elements/textfield/index.ts +1 -0
- package/components/ui/form-builder/index.ts +3 -0
- package/components/ui/input/Input.vue +33 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/integration-action-builder/IntegrationActionBuilder.vue +193 -0
- package/components/ui/integration-action-builder/InterpolationField.vue +29 -0
- package/components/ui/integration-action-builder/index.ts +1 -0
- package/components/ui/integration-action-builder/integrations/firebase/AddDocument.vue +43 -0
- package/components/ui/integration-action-builder/integrations/firebase/DeleteDocument.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/GetCollections.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/GetDocumentById.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/QueryCollectionGroup.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/QueryFirestore.vue +165 -0
- package/components/ui/integration-action-builder/integrations/firebase/UpdateDocument.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/index.ts +204 -0
- package/components/ui/integration-action-builder/integrations/index.ts +9 -0
- package/components/ui/integration-action-builder/integrations/openai/AddDocument.vue +43 -0
- package/components/ui/integration-action-builder/integrations/openai/GenerateText.vue +40 -0
- package/components/ui/integration-action-builder/integrations/openai/components/ModelSelector.vue +75 -0
- package/components/ui/integration-action-builder/integrations/openai/index.ts +116 -0
- package/components/ui/integration-action-builder/integrations/twilio/MakeCall.vue +40 -0
- package/components/ui/integration-action-builder/integrations/twilio/SendSMS.vue +39 -0
- package/components/ui/integration-action-builder/integrations/twilio/components/ModelSelector.vue +75 -0
- package/components/ui/integration-action-builder/integrations/twilio/index.ts +68 -0
- package/components/ui/integration-icon/IntegrationIcon.vue +18 -0
- package/components/ui/integration-icon/index.ts +1 -0
- package/components/ui/label/Label.vue +28 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/lucide-icon-selector/LucideIconPicker.vue +34 -0
- package/components/ui/lucide-icon-selector/LucideIconSelector.vue +55 -0
- package/components/ui/lucide-icon-selector/index.ts +2 -0
- package/components/ui/media-picker/MediaPicker.vue +40 -0
- package/components/ui/media-picker/MediaPickerDialog.vue +306 -0
- package/components/ui/media-picker/MediaPickerItems.vue +342 -0
- package/components/ui/media-picker/index.ts +2 -0
- package/components/ui/media-picker/media-picker-dialog/Dropzone.vue +104 -0
- package/components/ui/media-picker/media-picker-dialog/FileItem.vue +108 -0
- package/components/ui/media-picker/media-picker-dialog/Filters.vue +78 -0
- package/components/ui/menubar/Menubar.vue +36 -0
- package/components/ui/menubar/MenubarCheckboxItem.vue +41 -0
- package/components/ui/menubar/MenubarContent.vue +44 -0
- package/components/ui/menubar/MenubarGroup.vue +14 -0
- package/components/ui/menubar/MenubarItem.vue +37 -0
- package/components/ui/menubar/MenubarLabel.vue +19 -0
- package/components/ui/menubar/MenubarMenu.vue +14 -0
- package/components/ui/menubar/MenubarRadioGroup.vue +22 -0
- package/components/ui/menubar/MenubarRadioItem.vue +41 -0
- package/components/ui/menubar/MenubarSeparator.vue +23 -0
- package/components/ui/menubar/MenubarShortcut.vue +17 -0
- package/components/ui/menubar/MenubarSub.vue +22 -0
- package/components/ui/menubar/MenubarSubContent.vue +39 -0
- package/components/ui/menubar/MenubarSubTrigger.vue +27 -0
- package/components/ui/menubar/MenubarTrigger.vue +30 -0
- package/components/ui/menubar/index.ts +15 -0
- package/components/ui/number-field/NumberField.vue +23 -0
- package/components/ui/number-field/NumberFieldContent.vue +14 -0
- package/components/ui/number-field/NumberFieldDecrement.vue +25 -0
- package/components/ui/number-field/NumberFieldIncrement.vue +25 -0
- package/components/ui/number-field/NumberFieldInput.vue +16 -0
- package/components/ui/number-field/index.ts +5 -0
- package/components/ui/pagination/PaginationEllipsis.vue +22 -0
- package/components/ui/pagination/PaginationFirst.vue +29 -0
- package/components/ui/pagination/PaginationLast.vue +29 -0
- package/components/ui/pagination/PaginationNext.vue +29 -0
- package/components/ui/pagination/PaginationPrev.vue +29 -0
- package/components/ui/pagination/index.ts +10 -0
- package/components/ui/popover/Popover.vue +18 -0
- package/components/ui/popover/PopoverAnchor.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +14 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/query-builder-dialog/QueryBuilderDialog.vue +389 -0
- package/components/ui/query-builder-dialog/index.ts +1 -0
- package/components/ui/radio-group/RadioGroup.vue +30 -0
- package/components/ui/radio-group/RadioGroupItem.vue +43 -0
- package/components/ui/radio-group/index.ts +2 -0
- package/components/ui/range-calendar/RangeCalendar.vue +57 -0
- package/components/ui/range-calendar/RangeCalendarCell.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarCellTrigger.vue +37 -0
- package/components/ui/range-calendar/RangeCalendarGrid.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarGridBody.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridHead.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridRow.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeadCell.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeader.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeading.vue +28 -0
- package/components/ui/range-calendar/RangeCalendarNextButton.vue +29 -0
- package/components/ui/range-calendar/RangeCalendarPrevButton.vue +29 -0
- package/components/ui/range-calendar/index.ts +12 -0
- package/components/ui/resizable/ResizableHandle.vue +27 -0
- package/components/ui/resizable/ResizablePanel.vue +18 -0
- package/components/ui/resizable/ResizablePanelGroup.vue +25 -0
- package/components/ui/resizable/index.ts +3 -0
- package/components/ui/ripple-button/RippleButton.vue +97 -0
- package/components/ui/ripple-button/index.ts +1 -0
- package/components/ui/sandbox/Sandbox.vue +35 -0
- package/components/ui/sandbox/index.ts +1 -0
- package/components/ui/scroll-area/ScrollArea.vue +36 -0
- package/components/ui/scroll-area/ScrollBar.vue +34 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/segmented-control/SegmentedControl.vue +121 -0
- package/components/ui/segmented-control/SegmentedControlButton.vue +64 -0
- package/components/ui/segmented-control/index.ts +2 -0
- package/components/ui/select/Select.vue +18 -0
- package/components/ui/select/SelectContent.vue +55 -0
- package/components/ui/select/SelectGroup.vue +14 -0
- package/components/ui/select/SelectItem.vue +45 -0
- package/components/ui/select/SelectItemText.vue +14 -0
- package/components/ui/select/SelectLabel.vue +16 -0
- package/components/ui/select/SelectScrollDownButton.vue +28 -0
- package/components/ui/select/SelectScrollUpButton.vue +28 -0
- package/components/ui/select/SelectSeparator.vue +21 -0
- package/components/ui/select/SelectTrigger.vue +32 -0
- package/components/ui/select/SelectValue.vue +15 -0
- package/components/ui/select/index.ts +11 -0
- package/components/ui/separator/Separator.vue +28 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +17 -0
- package/components/ui/sheet/SheetClose.vue +14 -0
- package/components/ui/sheet/SheetContent.vue +65 -0
- package/components/ui/sheet/SheetDescription.vue +20 -0
- package/components/ui/sheet/SheetFooter.vue +16 -0
- package/components/ui/sheet/SheetHeader.vue +15 -0
- package/components/ui/sheet/SheetOverlay.vue +24 -0
- package/components/ui/sheet/SheetTitle.vue +20 -0
- package/components/ui/sheet/SheetTrigger.vue +14 -0
- package/components/ui/sheet/index.ts +8 -0
- package/components/ui/sidebar/Sidebar.vue +96 -0
- package/components/ui/sidebar/SidebarContent.vue +18 -0
- package/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
- package/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/components/ui/sidebar/SidebarInput.vue +22 -0
- package/components/ui/sidebar/SidebarInset.vue +21 -0
- package/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/components/ui/sidebar/SidebarMenuAction.vue +34 -0
- package/components/ui/sidebar/SidebarMenuBadge.vue +26 -0
- package/components/ui/sidebar/SidebarMenuButton.vue +49 -0
- package/components/ui/sidebar/SidebarMenuButtonChild.vue +34 -0
- package/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/components/ui/sidebar/SidebarMenuSkeleton.vue +34 -0
- package/components/ui/sidebar/SidebarMenuSub.vue +22 -0
- package/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/components/ui/sidebar/SidebarProvider.vue +81 -0
- package/components/ui/sidebar/SidebarRail.vue +33 -0
- package/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/components/ui/sidebar/SidebarTrigger.vue +27 -0
- package/components/ui/sidebar/index.ts +60 -0
- package/components/ui/sidebar/utils.ts +19 -0
- package/components/ui/skeleton/Skeleton.vue +17 -0
- package/components/ui/skeleton/index.ts +1 -0
- package/components/ui/sonner/Sonner.vue +18 -0
- package/components/ui/sonner/index.ts +1 -0
- package/components/ui/spring-calendar/SpringCalendar.vue +110 -0
- package/components/ui/spring-calendar/TextMorph.vue +160 -0
- package/components/ui/spring-calendar/index.ts +2 -0
- package/components/ui/switch/Switch.vue +41 -0
- package/components/ui/switch/index.ts +1 -0
- package/components/ui/table/Table.vue +16 -0
- package/components/ui/table/TableBody.vue +17 -0
- package/components/ui/table/TableCaption.vue +17 -0
- package/components/ui/table/TableCell.vue +22 -0
- package/components/ui/table/TableEmpty.vue +37 -0
- package/components/ui/table/TableFooter.vue +17 -0
- package/components/ui/table/TableHead.vue +17 -0
- package/components/ui/table/TableHeader.vue +17 -0
- package/components/ui/table/TableRow.vue +17 -0
- package/components/ui/table/index.ts +9 -0
- package/components/ui/table/utils.ts +9 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +29 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/tailwind-color-picker/TailwindColorPicker.vue +58 -0
- package/components/ui/tailwind-color-picker/index.ts +1 -0
- package/components/ui/textarea/Textarea.vue +28 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toggle/Toggle.vue +32 -0
- package/components/ui/toggle/index.ts +27 -0
- package/components/ui/tooltip/Tooltip.vue +17 -0
- package/components/ui/tooltip/TooltipContent.vue +33 -0
- package/components/ui/tooltip/TooltipProvider.vue +13 -0
- package/components/ui/tooltip/TooltipTrigger.vue +14 -0
- package/components/ui/tooltip/index.ts +4 -0
- package/composables/useCms.ts +11 -0
- package/index.ts +10 -0
- package/lib/interpolation.ts +77 -0
- package/lib/utils.ts +24 -0
- package/package.json +52 -0
- package/styles/components/code-editor.css +52 -0
- package/styles/components/flow-builder.css +159 -0
- package/styles/index.css +2 -0
- package/tsconfig.json +19 -0
- package/types/index.ts +41 -0
- package/vite.config.ts +25 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { CalendarHeading, type CalendarHeadingProps, useForwardProps } from 'reka-ui'
|
|
4
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<CalendarHeadingProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
|
|
8
|
+
defineSlots<{
|
|
9
|
+
default: (props: { headingValue: string }) => any
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = computed(() => {
|
|
13
|
+
const { class: _, ...delegated } = props
|
|
14
|
+
|
|
15
|
+
return delegated
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<CalendarHeading
|
|
23
|
+
v-slot="{ headingValue }"
|
|
24
|
+
data-slot="calendar-heading"
|
|
25
|
+
:class="cn('text-sm font-medium', props.class)"
|
|
26
|
+
v-bind="forwardedProps"
|
|
27
|
+
>
|
|
28
|
+
<slot :heading-value>
|
|
29
|
+
{{ headingValue }}
|
|
30
|
+
</slot>
|
|
31
|
+
</CalendarHeading>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { buttonVariants } from '../button'
|
|
4
|
+
import { ChevronRight } from 'lucide-vue-next'
|
|
5
|
+
import { CalendarNext, type CalendarNextProps, useForwardProps } from 'reka-ui'
|
|
6
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarNextProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _, ...delegated } = props
|
|
12
|
+
|
|
13
|
+
return delegated
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<CalendarNext
|
|
21
|
+
data-slot="calendar-next-button"
|
|
22
|
+
:class="cn(
|
|
23
|
+
buttonVariants({ variant: 'outline' }),
|
|
24
|
+
'absolute right-1',
|
|
25
|
+
'size-7 bg-transparent p-0 opacity-50 hover:opacity-100',
|
|
26
|
+
props.class,
|
|
27
|
+
)"
|
|
28
|
+
v-bind="forwardedProps"
|
|
29
|
+
>
|
|
30
|
+
<slot>
|
|
31
|
+
<ChevronRight class="size-4" />
|
|
32
|
+
</slot>
|
|
33
|
+
</CalendarNext>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { buttonVariants } from '../button'
|
|
4
|
+
import { ChevronLeft } from 'lucide-vue-next'
|
|
5
|
+
import { CalendarPrev, type CalendarPrevProps, useForwardProps } from 'reka-ui'
|
|
6
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarPrevProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _, ...delegated } = props
|
|
12
|
+
|
|
13
|
+
return delegated
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<CalendarPrev
|
|
21
|
+
data-slot="calendar-prev-button"
|
|
22
|
+
:class="cn(
|
|
23
|
+
buttonVariants({ variant: 'outline' }),
|
|
24
|
+
'absolute left-1',
|
|
25
|
+
'size-7 bg-transparent p-0 opacity-50 hover:opacity-100',
|
|
26
|
+
props.class,
|
|
27
|
+
)"
|
|
28
|
+
v-bind="forwardedProps"
|
|
29
|
+
>
|
|
30
|
+
<slot>
|
|
31
|
+
<ChevronLeft class="size-4" />
|
|
32
|
+
</slot>
|
|
33
|
+
</CalendarPrev>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Calendar } from './Calendar.vue'
|
|
2
|
+
export { default as CalendarCell } from './CalendarCell.vue'
|
|
3
|
+
export { default as CalendarCellTrigger } from './CalendarCellTrigger.vue'
|
|
4
|
+
export { default as CalendarGrid } from './CalendarGrid.vue'
|
|
5
|
+
export { default as CalendarGridBody } from './CalendarGridBody.vue'
|
|
6
|
+
export { default as CalendarGridHead } from './CalendarGridHead.vue'
|
|
7
|
+
export { default as CalendarGridRow } from './CalendarGridRow.vue'
|
|
8
|
+
export { default as CalendarHeadCell } from './CalendarHeadCell.vue'
|
|
9
|
+
export { default as CalendarHeader } from './CalendarHeader.vue'
|
|
10
|
+
export { default as CalendarHeading } from './CalendarHeading.vue'
|
|
11
|
+
export { default as CalendarNextButton } from './CalendarNextButton.vue'
|
|
12
|
+
export { default as CalendarPrevButton } from './CalendarPrevButton.vue'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
data-slot="card"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border border-input dark:border-border py-6 shadow-card',
|
|
16
|
+
props.class,
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
data-slot="card-action"
|
|
13
|
+
:class="cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
data-slot="card-content"
|
|
13
|
+
:class="cn('px-6', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<p
|
|
12
|
+
data-slot="card-description"
|
|
13
|
+
:class="cn('text-muted-foreground text-sm', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</p>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
data-slot="card-footer"
|
|
13
|
+
:class="cn('flex items-center px-6 [.border-t]:pt-6', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
data-slot="card-header"
|
|
13
|
+
:class="cn('@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<h3
|
|
12
|
+
data-slot="card-title"
|
|
13
|
+
:class="cn('leading-none font-semibold', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</h3>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Card } from './Card.vue'
|
|
2
|
+
export { default as CardAction } from './CardAction.vue'
|
|
3
|
+
export { default as CardContent } from './CardContent.vue'
|
|
4
|
+
export { default as CardDescription } from './CardDescription.vue'
|
|
5
|
+
export { default as CardFooter } from './CardFooter.vue'
|
|
6
|
+
export { default as CardHeader } from './CardHeader.vue'
|
|
7
|
+
export { default as CardTitle } from './CardTitle.vue'
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CheckboxRootEmits, CheckboxRootProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { Check } from 'lucide-vue-next'
|
|
5
|
+
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'reka-ui'
|
|
6
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
const emits = defineEmits<CheckboxRootEmits>()
|
|
10
|
+
|
|
11
|
+
const delegatedProps = computed(() => {
|
|
12
|
+
const { class: _, ...delegated } = props
|
|
13
|
+
|
|
14
|
+
return delegated
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<CheckboxRoot
|
|
22
|
+
data-slot="checkbox"
|
|
23
|
+
v-bind="forwarded"
|
|
24
|
+
:class="
|
|
25
|
+
cn('peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
26
|
+
props.class)"
|
|
27
|
+
>
|
|
28
|
+
<CheckboxIndicator
|
|
29
|
+
data-slot="checkbox-indicator"
|
|
30
|
+
class="flex items-center justify-center text-current transition-none"
|
|
31
|
+
>
|
|
32
|
+
<slot>
|
|
33
|
+
<Check class="size-3.5" />
|
|
34
|
+
</slot>
|
|
35
|
+
</CheckboxIndicator>
|
|
36
|
+
</CheckboxRoot>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from './Checkbox.vue'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, watch, onMounted, onBeforeUnmount, defineProps, defineEmits } from 'vue'
|
|
3
|
+
import { EditorView, keymap, ViewUpdate, placeholder } from '@codemirror/view'
|
|
4
|
+
import { EditorState } from '@codemirror/state'
|
|
5
|
+
import { javascript } from '@codemirror/lang-javascript'
|
|
6
|
+
import { autocompletion, Completion, CompletionContext } from '@codemirror/autocomplete'
|
|
7
|
+
import { oneDark } from '@codemirror/theme-one-dark'
|
|
8
|
+
import { highlightInterpolation } from './interpolationHighlight'
|
|
9
|
+
import { defaultKeymap, indentWithTab } from '@codemirror/commands'
|
|
10
|
+
import { indentUnit } from '@codemirror/language'
|
|
11
|
+
|
|
12
|
+
interface Variable {
|
|
13
|
+
name: string,
|
|
14
|
+
type: string,
|
|
15
|
+
value: any
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
modelValue: { type: String, required: true },
|
|
20
|
+
variables: { type: Array as () => Variable[], default: () => [] },
|
|
21
|
+
language: { type: String, default: 'javascript' },
|
|
22
|
+
placeholder: { type: String, default: '' }
|
|
23
|
+
})
|
|
24
|
+
const emit = defineEmits(['update:modelValue'])
|
|
25
|
+
|
|
26
|
+
const editor = ref<HTMLElement | null>(null)
|
|
27
|
+
let view: EditorView | null = null
|
|
28
|
+
|
|
29
|
+
// Autocomplete source for variables
|
|
30
|
+
function variableCompletion(context: CompletionContext) {
|
|
31
|
+
const word = context.matchBefore(/\w*/)
|
|
32
|
+
if (!word || (word.from == word.to && !context.explicit)) return null
|
|
33
|
+
return {
|
|
34
|
+
from: word.from,
|
|
35
|
+
options: props.variables.map(v => ({
|
|
36
|
+
label: v.name,
|
|
37
|
+
type: v.type,
|
|
38
|
+
info: `Available variable: ${v.name}`
|
|
39
|
+
})) as Completion[],
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
view = new EditorView({
|
|
45
|
+
state: EditorState.create({
|
|
46
|
+
doc: props.modelValue,
|
|
47
|
+
extensions: [
|
|
48
|
+
oneDark,
|
|
49
|
+
highlightInterpolation(),
|
|
50
|
+
props.language === 'javascript' ? javascript() : [],
|
|
51
|
+
autocompletion({ override: [variableCompletion] }),
|
|
52
|
+
EditorView.updateListener.of((v: ViewUpdate) => {
|
|
53
|
+
if (v.docChanged) {
|
|
54
|
+
emit('update:modelValue', v.state.doc.toString())
|
|
55
|
+
}
|
|
56
|
+
}),
|
|
57
|
+
EditorView.lineWrapping,
|
|
58
|
+
EditorView.editable.of(true),
|
|
59
|
+
keymap.of([indentWithTab, ...defaultKeymap]),
|
|
60
|
+
indentUnit.of(" "),
|
|
61
|
+
placeholder(props.placeholder)
|
|
62
|
+
],
|
|
63
|
+
}),
|
|
64
|
+
parent: editor.value!,
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
watch(() => props.modelValue, (newVal) => {
|
|
69
|
+
if (view && view.state.doc.toString() !== newVal) {
|
|
70
|
+
view.dispatch({
|
|
71
|
+
changes: { from: 0, to: view.state.doc.length, insert: newVal }
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
onBeforeUnmount(() => {
|
|
77
|
+
if (view) {
|
|
78
|
+
view.destroy()
|
|
79
|
+
view = null
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<div>
|
|
86
|
+
<div ref="editor" style="height: 100%; width: 100%;" />
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CodeEditor } from './CodeEditor.vue'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Extension } from '@codemirror/state'
|
|
2
|
+
import { Decoration, ViewPlugin, ViewUpdate, DecorationSet, EditorView } from '@codemirror/view'
|
|
3
|
+
|
|
4
|
+
export function highlightInterpolation(): Extension {
|
|
5
|
+
return ViewPlugin.fromClass(class {
|
|
6
|
+
decorations: DecorationSet
|
|
7
|
+
|
|
8
|
+
constructor(view: EditorView) {
|
|
9
|
+
this.decorations = this.buildDecorations(view)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
update(update: ViewUpdate) {
|
|
13
|
+
if (update.docChanged || update.viewportChanged) {
|
|
14
|
+
this.decorations = this.buildDecorations(update.view)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
buildDecorations(view: EditorView) {
|
|
19
|
+
const deco: Range<Decoration>[] = []
|
|
20
|
+
const re = /\{\{[^}]*\}\}/g
|
|
21
|
+
|
|
22
|
+
for (const { from, to } of view.visibleRanges) {
|
|
23
|
+
const text = view.state.doc.sliceString(from, to)
|
|
24
|
+
let match
|
|
25
|
+
while ((match = re.exec(text))) {
|
|
26
|
+
const start = from + match.index
|
|
27
|
+
const end = start + match[0].length
|
|
28
|
+
deco.push(Decoration.mark({
|
|
29
|
+
class: 'cm-interpolation'
|
|
30
|
+
}).range(start, end))
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return Decoration.set(deco)
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
decorations: v => v.decorations
|
|
38
|
+
})
|
|
39
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CollapsibleRootEmits, CollapsibleRootProps } from 'reka-ui'
|
|
3
|
+
import { CollapsibleRoot, useForwardPropsEmits } from 'reka-ui'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<CollapsibleRootProps>()
|
|
6
|
+
const emits = defineEmits<CollapsibleRootEmits>()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<CollapsibleRoot
|
|
13
|
+
v-slot="{ open }"
|
|
14
|
+
data-slot="collapsible"
|
|
15
|
+
v-bind="forwarded"
|
|
16
|
+
>
|
|
17
|
+
<slot :open="open" />
|
|
18
|
+
</CollapsibleRoot>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { CollapsibleContent, type CollapsibleContentProps } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<CollapsibleContentProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<CollapsibleContent
|
|
9
|
+
data-slot="collapsible-content"
|
|
10
|
+
v-bind="props"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</CollapsibleContent>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { CollapsibleTrigger, type CollapsibleTriggerProps } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<CollapsibleTriggerProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<CollapsibleTrigger
|
|
9
|
+
data-slot="collapsible-trigger"
|
|
10
|
+
v-bind="props"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</CollapsibleTrigger>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ComboboxRoot, type ComboboxRootEmits, type ComboboxRootProps, useForwardPropsEmits } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<ComboboxRootProps>()
|
|
5
|
+
const emits = defineEmits<ComboboxRootEmits>()
|
|
6
|
+
|
|
7
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<ComboboxRoot
|
|
12
|
+
data-slot="combobox"
|
|
13
|
+
v-bind="forwarded"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</ComboboxRoot>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxAnchorProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxAnchor, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxAnchorProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ComboboxAnchor
|
|
20
|
+
data-slot="combobox-anchor"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('w-[200px]', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ComboboxAnchor>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxEmptyProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxEmpty } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ComboboxEmpty
|
|
18
|
+
data-slot="combobox-empty"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="cn('py-6 text-center text-sm', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</ComboboxEmpty>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxGroupProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxGroup, ComboboxLabel } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxGroupProps & {
|
|
8
|
+
class?: HTMLAttributes['class']
|
|
9
|
+
heading?: string
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = computed(() => {
|
|
13
|
+
const { class: _, ...delegated } = props
|
|
14
|
+
|
|
15
|
+
return delegated
|
|
16
|
+
})
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ComboboxGroup
|
|
21
|
+
data-slot="combobox-group"
|
|
22
|
+
v-bind="delegatedProps"
|
|
23
|
+
:class="cn('overflow-hidden p-1 text-foreground', props.class)"
|
|
24
|
+
>
|
|
25
|
+
<ComboboxLabel v-if="heading" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
|
|
26
|
+
{{ heading }}
|
|
27
|
+
</ComboboxLabel>
|
|
28
|
+
<slot />
|
|
29
|
+
</ComboboxGroup>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { SearchIcon } from 'lucide-vue-next'
|
|
4
|
+
import { ComboboxInput, type ComboboxInputEmits, type ComboboxInputProps, useForwardPropsEmits } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
defineOptions({
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const props = defineProps<ComboboxInputProps & {
|
|
12
|
+
class?: HTMLAttributes['class']
|
|
13
|
+
hideIcon?: boolean
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const emits = defineEmits<ComboboxInputEmits>()
|
|
17
|
+
|
|
18
|
+
const delegatedProps = computed(() => {
|
|
19
|
+
const { class: _, ...delegated } = props
|
|
20
|
+
|
|
21
|
+
return delegated
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div
|
|
29
|
+
data-slot="command-input-wrapper"
|
|
30
|
+
class="relative"
|
|
31
|
+
>
|
|
32
|
+
<SearchIcon class="absolute top-2.5 left-3 size-4 shrink-0 opacity-50" v-if="!props.hideIcon" />
|
|
33
|
+
<ComboboxInput
|
|
34
|
+
data-slot="command-input"
|
|
35
|
+
:class="cn(
|
|
36
|
+
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex items-center h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
37
|
+
props.hideIcon ? '' : 'pl-10',
|
|
38
|
+
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
39
|
+
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive'
|
|
40
|
+
)"
|
|
41
|
+
|
|
42
|
+
v-bind="{ ...forwarded, ...$attrs }"
|
|
43
|
+
>
|
|
44
|
+
<slot />
|
|
45
|
+
</ComboboxInput>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxItemEmits, ComboboxItemProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxItem, useForwardPropsEmits } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
const emits = defineEmits<ComboboxItemEmits>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _, ...delegated } = props
|
|
12
|
+
|
|
13
|
+
return delegated
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ComboboxItem
|
|
21
|
+
data-slot="combobox-item"
|
|
22
|
+
v-bind="forwarded"
|
|
23
|
+
:class="cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, props.class)"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</ComboboxItem>
|
|
27
|
+
</template>
|