@vadimcomanescu/nadicode-design-system 2.0.6 → 2.0.8
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 -4
- package/.agents/skills/seed/intent-map.md +3 -3
- package/.agents/skills/seed/recipes/agents-chat.md +44 -20
- package/.agents/skills/seed/recipes/marketing-shell.md +10 -19
- package/.agents/skills/seed/recipes/navigation-shell.md +5 -5
- package/.agents/skills/seed/recipes/service-detail.md +1 -1
- package/.agents/skills/seed/references/blocks.md +30 -26
- package/.agents/skills/seed/references/brand-override.md +3 -1
- 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 +6162 -0
- package/contracts/public-surface-registry.schema.json +227 -0
- package/contracts/release-governance-baseline.json +850 -0
- package/contracts/spec-manifest.json +46 -0
- package/css/tokens.css +300 -122
- package/dist/catalog.json +2166 -162
- package/dist/chunk-2BADJLMV.js +117 -0
- package/dist/chunk-35EX5FP5.js +106 -0
- package/dist/chunk-4IGBBIYW.js +47 -0
- package/dist/chunk-4WPZ6T7V.js +186 -0
- package/dist/chunk-5PZ4VR2D.js +142 -0
- package/dist/chunk-5UESKK6S.js +76 -0
- package/dist/chunk-7A2RXKGH.js +205 -0
- package/dist/{chunk-DF47R6LN.js → chunk-AWIG4QN6.js} +9 -9
- package/dist/chunk-AYWL4IYM.js +67 -0
- package/dist/chunk-C7WHMSF3.js +114 -0
- package/dist/{chunk-SV3KZ6CB.js → chunk-DSMGCFMJ.js} +7 -2
- package/dist/{chunk-4K3PATUT.js → chunk-EEL4RAPC.js} +13 -1
- package/dist/{chunk-ILIHQ2KZ.js → chunk-EK43W2Y6.js} +16 -10
- package/dist/chunk-FV2G6SAF.js +134 -0
- package/dist/chunk-FX23F33E.js +57 -0
- package/dist/chunk-GJPTPLCQ.js +52 -0
- package/dist/chunk-HJ3A2YNO.js +163 -0
- package/dist/chunk-HJZRSPWB.js +38 -0
- package/dist/chunk-HWHJ6IRQ.js +78 -0
- package/dist/chunk-HZERHGBT.js +77 -0
- package/dist/{chunk-AUSYEAIJ.js → chunk-I66XWYSS.js} +32 -8
- package/dist/chunk-IXQGKJU4.js +183 -0
- package/dist/chunk-JDJY4ABS.js +60 -0
- package/dist/chunk-K7NQ6ZAW.js +84 -0
- package/dist/chunk-KWILREVQ.js +147 -0
- package/dist/chunk-LCKLZ4XK.js +60 -0
- package/dist/{chunk-WI37ZYIF.js → chunk-M4XKO45H.js} +13 -1
- package/dist/chunk-NEHCPO53.js +44 -0
- package/dist/chunk-OJ7OO3QB.js +269 -0
- package/dist/{chunk-ZHTQF2KI.js → chunk-OSNTB6RY.js} +29 -22
- package/dist/{chunk-GMMPLZLC.js → chunk-PDSQC6VE.js} +1 -1
- package/dist/chunk-QIHA7S3A.js +36 -0
- package/dist/chunk-QQOWC53X.js +98 -0
- package/dist/chunk-RKQPU75I.js +126 -0
- package/dist/chunk-U4GYSYGN.js +120 -0
- package/dist/chunk-UGV45DH3.js +18 -0
- package/dist/chunk-VBZQ4DBE.js +52 -0
- package/dist/{chunk-LQLFA2EL.js → chunk-VDONTZZX.js} +2 -2
- package/dist/chunk-VEO56RH4.js +105 -0
- package/dist/chunk-VJ5VD4UT.js +91 -0
- package/dist/{chunk-RWNJ54CI.js → chunk-VN475YZS.js} +1 -1
- package/dist/chunk-VNNAL4A6.js +110 -0
- package/dist/chunk-VZCB4APK.js +94 -0
- package/dist/chunk-W7FXDRQJ.js +94 -0
- package/dist/{chunk-5I3FWRC5.js → chunk-WOYBVPXK.js} +10 -10
- package/dist/chunk-WST5NLLC.js +73 -0
- package/dist/chunk-X6VXWEDO.js +125 -0
- package/dist/chunk-XTASI4IY.js +60 -0
- package/dist/chunk-Z233ZQZE.js +33 -0
- package/dist/chunk-ZKLB5N3Q.js +110 -0
- package/dist/chunk-ZM2NODUK.js +39 -0
- package/dist/components/blocks/AccountLockedBlock.js +7 -57
- package/dist/components/blocks/ActivityFeedBlock.js +6 -39
- package/dist/components/blocks/AgentConversationBlock.d.ts +6 -1
- package/dist/components/blocks/AgentConversationBlock.js +45 -71
- 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/AudioVisualizerBlock.d.ts +1 -1
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -2
- package/dist/components/blocks/AuthLayout.js +2 -2
- package/dist/components/blocks/AuthSuccessBlock.js +5 -60
- package/dist/components/blocks/BannerBlock.js +38 -38
- package/dist/components/blocks/BarChartBlock.d.ts +1 -1
- package/dist/components/blocks/BarChartBlock.js +2 -2
- package/dist/components/blocks/CallToActionBlock.d.ts +1 -1
- package/dist/components/blocks/CallToActionBlock.js +7 -53
- package/dist/components/blocks/ChangelogBlock.js +45 -142
- package/dist/components/blocks/ChartBlock.js +38 -38
- package/dist/components/blocks/ChartCollectionBlock.js +3 -3
- package/dist/components/blocks/ChatLayout.d.ts +4 -1
- package/dist/components/blocks/ChatLayout.js +39 -39
- package/dist/components/blocks/CodeBlock.js +7 -60
- package/dist/components/blocks/ComparisonBlock.js +9 -94
- package/dist/components/blocks/ContactBlock.js +11 -120
- 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 +44 -82
- package/dist/components/blocks/FeatureBlock.d.ts +10 -14
- package/dist/components/blocks/FeatureBlock.js +54 -196
- package/dist/components/blocks/FeatureGridBlock.d.ts +1 -1
- package/dist/components/blocks/FeatureGridBlock.js +2 -2
- package/dist/components/blocks/FooterBlock.d.ts +2 -2
- package/dist/components/blocks/FooterBlock.js +11 -67
- package/dist/components/blocks/GalleryBlock.js +38 -38
- package/dist/components/blocks/HeaderBlock.d.ts +2 -2
- package/dist/components/blocks/HeaderBlock.js +39 -39
- package/dist/components/blocks/HeatmapChartBlock.d.ts +1 -1
- package/dist/components/blocks/HeatmapChartBlock.js +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +6 -3
- package/dist/components/blocks/HeroBlock.js +53 -236
- package/dist/components/blocks/HeroSectionBlock.d.ts +1 -1
- package/dist/components/blocks/HeroSectionBlock.js +59 -63
- package/dist/components/blocks/IntegrationsBlock.d.ts +1 -1
- package/dist/components/blocks/IntegrationsBlock.js +42 -42
- package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
- package/dist/components/blocks/InteractiveAreaChartBlock.js +40 -40
- 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/NewsletterBlock.js +11 -84
- package/dist/components/blocks/NotFoundBlock.js +41 -41
- package/dist/components/blocks/OnboardingBlock.js +38 -38
- package/dist/components/blocks/PasswordRecoveryBlock.js +14 -142
- package/dist/components/blocks/PricingBlock.d.ts +1 -1
- package/dist/components/blocks/PricingBlock.js +13 -112
- package/dist/components/blocks/ProcessFlowBlock.js +10 -77
- package/dist/components/blocks/ResetPasswordBlock.js +11 -125
- package/dist/components/blocks/SettingsLayout.js +42 -42
- package/dist/components/blocks/SignUpBlock.d.ts +1 -1
- package/dist/components/blocks/SignUpBlock.js +3 -3
- package/dist/components/blocks/SocialProofBlock.d.ts +7 -11
- package/dist/components/blocks/SocialProofBlock.js +10 -108
- package/dist/components/blocks/StatsBlock.d.ts +1 -1
- package/dist/components/blocks/StatsBlock.js +40 -40
- package/dist/components/blocks/StatsMarketingBlock.d.ts +1 -1
- package/dist/components/blocks/StatsMarketingBlock.js +7 -38
- package/dist/components/blocks/TeamBlock.d.ts +1 -1
- package/dist/components/blocks/TeamBlock.js +4 -52
- package/dist/components/blocks/TestimonialsBlock.d.ts +1 -1
- package/dist/components/blocks/TestimonialsBlock.js +5 -133
- package/dist/components/blocks/TwoFactorChallengeBlock.js +46 -131
- package/dist/components/blocks/TwoFactorSetupBlock.js +53 -220
- package/dist/components/blocks/UsageDonutBlock.d.ts +1 -1
- package/dist/components/blocks/UsageDonutBlock.js +2 -2
- 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/AccountLockedPageKit.d.ts +10 -0
- package/dist/components/page-kits/AccountLockedPageKit.js +48 -0
- package/dist/components/page-kits/AgentsChatPageKit.d.ts +46 -0
- package/dist/components/page-kits/AgentsChatPageKit.js +290 -0
- package/dist/components/page-kits/AnalyticsPageKit.d.ts +49 -0
- package/dist/components/page-kits/AnalyticsPageKit.js +277 -0
- package/dist/components/page-kits/BlogContentPageKit.d.ts +64 -0
- package/dist/components/page-kits/BlogContentPageKit.js +296 -0
- package/dist/components/page-kits/CheckoutPageKit.d.ts +36 -0
- package/dist/components/page-kits/CheckoutPageKit.js +209 -0
- package/dist/components/page-kits/CompanySuitePageKit.d.ts +25 -0
- package/dist/components/page-kits/CompanySuitePageKit.js +240 -0
- package/dist/components/page-kits/CrudFormPageKit.d.ts +54 -0
- package/dist/components/page-kits/CrudFormPageKit.js +138 -0
- package/dist/components/page-kits/CrudListDetailPageKit.d.ts +70 -0
- package/dist/components/page-kits/CrudListDetailPageKit.js +138 -0
- package/dist/components/page-kits/DashboardPageKit.d.ts +39 -0
- package/dist/components/page-kits/DashboardPageKit.js +284 -0
- package/dist/components/page-kits/ErrorPageKit.d.ts +22 -0
- package/dist/components/page-kits/ErrorPageKit.js +55 -0
- package/dist/components/page-kits/KanbanBoardPageKit.d.ts +31 -0
- package/dist/components/page-kits/KanbanBoardPageKit.js +305 -0
- package/dist/components/page-kits/LandingPageKit.d.ts +29 -0
- package/dist/components/page-kits/LandingPageKit.js +222 -0
- package/dist/components/page-kits/LoginPageKit.d.ts +16 -0
- package/dist/components/page-kits/LoginPageKit.js +43 -0
- package/dist/components/page-kits/MarketingShellPageKit.d.ts +21 -0
- package/dist/components/page-kits/MarketingShellPageKit.js +131 -0
- package/dist/components/page-kits/NavigationShellPageKit.d.ts +41 -0
- package/dist/components/page-kits/NavigationShellPageKit.js +132 -0
- package/dist/components/page-kits/OnboardingPageKit.d.ts +26 -0
- package/dist/components/page-kits/OnboardingPageKit.js +248 -0
- package/dist/components/page-kits/PricingPageKit.d.ts +41 -0
- package/dist/components/page-kits/PricingPageKit.js +279 -0
- package/dist/components/page-kits/ProfileSettingsPageKit.d.ts +50 -0
- package/dist/components/page-kits/ProfileSettingsPageKit.js +171 -0
- package/dist/components/page-kits/RecoveryPageKit.d.ts +17 -0
- package/dist/components/page-kits/RecoveryPageKit.js +58 -0
- package/dist/components/page-kits/ResetPageKit.d.ts +14 -0
- package/dist/components/page-kits/ResetPageKit.js +52 -0
- package/dist/components/page-kits/ServiceSuitePageKit.d.ts +25 -0
- package/dist/components/page-kits/ServiceSuitePageKit.js +321 -0
- package/dist/components/page-kits/SettingsPageKit.d.ts +27 -0
- package/dist/components/page-kits/SettingsPageKit.js +11 -0
- package/dist/components/page-kits/SignupPageKit.d.ts +15 -0
- package/dist/components/page-kits/SignupPageKit.js +41 -0
- package/dist/components/page-kits/SuccessPageKit.d.ts +15 -0
- package/dist/components/page-kits/SuccessPageKit.js +146 -0
- package/dist/components/page-kits/TeamSettingsPageKit.d.ts +50 -0
- package/dist/components/page-kits/TeamSettingsPageKit.js +297 -0
- package/dist/components/page-kits/TwoFactorPageKit.d.ts +16 -0
- package/dist/components/page-kits/TwoFactorPageKit.js +156 -0
- package/dist/components/page-kits/VerifyEmailPageKit.d.ts +15 -0
- package/dist/components/page-kits/VerifyEmailPageKit.js +146 -0
- package/dist/components/page-kits/VoiceAgentsPageKit.d.ts +35 -0
- package/dist/components/page-kits/VoiceAgentsPageKit.js +250 -0
- 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/AudioWaveform.js +2 -76
- package/dist/components/ui/AvatarUpload.js +1 -1
- package/dist/components/ui/Breadcrumb.js +41 -143
- package/dist/components/ui/Calendar.js +38 -38
- package/dist/components/ui/Carousel.js +38 -38
- package/dist/components/ui/ChartCard.js +5 -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 +43 -44
- 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/DataFreshness.js +2 -73
- 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/MouseEffect.js +1 -1
- package/dist/components/ui/NativeSelect.js +2 -18
- package/dist/components/ui/NavigationMenu.js +38 -38
- package/dist/components/ui/NotificationCenter.js +38 -38
- package/dist/components/ui/Pagination.js +42 -153
- 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/ShaderBackground.js +2 -2
- 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/hooks/use-shader-preset.js +2 -2
- package/dist/index.js +43 -43
- package/dist/internal/local-image-assets.d.ts +12 -0
- package/dist/lib/shader-presets.js +1 -1
- package/dist/lib/tokens.config.d.ts +19 -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 +2 -0
- package/eslint-rules/nadicode/index.js +4 -0
- package/eslint-rules/nadicode/rules/no-deprecated-ds-import.js +77 -0
- package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +99 -0
- package/eslint-rules/nadicode/rules/no-unregistered-glass.js +2 -0
- package/package.json +895 -686
- package/scripts/ds-check.mjs +102 -73
- package/src/lib/tokens.config.js +63 -41
- package/dist/chunk-MLUSJTS2.js +0 -107
- package/dist/{chunk-5DKCZWC6.js → chunk-CQEUNASC.js} +1 -1
- 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
|
@@ -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;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { StopIcon } from '../../chunk-ZU2GYVAP.js';
|
|
3
|
+
import { SendIcon } from '../../chunk-CRZ2JE24.js';
|
|
4
|
+
import '../../chunk-ASKFAYYR.js';
|
|
5
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
6
|
+
import { createContext, useState, useRef, useCallback, useContext } from 'react';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var ChatPromptContext = createContext(null);
|
|
10
|
+
function useChatPrompt() {
|
|
11
|
+
const ctx = useContext(ChatPromptContext);
|
|
12
|
+
if (!ctx) throw new Error("ChatPromptInput compound components must be used within <ChatPromptInput>");
|
|
13
|
+
return ctx;
|
|
14
|
+
}
|
|
15
|
+
function ChatPromptInput({
|
|
16
|
+
status,
|
|
17
|
+
onSubmit,
|
|
18
|
+
onStop,
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
ref
|
|
22
|
+
}) {
|
|
23
|
+
const [, setIsComposing] = useState(false);
|
|
24
|
+
const composingRef = useRef(false);
|
|
25
|
+
const textareaNodeRef = useRef(null);
|
|
26
|
+
const registerTextarea = useCallback(
|
|
27
|
+
(node) => {
|
|
28
|
+
textareaNodeRef.current = node;
|
|
29
|
+
},
|
|
30
|
+
[]
|
|
31
|
+
);
|
|
32
|
+
const submit = useCallback(() => {
|
|
33
|
+
const value = textareaNodeRef.current?.value.trim();
|
|
34
|
+
if (!value) return;
|
|
35
|
+
onSubmit(value);
|
|
36
|
+
if (textareaNodeRef.current) {
|
|
37
|
+
textareaNodeRef.current.value = "";
|
|
38
|
+
}
|
|
39
|
+
}, [onSubmit]);
|
|
40
|
+
const stop = useCallback(() => {
|
|
41
|
+
onStop?.();
|
|
42
|
+
}, [onStop]);
|
|
43
|
+
const handleFormSubmit = useCallback(
|
|
44
|
+
(e) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
if (status === "streaming" || status === "submitted") {
|
|
47
|
+
stop();
|
|
48
|
+
} else {
|
|
49
|
+
submit();
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
[status, submit, stop]
|
|
53
|
+
);
|
|
54
|
+
const handleSetIsComposing = useCallback((v) => {
|
|
55
|
+
setIsComposing(v);
|
|
56
|
+
}, []);
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
ChatPromptContext.Provider,
|
|
59
|
+
{
|
|
60
|
+
value: {
|
|
61
|
+
status,
|
|
62
|
+
composingRef,
|
|
63
|
+
setIsComposing: handleSetIsComposing,
|
|
64
|
+
registerTextarea,
|
|
65
|
+
submit,
|
|
66
|
+
stop
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ jsx(
|
|
69
|
+
"form",
|
|
70
|
+
{
|
|
71
|
+
ref,
|
|
72
|
+
onSubmit: handleFormSubmit,
|
|
73
|
+
className: cn(
|
|
74
|
+
"flex flex-col gap-2 rounded-2xl border border-border bg-surface p-3 glass-panel",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
children
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function ChatPromptInputTextarea({
|
|
84
|
+
placeholder,
|
|
85
|
+
className,
|
|
86
|
+
"aria-label": ariaLabel,
|
|
87
|
+
ref
|
|
88
|
+
}) {
|
|
89
|
+
const { status, composingRef, setIsComposing, registerTextarea, submit, stop } = useChatPrompt();
|
|
90
|
+
const handleKeyDown = useCallback(
|
|
91
|
+
(e) => {
|
|
92
|
+
if (e.key === "Escape") {
|
|
93
|
+
stop();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (e.key === "Enter" && !e.shiftKey && !composingRef.current && !e.nativeEvent.isComposing) {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
if (status === "streaming" || status === "submitted") {
|
|
99
|
+
stop();
|
|
100
|
+
} else {
|
|
101
|
+
submit();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
[composingRef, status, submit, stop]
|
|
106
|
+
);
|
|
107
|
+
const mergedRef = useCallback(
|
|
108
|
+
(node) => {
|
|
109
|
+
registerTextarea(node);
|
|
110
|
+
if (typeof ref === "function") ref(node);
|
|
111
|
+
else if (ref && typeof ref === "object")
|
|
112
|
+
ref.current = node;
|
|
113
|
+
},
|
|
114
|
+
[registerTextarea, ref]
|
|
115
|
+
);
|
|
116
|
+
const handleCompositionStart = useCallback(() => {
|
|
117
|
+
composingRef.current = true;
|
|
118
|
+
setIsComposing(true);
|
|
119
|
+
}, [composingRef, setIsComposing]);
|
|
120
|
+
const handleCompositionEnd = useCallback(() => {
|
|
121
|
+
requestAnimationFrame(() => {
|
|
122
|
+
composingRef.current = false;
|
|
123
|
+
setIsComposing(false);
|
|
124
|
+
});
|
|
125
|
+
}, [composingRef, setIsComposing]);
|
|
126
|
+
return /* @__PURE__ */ jsx(
|
|
127
|
+
"textarea",
|
|
128
|
+
{
|
|
129
|
+
ref: mergedRef,
|
|
130
|
+
rows: 1,
|
|
131
|
+
placeholder,
|
|
132
|
+
"aria-label": ariaLabel ?? placeholder,
|
|
133
|
+
onKeyDown: handleKeyDown,
|
|
134
|
+
onCompositionStart: handleCompositionStart,
|
|
135
|
+
onCompositionEnd: handleCompositionEnd,
|
|
136
|
+
className: cn(
|
|
137
|
+
"w-full resize-none bg-transparent text-sm text-text-primary placeholder:text-text-tertiary",
|
|
138
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-accent focus-visible:ring-offset-0 rounded-lg",
|
|
139
|
+
"field-sizing-content",
|
|
140
|
+
className
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function ChatPromptInputToolbar({
|
|
146
|
+
children,
|
|
147
|
+
className
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-between gap-2", className), children });
|
|
150
|
+
}
|
|
151
|
+
function ChatPromptInputActions({
|
|
152
|
+
children,
|
|
153
|
+
className
|
|
154
|
+
}) {
|
|
155
|
+
return /* @__PURE__ */ jsx("div", { className: cn("ml-auto flex items-center gap-1", className), children });
|
|
156
|
+
}
|
|
157
|
+
function ChatPromptInputSubmit({ className }) {
|
|
158
|
+
const { status, stop } = useChatPrompt();
|
|
159
|
+
const isActive = status === "streaming" || status === "submitted";
|
|
160
|
+
if (isActive) {
|
|
161
|
+
return /* @__PURE__ */ jsx(
|
|
162
|
+
"button",
|
|
163
|
+
{
|
|
164
|
+
type: "button",
|
|
165
|
+
onClick: stop,
|
|
166
|
+
"aria-label": "Stop generation",
|
|
167
|
+
className: cn(
|
|
168
|
+
"inline-flex h-8 w-8 min-h-10 min-w-10 items-center justify-center rounded-full",
|
|
169
|
+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
170
|
+
"transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
171
|
+
className
|
|
172
|
+
),
|
|
173
|
+
children: /* @__PURE__ */ jsx(StopIcon, { size: 16 })
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
return /* @__PURE__ */ jsx(
|
|
178
|
+
"button",
|
|
179
|
+
{
|
|
180
|
+
type: "submit",
|
|
181
|
+
"aria-label": "Send message",
|
|
182
|
+
className: cn(
|
|
183
|
+
"inline-flex h-8 w-8 min-h-10 min-w-10 items-center justify-center rounded-full",
|
|
184
|
+
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
185
|
+
"transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
186
|
+
className
|
|
187
|
+
),
|
|
188
|
+
children: /* @__PURE__ */ jsx(SendIcon, { size: 16 })
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export { ChatPromptInput, ChatPromptInputActions, ChatPromptInputSubmit, ChatPromptInputTextarea, ChatPromptInputToolbar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ChatPromptInputAttachmentsProps {
|
|
3
|
+
onFilesChange: (files: File[]) => void;
|
|
4
|
+
accept?: string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function ChatPromptInputAttachments({ onFilesChange, accept, multiple, children, className, }: ChatPromptInputAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { XCircleIcon } from '../../chunk-PSVQ7ZNX.js';
|
|
3
|
+
import { PaperclipIcon } from '../../chunk-WKRIKCJC.js';
|
|
4
|
+
import '../../chunk-ASKFAYYR.js';
|
|
5
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
6
|
+
import { useState, useRef, useCallback } from 'react';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
function ChatPromptInputAttachments({
|
|
10
|
+
onFilesChange,
|
|
11
|
+
accept,
|
|
12
|
+
multiple = true,
|
|
13
|
+
children,
|
|
14
|
+
className
|
|
15
|
+
}) {
|
|
16
|
+
const [files, setFiles] = useState([]);
|
|
17
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
18
|
+
const fileInputRef = useRef(null);
|
|
19
|
+
const addFiles = useCallback(
|
|
20
|
+
(newFiles) => {
|
|
21
|
+
const updated = [...files, ...newFiles];
|
|
22
|
+
setFiles(updated);
|
|
23
|
+
onFilesChange(updated);
|
|
24
|
+
},
|
|
25
|
+
[files, onFilesChange]
|
|
26
|
+
);
|
|
27
|
+
const removeFile = useCallback(
|
|
28
|
+
(index) => {
|
|
29
|
+
const updated = files.filter((_, i) => i !== index);
|
|
30
|
+
setFiles(updated);
|
|
31
|
+
onFilesChange(updated);
|
|
32
|
+
},
|
|
33
|
+
[files, onFilesChange]
|
|
34
|
+
);
|
|
35
|
+
const handleFileInput = useCallback(
|
|
36
|
+
(e) => {
|
|
37
|
+
if (e.target.files) {
|
|
38
|
+
addFiles(Array.from(e.target.files));
|
|
39
|
+
}
|
|
40
|
+
e.target.value = "";
|
|
41
|
+
},
|
|
42
|
+
[addFiles]
|
|
43
|
+
);
|
|
44
|
+
const handleDragOver = useCallback((e) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
setIsDragging(true);
|
|
48
|
+
}, []);
|
|
49
|
+
const handleDragLeave = useCallback((e) => {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
setIsDragging(false);
|
|
53
|
+
}, []);
|
|
54
|
+
const handleDrop = useCallback(
|
|
55
|
+
(e) => {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
setIsDragging(false);
|
|
59
|
+
if (e.dataTransfer.files) {
|
|
60
|
+
addFiles(Array.from(e.dataTransfer.files));
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
[addFiles]
|
|
64
|
+
);
|
|
65
|
+
const openFilePicker = useCallback(() => {
|
|
66
|
+
fileInputRef.current?.click();
|
|
67
|
+
}, []);
|
|
68
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
69
|
+
/* @__PURE__ */ jsxs(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-drop-zone": true,
|
|
73
|
+
onDragOver: handleDragOver,
|
|
74
|
+
onDragLeave: handleDragLeave,
|
|
75
|
+
onDrop: handleDrop,
|
|
76
|
+
className: cn(
|
|
77
|
+
"relative",
|
|
78
|
+
isDragging && "ring-2 ring-accent ring-offset-2 rounded-lg"
|
|
79
|
+
),
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
"input",
|
|
83
|
+
{
|
|
84
|
+
ref: fileInputRef,
|
|
85
|
+
type: "file",
|
|
86
|
+
accept,
|
|
87
|
+
multiple,
|
|
88
|
+
onChange: handleFileInput,
|
|
89
|
+
"aria-label": "Attach files",
|
|
90
|
+
className: "sr-only"
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
"button",
|
|
95
|
+
{
|
|
96
|
+
type: "button",
|
|
97
|
+
onClick: openFilePicker,
|
|
98
|
+
"aria-label": "Attach files",
|
|
99
|
+
className: "inline-flex min-h-10 min-w-10 items-center justify-center rounded-full text-text-tertiary hover:text-text-secondary transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
|
|
100
|
+
children: /* @__PURE__ */ jsx(PaperclipIcon, { size: 18 })
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
children
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
files.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: files.map((file, index) => /* @__PURE__ */ jsxs(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: "group relative flex items-center gap-1.5 rounded-lg border border-border bg-surface/60 px-2 py-1 text-xs text-text-secondary",
|
|
111
|
+
children: [
|
|
112
|
+
file.type.startsWith("image/") ? /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded bg-muted overflow-hidden shrink-0", children: /* @__PURE__ */ jsx(FilePreview, { file }) }) : /* @__PURE__ */ jsx(PaperclipIcon, { size: 14, className: "shrink-0 text-text-tertiary" }),
|
|
113
|
+
/* @__PURE__ */ jsx("span", { className: "truncate max-w-[120px]", children: file.name }),
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
"button",
|
|
116
|
+
{
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: () => removeFile(index),
|
|
119
|
+
"aria-label": `Remove ${file.name}`,
|
|
120
|
+
className: "ml-1 inline-flex min-h-10 min-w-10 items-center justify-center rounded-full text-text-tertiary hover:text-destructive transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
|
|
121
|
+
children: /* @__PURE__ */ jsx(XCircleIcon, { size: 14 })
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
`${file.name}-${index}`
|
|
127
|
+
)) })
|
|
128
|
+
] });
|
|
129
|
+
}
|
|
130
|
+
function FilePreview({ file }) {
|
|
131
|
+
const src = typeof URL !== "undefined" ? URL.createObjectURL(file) : "";
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
"img",
|
|
134
|
+
{
|
|
135
|
+
src,
|
|
136
|
+
alt: file.name,
|
|
137
|
+
className: "h-full w-full object-cover",
|
|
138
|
+
onLoad: () => {
|
|
139
|
+
if (src) URL.revokeObjectURL(src);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export { ChatPromptInputAttachments };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ChatQueueProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ChatQueue({ children, className }: ChatQueueProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export interface ChatQueueSectionProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function ChatQueueSection({ children, className, defaultOpen, }: ChatQueueSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ChatQueueSectionTrigger({ children, className, }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ChatQueueSectionContent({ children, className, }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface ChatQueueItemProps {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
completed?: boolean;
|
|
24
|
+
badge?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function ChatQueueItem({ children, completed, badge, className, }: ChatQueueItemProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface ChatQueueItemIndicatorProps {
|
|
29
|
+
completed?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function ChatQueueItemIndicator({ completed, className, }: ChatQueueItemIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../../chunk-VJIL7W55.js';
|
|
3
|
+
import { CircleIcon } from '../../chunk-GCUTJI7M.js';
|
|
4
|
+
import { CheckIcon } from '../../chunk-CXACRCZ4.js';
|
|
5
|
+
import { ChevronDownIcon } from '../../chunk-HJBXUXTD.js';
|
|
6
|
+
import '../../chunk-ASKFAYYR.js';
|
|
7
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
function ChatQueue({ children, className }) {
|
|
11
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-y-2", className), children });
|
|
12
|
+
}
|
|
13
|
+
function ChatQueueSection({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
defaultOpen = false
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
Collapsible,
|
|
20
|
+
{
|
|
21
|
+
defaultOpen,
|
|
22
|
+
className: cn("rounded-lg border border-border", className),
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function ChatQueueSectionTrigger({
|
|
28
|
+
children,
|
|
29
|
+
className
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsxs(
|
|
32
|
+
CollapsibleTrigger,
|
|
33
|
+
{
|
|
34
|
+
className: cn(
|
|
35
|
+
"flex w-full min-h-10 items-center gap-1.5 px-3 py-2",
|
|
36
|
+
"text-sm font-medium text-text-primary",
|
|
37
|
+
"hover:bg-surface/80 transition-colors",
|
|
38
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent rounded-lg",
|
|
39
|
+
className
|
|
40
|
+
),
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
ChevronDownIcon,
|
|
45
|
+
{
|
|
46
|
+
size: 14,
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
className: "ml-auto transition-transform [[data-state=open]>&]:rotate-180"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function ChatQueueSectionContent({
|
|
56
|
+
children,
|
|
57
|
+
className
|
|
58
|
+
}) {
|
|
59
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: cn("space-y-0.5 border-t border-border px-3 py-2", className), children }) });
|
|
60
|
+
}
|
|
61
|
+
function ChatQueueItem({
|
|
62
|
+
children,
|
|
63
|
+
completed = false,
|
|
64
|
+
badge,
|
|
65
|
+
className
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ jsxs(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "queue-item",
|
|
71
|
+
className: cn(
|
|
72
|
+
"flex items-center gap-2 rounded-md px-2 py-1 text-sm",
|
|
73
|
+
completed ? "line-through text-text-tertiary opacity-60" : "text-text-secondary",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
children: [
|
|
77
|
+
children,
|
|
78
|
+
!!badge && /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 rounded bg-surface px-1.5 py-0.5 text-[10px] font-mono text-text-tertiary", children: badge })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function ChatQueueItemIndicator({
|
|
84
|
+
completed = false,
|
|
85
|
+
className
|
|
86
|
+
}) {
|
|
87
|
+
if (completed) {
|
|
88
|
+
return /* @__PURE__ */ jsx(CheckIcon, { size: 14, "aria-hidden": "true", className: cn("text-success shrink-0", className) });
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ jsx(CircleIcon, { size: 14, "aria-hidden": "true", className: cn("text-text-tertiary shrink-0", className) });
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { ChatQueue, ChatQueueItem, ChatQueueItemIndicator, ChatQueueSection, ChatQueueSectionContent, ChatQueueSectionTrigger };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
export interface ChatReasoningProps {
|
|
3
|
+
isStreaming: boolean;
|
|
4
|
+
autoCloseDelay?: number;
|
|
5
|
+
duration?: number;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChatReasoning({ isStreaming, autoCloseDelay, duration, defaultOpen, children, className, ref, }: ChatReasoningProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface ChatReasoningTriggerProps {
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function ChatReasoningTrigger({ className }: ChatReasoningTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface ChatReasoningContentProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function ChatReasoningContent({ children, className, }: ChatReasoningContentProps): import("react/jsx-runtime").JSX.Element;
|