@vadimcomanescu/nadicode-design-system 2.0.7 → 2.0.9
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/skills/seed/SKILL.md +17 -8
- package/.agents/skills/seed/contract.md +5 -5
- package/.agents/skills/seed/intent-map.md +3 -3
- package/.agents/skills/seed/recipes/agents-chat.md +44 -20
- package/.agents/skills/seed/references/blocks.md +5 -2
- package/.agents/skills/seed/references/components.md +22 -2
- package/.agents/skills/seed/references/dashboard-patterns.md +12 -12
- package/.agents/skills/seed/references/nextjs.md +20 -80
- package/.agents/skills/seed/references/tokens.md +57 -248
- package/README.md +43 -215
- package/contracts/block-props-schemas.json +2186 -0
- package/contracts/component-props-schemas.json +8322 -0
- package/contracts/consumer-contract.json +178 -0
- package/contracts/consumer-intent-map.json +707 -0
- package/contracts/message-catalog-contract.json +820 -0
- package/contracts/page-kit-props-schemas.json +1894 -0
- package/contracts/public-surface-registry.json +5822 -0
- package/contracts/public-surface-registry.schema.json +219 -0
- package/contracts/release-governance-baseline.json +850 -0
- package/contracts/spec-manifest.json +46 -0
- package/dist/catalog.json +284 -81
- package/dist/chunk-4IGBBIYW.js +47 -0
- package/dist/chunk-4WPZ6T7V.js +186 -0
- package/dist/{chunk-OHOOQUVJ.js → chunk-C7WHMSF3.js} +2 -1
- package/dist/{chunk-4K3PATUT.js → chunk-EEL4RAPC.js} +13 -1
- package/dist/{chunk-ILIHQ2KZ.js → chunk-EK43W2Y6.js} +16 -10
- package/dist/{chunk-IDKZEPWK.js → chunk-FV2G6SAF.js} +6 -5
- package/dist/chunk-HWHJ6IRQ.js +78 -0
- package/dist/{chunk-AUSYEAIJ.js → chunk-I66XWYSS.js} +32 -8
- package/dist/chunk-JDJY4ABS.js +60 -0
- package/dist/{chunk-GV4PKHG4.js → chunk-KWILREVQ.js} +2 -2
- package/dist/{chunk-WI37ZYIF.js → chunk-M4XKO45H.js} +13 -1
- package/dist/{chunk-6N6CSJVE.js → chunk-OJ7OO3QB.js} +2 -2
- package/dist/{chunk-ZHTQF2KI.js → chunk-OSNTB6RY.js} +29 -22
- package/dist/{chunk-GMMPLZLC.js → chunk-PDSQC6VE.js} +1 -1
- package/dist/chunk-QQOWC53X.js +98 -0
- package/dist/chunk-VJ5VD4UT.js +91 -0
- package/dist/{chunk-TUKZKU72.js → chunk-ZKLB5N3Q.js} +1 -1
- package/dist/components/blocks/AgentConversationBlock.d.ts +6 -1
- package/dist/components/blocks/AgentConversationBlock.js +44 -42
- package/dist/components/blocks/AgentRunOverviewBlock.js +1 -1
- package/dist/components/blocks/AgentWorkbenchBlock.d.ts +5 -1
- package/dist/components/blocks/AgentWorkbenchBlock.js +47 -46
- package/dist/components/blocks/AuthLayout.js +2 -2
- package/dist/components/blocks/BannerBlock.js +38 -38
- package/dist/components/blocks/CallToActionBlock.js +2 -2
- package/dist/components/blocks/ChangelogBlock.js +39 -39
- package/dist/components/blocks/ChartBlock.js +38 -38
- package/dist/components/blocks/ChartCollectionBlock.js +1 -1
- package/dist/components/blocks/ChatLayout.d.ts +4 -1
- package/dist/components/blocks/ChatLayout.js +39 -39
- package/dist/components/blocks/CodeBlock.js +2 -2
- package/dist/components/blocks/ContactBlock.js +2 -2
- package/dist/components/blocks/CreateBlock.js +39 -39
- package/dist/components/blocks/DataGridBlock.js +40 -40
- package/dist/components/blocks/DirectoryBlock.js +43 -43
- package/dist/components/blocks/FAQBlock.js +38 -38
- package/dist/components/blocks/FeatureBlock.js +38 -38
- package/dist/components/blocks/GalleryBlock.js +38 -38
- package/dist/components/blocks/HeaderBlock.js +38 -38
- package/dist/components/blocks/HeroBlock.js +41 -41
- package/dist/components/blocks/HeroSectionBlock.js +55 -59
- package/dist/components/blocks/IntegrationsBlock.js +40 -40
- package/dist/components/blocks/InteractiveAreaChartBlock.js +38 -38
- package/dist/components/blocks/KanbanDemoBlock.js +3 -3
- package/dist/components/blocks/LoginBlock.js +2 -2
- package/dist/components/blocks/LogoCloud.js +2 -13
- package/dist/components/blocks/NavUser.js +42 -42
- package/dist/components/blocks/NotFoundBlock.js +41 -41
- package/dist/components/blocks/OnboardingBlock.js +38 -38
- package/dist/components/blocks/PricingBlock.js +4 -4
- package/dist/components/blocks/ProcessFlowBlock.js +2 -2
- package/dist/components/blocks/SettingsLayout.js +42 -42
- package/dist/components/blocks/SignUpBlock.js +1 -1
- package/dist/components/blocks/SocialProofBlock.js +4 -3
- package/dist/components/blocks/StatsBlock.js +38 -38
- package/dist/components/blocks/StatsMarketingBlock.js +2 -2
- package/dist/components/blocks/TestimonialsBlock.js +2 -1
- package/dist/components/blocks/TwoFactorChallengeBlock.js +38 -38
- package/dist/components/blocks/TwoFactorSetupBlock.js +41 -41
- package/dist/components/blocks/VoiceAgentCard.d.ts +3 -1
- package/dist/components/blocks/VoiceAgentCard.js +7 -76
- package/dist/components/blocks/WizardBlock.js +39 -39
- package/dist/components/blocks/user/InviteUserModal.js +38 -38
- package/dist/components/logos/index.js +2 -2
- package/dist/components/page-kits/AgentsChatPageKit.js +59 -58
- package/dist/components/page-kits/AnalyticsPageKit.js +44 -44
- package/dist/components/page-kits/BlogContentPageKit.js +43 -43
- package/dist/components/page-kits/CheckoutPageKit.js +41 -41
- package/dist/components/page-kits/CompanySuitePageKit.js +47 -47
- package/dist/components/page-kits/CrudFormPageKit.js +44 -44
- package/dist/components/page-kits/CrudListDetailPageKit.js +44 -44
- package/dist/components/page-kits/DashboardPageKit.js +44 -44
- package/dist/components/page-kits/KanbanBoardPageKit.js +47 -47
- package/dist/components/page-kits/LandingPageKit.js +50 -49
- package/dist/components/page-kits/LoginPageKit.js +2 -2
- package/dist/components/page-kits/MarketingShellPageKit.js +40 -40
- package/dist/components/page-kits/NavigationShellPageKit.js +42 -42
- package/dist/components/page-kits/OnboardingPageKit.js +44 -44
- package/dist/components/page-kits/PricingPageKit.js +46 -46
- package/dist/components/page-kits/ProfileSettingsPageKit.js +2 -2
- package/dist/components/page-kits/ServiceSuitePageKit.js +47 -46
- package/dist/components/page-kits/SignupPageKit.js +2 -2
- package/dist/components/page-kits/SuccessPageKit.js +38 -38
- package/dist/components/page-kits/TeamSettingsPageKit.js +45 -45
- package/dist/components/page-kits/TwoFactorPageKit.js +41 -41
- package/dist/components/page-kits/VerifyEmailPageKit.js +38 -38
- package/dist/components/page-kits/VoiceAgentsPageKit.js +80 -76
- package/dist/components/ui/Accordion.js +38 -38
- package/dist/components/ui/AgentMessageBubble.d.ts +20 -4
- package/dist/components/ui/AgentMessageBubble.js +39 -39
- package/dist/components/ui/AgentStatus.d.ts +1 -1
- package/dist/components/ui/AgentStatus.js +5 -10
- package/dist/components/ui/AgentTerminal.d.ts +4 -1
- package/dist/components/ui/AgentTerminal.js +3 -1
- package/dist/components/ui/AgentTimeline.d.ts +2 -2
- package/dist/components/ui/AgentTimeline.js +15 -6
- package/dist/components/ui/AnimatedDialog.js +38 -38
- package/dist/components/ui/AnimatedSheet.js +38 -38
- package/dist/components/ui/ApprovalCard.js +1 -1
- package/dist/components/ui/Breadcrumb.js +38 -38
- package/dist/components/ui/Calendar.js +38 -38
- package/dist/components/ui/Carousel.js +38 -38
- package/dist/components/ui/ChatActions.d.ts +14 -0
- package/dist/components/ui/ChatActions.js +52 -0
- package/dist/components/ui/ChatBranch.d.ts +18 -0
- package/dist/components/ui/ChatBranch.js +84 -0
- package/dist/components/ui/ChatChainOfThought.d.ts +25 -0
- package/dist/components/ui/ChatChainOfThought.js +99 -0
- package/dist/components/ui/ChatConfirmation.d.ts +37 -0
- package/dist/components/ui/ChatConfirmation.js +115 -0
- package/dist/components/ui/ChatGreeting.d.ts +18 -0
- package/dist/components/ui/ChatGreeting.js +80 -0
- package/dist/components/ui/ChatMessage.d.ts +40 -0
- package/dist/components/ui/ChatMessage.js +96 -0
- package/dist/components/ui/ChatPlan.d.ts +29 -0
- package/dist/components/ui/ChatPlan.js +86 -0
- package/dist/components/ui/ChatPromptInput.d.ts +32 -0
- package/dist/components/ui/ChatPromptInput.js +193 -0
- package/dist/components/ui/ChatPromptInputAttachments.d.ts +9 -0
- package/dist/components/ui/ChatPromptInputAttachments.js +145 -0
- package/dist/components/ui/ChatQueue.d.ts +32 -0
- package/dist/components/ui/ChatQueue.js +93 -0
- package/dist/components/ui/ChatReasoning.d.ts +20 -0
- package/dist/components/ui/ChatReasoning.js +91 -0
- package/dist/components/ui/ChatResponse.d.ts +14 -0
- package/dist/components/ui/ChatResponse.js +25 -0
- package/dist/components/ui/ChatShimmer.d.ts +23 -0
- package/dist/components/ui/ChatShimmer.js +6 -0
- package/dist/components/ui/ChatSources.d.ts +30 -0
- package/dist/components/ui/ChatSources.js +113 -0
- package/dist/components/ui/ChatSuggestion.d.ts +13 -0
- package/dist/components/ui/ChatSuggestion.js +41 -0
- package/dist/components/ui/ChatThinkingMessage.d.ts +12 -0
- package/dist/components/ui/ChatThinkingMessage.js +55 -0
- package/dist/components/ui/ChatToolCall.d.ts +41 -0
- package/dist/components/ui/ChatToolCall.js +192 -0
- package/dist/components/ui/CheckStatus.d.ts +1 -1
- package/dist/components/ui/Checkbox.js +38 -38
- package/dist/components/ui/CheckoutForm.js +38 -38
- package/dist/components/ui/CheckoutFormDemo.js +38 -38
- package/dist/components/ui/Combobox.js +38 -38
- package/dist/components/ui/Command.js +38 -38
- package/dist/components/ui/ContextMenu.js +38 -38
- package/dist/components/ui/Conversation.d.ts +21 -0
- package/dist/components/ui/Conversation.js +196 -0
- package/dist/components/ui/ConversationThread.d.ts +8 -2
- package/dist/components/ui/ConversationThread.js +34 -16
- package/dist/components/ui/DataTable.js +40 -40
- package/dist/components/ui/DatePicker.js +38 -38
- package/dist/components/ui/DateRangePicker.js +38 -38
- package/dist/components/ui/Dialog.js +38 -38
- package/dist/components/ui/DropdownMenu.js +39 -39
- package/dist/components/ui/FileUpload.js +38 -38
- package/dist/components/ui/InputOTP.js +38 -38
- package/dist/components/ui/KanbanBoard.js +2 -2
- package/dist/components/ui/LanguageSwitcher.js +38 -38
- package/dist/components/ui/Menubar.js +38 -38
- package/dist/components/ui/NavigationMenu.js +38 -38
- package/dist/components/ui/NotificationCenter.js +38 -38
- package/dist/components/ui/Pagination.js +38 -38
- package/dist/components/ui/RadioGroup.js +38 -38
- package/dist/components/ui/Resizable.js +38 -38
- package/dist/components/ui/SearchCommand.js +38 -38
- package/dist/components/ui/Select.js +38 -38
- package/dist/components/ui/SettingsModal.js +38 -38
- package/dist/components/ui/Sheet.js +38 -38
- package/dist/components/ui/Sidebar.js +41 -41
- package/dist/components/ui/StyleToggle.js +1 -1
- package/dist/components/ui/TagInput.js +38 -38
- package/dist/components/ui/ThemeToggle.js +39 -39
- package/dist/components/ui/ThinkingIndicator.d.ts +3 -1
- package/dist/components/ui/ThinkingIndicator.js +2 -1
- package/dist/components/ui/Toast.js +38 -38
- package/dist/components/ui/Toaster.js +38 -38
- package/dist/components/ui/ToolCallCard.d.ts +1 -1
- package/dist/components/ui/ToolCallCard.js +5 -1
- package/dist/components/ui/TreeView.js +38 -38
- package/dist/components/ui/charts/index.js +1 -1
- package/dist/components/ui/icons/index.js +38 -38
- package/dist/components/ui/text-effects/index.js +2 -2
- package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
- package/dist/hooks/use-scroll-to-bottom.js +2 -0
- package/dist/index.js +43 -43
- package/dist/internal/local-image-assets.d.ts +12 -0
- package/dist/messages/en.js +1 -1
- package/dist/messages/it.js +1 -1
- package/dist/test/PublicSeedTestProvider.js +2 -2
- package/dist/test/simulate-ime-composition.d.ts +54 -0
- package/dist/test/simulate-ime-composition.js +55 -0
- package/eslint-rules/nadicode/config.js +1 -0
- package/eslint-rules/nadicode/index.js +2 -0
- package/eslint-rules/nadicode/rules/no-deprecated-ds-import.js +77 -0
- package/eslint-rules/nadicode/rules/no-unregistered-glass.js +2 -0
- package/package.json +103 -6
- package/scripts/ds-check.mjs +94 -73
- package/dist/chunk-MLUSJTS2.js +0 -107
- package/dist/chunk-TZXZFSD2.js +0 -33
- package/dist/{chunk-MX5FUFQR.js → chunk-7A2RXKGH.js} +2 -2
- package/dist/{chunk-5DKCZWC6.js → chunk-CQEUNASC.js} +1 -1
- package/dist/{chunk-RMLS2QUC.js → chunk-HZERHGBT.js} +1 -1
- package/dist/{chunk-WAVU744B.js → chunk-IXQGKJU4.js} +3 -3
- package/dist/{chunk-4HRVRW2X.js → chunk-J2DCQDXO.js} +2 -2
- package/dist/{chunk-6MFAZU4B.js → chunk-RGE5OQMZ.js} +1 -1
- package/dist/{chunk-PJNHVPHF.js → chunk-TYP2MR3Q.js} +1 -1
- package/dist/{chunk-TS2JSPQR.js → chunk-U4GYSYGN.js} +1 -1
- package/dist/{chunk-EJNF6JLL.js → chunk-VEO56RH4.js} +1 -1
- package/dist/{chunk-AURJQZC4.js → chunk-VNNAL4A6.js} +1 -1
- package/dist/{chunk-5PORR6LE.js → chunk-XTASI4IY.js} +1 -1
- package/dist/{chunk-E4L6LR6P.js → chunk-Z233ZQZE.js} +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../../chunk-VJIL7W55.js';
|
|
3
|
+
import { LoaderIcon } from '../../chunk-R3AO6AZM.js';
|
|
4
|
+
import { CircleIcon } from '../../chunk-GCUTJI7M.js';
|
|
5
|
+
import { CheckIcon } from '../../chunk-CXACRCZ4.js';
|
|
6
|
+
import { ChevronDownIcon } from '../../chunk-HJBXUXTD.js';
|
|
7
|
+
import '../../chunk-ASKFAYYR.js';
|
|
8
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
function ChatChainOfThought({
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
defaultOpen,
|
|
15
|
+
open,
|
|
16
|
+
onOpenChange
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
Collapsible,
|
|
20
|
+
{
|
|
21
|
+
defaultOpen,
|
|
22
|
+
open,
|
|
23
|
+
onOpenChange,
|
|
24
|
+
className: cn("space-y-1", className),
|
|
25
|
+
children
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function ChatChainOfThoughtTrigger({
|
|
30
|
+
children,
|
|
31
|
+
className
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
CollapsibleTrigger,
|
|
35
|
+
{
|
|
36
|
+
className: cn(
|
|
37
|
+
"inline-flex min-h-10 min-w-10 items-center gap-1.5 rounded-lg px-2 py-1",
|
|
38
|
+
"text-xs text-text-secondary",
|
|
39
|
+
"hover:bg-surface/80 hover:text-text-primary transition-colors",
|
|
40
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
|
|
41
|
+
className
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
ChevronDownIcon,
|
|
47
|
+
{
|
|
48
|
+
size: 14,
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
className: "transition-transform [[data-state=open]>&]:rotate-180"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
function ChatChainOfThoughtContent({
|
|
58
|
+
children,
|
|
59
|
+
className
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
role: "list",
|
|
65
|
+
"aria-label": "Reasoning steps",
|
|
66
|
+
className: cn("space-y-1 pl-1", className),
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
) });
|
|
70
|
+
}
|
|
71
|
+
var STEP_ICONS = {
|
|
72
|
+
complete: /* @__PURE__ */ jsx(CheckIcon, { size: 14, "aria-hidden": "true", className: "text-success" }),
|
|
73
|
+
active: /* @__PURE__ */ jsx(LoaderIcon, { size: 14, "aria-hidden": "true", className: "animate-spin text-accent" }),
|
|
74
|
+
pending: /* @__PURE__ */ jsx(CircleIcon, { size: 14, "aria-hidden": "true", className: "text-text-tertiary" })
|
|
75
|
+
};
|
|
76
|
+
function ChatChainOfThoughtStep({
|
|
77
|
+
status,
|
|
78
|
+
children,
|
|
79
|
+
className
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ jsxs(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
role: "listitem",
|
|
85
|
+
"data-slot": "step",
|
|
86
|
+
className: cn(
|
|
87
|
+
"flex items-center gap-2 rounded-md px-2 py-1 text-sm text-text-secondary",
|
|
88
|
+
status === "pending" && "opacity-50",
|
|
89
|
+
className
|
|
90
|
+
),
|
|
91
|
+
children: [
|
|
92
|
+
STEP_ICONS[status],
|
|
93
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { ChatChainOfThought, ChatChainOfThoughtContent, ChatChainOfThoughtStep, ChatChainOfThoughtTrigger };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type ChatConfirmationStatus = 'pending' | 'approved' | 'rejected';
|
|
3
|
+
export interface ChatConfirmationProps {
|
|
4
|
+
status: ChatConfirmationStatus;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function ChatConfirmation({ status, children, className, }: ChatConfirmationProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ChatConfirmationTitle({ children, className, }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ChatConfirmationDescription({ children, className, }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface ChatConfirmationActionsProps {
|
|
18
|
+
onApprove: () => void;
|
|
19
|
+
onReject: () => void;
|
|
20
|
+
approveLabel?: string;
|
|
21
|
+
rejectLabel?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function ChatConfirmationActions({ onApprove, onReject, approveLabel, rejectLabel, className, }: ChatConfirmationActionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
export declare function ChatConfirmationPending({ children, className, }: {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export declare function ChatConfirmationApproved({ children, className, }: {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
export declare function ChatConfirmationRejected({ children, className, }: {
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { CheckIcon } from '../../chunk-CXACRCZ4.js';
|
|
3
|
+
import { XIcon } from '../../chunk-UIUMTURU.js';
|
|
4
|
+
import '../../chunk-ASKFAYYR.js';
|
|
5
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
6
|
+
import { createContext, useContext } from 'react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var ChatConfirmationContext = createContext({
|
|
10
|
+
status: "pending"
|
|
11
|
+
});
|
|
12
|
+
function ChatConfirmation({
|
|
13
|
+
status,
|
|
14
|
+
children,
|
|
15
|
+
className
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ jsx(ChatConfirmationContext.Provider, { value: { status }, children: /* @__PURE__ */ jsx(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
role: "status",
|
|
21
|
+
"aria-label": "Confirmation",
|
|
22
|
+
className: cn(
|
|
23
|
+
"rounded-xl border border-border p-4 space-y-3",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
children
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}
|
|
30
|
+
function ChatConfirmationTitle({
|
|
31
|
+
children,
|
|
32
|
+
className
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsx("h3", { className: cn("text-sm font-medium text-text-primary", className), children });
|
|
35
|
+
}
|
|
36
|
+
function ChatConfirmationDescription({
|
|
37
|
+
children,
|
|
38
|
+
className
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ jsx("p", { className: cn("text-sm text-text-secondary", className), children });
|
|
41
|
+
}
|
|
42
|
+
function ChatConfirmationActions({
|
|
43
|
+
onApprove,
|
|
44
|
+
onReject,
|
|
45
|
+
approveLabel = "Approve",
|
|
46
|
+
rejectLabel = "Reject",
|
|
47
|
+
className
|
|
48
|
+
}) {
|
|
49
|
+
const { status } = useContext(ChatConfirmationContext);
|
|
50
|
+
if (status !== "pending") return null;
|
|
51
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
52
|
+
/* @__PURE__ */ jsxs(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
onClick: onApprove,
|
|
57
|
+
"aria-label": approveLabel,
|
|
58
|
+
className: cn(
|
|
59
|
+
"inline-flex min-h-10 min-w-10 items-center justify-center gap-1.5 rounded-lg",
|
|
60
|
+
"bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground",
|
|
61
|
+
"hover:bg-accent/90 transition-colors",
|
|
62
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"
|
|
63
|
+
),
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx(CheckIcon, { size: 14, "aria-hidden": "true" }),
|
|
66
|
+
approveLabel
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ jsxs(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
onClick: onReject,
|
|
75
|
+
"aria-label": rejectLabel,
|
|
76
|
+
className: cn(
|
|
77
|
+
"inline-flex min-h-10 min-w-10 items-center justify-center gap-1.5 rounded-lg",
|
|
78
|
+
"border border-border px-3 py-1.5 text-xs font-medium text-text-secondary",
|
|
79
|
+
"hover:bg-surface/80 hover:text-text-primary transition-colors",
|
|
80
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"
|
|
81
|
+
),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx(XIcon, { size: 14, "aria-hidden": "true" }),
|
|
84
|
+
rejectLabel
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
90
|
+
function ChatConfirmationPending({
|
|
91
|
+
children,
|
|
92
|
+
className
|
|
93
|
+
}) {
|
|
94
|
+
const { status } = useContext(ChatConfirmationContext);
|
|
95
|
+
if (status !== "pending") return null;
|
|
96
|
+
return /* @__PURE__ */ jsx("div", { className, children });
|
|
97
|
+
}
|
|
98
|
+
function ChatConfirmationApproved({
|
|
99
|
+
children,
|
|
100
|
+
className
|
|
101
|
+
}) {
|
|
102
|
+
const { status } = useContext(ChatConfirmationContext);
|
|
103
|
+
if (status !== "approved") return null;
|
|
104
|
+
return /* @__PURE__ */ jsx("div", { className, children });
|
|
105
|
+
}
|
|
106
|
+
function ChatConfirmationRejected({
|
|
107
|
+
children,
|
|
108
|
+
className
|
|
109
|
+
}) {
|
|
110
|
+
const { status } = useContext(ChatConfirmationContext);
|
|
111
|
+
if (status !== "rejected") return null;
|
|
112
|
+
return /* @__PURE__ */ jsx("div", { className, children });
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { ChatConfirmation, ChatConfirmationActions, ChatConfirmationApproved, ChatConfirmationDescription, ChatConfirmationPending, ChatConfirmationRejected, ChatConfirmationTitle };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
export interface ChatGreetingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
+
/** Greeting headline. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Greeting subtext. */
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Custom content instead of title/subtitle. */
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ChatGreeting - animated empty state shown when a conversation has zero messages.
|
|
13
|
+
*
|
|
14
|
+
* Renders configurable title and subtitle with a 300ms Framer Motion fade-in
|
|
15
|
+
* and staggered entrance. Accepts children for fully custom content.
|
|
16
|
+
* Consumers wrap this in AnimatePresence for fade-out when messages appear.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ChatGreeting({ title, subtitle, children, className, ref, ...props }: ChatGreetingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { m } from '../../chunk-PD2YEH3H.js';
|
|
3
|
+
import '../../chunk-CRY67BIF.js';
|
|
4
|
+
import '../../chunk-HJC6U46F.js';
|
|
5
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
6
|
+
import { useReducedMotion } from 'motion/react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var FADE_DURATION_S = 0.3;
|
|
10
|
+
var TITLE_DELAY_S = 0;
|
|
11
|
+
var SUBTITLE_DELAY_S = 0.1;
|
|
12
|
+
function ChatGreeting({
|
|
13
|
+
title = "Hello!",
|
|
14
|
+
subtitle = "How can I help you today?",
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
ref,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
const prefersReduced = useReducedMotion();
|
|
21
|
+
if (children) {
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
className: cn("flex flex-col items-center justify-center gap-2", className),
|
|
27
|
+
...props,
|
|
28
|
+
children
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
if (prefersReduced) {
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn("flex flex-col items-center justify-center gap-2", className),
|
|
38
|
+
...props,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx("p", { className: "text-xl font-semibold text-text-primary", children: title }),
|
|
41
|
+
subtitle ? /* @__PURE__ */ jsx("p", { className: "text-lg text-text-secondary", children: subtitle }) : null
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ jsxs(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: cn("flex flex-col items-center justify-center gap-2", className),
|
|
51
|
+
...props,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
m.p,
|
|
55
|
+
{
|
|
56
|
+
className: "text-xl font-semibold text-text-primary",
|
|
57
|
+
initial: { opacity: 0, y: 10 },
|
|
58
|
+
animate: { opacity: 1, y: 0 },
|
|
59
|
+
exit: { opacity: 0, y: 10 },
|
|
60
|
+
transition: { duration: FADE_DURATION_S, delay: TITLE_DELAY_S },
|
|
61
|
+
children: title
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
subtitle ? /* @__PURE__ */ jsx(
|
|
65
|
+
m.p,
|
|
66
|
+
{
|
|
67
|
+
className: "text-lg text-text-secondary",
|
|
68
|
+
initial: { opacity: 0, y: 10 },
|
|
69
|
+
animate: { opacity: 1, y: 0 },
|
|
70
|
+
exit: { opacity: 0, y: 10 },
|
|
71
|
+
transition: { duration: FADE_DURATION_S, delay: SUBTITLE_DELAY_S },
|
|
72
|
+
children: subtitle
|
|
73
|
+
}
|
|
74
|
+
) : null
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { ChatGreeting };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
type ChatMessageRole = 'user' | 'assistant' | 'agent' | 'system';
|
|
3
|
+
declare const chatMessageVariants: (props?: ({
|
|
4
|
+
role?: "user" | "assistant" | "system" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const chatMessageContentVariants: (props?: ({
|
|
7
|
+
role?: "user" | "assistant" | "system" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export interface ChatMessageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Message role.
|
|
12
|
+
* @deprecated Use `"assistant"` instead of `"agent"`.
|
|
13
|
+
* The `"agent"` alias will be removed in the next major version.
|
|
14
|
+
*/
|
|
15
|
+
role: ChatMessageRole;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* ChatMessage - role-based message layout compound.
|
|
21
|
+
*
|
|
22
|
+
* User right-aligned, assistant left-aligned, system centered.
|
|
23
|
+
* Compound: ChatMessage, ChatMessageContent, ChatMessageAvatar.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ChatMessage({ role, children, className, ref, ...props }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export interface ChatMessageContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
ref?: Ref<HTMLDivElement>;
|
|
29
|
+
}
|
|
30
|
+
export declare function ChatMessageContent({ children, className, ref, ...props }: ChatMessageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export interface ChatMessageAvatarProps {
|
|
32
|
+
/** Avatar image source URL. */
|
|
33
|
+
src: string;
|
|
34
|
+
/** Display name (first 2 chars used as fallback). */
|
|
35
|
+
name?: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
ref?: Ref<HTMLSpanElement>;
|
|
38
|
+
}
|
|
39
|
+
export declare function ChatMessageAvatar({ src, name, className, ref, }: ChatMessageAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export { chatMessageVariants, chatMessageContentVariants };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Avatar, AvatarImage, AvatarFallback } from '../../chunk-NAAU5IWU.js';
|
|
3
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
4
|
+
import { createContext, useContext } from 'react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var ChatMessageContext = createContext("user");
|
|
9
|
+
function useMessageRole() {
|
|
10
|
+
return useContext(ChatMessageContext);
|
|
11
|
+
}
|
|
12
|
+
function normalizeRole(role) {
|
|
13
|
+
return role === "agent" ? "assistant" : role;
|
|
14
|
+
}
|
|
15
|
+
var chatMessageVariants = cva("flex gap-4 max-w-full", {
|
|
16
|
+
variants: {
|
|
17
|
+
role: {
|
|
18
|
+
user: "flex-row-reverse",
|
|
19
|
+
assistant: "flex-row",
|
|
20
|
+
system: "justify-center"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: { role: "assistant" }
|
|
24
|
+
});
|
|
25
|
+
var chatMessageContentVariants = cva(
|
|
26
|
+
"rounded-2xl px-4 py-2.5 text-sm leading-relaxed",
|
|
27
|
+
{
|
|
28
|
+
variants: {
|
|
29
|
+
role: {
|
|
30
|
+
user: "bg-primary text-primary-foreground max-w-[80%] rounded-br-sm",
|
|
31
|
+
assistant: "bg-surface border border-border text-text-primary max-w-[80%] rounded-bl-sm",
|
|
32
|
+
system: "bg-muted/50 text-text-tertiary text-xs italic px-4 py-1.5 rounded-lg"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: { role: "assistant" }
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
function ChatMessage({
|
|
39
|
+
role,
|
|
40
|
+
children,
|
|
41
|
+
className,
|
|
42
|
+
ref,
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
const normalized = normalizeRole(role);
|
|
46
|
+
return /* @__PURE__ */ jsx(ChatMessageContext.Provider, { value: role, children: /* @__PURE__ */ jsx(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: cn(chatMessageVariants({ role: normalized }), className),
|
|
51
|
+
...props,
|
|
52
|
+
children
|
|
53
|
+
}
|
|
54
|
+
) });
|
|
55
|
+
}
|
|
56
|
+
function ChatMessageContent({
|
|
57
|
+
children,
|
|
58
|
+
className,
|
|
59
|
+
ref,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
const role = normalizeRole(useMessageRole());
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
className: cn(chatMessageContentVariants({ role }), className),
|
|
68
|
+
...props,
|
|
69
|
+
children
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function ChatMessageAvatar({
|
|
74
|
+
src,
|
|
75
|
+
name,
|
|
76
|
+
className,
|
|
77
|
+
ref
|
|
78
|
+
}) {
|
|
79
|
+
const role = normalizeRole(useMessageRole());
|
|
80
|
+
const fallback = name ? name.slice(0, 2).toUpperCase() : role === "user" ? "U" : "AI";
|
|
81
|
+
const label = role === "user" ? "User avatar" : "Assistant avatar";
|
|
82
|
+
return /* @__PURE__ */ jsxs(
|
|
83
|
+
Avatar,
|
|
84
|
+
{
|
|
85
|
+
ref,
|
|
86
|
+
className: cn("h-8 w-8 shrink-0 ring-1 ring-border", className),
|
|
87
|
+
"aria-label": label,
|
|
88
|
+
children: [
|
|
89
|
+
src ? /* @__PURE__ */ jsx(AvatarImage, { src, alt: "" }) : null,
|
|
90
|
+
/* @__PURE__ */ jsx(AvatarFallback, { className: "text-xs", children: fallback })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { ChatMessage, ChatMessageAvatar, ChatMessageContent, chatMessageContentVariants, chatMessageVariants };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ChatPlanProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function ChatPlan({ children, className, defaultOpen }: ChatPlanProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ChatPlanHeader({ children, className, }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface ChatPlanTitleProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
isStreaming?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function ChatPlanTitle({ children, isStreaming, className, }: ChatPlanTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function ChatPlanDescription({ children, className, }: {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ChatPlanTrigger({ children, className, }: {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function ChatPlanContent({ children, className, }: {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { ChatShimmer } from '../../chunk-JDJY4ABS.js';
|
|
3
|
+
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../../chunk-VJIL7W55.js';
|
|
4
|
+
import '../../chunk-PD2YEH3H.js';
|
|
5
|
+
import '../../chunk-CRY67BIF.js';
|
|
6
|
+
import '../../chunk-HJC6U46F.js';
|
|
7
|
+
import { ChevronDownIcon } from '../../chunk-HJBXUXTD.js';
|
|
8
|
+
import '../../chunk-ASKFAYYR.js';
|
|
9
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
function ChatPlan({ children, className, defaultOpen }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
Collapsible,
|
|
15
|
+
{
|
|
16
|
+
defaultOpen,
|
|
17
|
+
className: cn("rounded-xl border border-border", className),
|
|
18
|
+
children
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function ChatPlanHeader({
|
|
23
|
+
children,
|
|
24
|
+
className
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-y-1 p-4", className), children });
|
|
27
|
+
}
|
|
28
|
+
function ChatPlanTitle({
|
|
29
|
+
children,
|
|
30
|
+
isStreaming = false,
|
|
31
|
+
className
|
|
32
|
+
}) {
|
|
33
|
+
if (isStreaming) {
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
ChatShimmer,
|
|
36
|
+
{
|
|
37
|
+
as: "h3",
|
|
38
|
+
className: cn("text-sm font-medium text-text-primary", className),
|
|
39
|
+
children: typeof children === "string" ? children : ""
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ jsx("h3", { className: cn("text-sm font-medium text-text-primary", className), children });
|
|
44
|
+
}
|
|
45
|
+
function ChatPlanDescription({
|
|
46
|
+
children,
|
|
47
|
+
className
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ jsx("p", { className: cn("text-sm text-text-secondary", className), children });
|
|
50
|
+
}
|
|
51
|
+
function ChatPlanTrigger({
|
|
52
|
+
children,
|
|
53
|
+
className
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
CollapsibleTrigger,
|
|
57
|
+
{
|
|
58
|
+
className: cn(
|
|
59
|
+
"flex w-full min-h-10 items-center gap-1.5 border-t border-border px-4 py-2",
|
|
60
|
+
"text-xs text-text-secondary",
|
|
61
|
+
"hover:bg-surface/80 hover:text-text-primary transition-colors",
|
|
62
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
|
|
63
|
+
className
|
|
64
|
+
),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
ChevronDownIcon,
|
|
69
|
+
{
|
|
70
|
+
size: 14,
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
className: "ml-auto transition-transform [[data-state=open]>&]:rotate-180"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function ChatPlanContent({
|
|
80
|
+
children,
|
|
81
|
+
className
|
|
82
|
+
}) {
|
|
83
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: cn("border-t border-border px-4 py-3", className), children }) });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { ChatPlan, ChatPlanContent, ChatPlanDescription, ChatPlanHeader, ChatPlanTitle, ChatPlanTrigger };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
export type ChatPromptStatus = 'idle' | 'streaming' | 'submitted';
|
|
3
|
+
export interface ChatPromptInputProps {
|
|
4
|
+
status: ChatPromptStatus;
|
|
5
|
+
onSubmit: (value: string) => void;
|
|
6
|
+
onStop?: () => void;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
ref?: Ref<HTMLFormElement>;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChatPromptInput({ status, onSubmit, onStop, children, className, ref, }: ChatPromptInputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface ChatPromptInputTextareaProps {
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
17
|
+
}
|
|
18
|
+
export declare function ChatPromptInputTextarea({ placeholder, className, 'aria-label': ariaLabel, ref, }: ChatPromptInputTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export interface ChatPromptInputToolbarProps {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function ChatPromptInputToolbar({ children, className, }: ChatPromptInputToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface ChatPromptInputActionsProps {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function ChatPromptInputActions({ children, className, }: ChatPromptInputActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export interface ChatPromptInputSubmitProps {
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function ChatPromptInputSubmit({ className }: ChatPromptInputSubmitProps): import("react/jsx-runtime").JSX.Element;
|