@ciridae/ui 0.2.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/README.md +31 -0
- package/dist/components/agentic/agent-card.d.ts +28 -0
- package/dist/components/agentic/agent-card.js +27 -0
- package/dist/components/agentic/agent-composer.d.ts +44 -0
- package/dist/components/agentic/agent-composer.js +104 -0
- package/dist/components/agentic/agent-context.d.ts +28 -0
- package/dist/components/agentic/agent-context.js +102 -0
- package/dist/components/agentic/agent-plan.d.ts +27 -0
- package/dist/components/agentic/agent-plan.js +43 -0
- package/dist/components/agentic/agent-queue.d.ts +46 -0
- package/dist/components/agentic/agent-queue.js +53 -0
- package/dist/components/agentic/agent-task.d.ts +16 -0
- package/dist/components/agentic/agent-task.js +20 -0
- package/dist/components/agentic/approval-request.d.ts +24 -0
- package/dist/components/agentic/approval-request.js +57 -0
- package/dist/components/agentic/artifact.d.ts +24 -0
- package/dist/components/agentic/artifact.js +72 -0
- package/dist/components/agentic/attachments.d.ts +124 -0
- package/dist/components/agentic/attachments.js +595 -0
- package/dist/components/agentic/audio-player.d.ts +16 -0
- package/dist/components/agentic/audio-player.js +21 -0
- package/dist/components/agentic/canvas.d.ts +10 -0
- package/dist/components/agentic/canvas.js +22 -0
- package/dist/components/agentic/clipboard.d.ts +2 -0
- package/dist/components/agentic/clipboard.js +12 -0
- package/dist/components/agentic/code-block.d.ts +43 -0
- package/dist/components/agentic/code-block.js +92 -0
- package/dist/components/agentic/commit.d.ts +57 -0
- package/dist/components/agentic/commit.js +85 -0
- package/dist/components/agentic/connection.d.ts +3 -0
- package/dist/components/agentic/connection.js +8 -0
- package/dist/components/agentic/controls.d.ts +6 -0
- package/dist/components/agentic/controls.js +7 -0
- package/dist/components/agentic/conversation.d.ts +25 -0
- package/dist/components/agentic/conversation.js +56 -0
- package/dist/components/agentic/edge.d.ts +8 -0
- package/dist/components/agentic/edge.js +65 -0
- package/dist/components/agentic/effort-selector.d.ts +43 -0
- package/dist/components/agentic/effort-selector.js +47 -0
- package/dist/components/agentic/environment-variables.d.ts +32 -0
- package/dist/components/agentic/environment-variables.js +66 -0
- package/dist/components/agentic/file-tree.d.ts +24 -0
- package/dist/components/agentic/file-tree.js +56 -0
- package/dist/components/agentic/image.d.ts +9 -0
- package/dist/components/agentic/image.js +11 -0
- package/dist/components/agentic/inline-citation.d.ts +40 -0
- package/dist/components/agentic/inline-citation.js +111 -0
- package/dist/components/agentic/jsx-preview.d.ts +19 -0
- package/dist/components/agentic/jsx-preview.js +34 -0
- package/dist/components/agentic/message-branch.d.ts +20 -0
- package/dist/components/agentic/message-branch.js +83 -0
- package/dist/components/agentic/message-response.css +265 -0
- package/dist/components/agentic/message-response.css.d.ts +2 -0
- package/dist/components/agentic/message.d.ts +27 -0
- package/dist/components/agentic/message.js +57 -0
- package/dist/components/agentic/mic-selector.d.ts +58 -0
- package/dist/components/agentic/mic-selector.js +173 -0
- package/dist/components/agentic/model-selector.d.ts +39 -0
- package/dist/components/agentic/model-selector.js +47 -0
- package/dist/components/agentic/node.d.ts +26 -0
- package/dist/components/agentic/node.js +29 -0
- package/dist/components/agentic/open-in-chat.d.ts +9 -0
- package/dist/components/agentic/open-in-chat.js +8 -0
- package/dist/components/agentic/package-info.d.ts +30 -0
- package/dist/components/agentic/package-info.js +44 -0
- package/dist/components/agentic/panel.d.ts +6 -0
- package/dist/components/agentic/panel.js +7 -0
- package/dist/components/agentic/persona.d.ts +16 -0
- package/dist/components/agentic/persona.js +116 -0
- package/dist/components/agentic/prompt-input-action-menu.d.ts +16 -0
- package/dist/components/agentic/prompt-input-action-menu.js +22 -0
- package/dist/components/agentic/prompt-input-command.d.ts +18 -0
- package/dist/components/agentic/prompt-input-command.js +25 -0
- package/dist/components/agentic/prompt-input-hover-card.d.ts +10 -0
- package/dist/components/agentic/prompt-input-hover-card.js +13 -0
- package/dist/components/agentic/prompt-input-select.d.ts +14 -0
- package/dist/components/agentic/prompt-input-select.js +19 -0
- package/dist/components/agentic/prompt-input-tabs.d.ts +17 -0
- package/dist/components/agentic/prompt-input-tabs.js +45 -0
- package/dist/components/agentic/prompt-input.d.ts +79 -0
- package/dist/components/agentic/prompt-input.js +206 -0
- package/dist/components/agentic/reasoning.d.ts +21 -0
- package/dist/components/agentic/reasoning.js +106 -0
- package/dist/components/agentic/run-checkpoint.d.ts +13 -0
- package/dist/components/agentic/run-checkpoint.js +19 -0
- package/dist/components/agentic/run-trace.d.ts +30 -0
- package/dist/components/agentic/run-trace.js +56 -0
- package/dist/components/agentic/sandbox.d.ts +24 -0
- package/dist/components/agentic/sandbox.js +33 -0
- package/dist/components/agentic/schema-display.d.ts +39 -0
- package/dist/components/agentic/schema-display.js +56 -0
- package/dist/components/agentic/shimmer.d.ts +11 -0
- package/dist/components/agentic/shimmer.js +16 -0
- package/dist/components/agentic/snippet.d.ts +18 -0
- package/dist/components/agentic/snippet.js +35 -0
- package/dist/components/agentic/sources.d.ts +16 -0
- package/dist/components/agentic/sources.js +17 -0
- package/dist/components/agentic/speech-input.d.ts +24 -0
- package/dist/components/agentic/speech-input.js +30 -0
- package/dist/components/agentic/stack-trace.d.ts +27 -0
- package/dist/components/agentic/stack-trace.js +76 -0
- package/dist/components/agentic/suggestion.d.ts +12 -0
- package/dist/components/agentic/suggestion.js +15 -0
- package/dist/components/agentic/terminal.d.ts +24 -0
- package/dist/components/agentic/terminal.js +47 -0
- package/dist/components/agentic/test-results.d.ts +51 -0
- package/dist/components/agentic/test-results.js +83 -0
- package/dist/components/agentic/theme.d.ts +5 -0
- package/dist/components/agentic/theme.js +31 -0
- package/dist/components/agentic/tool.d.ts +25 -0
- package/dist/components/agentic/tool.js +73 -0
- package/dist/components/agentic/toolbar.d.ts +6 -0
- package/dist/components/agentic/toolbar.js +7 -0
- package/dist/components/agentic/transcription.d.ts +20 -0
- package/dist/components/agentic/transcription.js +32 -0
- package/dist/components/agentic/types.d.ts +172 -0
- package/dist/components/agentic/types.js +1 -0
- package/dist/components/agentic/use-controllable-state.d.ts +6 -0
- package/dist/components/agentic/use-controllable-state.js +13 -0
- package/dist/components/agentic/voice-selector.d.ts +69 -0
- package/dist/components/agentic/voice-selector.js +122 -0
- package/dist/components/agentic/web-preview.d.ts +25 -0
- package/dist/components/agentic/web-preview.js +33 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +17 -0
- package/dist/components/ui/alert-dialog.d.ts +22 -0
- package/dist/components/ui/alert-dialog.js +51 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +24 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +7 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.js +22 -0
- package/dist/components/ui/badge-variants.d.ts +100 -0
- package/dist/components/ui/badge-variants.js +140 -0
- package/dist/components/ui/badge.d.ts +6 -0
- package/dist/components/ui/badge.js +9 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +27 -0
- package/dist/components/ui/button-group-variants.d.ts +6 -0
- package/dist/components/ui/button-group-variants.js +13 -0
- package/dist/components/ui/button-group.d.ts +8 -0
- package/dist/components/ui/button-group.js +16 -0
- package/dist/components/ui/button-variants.d.ts +133 -0
- package/dist/components/ui/button-variants.js +170 -0
- package/dist/components/ui/button.d.ts +8 -0
- package/dist/components/ui/button.js +67 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.js +99 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.js +28 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.js +104 -0
- package/dist/components/ui/chart-context.d.ts +33 -0
- package/dist/components/ui/chart-context.js +36 -0
- package/dist/components/ui/chart-panel.d.ts +11 -0
- package/dist/components/ui/chart-panel.js +6 -0
- package/dist/components/ui/chart-tooltip.d.ts +13 -0
- package/dist/components/ui/chart-tooltip.js +84 -0
- package/dist/components/ui/chart.d.ts +23 -0
- package/dist/components/ui/chart.js +52 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +12 -0
- package/dist/components/ui/combobox-anchor.d.ts +3 -0
- package/dist/components/ui/combobox-anchor.js +5 -0
- package/dist/components/ui/combobox.d.ts +23 -0
- package/dist/components/ui/combobox.js +54 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.js +38 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.js +63 -0
- package/dist/components/ui/data-table.d.ts +17 -0
- package/dist/components/ui/data-table.js +26 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +48 -0
- package/dist/components/ui/direction-context.d.ts +3 -0
- package/dist/components/ui/direction-context.js +3 -0
- package/dist/components/ui/direction.d.ts +6 -0
- package/dist/components/ui/direction.js +7 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +47 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.js +63 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/expandable-data-table.d.ts +24 -0
- package/dist/components/ui/expandable-data-table.js +62 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.js +74 -0
- package/dist/components/ui/file-upload-field-parts.d.ts +21 -0
- package/dist/components/ui/file-upload-field-parts.js +55 -0
- package/dist/components/ui/file-upload-field.d.ts +15 -0
- package/dist/components/ui/file-upload-field.js +85 -0
- package/dist/components/ui/form-context.d.ts +23 -0
- package/dist/components/ui/form-context.js +35 -0
- package/dist/components/ui/form.d.ts +12 -0
- package/dist/components/ui/form.js +38 -0
- package/dist/components/ui/hover-card.d.ts +10 -0
- package/dist/components/ui/hover-card.js +22 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input-group.js +62 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.js +21 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +6 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.js +66 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +9 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +7 -0
- package/dist/components/ui/loading-state.d.ts +27 -0
- package/dist/components/ui/loading-state.js +44 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.js +63 -0
- package/dist/components/ui/metrics-strip.d.ts +7 -0
- package/dist/components/ui/metrics-strip.js +18 -0
- package/dist/components/ui/native-select.d.ts +7 -0
- package/dist/components/ui/native-select.js +13 -0
- package/dist/components/ui/navigation-menu-variants.d.ts +2 -0
- package/dist/components/ui/navigation-menu-variants.js +3 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +30 -0
- package/dist/components/ui/page-header.d.ts +19 -0
- package/dist/components/ui/page-header.js +36 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/pagination.js +29 -0
- package/dist/components/ui/popover.d.ts +14 -0
- package/dist/components/ui/popover.js +34 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/property-list.d.ts +6 -0
- package/dist/components/ui/property-list.js +15 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +11 -0
- package/dist/components/ui/registry-docs-api.d.ts +11 -0
- package/dist/components/ui/registry-docs-api.js +9 -0
- package/dist/components/ui/registry-docs-code.d.ts +19 -0
- package/dist/components/ui/registry-docs-code.js +78 -0
- package/dist/components/ui/registry-docs-showcase.d.ts +11 -0
- package/dist/components/ui/registry-docs-showcase.js +27 -0
- package/dist/components/ui/registry-docs.d.ts +27 -0
- package/dist/components/ui/registry-docs.js +32 -0
- package/dist/components/ui/resizable.d.ts +7 -0
- package/dist/components/ui/resizable.js +15 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.js +10 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/select.js +38 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +7 -0
- package/dist/components/ui/sheet.d.ts +21 -0
- package/dist/components/ui/sheet.js +62 -0
- package/dist/components/ui/sidebar/context.d.ts +21 -0
- package/dist/components/ui/sidebar/context.js +15 -0
- package/dist/components/ui/sidebar/group.d.ts +10 -0
- package/dist/components/ui/sidebar/group.js +18 -0
- package/dist/components/ui/sidebar/layout.d.ts +17 -0
- package/dist/components/ui/sidebar/layout.js +73 -0
- package/dist/components/ui/sidebar/menu.d.ts +30 -0
- package/dist/components/ui/sidebar/menu.js +64 -0
- package/dist/components/ui/sidebar/provider.d.ts +7 -0
- package/dist/components/ui/sidebar/provider.js +53 -0
- package/dist/components/ui/sidebar/rail.d.ts +3 -0
- package/dist/components/ui/sidebar/rail.js +12 -0
- package/dist/components/ui/sidebar/trigger.d.ts +4 -0
- package/dist/components/ui/sidebar/trigger.js +16 -0
- package/dist/components/ui/sidebar-account-menu-theme.d.ts +7 -0
- package/dist/components/ui/sidebar-account-menu-theme.js +32 -0
- package/dist/components/ui/sidebar-account-menu.d.ts +14 -0
- package/dist/components/ui/sidebar-account-menu.js +51 -0
- package/dist/components/ui/sidebar.d.ts +7 -0
- package/dist/components/ui/sidebar.js +7 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +15 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +9 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +33 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.js +7 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +28 -0
- package/dist/components/ui/tabs-variants.d.ts +6 -0
- package/dist/components/ui/tabs-variants.js +13 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.js +17 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +6 -0
- package/dist/components/ui/toggle-group.d.ts +9 -0
- package/dist/components/ui/toggle-group.js +24 -0
- package/dist/components/ui/toggle-variants.d.ts +7 -0
- package/dist/components/ui/toggle-variants.js +19 -0
- package/dist/components/ui/toggle.d.ts +5 -0
- package/dist/components/ui/toggle.js +9 -0
- package/dist/components/ui/tooltip.d.ts +11 -0
- package/dist/components/ui/tooltip.js +25 -0
- package/dist/components/ui/workflow-timeline.d.ts +20 -0
- package/dist/components/ui/workflow-timeline.js +92 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +8 -0
- package/dist/styled-system/css/conditions.mjs +36 -0
- package/dist/styled-system/css/css.mjs +45 -0
- package/dist/styled-system/css/cva.mjs +87 -0
- package/dist/styled-system/css/cx.mjs +15 -0
- package/dist/styled-system/css/index.mjs +4 -0
- package/dist/styled-system/css/sva.mjs +46 -0
- package/dist/styled-system/helpers.mjs +316 -0
- package/dist/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/dist/styled-system/patterns/bleed.mjs +24 -0
- package/dist/styled-system/patterns/box.mjs +15 -0
- package/dist/styled-system/patterns/center.mjs +21 -0
- package/dist/styled-system/patterns/circle.mjs +25 -0
- package/dist/styled-system/patterns/container.mjs +21 -0
- package/dist/styled-system/patterns/cq.mjs +21 -0
- package/dist/styled-system/patterns/divider.mjs +25 -0
- package/dist/styled-system/patterns/flex.mjs +26 -0
- package/dist/styled-system/patterns/float.mjs +52 -0
- package/dist/styled-system/patterns/grid-item.mjs +25 -0
- package/dist/styled-system/patterns/grid.mjs +27 -0
- package/dist/styled-system/patterns/hstack.mjs +24 -0
- package/dist/styled-system/patterns/index.mjs +20 -0
- package/dist/styled-system/patterns/link-overlay.mjs +24 -0
- package/dist/styled-system/patterns/spacer.mjs +25 -0
- package/dist/styled-system/patterns/square.mjs +24 -0
- package/dist/styled-system/patterns/stack.mjs +24 -0
- package/dist/styled-system/patterns/visually-hidden.mjs +18 -0
- package/dist/styled-system/patterns/vstack.mjs +24 -0
- package/dist/styled-system/patterns/wrap.mjs +25 -0
- package/dist/styled-system/styles.css +1089 -0
- package/dist/styled-system/styles.css.d.ts +2 -0
- package/dist/styled-system/tokens/index.mjs +2304 -0
- package/package.json +688 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "@ciridae/ui/command";
|
|
3
|
+
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@ciridae/ui/dialog";
|
|
4
|
+
import { cn } from "@ciridae/ui/utils";
|
|
5
|
+
function ModelSelector(props) {
|
|
6
|
+
return _jsx(Dialog, { ...props });
|
|
7
|
+
}
|
|
8
|
+
function ModelSelectorTrigger(props) {
|
|
9
|
+
return _jsx(DialogTrigger, { ...props });
|
|
10
|
+
}
|
|
11
|
+
function ModelSelectorContent({ children, className, title = "Model selector", ...props }) {
|
|
12
|
+
return (_jsxs(DialogContent, { "aria-describedby": undefined, className: cn("overflow-hidden p-0 sm:max-w-xl", className), ...props, children: [_jsx(DialogTitle, { className: "sr-only", children: title }), _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-auto", children: children })] }));
|
|
13
|
+
}
|
|
14
|
+
function ModelSelectorDialog(props) {
|
|
15
|
+
return _jsx(CommandDialog, { ...props });
|
|
16
|
+
}
|
|
17
|
+
function ModelSelectorInput({ className, ...props }) {
|
|
18
|
+
return _jsx(CommandInput, { className: cn("h-auto py-3", className), ...props });
|
|
19
|
+
}
|
|
20
|
+
function ModelSelectorList(props) {
|
|
21
|
+
return _jsx(CommandList, { ...props });
|
|
22
|
+
}
|
|
23
|
+
function ModelSelectorEmpty(props) {
|
|
24
|
+
return _jsx(CommandEmpty, { ...props });
|
|
25
|
+
}
|
|
26
|
+
function ModelSelectorGroup(props) {
|
|
27
|
+
return _jsx(CommandGroup, { ...props });
|
|
28
|
+
}
|
|
29
|
+
function ModelSelectorItem(props) {
|
|
30
|
+
return _jsx(CommandItem, { ...props });
|
|
31
|
+
}
|
|
32
|
+
function ModelSelectorShortcut(props) {
|
|
33
|
+
return _jsx(CommandShortcut, { ...props });
|
|
34
|
+
}
|
|
35
|
+
function ModelSelectorSeparator(props) {
|
|
36
|
+
return _jsx(CommandSeparator, { ...props });
|
|
37
|
+
}
|
|
38
|
+
function ModelSelectorLogo({ alt, className, provider, src, ...props }) {
|
|
39
|
+
return (_jsx("img", { alt: alt ?? `${provider} logo`, className: cn("size-4 rounded-sm object-contain p-0.5 ring-1 ring-border dark:invert", className), height: 16, src: src ?? `https://models.dev/logos/${provider}.svg`, width: 16, ...props }));
|
|
40
|
+
}
|
|
41
|
+
function ModelSelectorLogoGroup({ className, ...props }) {
|
|
42
|
+
return (_jsx("div", { "data-slot": "model-selector-logo-group", className: cn("flex shrink-0 items-center -space-x-1 [&>img]:rounded-full [&>img]:bg-background [&>img]:p-px [&>img]:ring-1", className), ...props }));
|
|
43
|
+
}
|
|
44
|
+
function ModelSelectorName({ className, ...props }) {
|
|
45
|
+
return (_jsx("span", { "data-slot": "model-selector-name", className: cn("min-w-0 flex-1 truncate text-left", className), ...props }));
|
|
46
|
+
}
|
|
47
|
+
export { ModelSelector, ModelSelectorContent, ModelSelectorDialog, ModelSelectorEmpty, ModelSelectorGroup, ModelSelectorInput, ModelSelectorItem, ModelSelectorList, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorName, ModelSelectorSeparator, ModelSelectorShortcut, ModelSelectorTrigger, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Position } from "@xyflow/react";
|
|
3
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@ciridae/ui/card";
|
|
4
|
+
type NodeProps = React.ComponentProps<typeof Card> & {
|
|
5
|
+
handles?: {
|
|
6
|
+
source?: boolean;
|
|
7
|
+
target?: boolean;
|
|
8
|
+
};
|
|
9
|
+
sourcePosition?: Position;
|
|
10
|
+
targetPosition?: Position;
|
|
11
|
+
};
|
|
12
|
+
type NodeHeaderProps = React.ComponentProps<typeof CardHeader>;
|
|
13
|
+
type NodeTitleProps = React.ComponentProps<typeof CardTitle>;
|
|
14
|
+
type NodeDescriptionProps = React.ComponentProps<typeof CardDescription>;
|
|
15
|
+
type NodeActionProps = React.ComponentProps<typeof CardAction>;
|
|
16
|
+
type NodeContentProps = React.ComponentProps<typeof CardContent>;
|
|
17
|
+
type NodeFooterProps = React.ComponentProps<typeof CardFooter>;
|
|
18
|
+
declare function Node({ children, className, handles, sourcePosition, targetPosition, ...props }: NodeProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function NodeHeader({ className, ...props }: NodeHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function NodeTitle(props: NodeTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function NodeDescription(props: NodeDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function NodeAction(props: NodeActionProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function NodeContent({ className, ...props }: NodeContentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function NodeFooter({ className, ...props }: NodeFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { Node, NodeAction, NodeContent, NodeDescription, NodeFooter, NodeHeader, NodeTitle };
|
|
26
|
+
export type { NodeActionProps, NodeContentProps, NodeDescriptionProps, NodeFooterProps, NodeHeaderProps, NodeProps, NodeTitleProps, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Handle, Position } from "@xyflow/react";
|
|
3
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "@ciridae/ui/card";
|
|
4
|
+
import { cn } from "@ciridae/ui/utils";
|
|
5
|
+
function Node({ children, className, handles = { source: true, target: true }, sourcePosition = Position.Right, targetPosition = Position.Left, ...props }) {
|
|
6
|
+
return (_jsxs(Card, { "data-slot": "node", className: cn("relative min-w-60 gap-3 py-4 shadow-xs", "data-[selected=true]:border-ring data-[selected=true]:ring-2 data-[selected=true]:ring-ring/20", className), ...props, children: [handles.target ? _jsx(NodeHandle, { position: targetPosition, type: "target" }) : null, children, handles.source ? _jsx(NodeHandle, { position: sourcePosition, type: "source" }) : null] }));
|
|
7
|
+
}
|
|
8
|
+
function NodeHandle({ position, type }) {
|
|
9
|
+
return (_jsx(Handle, { className: "size-2.5! border-2! border-background! bg-foreground!", position: position, type: type }));
|
|
10
|
+
}
|
|
11
|
+
function NodeHeader({ className, ...props }) {
|
|
12
|
+
return _jsx(CardHeader, { className: cn("gap-1 px-4", className), ...props });
|
|
13
|
+
}
|
|
14
|
+
function NodeTitle(props) {
|
|
15
|
+
return _jsx(CardTitle, { ...props });
|
|
16
|
+
}
|
|
17
|
+
function NodeDescription(props) {
|
|
18
|
+
return _jsx(CardDescription, { ...props });
|
|
19
|
+
}
|
|
20
|
+
function NodeAction(props) {
|
|
21
|
+
return _jsx(CardAction, { ...props });
|
|
22
|
+
}
|
|
23
|
+
function NodeContent({ className, ...props }) {
|
|
24
|
+
return _jsx(CardContent, { className: cn("px-4 text-sm", className), ...props });
|
|
25
|
+
}
|
|
26
|
+
function NodeFooter({ className, ...props }) {
|
|
27
|
+
return (_jsx(CardFooter, { className: cn("items-center justify-between px-4 text-xs", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
export { Node, NodeAction, NodeContent, NodeDescription, NodeFooter, NodeHeader, NodeTitle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Button } from "@ciridae/ui/button";
|
|
3
|
+
type OpenInChatProps = React.ComponentProps<typeof Button> & {
|
|
4
|
+
label?: string;
|
|
5
|
+
metadataLabel?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function OpenInChat({ children, className, label, metadataLabel, size, type, variant, ...props }: OpenInChatProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { OpenInChat };
|
|
9
|
+
export type { OpenInChatProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MessageSquareTextIcon } from "lucide-react";
|
|
3
|
+
import { Button } from "@ciridae/ui/button";
|
|
4
|
+
import { cn } from "@ciridae/ui/utils";
|
|
5
|
+
function OpenInChat({ children, className, label = "Open in chat", metadataLabel, size = "sm", type = "button", variant = "outline", ...props }) {
|
|
6
|
+
return (_jsx(Button, { "data-slot": "open-in-chat", className: cn("max-w-full justify-start", className), size: size, type: type, variant: variant, ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(MessageSquareTextIcon, { "aria-hidden": "true", className: "size-4" }), _jsx("span", { className: "truncate", children: label }), metadataLabel ? (_jsx("span", { className: "font-mono text-xs text-muted-foreground tabular-nums", children: metadataLabel })) : null] })) }));
|
|
7
|
+
}
|
|
8
|
+
export { OpenInChat };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Badge } from "@ciridae/ui/badge";
|
|
3
|
+
type PackageChangeType = "added" | "major" | "minor" | "patch" | "removed";
|
|
4
|
+
type PackageInfoProps = React.ComponentProps<"div"> & {
|
|
5
|
+
changeType?: PackageChangeType;
|
|
6
|
+
name: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
};
|
|
9
|
+
type PackageInfoHeaderProps = React.ComponentProps<"div">;
|
|
10
|
+
type PackageInfoNameProps = React.ComponentProps<"div">;
|
|
11
|
+
type PackageInfoChangeTypeProps = React.ComponentProps<typeof Badge>;
|
|
12
|
+
type PackageInfoVersionProps = React.ComponentProps<"div">;
|
|
13
|
+
type PackageInfoDescriptionProps = React.ComponentProps<"p">;
|
|
14
|
+
type PackageInfoContentProps = React.ComponentProps<"div">;
|
|
15
|
+
type PackageInfoDependenciesProps = React.ComponentProps<"div">;
|
|
16
|
+
type PackageInfoDependencyProps = React.ComponentProps<"div"> & {
|
|
17
|
+
name: string;
|
|
18
|
+
version?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function PackageInfo({ children, className, changeType, name, version, ...props }: PackageInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function PackageInfoHeader({ className, ...props }: PackageInfoHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function PackageInfoName({ className, ...props }: PackageInfoNameProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function PackageInfoChangeType({ children, variant, ...props }: PackageInfoChangeTypeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
declare function PackageInfoVersion({ className, ...props }: PackageInfoVersionProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function PackageInfoDescription({ className, ...props }: PackageInfoDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function PackageInfoContent({ className, ...props }: PackageInfoContentProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function PackageInfoDependencies({ className, ...props }: PackageInfoDependenciesProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function PackageInfoDependency({ children, className, name, version, ...props }: PackageInfoDependencyProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export { PackageInfo, PackageInfoChangeType, PackageInfoContent, PackageInfoDependencies, PackageInfoDependency, PackageInfoDescription, PackageInfoHeader, PackageInfoName, PackageInfoVersion, };
|
|
30
|
+
export type { PackageChangeType, PackageInfoChangeTypeProps, PackageInfoContentProps, PackageInfoDependenciesProps, PackageInfoDependencyProps, PackageInfoDescriptionProps, PackageInfoHeaderProps, PackageInfoNameProps, PackageInfoProps, PackageInfoVersionProps, };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PackageIcon } from "lucide-react";
|
|
3
|
+
import { createContext, useContext, useMemo } from "react";
|
|
4
|
+
import { Badge } from "@ciridae/ui/badge";
|
|
5
|
+
import { cn } from "@ciridae/ui/utils";
|
|
6
|
+
const PackageInfoContext = createContext({ name: "" });
|
|
7
|
+
function usePackageInfo() {
|
|
8
|
+
return useContext(PackageInfoContext);
|
|
9
|
+
}
|
|
10
|
+
function PackageInfo({ children, className, changeType, name, version, ...props }) {
|
|
11
|
+
const contextValue = useMemo(() => ({ changeType, name, version }), [changeType, name, version]);
|
|
12
|
+
return (_jsx(PackageInfoContext.Provider, { value: contextValue, children: _jsx("div", { "data-slot": "package-info", className: cn("grid gap-3 rounded-lg border bg-card p-4", className), ...props, children: children }) }));
|
|
13
|
+
}
|
|
14
|
+
function PackageInfoHeader({ className, ...props }) {
|
|
15
|
+
return (_jsx("div", { "data-slot": "package-info-header", className: cn("flex min-w-0 items-start justify-between gap-3", className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function PackageInfoName({ className, ...props }) {
|
|
18
|
+
const { name } = usePackageInfo();
|
|
19
|
+
return (_jsxs("div", { "data-slot": "package-info-name", className: cn("flex min-w-0 items-center gap-2 text-sm font-medium", className), ...props, children: [_jsx(PackageIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-muted-foreground" }), _jsx("span", { className: "truncate", children: props.children ?? name })] }));
|
|
20
|
+
}
|
|
21
|
+
function PackageInfoChangeType({ children, variant = "outline", ...props }) {
|
|
22
|
+
const { changeType } = usePackageInfo();
|
|
23
|
+
const label = children ?? changeType;
|
|
24
|
+
if (!label)
|
|
25
|
+
return null;
|
|
26
|
+
return (_jsx(Badge, { "data-slot": "package-info-change-type", variant: variant, ...props, children: label }));
|
|
27
|
+
}
|
|
28
|
+
function PackageInfoVersion({ className, ...props }) {
|
|
29
|
+
const { version } = usePackageInfo();
|
|
30
|
+
return (_jsx("div", { "data-slot": "package-info-version", className: cn("font-mono text-xs text-muted-foreground", className), ...props, children: props.children ?? version }));
|
|
31
|
+
}
|
|
32
|
+
function PackageInfoDescription({ className, ...props }) {
|
|
33
|
+
return (_jsx("p", { "data-slot": "package-info-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
34
|
+
}
|
|
35
|
+
function PackageInfoContent({ className, ...props }) {
|
|
36
|
+
return _jsx("div", { "data-slot": "package-info-content", className: cn("grid gap-3", className), ...props });
|
|
37
|
+
}
|
|
38
|
+
function PackageInfoDependencies({ className, ...props }) {
|
|
39
|
+
return (_jsx("div", { "data-slot": "package-info-dependencies", className: cn("grid gap-1", className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
function PackageInfoDependency({ children, className, name, version, ...props }) {
|
|
42
|
+
return (_jsxs("div", { "data-slot": "package-info-dependency", className: cn("flex min-w-0 items-center justify-between gap-3 rounded-md bg-muted/40 px-2 py-1 text-sm", className), ...props, children: [_jsx("span", { className: "truncate font-mono text-xs", children: children ?? name }), version ? (_jsx("span", { className: "shrink-0 font-mono text-xs text-muted-foreground", children: version })) : null] }));
|
|
43
|
+
}
|
|
44
|
+
export { PackageInfo, PackageInfoChangeType, PackageInfoContent, PackageInfoDependencies, PackageInfoDependency, PackageInfoDescription, PackageInfoHeader, PackageInfoName, PackageInfoVersion, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Panel as PanelPrimitive } from "@xyflow/react";
|
|
3
|
+
type PanelProps = React.ComponentProps<typeof PanelPrimitive>;
|
|
4
|
+
declare function Panel({ className, ...props }: PanelProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Panel };
|
|
6
|
+
export type { PanelProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Panel as PanelPrimitive } from "@xyflow/react";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function Panel({ className, ...props }) {
|
|
5
|
+
return (_jsx(PanelPrimitive, { "data-slot": "panel", className: cn("rounded-lg border bg-card p-2 text-card-foreground shadow-xs", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
export { Panel };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RiveParameters } from "@rive-app/react-webgl2";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
type PersonaState = "idle" | "listening" | "thinking" | "speaking" | "asleep";
|
|
4
|
+
type PersonaContainerProps = Omit<React.ComponentProps<"div">, "onLoad" | "onLoadError" | "onPause" | "onPlay" | "onReady" | "onStop">;
|
|
5
|
+
type PersonaProps = PersonaContainerProps & {
|
|
6
|
+
onLoad?: RiveParameters["onLoad"];
|
|
7
|
+
onLoadError?: RiveParameters["onLoadError"];
|
|
8
|
+
onPause?: RiveParameters["onPause"];
|
|
9
|
+
onPlay?: RiveParameters["onPlay"];
|
|
10
|
+
onReady?: () => void;
|
|
11
|
+
onStop?: RiveParameters["onStop"];
|
|
12
|
+
state?: PersonaState;
|
|
13
|
+
};
|
|
14
|
+
declare const Persona: React.MemoExoticComponent<({ className, onLoad, onLoadError, onPause, onPlay, onReady, onStop, state, ...props }: PersonaProps) => import("react/jsx-runtime").JSX.Element>;
|
|
15
|
+
export { Persona };
|
|
16
|
+
export type { PersonaProps, PersonaState };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRive, useStateMachineInput, useViewModel, useViewModelInstance, useViewModelInstanceColor, } from "@rive-app/react-webgl2";
|
|
3
|
+
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { useAgenticTheme } from "@ciridae/ui/theme";
|
|
5
|
+
import { cn } from "@ciridae/ui/utils";
|
|
6
|
+
const HALO_SOURCE = "/assets/persona/halo-2.0.riv";
|
|
7
|
+
const STATE_MACHINE = "default";
|
|
8
|
+
const Persona = memo(function Persona({ className, onLoad, onLoadError, onPause, onPlay, onReady, onStop, state = "idle", ...props }) {
|
|
9
|
+
const ready = useStrictModeSafeInit();
|
|
10
|
+
const callbacks = useStableRiveCallbacks({
|
|
11
|
+
onLoad,
|
|
12
|
+
onLoadError,
|
|
13
|
+
onPause,
|
|
14
|
+
onPlay,
|
|
15
|
+
onReady,
|
|
16
|
+
onStop,
|
|
17
|
+
});
|
|
18
|
+
const [loadFailed, setLoadFailed] = useState(false);
|
|
19
|
+
const riveParams = useMemo(() => ready
|
|
20
|
+
? {
|
|
21
|
+
autoplay: true,
|
|
22
|
+
onLoad: callbacks.onLoad,
|
|
23
|
+
onLoadError: (error) => {
|
|
24
|
+
setLoadFailed(true);
|
|
25
|
+
callbacks.onLoadError?.(error);
|
|
26
|
+
},
|
|
27
|
+
onPause: callbacks.onPause,
|
|
28
|
+
onPlay: callbacks.onPlay,
|
|
29
|
+
onRiveReady: callbacks.onReady,
|
|
30
|
+
onStop: callbacks.onStop,
|
|
31
|
+
src: HALO_SOURCE,
|
|
32
|
+
stateMachines: STATE_MACHINE,
|
|
33
|
+
}
|
|
34
|
+
: null, [callbacks, ready]);
|
|
35
|
+
const { rive, RiveComponent } = useRive(riveParams);
|
|
36
|
+
usePersonaThemeColor(rive);
|
|
37
|
+
usePersonaStateMachine(rive, state);
|
|
38
|
+
return (_jsx("div", { "data-slot": "persona", "data-state": state, className: cn("relative flex aspect-square size-48 items-center justify-center overflow-hidden rounded-full", "bg-background text-foreground", className), ...props, children: loadFailed ? _jsx(PersonaFallback, { state: state }) : _jsx(RiveComponent, { className: "size-full" }) }));
|
|
39
|
+
});
|
|
40
|
+
function useStrictModeSafeInit() {
|
|
41
|
+
const [ready, setReady] = useState(false);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
const id = requestAnimationFrame(() => setReady(true));
|
|
44
|
+
return () => {
|
|
45
|
+
cancelAnimationFrame(id);
|
|
46
|
+
setReady(false);
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
49
|
+
return ready;
|
|
50
|
+
}
|
|
51
|
+
function useStableRiveCallbacks({ onLoad, onLoadError, onPause, onPlay, onReady, onStop, }) {
|
|
52
|
+
const callbacksRef = useRef({
|
|
53
|
+
onLoad,
|
|
54
|
+
onLoadError,
|
|
55
|
+
onPause,
|
|
56
|
+
onPlay,
|
|
57
|
+
onReady,
|
|
58
|
+
onStop,
|
|
59
|
+
});
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
callbacksRef.current = {
|
|
62
|
+
onLoad,
|
|
63
|
+
onLoadError,
|
|
64
|
+
onPause,
|
|
65
|
+
onPlay,
|
|
66
|
+
onReady,
|
|
67
|
+
onStop,
|
|
68
|
+
};
|
|
69
|
+
}, [onLoad, onLoadError, onPause, onPlay, onReady, onStop]);
|
|
70
|
+
return useMemo(() => ({
|
|
71
|
+
onLoad: (loadedRive) => callbacksRef.current.onLoad?.(loadedRive),
|
|
72
|
+
onLoadError: (error) => callbacksRef.current.onLoadError?.(error),
|
|
73
|
+
onPause: (event) => callbacksRef.current.onPause?.(event),
|
|
74
|
+
onPlay: (event) => callbacksRef.current.onPlay?.(event),
|
|
75
|
+
onReady: () => callbacksRef.current.onReady?.(),
|
|
76
|
+
onStop: (event) => callbacksRef.current.onStop?.(event),
|
|
77
|
+
}), []);
|
|
78
|
+
}
|
|
79
|
+
function usePersonaThemeColor(rive) {
|
|
80
|
+
const theme = useAgenticTheme();
|
|
81
|
+
const viewModel = useViewModel(rive, { useDefault: true });
|
|
82
|
+
const viewModelInstance = useViewModelInstance(viewModel, {
|
|
83
|
+
rive,
|
|
84
|
+
useDefault: true,
|
|
85
|
+
});
|
|
86
|
+
const color = useViewModelInstanceColor("color", viewModelInstance);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!color)
|
|
89
|
+
return;
|
|
90
|
+
if (theme === "light")
|
|
91
|
+
color.setRgb(24, 24, 27);
|
|
92
|
+
else
|
|
93
|
+
color.setRgb(255, 255, 255);
|
|
94
|
+
}, [color, theme]);
|
|
95
|
+
}
|
|
96
|
+
function usePersonaStateMachine(rive, state) {
|
|
97
|
+
const listeningInput = useStateMachineInput(rive, STATE_MACHINE, "listening");
|
|
98
|
+
const thinkingInput = useStateMachineInput(rive, STATE_MACHINE, "thinking");
|
|
99
|
+
const speakingInput = useStateMachineInput(rive, STATE_MACHINE, "speaking");
|
|
100
|
+
const asleepInput = useStateMachineInput(rive, STATE_MACHINE, "asleep");
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
setInputValue(listeningInput, state === "listening");
|
|
103
|
+
setInputValue(thinkingInput, state === "thinking");
|
|
104
|
+
setInputValue(speakingInput, state === "speaking");
|
|
105
|
+
setInputValue(asleepInput, state === "asleep");
|
|
106
|
+
}, [asleepInput, listeningInput, speakingInput, state, thinkingInput]);
|
|
107
|
+
}
|
|
108
|
+
function setInputValue(input, value) {
|
|
109
|
+
if (!input)
|
|
110
|
+
return;
|
|
111
|
+
input.value = value;
|
|
112
|
+
}
|
|
113
|
+
function PersonaFallback({ state }) {
|
|
114
|
+
return (_jsx("div", { "data-slot": "persona-fallback", "data-state": state, className: cn("size-24 rounded-full border border-foreground bg-background", state !== "asleep" && "ring-1 ring-foreground/20") }));
|
|
115
|
+
}
|
|
116
|
+
export { Persona };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem } from "@ciridae/ui/dropdown-menu";
|
|
3
|
+
import { InputGroupButton } from "@ciridae/ui/input-group";
|
|
4
|
+
type PromptInputActionMenuProps = React.ComponentProps<typeof DropdownMenu>;
|
|
5
|
+
type PromptInputActionMenuTriggerProps = React.ComponentProps<typeof InputGroupButton> & {
|
|
6
|
+
label?: string;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
};
|
|
9
|
+
type PromptInputActionMenuContentProps = React.ComponentProps<typeof DropdownMenuContent>;
|
|
10
|
+
type PromptInputActionMenuItemProps = React.ComponentProps<typeof DropdownMenuItem>;
|
|
11
|
+
declare function PromptInputActionMenu(props: PromptInputActionMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function PromptInputActionMenuTrigger({ children, className, label, size, tooltip, variant, ...props }: PromptInputActionMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function PromptInputActionMenuContent({ className, sideOffset, ...props }: PromptInputActionMenuContentProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function PromptInputActionMenuItem({ className, ...props }: PromptInputActionMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, };
|
|
16
|
+
export type { PromptInputActionMenuContentProps, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTriggerProps, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MoreHorizontalIcon } from "lucide-react";
|
|
3
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@ciridae/ui/dropdown-menu";
|
|
4
|
+
import { InputGroupButton } from "@ciridae/ui/input-group";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@ciridae/ui/tooltip";
|
|
6
|
+
import { cn } from "@ciridae/ui/utils";
|
|
7
|
+
function PromptInputActionMenu(props) {
|
|
8
|
+
return _jsx(DropdownMenu, { ...props });
|
|
9
|
+
}
|
|
10
|
+
function PromptInputActionMenuTrigger({ children, className, label = "Open prompt actions", size = "icon-sm", tooltip = "Prompt actions", variant = "ghost", ...props }) {
|
|
11
|
+
const trigger = (_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(InputGroupButton, { "aria-label": label, "data-slot": "prompt-input-action-menu-trigger", size: size, variant: variant, className: cn("shrink-0 text-muted-foreground", className), ...props, children: children ?? _jsx(MoreHorizontalIcon, {}) }) }));
|
|
12
|
+
if (!tooltip)
|
|
13
|
+
return trigger;
|
|
14
|
+
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: trigger }), _jsx(TooltipContent, { children: tooltip })] }) }));
|
|
15
|
+
}
|
|
16
|
+
function PromptInputActionMenuContent({ className, sideOffset = 6, ...props }) {
|
|
17
|
+
return (_jsx(DropdownMenuContent, { "data-slot": "prompt-input-action-menu-content", sideOffset: sideOffset, className: cn("min-w-52", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function PromptInputActionMenuItem({ className, ...props }) {
|
|
20
|
+
return (_jsx(DropdownMenuItem, { "data-slot": "prompt-input-action-menu-item", className: cn("gap-2", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
export { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "@ciridae/ui/command";
|
|
3
|
+
type PromptInputCommandProps = React.ComponentProps<typeof Command>;
|
|
4
|
+
type PromptInputCommandInputProps = React.ComponentProps<typeof CommandInput>;
|
|
5
|
+
type PromptInputCommandListProps = React.ComponentProps<typeof CommandList>;
|
|
6
|
+
type PromptInputCommandEmptyProps = React.ComponentProps<typeof CommandEmpty>;
|
|
7
|
+
type PromptInputCommandGroupProps = React.ComponentProps<typeof CommandGroup>;
|
|
8
|
+
type PromptInputCommandItemProps = React.ComponentProps<typeof CommandItem>;
|
|
9
|
+
type PromptInputCommandSeparatorProps = React.ComponentProps<typeof CommandSeparator>;
|
|
10
|
+
declare function PromptInputCommand({ className, ...props }: PromptInputCommandProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function PromptInputCommandInput(props: PromptInputCommandInputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function PromptInputCommandList({ className, ...props }: PromptInputCommandListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function PromptInputCommandEmpty(props: PromptInputCommandEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function PromptInputCommandGroup(props: PromptInputCommandGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function PromptInputCommandItem({ className, ...props }: PromptInputCommandItemProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function PromptInputCommandSeparator(props: PromptInputCommandSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, };
|
|
18
|
+
export type { PromptInputCommandEmptyProps, PromptInputCommandGroupProps, PromptInputCommandInputProps, PromptInputCommandItemProps, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparatorProps, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, } from "@ciridae/ui/command";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function PromptInputCommand({ className, ...props }) {
|
|
5
|
+
return (_jsx(Command, { "data-slot": "prompt-input-command", className: cn("rounded-md border bg-popover shadow-xs", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
function PromptInputCommandInput(props) {
|
|
8
|
+
return _jsx(CommandInput, { "data-slot": "prompt-input-command-input", ...props });
|
|
9
|
+
}
|
|
10
|
+
function PromptInputCommandList({ className, ...props }) {
|
|
11
|
+
return (_jsx(CommandList, { "data-slot": "prompt-input-command-list", className: cn("max-h-56", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function PromptInputCommandEmpty(props) {
|
|
14
|
+
return _jsx(CommandEmpty, { "data-slot": "prompt-input-command-empty", ...props });
|
|
15
|
+
}
|
|
16
|
+
function PromptInputCommandGroup(props) {
|
|
17
|
+
return _jsx(CommandGroup, { "data-slot": "prompt-input-command-group", ...props });
|
|
18
|
+
}
|
|
19
|
+
function PromptInputCommandItem({ className, ...props }) {
|
|
20
|
+
return (_jsx(CommandItem, { "data-slot": "prompt-input-command-item", className: cn("gap-2", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
function PromptInputCommandSeparator(props) {
|
|
23
|
+
return _jsx(CommandSeparator, { "data-slot": "prompt-input-command-separator", ...props });
|
|
24
|
+
}
|
|
25
|
+
export { PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from "@ciridae/ui/hover-card";
|
|
3
|
+
type PromptInputHoverCardProps = React.ComponentProps<typeof HoverCard>;
|
|
4
|
+
type PromptInputHoverCardTriggerProps = React.ComponentProps<typeof HoverCardTrigger>;
|
|
5
|
+
type PromptInputHoverCardContentProps = React.ComponentProps<typeof HoverCardContent>;
|
|
6
|
+
declare function PromptInputHoverCard(props: PromptInputHoverCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function PromptInputHoverCardTrigger(props: PromptInputHoverCardTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function PromptInputHoverCardContent({ align, className, sideOffset, ...props }: PromptInputHoverCardContentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger };
|
|
10
|
+
export type { PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTriggerProps, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from "@ciridae/ui/hover-card";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function PromptInputHoverCard(props) {
|
|
5
|
+
return _jsx(HoverCard, { ...props });
|
|
6
|
+
}
|
|
7
|
+
function PromptInputHoverCardTrigger(props) {
|
|
8
|
+
return _jsx(HoverCardTrigger, { "data-slot": "prompt-input-hover-card-trigger", ...props });
|
|
9
|
+
}
|
|
10
|
+
function PromptInputHoverCardContent({ align = "start", className, sideOffset = 6, ...props }) {
|
|
11
|
+
return (_jsx(HoverCardContent, { "data-slot": "prompt-input-hover-card-content", align: align, sideOffset: sideOffset, className: cn("w-72 p-3", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
export { PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@ciridae/ui/select";
|
|
3
|
+
type PromptInputSelectProps = React.ComponentProps<typeof Select>;
|
|
4
|
+
type PromptInputSelectTriggerProps = React.ComponentProps<typeof SelectTrigger>;
|
|
5
|
+
type PromptInputSelectContentProps = React.ComponentProps<typeof SelectContent>;
|
|
6
|
+
type PromptInputSelectItemProps = React.ComponentProps<typeof SelectItem>;
|
|
7
|
+
type PromptInputSelectValueProps = React.ComponentProps<typeof SelectValue>;
|
|
8
|
+
declare function PromptInputSelect(props: PromptInputSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function PromptInputSelectTrigger({ className, size, ...props }: PromptInputSelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function PromptInputSelectContent({ align, className, ...props }: PromptInputSelectContentProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function PromptInputSelectItem({ className, ...props }: PromptInputSelectItemProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function PromptInputSelectValue(props: PromptInputSelectValueProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { PromptInputSelect, PromptInputSelectContent, PromptInputSelectItem, PromptInputSelectTrigger, PromptInputSelectValue, };
|
|
14
|
+
export type { PromptInputSelectContentProps, PromptInputSelectItemProps, PromptInputSelectProps, PromptInputSelectTriggerProps, PromptInputSelectValueProps, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@ciridae/ui/select";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function PromptInputSelect(props) {
|
|
5
|
+
return _jsx(Select, { ...props });
|
|
6
|
+
}
|
|
7
|
+
function PromptInputSelectTrigger({ className, size = "sm", ...props }) {
|
|
8
|
+
return (_jsx(SelectTrigger, { "data-slot": "prompt-input-select-trigger", size: size, className: cn("h-(--control-height-sm) min-w-0 border-transparent bg-transparent px-2 shadow-none hover:bg-accent hover:text-accent-foreground dark:bg-transparent dark:hover:bg-accent/50 [&_[data-slot=select-value]>svg:not([class*='size-'])]:size-3.5", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function PromptInputSelectContent({ align = "start", className, ...props }) {
|
|
11
|
+
return (_jsx(SelectContent, { "data-slot": "prompt-input-select-content", align: align, className: cn("min-w-52", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function PromptInputSelectItem({ className, ...props }) {
|
|
14
|
+
return (_jsx(SelectItem, { "data-slot": "prompt-input-select-item", className: cn("gap-2", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function PromptInputSelectValue(props) {
|
|
17
|
+
return _jsx(SelectValue, { "data-prompt-input-slot": "prompt-input-select-value", ...props });
|
|
18
|
+
}
|
|
19
|
+
export { PromptInputSelect, PromptInputSelectContent, PromptInputSelectItem, PromptInputSelectTrigger, PromptInputSelectValue, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Tabs, TabsContent, TabsTrigger } from "@ciridae/ui/tabs";
|
|
3
|
+
type PromptInputTabsListProps = React.ComponentProps<typeof Tabs>;
|
|
4
|
+
type PromptInputTabProps = React.ComponentProps<typeof TabsTrigger>;
|
|
5
|
+
type PromptInputTabLabelProps = React.ComponentProps<"span">;
|
|
6
|
+
type PromptInputTabBodyProps = React.ComponentProps<typeof TabsContent>;
|
|
7
|
+
type PromptInputTabItemProps = React.ComponentProps<"div">;
|
|
8
|
+
declare function PromptInputTabsList({ children, className, orientation, ...props }: PromptInputTabsListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function PromptInputTab({ className, ...props }: PromptInputTabProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare namespace PromptInputTab {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
declare function PromptInputTabLabel({ className, ...props }: PromptInputTabLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function PromptInputTabBody({ className, ...props }: PromptInputTabBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function PromptInputTabItem({ className, ...props }: PromptInputTabItemProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, };
|
|
17
|
+
export type { PromptInputTabBodyProps, PromptInputTabItemProps, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsListProps, };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@ciridae/ui/tabs";
|
|
4
|
+
import { cn } from "@ciridae/ui/utils";
|
|
5
|
+
function PromptInputTabsList({ children, className, orientation = "horizontal", ...props }) {
|
|
6
|
+
const childrenArray = React.Children.toArray(children);
|
|
7
|
+
const tabs = childrenArray.filter(isPromptInputTabElement);
|
|
8
|
+
const bodies = childrenArray.filter((child) => !isPromptInputTabElement(child));
|
|
9
|
+
return (_jsxs(Tabs, { "data-slot": "prompt-input-tabs-list", orientation: orientation, className: cn("gap-2 rounded-md border bg-background p-1", "data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row", className), ...props, children: [_jsx(TabsList, { variant: "default", className: "h-auto min-w-0 justify-start gap-1 bg-transparent p-0", children: tabs }), bodies] }));
|
|
10
|
+
}
|
|
11
|
+
function PromptInputTab({ className, ...props }) {
|
|
12
|
+
return (_jsx(TabsTrigger, { "data-slot": "prompt-input-tab", className: cn("h-(--control-height-sm) flex-none gap-1.5 rounded-sm px-2 text-xs", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function PromptInputTabLabel({ className, ...props }) {
|
|
15
|
+
return (_jsx("span", { "data-slot": "prompt-input-tab-label", className: cn("min-w-0 truncate", className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function PromptInputTabBody({ className, ...props }) {
|
|
18
|
+
return (_jsx(TabsContent, { "data-slot": "prompt-input-tab-body", className: cn("mt-0 rounded-sm p-2 text-sm", className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function PromptInputTabItem({ className, ...props }) {
|
|
21
|
+
return (_jsx("div", { "data-slot": "prompt-input-tab-item", className: cn("flex min-w-0 items-start gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground", "[&_svg]:mt-0.5 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground", className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
function isPromptInputTabElement(child) {
|
|
24
|
+
if (!React.isValidElement(child))
|
|
25
|
+
return false;
|
|
26
|
+
return getPromptInputTabTypeName(child.type) === "PromptInputTab";
|
|
27
|
+
}
|
|
28
|
+
function getPromptInputTabTypeName(type) {
|
|
29
|
+
if (typeof type === "function") {
|
|
30
|
+
if ("displayName" in type && typeof type.displayName === "string")
|
|
31
|
+
return type.displayName;
|
|
32
|
+
return type.name;
|
|
33
|
+
}
|
|
34
|
+
if (typeof type !== "object" || type === null)
|
|
35
|
+
return undefined;
|
|
36
|
+
if ("displayName" in type && typeof type.displayName === "string")
|
|
37
|
+
return type.displayName;
|
|
38
|
+
if ("type" in type)
|
|
39
|
+
return getPromptInputTabTypeName(type.type);
|
|
40
|
+
if ("render" in type)
|
|
41
|
+
return getPromptInputTabTypeName(type.render);
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
PromptInputTab.displayName = "PromptInputTab";
|
|
45
|
+
export { PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, };
|