@nadicodeai/ui 0.4.1 → 0.5.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/AGENTS.md +1 -1
- package/README.md +2 -2
- package/dist/components/accordion.d.ts +4 -15
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +5 -31
- package/dist/components/agent-message.js +1 -1
- package/dist/components/agent-tool-approval.d.ts.map +1 -1
- package/dist/components/agent-tool-approval.js +9 -6
- package/dist/components/ai-elements/artifact.js +1 -1
- package/dist/components/ai-elements/attachments.d.ts +1 -1
- package/dist/components/ai-elements/attachments.d.ts.map +1 -1
- package/dist/components/ai-elements/attachments.js +2 -2
- package/dist/components/ai-elements/audio-player.d.ts.map +1 -1
- package/dist/components/ai-elements/audio-player.js +8 -8
- package/dist/components/ai-elements/chain-of-thought.js +1 -1
- package/dist/components/ai-elements/checkpoint.d.ts +1 -1
- package/dist/components/ai-elements/checkpoint.d.ts.map +1 -1
- package/dist/components/ai-elements/checkpoint.js +1 -1
- package/dist/components/ai-elements/commit.d.ts.map +1 -1
- package/dist/components/ai-elements/commit.js +1 -1
- package/dist/components/ai-elements/context.d.ts +4 -4
- package/dist/components/ai-elements/context.d.ts.map +1 -1
- package/dist/components/ai-elements/context.js +4 -3
- package/dist/components/ai-elements/file-tree.d.ts.map +1 -1
- package/dist/components/ai-elements/file-tree.js +1 -1
- package/dist/components/ai-elements/inline-citation.d.ts.map +1 -1
- package/dist/components/ai-elements/inline-citation.js +2 -2
- package/dist/components/ai-elements/message.js +1 -1
- package/dist/components/ai-elements/mic-selector.d.ts.map +1 -1
- package/dist/components/ai-elements/mic-selector.js +1 -1
- package/dist/components/ai-elements/model-selector.d.ts +1 -1
- package/dist/components/ai-elements/model-selector.d.ts.map +1 -1
- package/dist/components/ai-elements/model-selector.js +1 -1
- package/dist/components/ai-elements/open-in-chat.d.ts.map +1 -1
- package/dist/components/ai-elements/open-in-chat.js +8 -5
- package/dist/components/ai-elements/plan.d.ts.map +1 -1
- package/dist/components/ai-elements/plan.js +3 -3
- package/dist/components/ai-elements/prompt-input.d.ts +2 -2
- package/dist/components/ai-elements/prompt-input.d.ts.map +1 -1
- package/dist/components/ai-elements/prompt-input.js +12 -12
- package/dist/components/ai-elements/queue.d.ts.map +1 -1
- package/dist/components/ai-elements/queue.js +2 -2
- package/dist/components/ai-elements/reasoning.js +1 -1
- package/dist/components/ai-elements/sandbox.js +3 -3
- package/dist/components/ai-elements/schema-display.js +4 -4
- package/dist/components/ai-elements/sources.js +1 -1
- package/dist/components/ai-elements/stack-trace.d.ts.map +1 -1
- package/dist/components/ai-elements/stack-trace.js +2 -2
- package/dist/components/ai-elements/task.d.ts.map +1 -1
- package/dist/components/ai-elements/task.js +3 -3
- package/dist/components/ai-elements/test-results.js +1 -1
- package/dist/components/ai-elements/tool.js +2 -2
- package/dist/components/ai-elements/voice-selector.d.ts +1 -1
- package/dist/components/ai-elements/voice-selector.d.ts.map +1 -1
- package/dist/components/ai-elements/voice-selector.js +1 -1
- package/dist/components/ai-elements/web-preview.d.ts.map +1 -1
- package/dist/components/ai-elements/web-preview.js +2 -2
- package/dist/components/alert-dialog.d.ts +1 -2
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +2 -3
- package/dist/components/alert.d.ts +2 -1
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/alert.js +8 -5
- package/dist/components/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio.js +0 -1
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +0 -1
- package/dist/components/badge.d.ts +2 -4
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +21 -13
- package/dist/components/breadcrumb.d.ts +3 -4
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +20 -12
- package/dist/components/button-group.d.ts +2 -3
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +17 -9
- package/dist/components/button.d.ts +1 -5
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +2 -8
- package/dist/components/calendar.d.ts +5 -3
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +17 -17
- package/dist/components/card.d.ts +3 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +6 -6
- package/dist/components/carousel.d.ts +10 -1
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +10 -10
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +2 -3
- package/dist/components/collapsible.d.ts +3 -7
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +5 -16
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +10 -11
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/context-menu.d.ts +4 -9
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +6 -16
- package/dist/components/dialog.d.ts +2 -3
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +2 -4
- package/dist/components/direction.d.ts +1 -8
- package/dist/components/direction.d.ts.map +1 -1
- package/dist/components/direction.js +1 -7
- package/dist/components/drawer.d.ts +4 -13
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +5 -22
- package/dist/components/dropdown-menu.d.ts +4 -9
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +6 -17
- package/dist/components/empty.d.ts.map +1 -1
- package/dist/components/empty.js +5 -5
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +11 -19
- package/dist/components/form.d.ts +2 -2
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +17 -5
- package/dist/components/hover-card.d.ts +3 -8
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +4 -9
- package/dist/components/input-group.d.ts +3 -1
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +10 -16
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +5 -5
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +2 -1
- package/dist/components/item.d.ts +3 -4
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +29 -18
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/menubar.d.ts.map +1 -1
- package/dist/components/menubar.js +4 -1
- package/dist/components/native-select.d.ts +3 -2
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.d.ts +2 -9
- package/dist/components/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu.js +4 -8
- package/dist/components/pagination.d.ts +8 -4
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +10 -13
- package/dist/components/popover.d.ts +3 -7
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +5 -30
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +0 -1
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +2 -2
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +0 -1
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +0 -1
- package/dist/components/sheet.d.ts +2 -3
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +2 -3
- package/dist/components/sidebar.d.ts +9 -15
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +85 -41
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +3 -8
- package/dist/components/sonner.d.ts +1 -1
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +15 -9
- package/dist/components/spinner.d.ts.map +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +0 -1
- package/dist/components/table.js +2 -2
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +0 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/theme-mode-switcher.js +4 -3
- package/dist/components/toggle-group.d.ts +3 -9
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +5 -22
- package/dist/components/toggle.d.ts +1 -2
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +2 -3
- package/dist/components/tooltip.d.ts +2 -5
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +4 -6
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +0 -1
- package/docs/migration/base-ui-migration.md +33 -9
- package/package.json +3 -2
- package/dist/lib/base-render.d.ts +0 -14
- package/dist/lib/base-render.d.ts.map +0 -1
- package/dist/lib/base-render.js +0 -16
- package/dist/lib/slot.d.ts +0 -8
- package/dist/lib/slot.d.ts.map +0 -1
- package/dist/lib/slot.js +0 -17
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Button } from "../button.js";
|
|
4
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../dropdown-menu.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../dropdown-menu.js";
|
|
5
5
|
import { cn } from "../../lib/utils.js";
|
|
6
6
|
import { ChevronDownIcon, ExternalLinkIcon, MessageCircleIcon, } from "lucide-react";
|
|
7
|
-
import { createContext, useContext, useMemo } from "react";
|
|
7
|
+
import { createContext, isValidElement, useContext, useMemo } from "react";
|
|
8
8
|
const providers = {
|
|
9
9
|
chatgpt: {
|
|
10
10
|
createUrl: (prompt) => `https://chatgpt.com/?${new URLSearchParams({
|
|
@@ -64,12 +64,15 @@ export const OpenIn = ({ query, ...props }) => {
|
|
|
64
64
|
};
|
|
65
65
|
export const OpenInContent = ({ className, ...props }) => (_jsx(DropdownMenuContent, { align: "start", className: cn("w-[240px]", className), ...props }));
|
|
66
66
|
export const OpenInItem = (props) => (_jsx(DropdownMenuItem, { ...props }));
|
|
67
|
-
export const OpenInLabel = (props) => (_jsx(DropdownMenuLabel, { ...props }));
|
|
67
|
+
export const OpenInLabel = (props) => (_jsx(DropdownMenuGroup, { children: _jsx(DropdownMenuLabel, { ...props }) }));
|
|
68
68
|
export const OpenInSeparator = (props) => (_jsx(DropdownMenuSeparator, { ...props }));
|
|
69
|
-
export const OpenInTrigger = ({ children, ...props }) =>
|
|
69
|
+
export const OpenInTrigger = ({ children, ...props }) => {
|
|
70
|
+
const trigger = isValidElement(children) ? (children) : (_jsxs(Button, { type: "button", variant: "outline", children: ["Open in chat", _jsx(ChevronDownIcon, { className: "size-4" })] }));
|
|
71
|
+
return _jsx(DropdownMenuTrigger, { render: trigger, ...props });
|
|
72
|
+
};
|
|
70
73
|
const OpenInProviderItem = ({ provider, ...props }) => {
|
|
71
74
|
const { query } = useOpenInContext();
|
|
72
|
-
return (_jsx(DropdownMenuItem, {
|
|
75
|
+
return (_jsx(DropdownMenuItem, { render: _jsxs("a", { className: "flex items-center gap-2", href: providers[provider].createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers[provider].icon }), _jsx("span", { className: "flex-1", children: providers[provider].title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }), ...props }));
|
|
73
76
|
};
|
|
74
77
|
export const OpenInChatGPT = (props) => (_jsx(OpenInProviderItem, { provider: "chatgpt", ...props }));
|
|
75
78
|
export const OpenInClaude = (props) => (_jsx(OpenInProviderItem, { provider: "claude", ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/plan.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAEL,UAAU,EACV,WAAW,EACX,eAAe,EAEf,UAAU,EACV,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAmB5C,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,GAAG;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,gDAKlB,SAAS,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/plan.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAEL,UAAU,EACV,WAAW,EACX,eAAe,EAEf,UAAU,EACV,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAmB5C,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,GAAG;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,gDAKlB,SAAS,gCAYX,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEhE,eAAO,MAAM,UAAU,GAAI,yBAAyB,eAAe,gCAMlE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,cAAc,CAAC,OAAO,SAAS,CAAC,EAChC,UAAU,CACX,GAAG;IACF,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,wBAAwB,cAAc,gCAQ/D,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,cAAc,CAAC,OAAO,eAAe,CAAC,EACtC,UAAU,CACX,GAAG;IACF,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,mCAI7B,oBAAoB,gCAYtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEhE,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,gCAEhD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,gCAIlD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,gCAEhD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,CAAC,OAAO,MAAM,CAAC,EAC7B,UAAU,GAAG,MAAM,GAAG,SAAS,CAChC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,yBAAyB,gBAAgB,gCAepE,CAAC"}
|
|
@@ -17,7 +17,7 @@ const usePlan = () => {
|
|
|
17
17
|
};
|
|
18
18
|
export const Plan = ({ className, isStreaming = false, children, ...props }) => {
|
|
19
19
|
const contextValue = useMemo(() => ({ isStreaming }), [isStreaming]);
|
|
20
|
-
return (_jsx(PlanContext.Provider, { value: contextValue, children: _jsx(Collapsible, {
|
|
20
|
+
return (_jsx(PlanContext.Provider, { value: contextValue, children: _jsx(Collapsible, { "data-slot": "plan", render: _jsx(Card, { className: cn("shadow-none", className), children: children }), ...props }) }));
|
|
21
21
|
};
|
|
22
22
|
export const PlanHeader = ({ className, ...props }) => (_jsx(CardHeader, { className: cn("flex items-start justify-between", className), "data-slot": "plan-header", ...props }));
|
|
23
23
|
export const PlanTitle = ({ children, ...props }) => {
|
|
@@ -29,6 +29,6 @@ export const PlanDescription = ({ className, children, ...props }) => {
|
|
|
29
29
|
return (_jsx(CardDescription, { className: cn("text-balance", className), "data-slot": "plan-description", ...props, children: isStreaming ? _jsx(Shimmer, { children: children }) : children }));
|
|
30
30
|
};
|
|
31
31
|
export const PlanAction = (props) => (_jsx(CardAction, { "data-slot": "plan-action", ...props }));
|
|
32
|
-
export const PlanContent = (props) => (_jsx(CollapsibleContent, {
|
|
32
|
+
export const PlanContent = (props) => (_jsx(CollapsibleContent, { render: _jsx(CardContent, { "data-slot": "plan-content", ...props }) }));
|
|
33
33
|
export const PlanFooter = (props) => (_jsx(CardFooter, { "data-slot": "plan-footer", ...props }));
|
|
34
|
-
export const PlanTrigger = ({ className, ...props }) => (_jsx(CollapsibleTrigger, {
|
|
34
|
+
export const PlanTrigger = ({ className, ...props }) => (_jsx(CollapsibleTrigger, { render: _jsxs(Button, { className: cn("size-8", className), "data-slot": "plan-trigger", size: "icon", variant: "ghost", ...props, children: [_jsx(ChevronsUpDownIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Toggle plan" })] }) }));
|
|
@@ -55,7 +55,7 @@ export declare const PromptInputActionAddAttachments: ({ label, ...props }: Prom
|
|
|
55
55
|
export type PromptInputActionAddScreenshotProps = ComponentProps<typeof DropdownMenuItem> & {
|
|
56
56
|
label?: string;
|
|
57
57
|
};
|
|
58
|
-
export declare const PromptInputActionAddScreenshot: ({ label,
|
|
58
|
+
export declare const PromptInputActionAddScreenshot: ({ label, onClick, ...props }: PromptInputActionAddScreenshotProps) => import("react").JSX.Element;
|
|
59
59
|
export interface PromptInputMessage {
|
|
60
60
|
text: string;
|
|
61
61
|
files: FileUIPart[];
|
|
@@ -117,7 +117,7 @@ export declare const PromptInputSelectItem: ({ className, ...props }: PromptInpu
|
|
|
117
117
|
export type PromptInputSelectValueProps = ComponentProps<typeof SelectValue>;
|
|
118
118
|
export declare const PromptInputSelectValue: ({ className, ...props }: PromptInputSelectValueProps) => import("react").JSX.Element;
|
|
119
119
|
export type PromptInputHoverCardProps = ComponentProps<typeof HoverCard>;
|
|
120
|
-
export declare const PromptInputHoverCard: ({
|
|
120
|
+
export declare const PromptInputHoverCard: ({ ...props }: PromptInputHoverCardProps) => import("react").JSX.Element;
|
|
121
121
|
export type PromptInputHoverCardTriggerProps = ComponentProps<typeof HoverCardTrigger>;
|
|
122
122
|
export declare const PromptInputHoverCardTrigger: (props: PromptInputHoverCardTriggerProps) => import("react").JSX.Element;
|
|
123
123
|
export type PromptInputHoverCardContentProps = ComponentProps<typeof HoverCardContent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-input.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/prompt-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAUvE,OAAO,KAAK,EAIV,cAAc,EACd,SAAS,EAET,cAAc,EAEd,iBAAiB,EACjB,SAAS,EACT,SAAS,EACV,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-input.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/prompt-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAUvE,OAAO,KAAK,EAIV,cAAc,EACd,SAAS,EAET,cAAc,EAEd,iBAAiB,EACjB,SAAS,EACT,SAAS,EACV,MAAM,OAAO,CAAC;AA4Hf,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,CAAC,UAAU,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IACvC,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAA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GpC,2BAA2B,gCAE7B,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AAE/E,eAAO,MAAM,uBAAuB,GAAI,yBAGrC,4BAA4B,gCAE9B,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AAE/E,eAAO,MAAM,uBAAuB,GAAI,yBAGrC,4BAA4B,gCAE9B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE7E,eAAO,MAAM,sBAAsB,GAAI,yBAGpC,2BAA2B,gCAE7B,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAC3D,OAAO,gBAAgB,CACxB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,yBAGzC,gCAAgC,gCAElC,CAAC"}
|
|
@@ -228,16 +228,16 @@ export const usePromptInputReferencedSources = () => {
|
|
|
228
228
|
};
|
|
229
229
|
export const PromptInputActionAddAttachments = ({ label = "Add photos or files", ...props }) => {
|
|
230
230
|
const attachments = usePromptInputAttachments();
|
|
231
|
-
const
|
|
232
|
-
|
|
231
|
+
const handleClick = useCallback((event) => {
|
|
232
|
+
event.preventDefault();
|
|
233
233
|
attachments.openFileDialog();
|
|
234
234
|
}, [attachments]);
|
|
235
|
-
return (_jsxs(DropdownMenuItem, { ...props,
|
|
235
|
+
return (_jsxs(DropdownMenuItem, { ...props, closeOnClick: false, onClick: handleClick, children: [_jsx(ImageIcon, { className: "mr-2 size-4" }), " ", label] }));
|
|
236
236
|
};
|
|
237
|
-
export const PromptInputActionAddScreenshot = ({ label = "Take screenshot",
|
|
237
|
+
export const PromptInputActionAddScreenshot = ({ label = "Take screenshot", onClick, ...props }) => {
|
|
238
238
|
const attachments = usePromptInputAttachments();
|
|
239
|
-
const
|
|
240
|
-
|
|
239
|
+
const handleClick = useCallback(async (event) => {
|
|
240
|
+
onClick?.(event);
|
|
241
241
|
if (event.defaultPrevented) {
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
@@ -254,8 +254,8 @@ export const PromptInputActionAddScreenshot = ({ label = "Take screenshot", onSe
|
|
|
254
254
|
}
|
|
255
255
|
throw error;
|
|
256
256
|
}
|
|
257
|
-
}, [
|
|
258
|
-
return (_jsxs(DropdownMenuItem, { ...props,
|
|
257
|
+
}, [onClick, attachments]);
|
|
258
|
+
return (_jsxs(DropdownMenuItem, { ...props, onClick: handleClick, children: [_jsx(Monitor, { className: "mr-2 size-4" }), label] }));
|
|
259
259
|
};
|
|
260
260
|
export const PromptInput = ({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, children, ...props }) => {
|
|
261
261
|
// Try to use a provider controller if present
|
|
@@ -662,10 +662,10 @@ export const PromptInputButton = ({ variant = "ghost", className, size, tooltip,
|
|
|
662
662
|
const tooltipContent = typeof tooltip === "string" ? tooltip : tooltip.content;
|
|
663
663
|
const shortcut = typeof tooltip === "string" ? undefined : tooltip.shortcut;
|
|
664
664
|
const side = typeof tooltip === "string" ? "top" : (tooltip.side ?? "top");
|
|
665
|
-
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, {
|
|
665
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: button }), _jsxs(TooltipContent, { side: side, children: [tooltipContent, shortcut && (_jsx("span", { className: "ml-2 text-muted-foreground", children: shortcut }))] })] }));
|
|
666
666
|
};
|
|
667
667
|
export const PromptInputActionMenu = (props) => (_jsx(DropdownMenu, { ...props }));
|
|
668
|
-
export const PromptInputActionMenuTrigger = ({ className, children, ...props }) => (_jsx(DropdownMenuTrigger, {
|
|
668
|
+
export const PromptInputActionMenuTrigger = ({ className, children, ...props }) => (_jsx(DropdownMenuTrigger, { render: _jsx(PromptInputButton, { className: className, ...props, children: children ?? _jsx(PlusIcon, { className: "size-4" }) }) }));
|
|
669
669
|
export const PromptInputActionMenuContent = ({ className, ...props }) => (_jsx(DropdownMenuContent, { align: "start", className: cn(className), ...props }));
|
|
670
670
|
export const PromptInputActionMenuItem = ({ className, ...props }) => (_jsx(DropdownMenuItem, { className: cn(className), ...props }));
|
|
671
671
|
export const PromptInputSubmit = ({ className, variant = "default", size = "icon-sm", status, onStop, onClick, children, ...props }) => {
|
|
@@ -695,8 +695,8 @@ export const PromptInputSelectTrigger = ({ className, ...props }) => (_jsx(Selec
|
|
|
695
695
|
export const PromptInputSelectContent = ({ className, ...props }) => (_jsx(SelectContent, { className: cn(className), ...props }));
|
|
696
696
|
export const PromptInputSelectItem = ({ className, ...props }) => (_jsx(SelectItem, { className: cn(className), ...props }));
|
|
697
697
|
export const PromptInputSelectValue = ({ className, ...props }) => (_jsx(SelectValue, { className: cn(className), ...props }));
|
|
698
|
-
export const PromptInputHoverCard = ({
|
|
699
|
-
export const PromptInputHoverCardTrigger = (props) => _jsx(HoverCardTrigger, { ...props });
|
|
698
|
+
export const PromptInputHoverCard = ({ ...props }) => (_jsx(HoverCard, { ...props }));
|
|
699
|
+
export const PromptInputHoverCardTrigger = (props) => _jsx(HoverCardTrigger, { closeDelay: 0, delay: 0, ...props });
|
|
700
700
|
export const PromptInputHoverCardContent = ({ align = "start", ...props }) => (_jsx(HoverCardContent, { align: align, ...props }));
|
|
701
701
|
export const PromptInputTabsList = ({ className, ...props }) => _jsx("div", { className: cn(className), ...props });
|
|
702
702
|
export const PromptInputTab = ({ className, ...props }) => _jsx("div", { className: cn(className), ...props });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/queue.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc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AQxB,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CACnD,OAAO,kBAAkB,CAC1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,yBAGjC,wBAAwB,gCAE1B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK,GAAI,yBAAyB,UAAU,gCAQxD,CAAC"}
|
|
@@ -22,7 +22,7 @@ export const QueueItemImage = ({ className, ...props }) => (_jsx("img", { alt: "
|
|
|
22
22
|
export const QueueItemFile = ({ children, className, ...props }) => (_jsxs("span", { className: cn("flex items-center gap-1 rounded border bg-muted px-2 py-1 text-xs", className), ...props, children: [_jsx(PaperclipIcon, { size: 12 }), _jsx("span", { className: "max-w-[100px] truncate", children: children })] }));
|
|
23
23
|
export const QueueList = ({ children, className, ...props }) => (_jsx(ScrollArea, { className: cn("mt-2 -mb-1", className), ...props, children: _jsx("div", { className: "max-h-40 pr-4", children: _jsx("ul", { children: children }) }) }));
|
|
24
24
|
export const QueueSection = ({ className, defaultOpen = true, ...props }) => (_jsx(Collapsible, { className: cn(className), defaultOpen: defaultOpen, ...props }));
|
|
25
|
-
export const QueueSectionTrigger = ({ children, className, ...props }) => (_jsx(CollapsibleTrigger, {
|
|
26
|
-
export const QueueSectionLabel = ({ count, label, icon, className, ...props }) => (_jsxs("span", { className: cn("flex items-center gap-2", className), ...props, children: [_jsx(ChevronDownIcon, { className: "size-4 transition-transform group-data-
|
|
25
|
+
export const QueueSectionTrigger = ({ children, className, ...props }) => (_jsx(CollapsibleTrigger, { render: _jsx("button", { className: cn("group flex w-full items-center justify-between rounded-md bg-muted/40 px-3 py-2 text-left font-medium text-muted-foreground text-sm transition-colors hover:bg-muted", className), type: "button", ...props, children: children }) }));
|
|
26
|
+
export const QueueSectionLabel = ({ count, label, icon, className, ...props }) => (_jsxs("span", { className: cn("flex items-center gap-2", className), ...props, children: [_jsx(ChevronDownIcon, { className: "-rotate-90 size-4 transition-transform group-data-panel-open:rotate-0" }), icon, _jsxs("span", { children: [count, " ", label] })] }));
|
|
27
27
|
export const QueueSectionContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn(className), ...props }));
|
|
28
28
|
export const Queue = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col gap-2 rounded-xl border border-border bg-background px-3 pt-2 pb-2 shadow-xs", className), ...props }));
|
|
@@ -89,7 +89,7 @@ export const ReasoningTrigger = memo(({ className, children, getThinkingMessage
|
|
|
89
89
|
return (_jsx(CollapsibleTrigger, { className: cn("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(BrainIcon, { className: "size-4" }), getThinkingMessage(isStreaming, duration), _jsx(ChevronDownIcon, { className: cn("size-4 transition-transform", isOpen ? "rotate-180" : "rotate-0") })] })) }));
|
|
90
90
|
});
|
|
91
91
|
const streamdownPlugins = { cjk, code, math, mermaid };
|
|
92
|
-
export const ReasoningContent = memo(({ className, children, ...props }) => (_jsx(CollapsibleContent, { className: cn("mt-4 text-sm", "data-
|
|
92
|
+
export const ReasoningContent = memo(({ className, children, ...props }) => (_jsx(CollapsibleContent, { className: cn("mt-4 text-sm", "data-closed:fade-out-0 data-closed:slide-out-to-top-2 data-open:slide-in-from-top-2 text-muted-foreground outline-none data-closed:animate-out data-open:animate-in", className), ...props, children: _jsx(Streamdown, { plugins: streamdownPlugins, children: children }) })));
|
|
93
93
|
Reasoning.displayName = "Reasoning";
|
|
94
94
|
ReasoningTrigger.displayName = "ReasoningTrigger";
|
|
95
95
|
ReasoningContent.displayName = "ReasoningContent";
|
|
@@ -6,10 +6,10 @@ import { cn } from "../../lib/utils.js";
|
|
|
6
6
|
import { ChevronDownIcon, Code } from "lucide-react";
|
|
7
7
|
import { getStatusBadge } from "./tool.js";
|
|
8
8
|
export const Sandbox = ({ className, ...props }) => (_jsx(Collapsible, { className: cn("not-prose group mb-4 w-full overflow-hidden rounded-md border", className), defaultOpen: true, ...props }));
|
|
9
|
-
export const SandboxHeader = ({ className, title, state, ...props }) => (_jsxs(CollapsibleTrigger, { className: cn("flex w-full items-center justify-between gap-4 p-3", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Code, { className: "size-4 text-muted-foreground" }), _jsx("span", { className: "font-medium text-sm", children: title }), getStatusBadge(state)] }), _jsx(ChevronDownIcon, { className: "size-4 text-muted-foreground transition-transform group-data-
|
|
10
|
-
export const SandboxContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-
|
|
9
|
+
export const SandboxHeader = ({ className, title, state, ...props }) => (_jsxs(CollapsibleTrigger, { className: cn("flex w-full items-center justify-between gap-4 p-3", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Code, { className: "size-4 text-muted-foreground" }), _jsx("span", { className: "font-medium text-sm", children: title }), getStatusBadge(state)] }), _jsx(ChevronDownIcon, { className: "size-4 text-muted-foreground transition-transform group-data-panel-open:rotate-180" })] }));
|
|
10
|
+
export const SandboxContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-closed:fade-out-0 data-closed:slide-out-to-top-2 data-open:slide-in-from-top-2 outline-none data-closed:animate-out data-open:animate-in", className), ...props }));
|
|
11
11
|
export const SandboxTabs = ({ className, ...props }) => (_jsx(Tabs, { className: cn("w-full gap-0", className), ...props }));
|
|
12
12
|
export const SandboxTabsBar = ({ className, ...props }) => (_jsx("div", { className: cn("flex w-full items-center border-border border-t border-b", className), ...props }));
|
|
13
13
|
export const SandboxTabsList = ({ className, ...props }) => (_jsx(TabsList, { className: cn("h-auto rounded-none border-0 bg-transparent p-0", className), ...props }));
|
|
14
|
-
export const SandboxTabsTrigger = ({ className, ...props }) => (_jsx(TabsTrigger, { className: cn("rounded-none border-0 border-transparent border-b-2 px-4 py-2 font-medium text-muted-foreground text-sm transition-colors data-
|
|
14
|
+
export const SandboxTabsTrigger = ({ className, ...props }) => (_jsx(TabsTrigger, { className: cn("rounded-none border-0 border-transparent border-b-2 px-4 py-2 font-medium text-muted-foreground text-sm transition-colors data-active:border-primary data-active:bg-transparent data-active:text-foreground data-active:shadow-none", className), ...props }));
|
|
15
15
|
export const SandboxTabContent = ({ className, ...props }) => (_jsx(TabsContent, { className: cn("mt-0 text-sm", className), ...props }));
|
|
@@ -54,25 +54,25 @@ export const SchemaDisplayContent = ({ className, children, ...props }) => (_jsx
|
|
|
54
54
|
export const SchemaDisplayParameter = ({ name, type, required, description, location, className, ...props }) => (_jsxs("div", { className: cn("px-4 py-3 pl-10", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-mono text-sm", children: name }), _jsx(Badge, { className: "text-xs", variant: "outline", children: type }), location && (_jsx(Badge, { className: "text-xs", variant: "secondary", children: location })), required && (_jsx(Badge, { className: "bg-destructive/10 text-destructive text-xs", variant: "secondary", children: "required" }))] }), description && (_jsx("p", { className: "mt-1 text-muted-foreground text-sm", children: description }))] }));
|
|
55
55
|
export const SchemaDisplayParameters = ({ className, children, ...props }) => {
|
|
56
56
|
const { parameters } = useContext(SchemaDisplayContext);
|
|
57
|
-
return (_jsxs(Collapsible, { className: cn(className), defaultOpen: true, ...props, children: [_jsxs(CollapsibleTrigger, { className: "group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-
|
|
57
|
+
return (_jsxs(Collapsible, { className: cn(className), defaultOpen: true, ...props, children: [_jsxs(CollapsibleTrigger, { className: "group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90" }), _jsx("span", { className: "font-medium text-sm", children: "Parameters" }), _jsx(Badge, { className: "ml-auto text-xs", variant: "secondary", children: parameters?.length })] }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "divide-y border-t", children: children ??
|
|
58
58
|
parameters?.map((param) => (_jsx(SchemaDisplayParameter, { ...param }, param.name))) }) })] }));
|
|
59
59
|
};
|
|
60
60
|
export const SchemaDisplayProperty = ({ name, type, required, description, properties, items, depth = 0, className, ...props }) => {
|
|
61
61
|
const hasChildren = properties || items;
|
|
62
62
|
const paddingLeft = 40 + depth * 16;
|
|
63
63
|
if (hasChildren) {
|
|
64
|
-
return (_jsxs(Collapsible, { defaultOpen: depth < 2, children: [_jsxs(CollapsibleTrigger, { className: cn("group flex w-full items-center gap-2 py-3 text-left transition-colors hover:bg-muted/50", className), style: { paddingLeft }, children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-
|
|
64
|
+
return (_jsxs(Collapsible, { defaultOpen: depth < 2, children: [_jsxs(CollapsibleTrigger, { className: cn("group flex w-full items-center gap-2 py-3 text-left transition-colors hover:bg-muted/50", className), style: { paddingLeft }, children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90" }), _jsx("span", { className: "font-mono text-sm", children: name }), _jsx(Badge, { className: "text-xs", variant: "outline", children: type }), required && (_jsx(Badge, { className: "bg-destructive/10 text-destructive text-xs", variant: "secondary", children: "required" }))] }), description && (_jsx("p", { className: "pb-2 text-muted-foreground text-sm", style: { paddingLeft: paddingLeft + 24 }, children: description })), _jsx(CollapsibleContent, { children: _jsxs("div", { className: "divide-y border-t", children: [properties?.map((prop) => (_jsx(SchemaDisplayProperty, { ...prop, depth: depth + 1 }, prop.name))), items && (_jsx(SchemaDisplayProperty, { ...items, depth: depth + 1, name: `${name}[]` }))] }) })] }));
|
|
65
65
|
}
|
|
66
66
|
return (_jsxs("div", { className: cn("py-3 pr-4", className), style: { paddingLeft }, ...props, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "size-4" }), _jsx("span", { className: "font-mono text-sm", children: name }), _jsx(Badge, { className: "text-xs", variant: "outline", children: type }), required && (_jsx(Badge, { className: "bg-destructive/10 text-destructive text-xs", variant: "secondary", children: "required" }))] }), description && (_jsx("p", { className: "mt-1 pl-6 text-muted-foreground text-sm", children: description }))] }));
|
|
67
67
|
};
|
|
68
68
|
export const SchemaDisplayRequest = ({ className, children, ...props }) => {
|
|
69
69
|
const { requestBody } = useContext(SchemaDisplayContext);
|
|
70
|
-
return (_jsxs(Collapsible, { className: cn(className), defaultOpen: true, ...props, children: [_jsxs(CollapsibleTrigger, { className: "group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-
|
|
70
|
+
return (_jsxs(Collapsible, { className: cn(className), defaultOpen: true, ...props, children: [_jsxs(CollapsibleTrigger, { className: "group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90" }), _jsx("span", { className: "font-medium text-sm", children: "Request Body" })] }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "border-t", children: children ??
|
|
71
71
|
requestBody?.map((prop) => (_jsx(SchemaDisplayProperty, { ...prop, depth: 0 }, prop.name))) }) })] }));
|
|
72
72
|
};
|
|
73
73
|
export const SchemaDisplayResponse = ({ className, children, ...props }) => {
|
|
74
74
|
const { responseBody } = useContext(SchemaDisplayContext);
|
|
75
|
-
return (_jsxs(Collapsible, { className: cn(className), defaultOpen: true, ...props, children: [_jsxs(CollapsibleTrigger, { className: "group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-
|
|
75
|
+
return (_jsxs(Collapsible, { className: cn(className), defaultOpen: true, ...props, children: [_jsxs(CollapsibleTrigger, { className: "group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90" }), _jsx("span", { className: "font-medium text-sm", children: "Response" })] }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "border-t", children: children ??
|
|
76
76
|
responseBody?.map((prop) => (_jsx(SchemaDisplayProperty, { ...prop, depth: 0 }, prop.name))) }) })] }));
|
|
77
77
|
};
|
|
78
78
|
export const SchemaDisplay = ({ method, path, description, parameters, requestBody, responseBody, className, children, ...props }) => {
|
|
@@ -5,5 +5,5 @@ import { cn } from "../../lib/utils.js";
|
|
|
5
5
|
import { BookIcon, ChevronDownIcon } from "lucide-react";
|
|
6
6
|
export const Sources = ({ className, ...props }) => (_jsx(Collapsible, { className: cn("not-prose mb-4 text-primary text-xs", className), ...props }));
|
|
7
7
|
export const SourcesTrigger = ({ className, count, children, ...props }) => (_jsx(CollapsibleTrigger, { className: cn("flex items-center gap-2", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsxs("p", { className: "font-medium", children: ["Used ", count, " sources"] }), _jsx(ChevronDownIcon, { className: "h-4 w-4" })] })) }));
|
|
8
|
-
export const SourcesContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn("mt-3 flex w-fit flex-col gap-2", "data-
|
|
8
|
+
export const SourcesContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn("mt-3 flex w-fit flex-col gap-2", "data-closed:fade-out-0 data-closed:slide-out-to-top-2 data-open:slide-in-from-top-2 outline-none data-closed:animate-out data-open:animate-in", className), ...props }));
|
|
9
9
|
export const Source = ({ href, title, children, ...props }) => (_jsx("a", { className: "flex items-center gap-2", href: href, rel: "noreferrer", target: "_blank", ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(BookIcon, { className: "h-4 w-4" }), _jsx("span", { className: "block font-medium", children: title })] })) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-trace.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/stack-trace.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,cAAc,CACjD,OAAO,kBAAkB,CAC1B,GAAG;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qFAMzB,sBAAsB,iCAmB1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC1D,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA2CF,eAAO,MAAM,gBAAgB,oFAKxB,qBAAqB,iCA8CzB,CAAC"}
|
|
@@ -113,7 +113,7 @@ export const StackTrace = memo(({ trace, className, open, defaultOpen = false, o
|
|
|
113
113
|
});
|
|
114
114
|
export const StackTraceHeader = memo(({ className, children, ...props }) => {
|
|
115
115
|
const { isOpen, setIsOpen } = useStackTrace();
|
|
116
|
-
return (_jsx(Collapsible, { onOpenChange: setIsOpen, open: isOpen, children: _jsx(CollapsibleTrigger, {
|
|
116
|
+
return (_jsx(Collapsible, { onOpenChange: setIsOpen, open: isOpen, children: _jsx(CollapsibleTrigger, { nativeButton: false, render: _jsx("div", { className: cn("flex w-full cursor-pointer items-center gap-3 p-3 text-left transition-colors hover:bg-muted/50", className), children: children }), ...props }) }));
|
|
117
117
|
});
|
|
118
118
|
export const StackTraceError = memo(({ className, children, ...props }) => (_jsxs("div", { className: cn("flex flex-1 items-center gap-2 overflow-hidden", className), ...props, children: [_jsx(AlertTriangleIcon, { className: "size-4 shrink-0 text-destructive" }), children] })));
|
|
119
119
|
export const StackTraceErrorType = memo(({ className, children, ...props }) => {
|
|
@@ -162,7 +162,7 @@ export const StackTraceExpandButton = memo(({ className, ...props }) => {
|
|
|
162
162
|
});
|
|
163
163
|
export const StackTraceContent = memo(({ className, maxHeight = 400, children, ...props }) => {
|
|
164
164
|
const { isOpen } = useStackTrace();
|
|
165
|
-
return (_jsx(Collapsible, { open: isOpen, children: _jsx(CollapsibleContent, { className: cn("overflow-auto border-t bg-muted/30", "data-
|
|
165
|
+
return (_jsx(Collapsible, { open: isOpen, children: _jsx(CollapsibleContent, { className: cn("overflow-auto border-t bg-muted/30", "data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in", className), style: { maxHeight }, ...props, children: children }) }));
|
|
166
166
|
});
|
|
167
167
|
const FilePathButton = memo(({ frame, onFilePathClick }) => {
|
|
168
168
|
const handleClick = useCallback(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/task.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY,GAAI,mCAI1B,iBAAiB,gCAUnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAElD,eAAO,MAAM,QAAQ,GAAI,mCAAmC,aAAa,gCAIxE,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,IAAI,GAAI,sCAIlB,SAAS,gCAEX,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACzE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,0CAKzB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/task.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY,GAAI,mCAI1B,iBAAiB,gCAUnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAElD,eAAO,MAAM,QAAQ,GAAI,mCAAmC,aAAa,gCAIxE,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,IAAI,GAAI,sCAIlB,SAAS,gCAEX,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACzE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,0CAKzB,gBAAgB,gCAiBlB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzE,eAAO,MAAM,WAAW,GAAI,mCAIzB,gBAAgB,gCAYlB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "../collapsible.js";
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { ChevronDownIcon, SearchIcon } from "lucide-react";
|
|
6
6
|
export const TaskItemFile = ({ children, className, ...props }) => (_jsx("div", { className: cn("inline-flex items-center gap-1 rounded-md border bg-secondary px-1.5 py-0.5 text-foreground text-xs", className), ...props, children: children }));
|
|
7
7
|
export const TaskItem = ({ children, className, ...props }) => (_jsx("div", { className: cn("text-muted-foreground text-sm", className), ...props, children: children }));
|
|
8
8
|
export const Task = ({ defaultOpen = true, className, ...props }) => (_jsx(Collapsible, { className: cn(className), defaultOpen: defaultOpen, ...props }));
|
|
9
|
-
export const TaskTrigger = ({ children, className, title, ...props }) => (_jsx(CollapsibleTrigger, {
|
|
10
|
-
export const TaskContent = ({ children, className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-
|
|
9
|
+
export const TaskTrigger = ({ children, className, title, ...props }) => (_jsx(CollapsibleTrigger, { className: cn("group", className), nativeButton: false, render: _jsx("div", { className: "flex w-full cursor-pointer items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground", children: children ?? (_jsxs(_Fragment, { children: [_jsx(SearchIcon, { className: "size-4" }), _jsx("p", { className: "text-sm", children: title }), _jsx(ChevronDownIcon, { className: "size-4 transition-transform group-data-panel-open:rotate-180" })] })) }), ...props }));
|
|
10
|
+
export const TaskContent = ({ children, className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-closed:fade-out-0 data-closed:slide-out-to-top-2 data-open:slide-in-from-top-2 text-popover-foreground outline-none data-closed:animate-out data-open:animate-in", className), ...props, children: _jsx("div", { className: "mt-4 flex flex-col gap-2 border-l-2 border-muted pl-4", children: children }) }));
|
|
@@ -66,7 +66,7 @@ export const TestSuite = ({ name, status, className, children, ...props }) => {
|
|
|
66
66
|
};
|
|
67
67
|
export const TestSuiteName = ({ className, children, ...props }) => {
|
|
68
68
|
const { name, status } = useContext(TestSuiteContext);
|
|
69
|
-
return (_jsxs(CollapsibleTrigger, { className: cn("group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", className), ...props, children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-
|
|
69
|
+
return (_jsxs(CollapsibleTrigger, { className: cn("group flex w-full items-center gap-2 px-4 py-3 text-left transition-colors hover:bg-muted/50", className), ...props, children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90" }), _jsx(TestStatusIcon, { status: status }), _jsx("span", { className: "font-medium text-sm", children: children ?? name })] }));
|
|
70
70
|
};
|
|
71
71
|
export const TestSuiteStats = ({ passed = 0, failed = 0, skipped = 0, className, children, ...props }) => (_jsx("div", { className: cn("ml-auto flex items-center gap-2 text-xs", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [passed > 0 && (_jsxs("span", { className: "text-[var(--nc-success)]", children: [passed, " passed"] })), failed > 0 && (_jsxs("span", { className: "text-destructive", children: [failed, " failed"] })), skipped > 0 && (_jsxs("span", { className: "text-[var(--nc-warning-deep)]", children: [skipped, " skipped"] }))] })) }));
|
|
72
72
|
export const TestSuiteContent = ({ className, children, ...props }) => (_jsx(CollapsibleContent, { className: cn("border-t", className), ...props, children: _jsx("div", { className: "divide-y", children: children }) }));
|
|
@@ -28,9 +28,9 @@ const statusIcons = {
|
|
|
28
28
|
export const getStatusBadge = (status) => (_jsxs(Badge, { className: "gap-1.5 rounded-full text-xs", variant: "secondary", children: [statusIcons[status], statusLabels[status]] }));
|
|
29
29
|
export const ToolHeader = ({ className, title, type, state, toolName, ...props }) => {
|
|
30
30
|
const derivedName = type === "dynamic-tool" ? toolName : type.split("-").slice(1).join("-");
|
|
31
|
-
return (_jsxs(CollapsibleTrigger, { className: cn("flex w-full items-center justify-between gap-4 p-3", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(WrenchIcon, { className: "size-4 text-muted-foreground" }), _jsx("span", { className: "font-medium text-sm", children: title ?? derivedName }), getStatusBadge(state)] }), _jsx(ChevronDownIcon, { className: "size-4 text-muted-foreground transition-transform group-data-
|
|
31
|
+
return (_jsxs(CollapsibleTrigger, { className: cn("flex w-full items-center justify-between gap-4 p-3", className), ...props, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(WrenchIcon, { className: "size-4 text-muted-foreground" }), _jsx("span", { className: "font-medium text-sm", children: title ?? derivedName }), getStatusBadge(state)] }), _jsx(ChevronDownIcon, { className: "size-4 text-muted-foreground transition-transform group-data-panel-open:rotate-180" })] }));
|
|
32
32
|
};
|
|
33
|
-
export const ToolContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-
|
|
33
|
+
export const ToolContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn("data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-top-2 data-open:animate-in data-open:slide-in-from-top-2 flex flex-col gap-4 p-4 text-popover-foreground outline-none", className), ...props }));
|
|
34
34
|
export const ToolInput = ({ className, input, ...props }) => (_jsxs("div", { className: cn("flex flex-col gap-2 overflow-hidden", className), ...props, children: [_jsx("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Parameters" }), _jsx("div", { className: "rounded-md bg-muted/50", children: _jsx(CodeBlock, { code: JSON.stringify(input, null, 2), language: "json" }) })] }));
|
|
35
35
|
export const ToolOutput = ({ className, output, errorText, ...props }) => {
|
|
36
36
|
if (!(output || errorText)) {
|
|
@@ -22,7 +22,7 @@ export type VoiceSelectorContentProps = ComponentProps<typeof DialogContent> & {
|
|
|
22
22
|
};
|
|
23
23
|
export declare const VoiceSelectorContent: ({ className, children, title, ...props }: VoiceSelectorContentProps) => import("react").JSX.Element;
|
|
24
24
|
export type VoiceSelectorDialogProps = ComponentProps<typeof CommandDialog>;
|
|
25
|
-
export declare const VoiceSelectorDialog: (props: VoiceSelectorDialogProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const VoiceSelectorDialog: ({ children, ...props }: VoiceSelectorDialogProps) => import("react").JSX.Element;
|
|
26
26
|
export type VoiceSelectorInputProps = ComponentProps<typeof CommandInput>;
|
|
27
27
|
export declare const VoiceSelectorInput: ({ className, ...props }: VoiceSelectorInputProps) => import("react").JSX.Element;
|
|
28
28
|
export type VoiceSelectorListProps = ComponentProps<typeof CommandList>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice-selector.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/voice-selector.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,YAAY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mCAIrC,4BAA4B,gCAI9B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB,GAAI,yBAGjC,wBAAwB,gCAQ1B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,cAAc,CAAC,QAAQ,CAAC,EACxB,UAAU,CACX,GAAG;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,4DAOlC,yBAAyB,gCAgC3B,CAAC"}
|
|
@@ -32,7 +32,7 @@ export const VoiceSelector = ({ value: valueProp, defaultValue, onValueChange, o
|
|
|
32
32
|
};
|
|
33
33
|
export const VoiceSelectorTrigger = (props) => (_jsx(DialogTrigger, { ...props }));
|
|
34
34
|
export const VoiceSelectorContent = ({ className, children, title = "Voice Selector", ...props }) => (_jsxs(DialogContent, { "aria-describedby": undefined, className: cn("p-0", className), ...props, children: [_jsx(DialogTitle, { className: "sr-only", children: title }), _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-auto", children: children })] }));
|
|
35
|
-
export const VoiceSelectorDialog = (props) => (_jsx(CommandDialog, { ...props }));
|
|
35
|
+
export const VoiceSelectorDialog = ({ children, ...props }) => (_jsx(CommandDialog, { ...props, children: _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-auto", children: children }) }));
|
|
36
36
|
export const VoiceSelectorInput = ({ className, ...props }) => (_jsx(CommandInput, { className: cn("h-auto py-3.5", className), ...props }));
|
|
37
37
|
export const VoiceSelectorList = (props) => (_jsx(CommandList, { ...props }));
|
|
38
38
|
export const VoiceSelectorEmpty = (props) => (_jsx(CommandEmpty, { ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-preview.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/web-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAS3C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvD,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAYD,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,4DAMxB,eAAe,gCAmCjB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE9D,eAAO,MAAM,oBAAoB,GAAI,mCAIlC,yBAAyB,gCAO3B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,oDAMxC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"web-preview.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/web-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAS3C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvD,MAAM,WAAW,sB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AE,IAAI,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,yCAK/B,sBAAsB,gCA0DxB,CAAC"}
|
|
@@ -31,7 +31,7 @@ export const WebPreview = ({ className, children, defaultUrl = "", onUrlChange,
|
|
|
31
31
|
return (_jsx(WebPreviewContext.Provider, { value: contextValue, children: _jsx("div", { className: cn("flex size-full flex-col rounded-lg border bg-card", className), ...props, children: children }) }));
|
|
32
32
|
};
|
|
33
33
|
export const WebPreviewNavigation = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center gap-1 border-b p-2", className), ...props, children: children }));
|
|
34
|
-
export const WebPreviewNavigationButton = ({ onClick, disabled, tooltip, children, ...props }) => (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, {
|
|
34
|
+
export const WebPreviewNavigationButton = ({ onClick, disabled, tooltip, children, ...props }) => (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { className: "h-8 w-8 p-0 hover:text-foreground", disabled: disabled, onClick: onClick, size: "sm", variant: "ghost", ...props, children: children }) }), _jsx(TooltipContent, { children: _jsx("p", { children: tooltip }) })] }) }));
|
|
35
35
|
export const WebPreviewUrl = ({ value, onChange, onKeyDown, ...props }) => {
|
|
36
36
|
const { url, setUrl } = useWebPreview();
|
|
37
37
|
const [prevUrl, setPrevUrl] = useState(url);
|
|
@@ -62,5 +62,5 @@ export const WebPreviewBody = ({ className, loading, src, ...props }) => {
|
|
|
62
62
|
};
|
|
63
63
|
export const WebPreviewConsole = ({ className, logs = [], children, ...props }) => {
|
|
64
64
|
const { consoleOpen, setConsoleOpen } = useWebPreview();
|
|
65
|
-
return (_jsxs(Collapsible, { className: cn("border-t bg-muted/50 font-mono text-sm", className), onOpenChange: setConsoleOpen, open: consoleOpen, ...props, children: [_jsx(CollapsibleTrigger, {
|
|
65
|
+
return (_jsxs(Collapsible, { className: cn("border-t bg-muted/50 font-mono text-sm", className), onOpenChange: setConsoleOpen, open: consoleOpen, ...props, children: [_jsx(CollapsibleTrigger, { render: _jsxs(Button, { className: "flex w-full items-center justify-between p-4 text-left font-medium hover:bg-muted/50", variant: "ghost", children: ["Console", _jsx(ChevronDownIcon, { className: cn("h-4 w-4 transition-transform duration-200", consoleOpen && "rotate-180") })] }) }), _jsx(CollapsibleContent, { className: cn("px-4 pb-4", "data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 outline-none data-closed:animate-out data-open:animate-in"), children: _jsxs("div", { className: "flex max-h-48 flex-col gap-1 overflow-y-auto", children: [logs.length === 0 ? (_jsx("p", { className: "text-muted-foreground", children: "No console output" })) : (logs.map((log) => (_jsxs("div", { className: cn("text-xs", log.level === "error" && "text-destructive", log.level === "warn" && "text-[var(--nc-warning-deep)]", log.level === "log" && "text-foreground"), children: [_jsx("span", { className: "text-muted-foreground", children: log.timestamp.toLocaleTimeString() }), " ", log.message] }, `${log.timestamp.getTime()}-${log.level}-${log.message}`)))), children] }) })] }));
|
|
66
66
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
3
|
-
import { type WithAsChild } from "../lib/base-render";
|
|
4
3
|
import { Button } from "./button";
|
|
5
4
|
declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
|
|
6
|
-
declare function AlertDialogTrigger({ ...props }:
|
|
5
|
+
declare function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props): React.JSX.Element;
|
|
7
6
|
declare function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props): React.JSX.Element;
|
|
8
7
|
declare function AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
9
8
|
declare function AlertDialogContent({ className, size, ...props }: AlertDialogPrimitive.Popup.Props & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAGjF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,qBAEjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,qBAI3E;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,qBAIzE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,QAAQ,CAAC,KAAK,qBAWrC;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GAAG;IACpC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CACxB,qBAeA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,qBAWzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,qBAW/D;AAID,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,qBAS9D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,qBAS9D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAA"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
4
|
-
import { withAsChildRender } from "../lib/base-render.js";
|
|
5
4
|
import { cn } from "../lib/utils.js";
|
|
6
5
|
import { Button } from "./button.js";
|
|
7
6
|
function AlertDialog({ ...props }) {
|
|
8
7
|
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
9
8
|
}
|
|
10
9
|
function AlertDialogTrigger({ ...props }) {
|
|
11
|
-
return (_jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...
|
|
10
|
+
return (_jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props }));
|
|
12
11
|
}
|
|
13
12
|
function AlertDialogPortal({ ...props }) {
|
|
14
13
|
return (_jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props }));
|
|
@@ -35,7 +34,7 @@ function AlertDialogDescription({ className, ...props }) {
|
|
|
35
34
|
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
|
|
36
35
|
}
|
|
37
36
|
// Deviates from stock base-nova (bare Button): Action stays a Close so it
|
|
38
|
-
// auto-closes on click, preserving the
|
|
37
|
+
// auto-closes on click, preserving the contract portal consumers rely on.
|
|
39
38
|
function AlertDialogAction({ className, variant = "default", size = "default", ...props }) {
|
|
40
39
|
return (_jsx(AlertDialogPrimitive.Close, { "data-slot": "alert-dialog-action", className: cn(className), render: _jsx(Button, { variant: variant, size: size }), ...props }));
|
|
41
40
|
}
|
|
@@ -6,5 +6,6 @@ declare const alertVariants: (props?: ({
|
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
8
|
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
-
|
|
9
|
+
declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
|
10
11
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;8EAclB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,qBASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;8EAclB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,qBASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/components/alert.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
const alertVariants = cva("relative grid w-full
|
|
4
|
+
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
default: "bg-card text-card-foreground",
|
|
8
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [
|
|
8
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
11
|
defaultVariants: {
|
|
@@ -16,9 +16,12 @@ function Alert({ className, variant, ...props }) {
|
|
|
16
16
|
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
17
|
}
|
|
18
18
|
function AlertTitle({ className, ...props }) {
|
|
19
|
-
return (_jsx("div", { "data-slot": "alert-title", className: cn("col-start-2
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className), ...props }));
|
|
20
20
|
}
|
|
21
21
|
function AlertDescription({ className, ...props }) {
|
|
22
|
-
return (_jsx("div", { "data-slot": "alert-description", className: cn("
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className), ...props }));
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
function AlertAction({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/components/aspect-ratio.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/components/aspect-ratio.tsx"],"names":[],"mappings":"AAEA,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAcjD;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|