veryfront 0.1.1048 → 0.1.1049
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/esm/cli/templates/manifest.js +3 -3
- package/esm/deno.d.ts +3 -0
- package/esm/deno.js +10 -6
- package/esm/src/agent/react/use-agent-metadata.js +1 -1
- package/esm/src/agent/react/use-agent.js +1 -1
- package/esm/src/agent/react/use-agents.js +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +0 -6
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +5 -0
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +87 -34
- package/esm/src/agent/react/use-completion.js +1 -1
- package/esm/src/agent/react/use-streaming.js +1 -1
- package/esm/src/agent/react/use-voice-input.js +1 -1
- package/esm/src/cache/backends/api.d.ts.map +1 -1
- package/esm/src/cache/backends/api.js +10 -7
- package/esm/src/chat/index.d.ts +8 -15
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +7 -16
- package/esm/src/modules/component-registry/registry.d.ts +1 -1
- package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.d.ts +1 -1
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/extract-component.d.ts +1 -1
- package/esm/src/modules/react-loader/extract-component.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/types.d.ts +1 -1
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts +3 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.js +2 -0
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts +4 -0
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/request-context.js +1 -0
- package/esm/src/proxy/main.js +6 -5
- package/esm/src/proxy/retry.d.ts +14 -6
- package/esm/src/proxy/retry.d.ts.map +1 -1
- package/esm/src/proxy/retry.js +82 -20
- package/esm/src/react/compat/hooks-adapter.d.ts +1 -1
- package/esm/src/react/compat/hooks-adapter.d.ts.map +1 -1
- package/esm/src/react/compat/hooks-adapter.js +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/server-loader.d.ts +5 -5
- package/esm/src/react/compat/ssr-adapter/server-loader.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/version-detector/feature-detector.js +1 -1
- package/esm/src/react/components/AppWrapper.d.ts +1 -1
- package/esm/src/react/components/AppWrapper.d.ts.map +1 -1
- package/esm/src/react/components/AppWrapper.js +1 -1
- package/esm/src/react/components/LayoutComponent.d.ts +1 -1
- package/esm/src/react/components/LayoutComponent.d.ts.map +1 -1
- package/esm/src/react/components/LayoutComponent.js +1 -1
- package/esm/src/react/components/MDXProvider.d.ts +1 -1
- package/esm/src/react/components/MDXProvider.d.ts.map +1 -1
- package/esm/src/react/components/MDXProvider.js +1 -1
- package/esm/src/react/components/ProviderComponent.d.ts +1 -1
- package/esm/src/react/components/ProviderComponent.d.ts.map +1 -1
- package/esm/src/react/components/ProviderComponent.js +1 -1
- package/esm/src/react/components/chat/agent-card.d.ts +15 -7
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +9 -10
- package/esm/src/react/components/chat/agent-picker-actions.d.ts +20 -0
- package/esm/src/react/components/chat/agent-picker-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker-actions.js +24 -0
- package/esm/src/react/components/chat/agent-picker-context.d.ts +19 -0
- package/esm/src/react/components/chat/agent-picker-context.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker-context.js +13 -0
- package/esm/src/react/components/chat/agent-picker.d.ts +35 -42
- package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-picker.js +59 -50
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts +14 -0
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/app-mode-chat.js +137 -0
- package/esm/src/react/components/chat/chat/chat-attachments.d.ts +7 -0
- package/esm/src/react/components/chat/chat/chat-attachments.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-attachments.js +16 -0
- package/esm/src/react/components/chat/chat/chat-component.d.ts +21 -0
- package/esm/src/react/components/chat/chat/chat-component.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-component.js +1 -0
- package/esm/src/react/components/chat/chat/chat-props.d.ts +114 -0
- package/esm/src/react/components/chat/chat/chat-props.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-props.js +1 -0
- package/esm/src/react/components/chat/chat/components/animations.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/animations.js +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +18 -18
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.js +11 -15
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +14 -3
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +3 -3
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +44 -14
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/branch-picker.js +55 -12
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +7 -2
- package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.js +3 -3
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.js +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.js +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.js +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +33 -10
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.js +145 -51
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +49 -20
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-actions.js +72 -18
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.js +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +34 -14
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.js +54 -15
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.js +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +14 -6
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +3 -5
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +70 -16
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +72 -23
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.js +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.js +1 -1
- package/esm/src/react/components/chat/chat/components/sources.d.ts +25 -15
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +7 -7
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +14 -3
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/step-indicator.js +3 -3
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.js +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +16 -9
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.js +10 -14
- package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/agent-avatar.js +1 -1
- package/esm/src/react/components/chat/chat/composition/api.d.ts +3 -3
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/api.js +2 -2
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +72 -29
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +92 -82
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +7 -2
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.js +3 -3
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +25 -11
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.js +67 -29
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +7 -3
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -5
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +7 -2
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.js +3 -3
- package/esm/src/react/components/chat/chat/composition/message.d.ts +85 -34
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +146 -122
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.js +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +2 -3
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +2 -2
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +2 -2
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +15 -2
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.js +11 -1
- package/esm/src/react/components/chat/chat/controlled-chat.d.ts +15 -0
- package/esm/src/react/components/chat/chat/controlled-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/controlled-chat.js +97 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts +54 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.js +179 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversations.js +3 -6
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +8 -5
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +6 -6
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-upload.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +1 -1
- package/esm/src/react/components/chat/chat/index.d.ts +13 -230
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +27 -383
- package/esm/src/react/components/chat/chat-actions.d.ts +1 -1
- package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-actions.js +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.d.ts +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.js +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.d.ts +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.js +1 -1
- package/esm/src/react/components/chat/chat.d.ts +6 -6
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.js +4 -4
- package/esm/src/react/components/chat/error-boundary.d.ts +1 -1
- package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -1
- package/esm/src/react/components/chat/error-boundary.js +1 -1
- package/esm/src/react/components/chat/markdown.d.ts +3 -5
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +4 -72
- package/esm/src/react/components/chat/model-selector.d.ts +21 -27
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +26 -31
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.js +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.js +1 -1
- package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/utils.d.ts +1 -1
- package/esm/src/react/components/optimized-image/utils.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/utils.js +1 -1
- package/esm/src/react/components/ui/alert.d.ts +1 -1
- package/esm/src/react/components/ui/alert.d.ts.map +1 -1
- package/esm/src/react/components/ui/alert.js +1 -1
- package/esm/src/react/components/ui/app-shell.d.ts +1 -1
- package/esm/src/react/components/ui/app-shell.d.ts.map +1 -1
- package/esm/src/react/components/ui/app-shell.js +1 -1
- package/esm/src/react/components/ui/avatar.d.ts +1 -1
- package/esm/src/react/components/ui/avatar.d.ts.map +1 -1
- package/esm/src/react/components/ui/avatar.js +1 -1
- package/esm/src/react/components/ui/badge.d.ts +1 -1
- package/esm/src/react/components/ui/badge.d.ts.map +1 -1
- package/esm/src/react/components/ui/badge.js +1 -1
- package/esm/src/react/components/ui/button.d.ts +1 -1
- package/esm/src/react/components/ui/button.d.ts.map +1 -1
- package/esm/src/react/components/ui/button.js +1 -1
- package/esm/src/react/components/ui/card.d.ts +1 -1
- package/esm/src/react/components/ui/card.d.ts.map +1 -1
- package/esm/src/react/components/ui/card.js +1 -1
- package/esm/src/react/components/ui/checkbox.d.ts +1 -1
- package/esm/src/react/components/ui/checkbox.d.ts.map +1 -1
- package/esm/src/react/components/ui/checkbox.js +1 -1
- package/esm/src/react/components/ui/code-block.d.ts +1 -1
- package/esm/src/react/components/ui/code-block.d.ts.map +1 -1
- package/esm/src/react/components/ui/code-block.js +1 -1
- package/esm/src/react/components/ui/collapsible.d.ts +1 -1
- package/esm/src/react/components/ui/collapsible.d.ts.map +1 -1
- package/esm/src/react/components/ui/collapsible.js +1 -1
- package/esm/src/react/components/ui/color-mode.d.ts +2 -2
- package/esm/src/react/components/ui/color-mode.d.ts.map +1 -1
- package/esm/src/react/components/ui/color-mode.js +1 -1
- package/esm/src/react/components/ui/command.d.ts +1 -1
- package/esm/src/react/components/ui/command.d.ts.map +1 -1
- package/esm/src/react/components/ui/command.js +1 -1
- package/esm/src/react/components/ui/dialog.d.ts +1 -1
- package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
- package/esm/src/react/components/ui/dialog.js +1 -1
- package/esm/src/react/components/ui/drawer.d.ts +1 -1
- package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
- package/esm/src/react/components/ui/drawer.js +1 -1
- package/esm/src/react/components/ui/dropdown-menu.d.ts +1 -1
- package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
- package/esm/src/react/components/ui/dropdown-menu.js +1 -1
- package/esm/src/react/components/ui/file-type.d.ts +1 -1
- package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
- package/esm/src/react/components/ui/file-type.js +1 -1
- package/esm/src/react/components/ui/floating.d.ts +1 -1
- package/esm/src/react/components/ui/floating.d.ts.map +1 -1
- package/esm/src/react/components/ui/floating.js +2 -2
- package/esm/src/react/components/ui/icon-button.d.ts +1 -1
- package/esm/src/react/components/ui/icon-button.d.ts.map +1 -1
- package/esm/src/react/components/ui/icon-button.js +1 -1
- package/esm/src/react/components/ui/icons/index.d.ts +1 -1
- package/esm/src/react/components/ui/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/icons/index.js +1 -1
- package/esm/src/react/components/ui/input.d.ts +1 -1
- package/esm/src/react/components/ui/input.d.ts.map +1 -1
- package/esm/src/react/components/ui/input.js +1 -1
- package/esm/src/react/components/ui/label.d.ts +1 -1
- package/esm/src/react/components/ui/label.d.ts.map +1 -1
- package/esm/src/react/components/ui/label.js +1 -1
- package/esm/src/react/components/ui/list.d.ts +1 -1
- package/esm/src/react/components/ui/list.d.ts.map +1 -1
- package/esm/src/react/components/ui/list.js +1 -1
- package/esm/src/react/components/ui/pill.d.ts +1 -1
- package/esm/src/react/components/ui/pill.d.ts.map +1 -1
- package/esm/src/react/components/ui/pill.js +1 -1
- package/esm/src/react/components/ui/popover.d.ts +1 -1
- package/esm/src/react/components/ui/popover.d.ts.map +1 -1
- package/esm/src/react/components/ui/popover.js +1 -1
- package/esm/src/react/components/ui/progress-bar.d.ts +1 -1
- package/esm/src/react/components/ui/progress-bar.d.ts.map +1 -1
- package/esm/src/react/components/ui/progress-bar.js +1 -1
- package/esm/src/react/components/ui/radio.d.ts +1 -1
- package/esm/src/react/components/ui/radio.d.ts.map +1 -1
- package/esm/src/react/components/ui/radio.js +1 -1
- package/esm/src/react/components/ui/scroll-fade.d.ts +1 -1
- package/esm/src/react/components/ui/scroll-fade.d.ts.map +1 -1
- package/esm/src/react/components/ui/scroll-fade.js +1 -1
- package/esm/src/react/components/ui/select.d.ts +1 -1
- package/esm/src/react/components/ui/select.d.ts.map +1 -1
- package/esm/src/react/components/ui/select.js +1 -1
- package/esm/src/react/components/ui/shimmer.d.ts +1 -1
- package/esm/src/react/components/ui/shimmer.d.ts.map +1 -1
- package/esm/src/react/components/ui/shimmer.js +1 -1
- package/esm/src/react/components/ui/skeleton.d.ts +1 -1
- package/esm/src/react/components/ui/skeleton.d.ts.map +1 -1
- package/esm/src/react/components/ui/skeleton.js +1 -1
- package/esm/src/react/components/ui/slot.d.ts +1 -1
- package/esm/src/react/components/ui/slot.d.ts.map +1 -1
- package/esm/src/react/components/ui/slot.js +1 -1
- package/esm/src/react/components/ui/status.d.ts +1 -1
- package/esm/src/react/components/ui/status.d.ts.map +1 -1
- package/esm/src/react/components/ui/status.js +1 -1
- package/esm/src/react/components/ui/switch.d.ts +1 -1
- package/esm/src/react/components/ui/switch.d.ts.map +1 -1
- package/esm/src/react/components/ui/switch.js +1 -1
- package/esm/src/react/components/ui/tabs.d.ts +3 -3
- package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
- package/esm/src/react/components/ui/tabs.js +1 -1
- package/esm/src/react/components/ui/tag.d.ts +1 -1
- package/esm/src/react/components/ui/tag.d.ts.map +1 -1
- package/esm/src/react/components/ui/tag.js +1 -1
- package/esm/src/react/components/ui/textarea.d.ts +1 -1
- package/esm/src/react/components/ui/textarea.d.ts.map +1 -1
- package/esm/src/react/components/ui/textarea.js +1 -1
- package/esm/src/react/components/ui/tokens.d.ts +1 -1
- package/esm/src/react/components/ui/tokens.d.ts.map +1 -1
- package/esm/src/react/components/ui/tokens.js +1 -1
- package/esm/src/react/components/ui/tooltip.d.ts +1 -1
- package/esm/src/react/components/ui/tooltip.d.ts.map +1 -1
- package/esm/src/react/components/ui/tooltip.js +2 -2
- package/esm/src/react/fonts/index.d.ts +1 -1
- package/esm/src/react/fonts/index.d.ts.map +1 -1
- package/esm/src/react/fonts/index.js +1 -1
- package/esm/src/react/primitives/agent-primitives.d.ts +4 -4
- package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/agent-primitives.js +1 -1
- package/esm/src/react/primitives/chat-container.d.ts +2 -2
- package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
- package/esm/src/react/primitives/chat-container.js +1 -1
- package/esm/src/react/primitives/input-box.d.ts +4 -4
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +1 -1
- package/esm/src/react/primitives/message-list.d.ts +5 -5
- package/esm/src/react/primitives/message-list.d.ts.map +1 -1
- package/esm/src/react/primitives/message-list.js +1 -1
- package/esm/src/react/primitives/tool-primitives.d.ts +4 -4
- package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/tool-primitives.js +1 -1
- package/esm/src/react/runtime/core.d.ts +1 -1
- package/esm/src/react/runtime/core.d.ts.map +1 -1
- package/esm/src/react/runtime/core.js +1 -1
- package/esm/src/rendering/app-reserved.d.ts +1 -1
- package/esm/src/rendering/app-reserved.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.js +1 -1
- package/esm/src/rendering/component-handling.d.ts +1 -1
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.d.ts +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.js +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.d.ts +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.js +1 -1
- package/esm/src/rendering/element-validator/validator-core.d.ts +1 -1
- package/esm/src/rendering/element-validator/validator-core.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-applicator.d.ts +1 -1
- package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/layout.d.ts +1 -1
- package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.d.ts +1 -1
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-rendering.d.ts +1 -1
- package/esm/src/rendering/page-rendering.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.js +1 -1
- package/esm/src/rendering/snippet-renderer.js +2 -2
- package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
- package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
- package/esm/src/rendering/ssr/component-registry.js +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.d.ts +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.d.ts.map +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.js +1 -1
- package/esm/src/rendering/ssr/types.d.ts +1 -1
- package/esm/src/rendering/ssr/types.d.ts.map +1 -1
- package/esm/src/rendering/ssr-renderer.d.ts +1 -1
- package/esm/src/rendering/ssr-renderer.d.ts.map +1 -1
- package/esm/src/rendering/utils/react-helpers.d.ts +1 -1
- package/esm/src/rendering/utils/react-helpers.d.ts.map +1 -1
- package/esm/src/rendering/utils/react-helpers.js +1 -1
- package/esm/src/security/http/base-handler.d.ts +2 -0
- package/esm/src/security/http/base-handler.d.ts.map +1 -1
- package/esm/src/security/http/base-handler.js +1 -0
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +841 -596
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +4 -1
- package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
- package/esm/src/transforms/mdx/index.d.ts +1 -1
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +1 -1
- package/esm/src/transforms/mdx/mdx-cache-adapter.js +1 -1
- package/esm/src/transforms/mdx/module-loader/types.d.ts +1 -1
- package/esm/src/transforms/mdx/module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/types.d.ts +2 -2
- package/esm/src/transforms/mdx/types.d.ts.map +1 -1
- package/esm/src/types/app.d.ts +1 -1
- package/esm/src/types/app.d.ts.map +1 -1
- package/esm/src/types/global-guards.d.ts +1 -1
- package/esm/src/types/global-guards.d.ts.map +1 -1
- package/esm/src/types/index.d.ts +1 -1
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/utils/id.d.ts +7 -0
- package/esm/src/utils/id.d.ts.map +1 -1
- package/esm/src/utils/id.js +22 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/claude-code/react/use-claude-code-stream.js +1 -1
- package/esm/src/workflow/claude-code/react/use-claude-code-websocket.js +1 -1
- package/esm/src/workflow/react/use-approval.js +1 -1
- package/esm/src/workflow/react/use-workflow-list.js +1 -1
- package/esm/src/workflow/react/use-workflow-start.js +1 -1
- package/esm/src/workflow/react/use-workflow.js +1 -1
- package/package.json +4 -5
- package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4/client.js +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4/server.js +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4.js +0 -3
- package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts +0 -3
- package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts.map +0 -1
- package/esm/deps/esm.sh/scheduler@^0.27.0.js +0 -3
- package/esm/react/jsx-dev-runtime.d.ts +0 -2
- package/esm/react/jsx-dev-runtime.d.ts.map +0 -1
- package/esm/react/jsx-dev-runtime.js +0 -1
- package/esm/react/jsx-runtime.d.ts +0 -2
- package/esm/react/jsx-runtime.d.ts.map +0 -1
- package/esm/react/jsx-runtime.js +0 -1
- package/esm/react/react-dom-client.d.ts +0 -3
- package/esm/react/react-dom-client.d.ts.map +0 -1
- package/esm/react/react-dom-client.js +0 -2
- package/esm/react/react-dom-server.d.ts +0 -3
- package/esm/react/react-dom-server.d.ts.map +0 -1
- package/esm/react/react-dom-server.js +0 -2
- package/esm/react/react-dom.d.ts +0 -3
- package/esm/react/react-dom.d.ts.map +0 -1
- package/esm/react/react-dom.js +0 -2
- package/esm/react/react.d.ts +0 -6
- package/esm/react/react.d.ts.map +0 -1
- package/esm/react/react.js +0 -7
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { ChatMessage, UseChatResult } from "../../../../agent/react/index.js";
|
|
3
|
+
import type { ChatTheme } from "../theme.js";
|
|
4
|
+
import type { ModelOption } from "../model-selector.js";
|
|
5
|
+
import type { Source } from "./components/sources.js";
|
|
6
|
+
import type { AttachmentInfo } from "./components/attachment-pill.js";
|
|
7
|
+
import type { FeedbackValue } from "./components/message-feedback.js";
|
|
8
|
+
import type { Conversation } from "./persistence/conversation-store.js";
|
|
9
|
+
/**
|
|
10
|
+
* Agent identity + agent-driven content for `<Chat>`. Collapses the old
|
|
11
|
+
* `agent` / `models` / suggestion props into one object. In app mode
|
|
12
|
+
* (`agentId`) this is derived from agent metadata automatically; pass it
|
|
13
|
+
* yourself to drive a controlled chat.
|
|
14
|
+
*/
|
|
15
|
+
export interface ChatAgentInfo {
|
|
16
|
+
/** Assistant display name for message headers + the idle hero. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Assistant avatar. */
|
|
19
|
+
avatarUrl?: string;
|
|
20
|
+
/** Blurb under the name in the idle hero. */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Prompt suggestions shown on an empty thread. */
|
|
23
|
+
suggestions?: string[];
|
|
24
|
+
/** Model options for the composer's model selector. */
|
|
25
|
+
models?: ModelOption[];
|
|
26
|
+
}
|
|
27
|
+
/** Props accepted by chat. */
|
|
28
|
+
export interface ChatProps {
|
|
29
|
+
/** Agent id — fetches avatar/name/suggestions and scopes the request. */
|
|
30
|
+
agentId?: string;
|
|
31
|
+
/** AG-UI endpoint for the self-driven `useChat`. @default "/api/ag-ui" */
|
|
32
|
+
api?: string;
|
|
33
|
+
/** Seed messages for the self-driven thread. */
|
|
34
|
+
initialMessages?: ChatMessage[];
|
|
35
|
+
/** Error callback for the self-driven `useChat`. */
|
|
36
|
+
onError?: (error: Error) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Persistence sink for the live thread (app mode). Fires with the whole
|
|
39
|
+
* updated `conversation` (`{ id, messages, title, updatedAt, … }`) whenever
|
|
40
|
+
* the messages change — point it at your store's `save`.
|
|
41
|
+
*
|
|
42
|
+
* Resolved by presence: an explicit `onUpdate` wins; otherwise a surrounding
|
|
43
|
+
* `ConversationsProvider`'s `save` is used; with neither, the thread is
|
|
44
|
+
* ephemeral. One optional prop, three behaviours — `<Chat>` is sugar over the
|
|
45
|
+
* explicit primitive.
|
|
46
|
+
*/
|
|
47
|
+
onUpdate?: (conversation: Conversation) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Drive `<Chat>` from a `useChat()` session you own: `<Chat chat={useChat()}>`.
|
|
50
|
+
* Pass the whole result object and everything wires up (input, submit,
|
|
51
|
+
* attachments, model, branches).
|
|
52
|
+
*/
|
|
53
|
+
chat?: UseChatResult;
|
|
54
|
+
placeholder?: string;
|
|
55
|
+
maxHeight?: string;
|
|
56
|
+
className?: string;
|
|
57
|
+
theme?: Partial<ChatTheme>;
|
|
58
|
+
renderMessage?: (message: ChatMessage) => React.ReactNode;
|
|
59
|
+
/** Prompt suggestions for an empty thread. Also fillable via `agent.suggestions`. */
|
|
60
|
+
suggestions?: string[];
|
|
61
|
+
onSuggestionClick?: (suggestion: string) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Opt-in idle hero for an empty thread (icon + title + optional blurb, plus
|
|
64
|
+
* `suggestions`). When omitted, an empty thread renders as a blank canvas +
|
|
65
|
+
* composer — no "What can I help with?" placeholder. Compose `Chat.Empty`
|
|
66
|
+
* directly for full control.
|
|
67
|
+
*/
|
|
68
|
+
emptyState?: {
|
|
69
|
+
icon?: React.ReactNode;
|
|
70
|
+
title?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* The thread is still loading its initial history → render the skeleton
|
|
75
|
+
* instead of the idle empty state. In app mode (`agentId`) this is derived
|
|
76
|
+
* automatically while the agent metadata resolves, so the generic
|
|
77
|
+
* "What can I help with?" never flashes before the agent loads. Set it
|
|
78
|
+
* yourself in controlled mode.
|
|
79
|
+
*/
|
|
80
|
+
initializing?: boolean;
|
|
81
|
+
/** Override the loading skeleton (defaults to `<Chat.Skeleton />`). */
|
|
82
|
+
skeleton?: React.ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* Agent identity + agent-driven content (name / avatar / description /
|
|
85
|
+
* suggestions / models). Backs assistant message headers and the idle hero;
|
|
86
|
+
* in app mode (`agentId`) it's filled from agent metadata automatically.
|
|
87
|
+
*/
|
|
88
|
+
agent?: ChatAgentInfo;
|
|
89
|
+
onSourceClick?: (source: Source, index: number) => void;
|
|
90
|
+
/**
|
|
91
|
+
* The composer's `+` menu and drag-to-attach are on by default — `<Chat>`
|
|
92
|
+
* keeps the pending files itself unless you wire the attachment props below.
|
|
93
|
+
* Compose `ChatInput` without `ChatInput.Attach` to omit attachments.
|
|
94
|
+
*/
|
|
95
|
+
/**
|
|
96
|
+
* Endpoint that pending files POST to (multipart `file`) → `{ url }`. When
|
|
97
|
+
* omitted, attachments are inlined as base64 `data:` URLs (no backend
|
|
98
|
+
* required); set this to store files durably (e.g. `"/api/uploads"`).
|
|
99
|
+
*/
|
|
100
|
+
uploadApi?: string;
|
|
101
|
+
onAttach?: (files: FileList) => void;
|
|
102
|
+
onSelectAttachment?: () => void;
|
|
103
|
+
onDrop?: (files: FileList) => void;
|
|
104
|
+
attachAccept?: string;
|
|
105
|
+
attachments?: AttachmentInfo[];
|
|
106
|
+
onRemoveAttachment?: (id: string) => void;
|
|
107
|
+
onFeedback?: (messageId: string, feedback: FeedbackValue) => void;
|
|
108
|
+
/** Leading composer-toolbar slot (e.g. an `<AgentPicker>`). */
|
|
109
|
+
toolbarStart?: React.ReactNode;
|
|
110
|
+
children?: React.ReactNode;
|
|
111
|
+
/** React 19: ref is a regular prop. */
|
|
112
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=chat-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-props.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/chat/chat-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAMxE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,uDAAuD;IACvD,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,8BAA8B;AAC9B,MAAM,WAAW,SAAS;IAMxB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC,oDAAoD;IACpD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,C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CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAClE,+DAA+D;IAC/D,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/animations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/animations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,sBAAsB;AACtB,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAMvF;AAED,qBAAqB;AACrB,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,IAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,YAAY,CAcrB;AAED,sBAAsB;AACtB,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,QAAc,EACd,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,YAAY,CAoBrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/** Upload lifecycle state (shadcn-style). Drives the icon, label, and treatment. */
|
|
3
3
|
export type AttachmentState = "selected" | "uploading" | "processing" | "uploaded" | "error";
|
|
4
4
|
/** Public API contract for attachment info. */
|
|
@@ -17,21 +17,12 @@ export interface AttachmentInfo {
|
|
|
17
17
|
/** Resolved URL once the file has finished uploading. */
|
|
18
18
|
url?: string;
|
|
19
19
|
}
|
|
20
|
-
/** Icon overrides for {@link AttachmentPill}. Each defaults to its glyph. */
|
|
21
|
-
export interface AttachmentPillIcons {
|
|
22
|
-
/** Override the remove (✕) glyph. */
|
|
23
|
-
remove?: React.ReactNode;
|
|
24
|
-
/** Override the retry glyph. */
|
|
25
|
-
retry?: React.ReactNode;
|
|
26
|
-
}
|
|
27
20
|
/** Props accepted by attachment pill. */
|
|
28
21
|
export interface AttachmentPillProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
22
|
attachment: AttachmentInfo;
|
|
30
23
|
onRemove?: (id: string) => void;
|
|
31
24
|
/** Retry handler — surfaces a retry button in the `error` state. */
|
|
32
25
|
onRetry?: (id: string) => void;
|
|
33
|
-
/** Override the remove / retry button icons. */
|
|
34
|
-
icons?: AttachmentPillIcons;
|
|
35
26
|
/**
|
|
36
27
|
* Draw the outline + surrounding box. `false` gives a flat, borderless row
|
|
37
28
|
* (e.g. `AttachmentsPanel`, where the pills are a plain list). @default true
|
|
@@ -39,13 +30,14 @@ export interface AttachmentPillProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
39
30
|
bordered?: boolean;
|
|
40
31
|
/** Compose your own pill; when omitted, the default anatomy is rendered. */
|
|
41
32
|
children?: React.ReactNode;
|
|
33
|
+
/** React 19: ref is a regular prop. */
|
|
34
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
35
|
}
|
|
43
36
|
/** Derived per-pill view state shared with `AttachmentPill.*` sub-parts. */
|
|
44
37
|
export interface AttachmentPillContextValue {
|
|
45
38
|
attachment: AttachmentInfo;
|
|
46
39
|
onRemove?: (id: string) => void;
|
|
47
40
|
onRetry?: (id: string) => void;
|
|
48
|
-
icons?: AttachmentPillIcons;
|
|
49
41
|
/** File extension (from the name, falling back to the media type). */
|
|
50
42
|
ext: string;
|
|
51
43
|
/** Tailwind color pair for the default (no-state) icon box. */
|
|
@@ -64,8 +56,6 @@ export interface AttachmentPillContextValue {
|
|
|
64
56
|
label: string;
|
|
65
57
|
/** Legacy dimming for the old `status="uploading"` API. */
|
|
66
58
|
legacyUploading: boolean;
|
|
67
|
-
/** Whether the remove control should render. */
|
|
68
|
-
showRemove: boolean;
|
|
69
59
|
/** The state glyph for the icon box (null → render the extension text). */
|
|
70
60
|
stateGlyph: React.ReactNode;
|
|
71
61
|
/** Tailwind classes for the icon box background/foreground. */
|
|
@@ -76,6 +66,14 @@ export interface AttachmentPillContextValue {
|
|
|
76
66
|
* `AttachmentPill`.
|
|
77
67
|
*/
|
|
78
68
|
export declare function useAttachmentPill(): AttachmentPillContextValue;
|
|
69
|
+
/**
|
|
70
|
+
* `AttachmentPill.Root` — context provider + the chip wrapper. No children
|
|
71
|
+
* renders the default anatomy; pass children to recompose.
|
|
72
|
+
*/
|
|
73
|
+
declare function AttachmentPillRoot({ attachment, onRemove, onRetry, bordered, className, children, ref, ...props }: AttachmentPillProps): React.ReactElement;
|
|
74
|
+
declare namespace AttachmentPillRoot {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
79
77
|
/**
|
|
80
78
|
* `AttachmentPill.Thumbnail` — the image square (with a busy overlay). Renders
|
|
81
79
|
* only when the attachment resolves to a non-error image with a source.
|
|
@@ -107,8 +105,9 @@ declare namespace AttachmentPillLabel {
|
|
|
107
105
|
* `AttachmentPill.Retry` — the retry control. Renders only in the `error` state
|
|
108
106
|
* when an `onRetry` handler is provided.
|
|
109
107
|
*/
|
|
110
|
-
declare function AttachmentPillRetry({ className }: {
|
|
108
|
+
declare function AttachmentPillRetry({ className, icon }: {
|
|
111
109
|
className?: string;
|
|
110
|
+
icon?: React.ReactNode;
|
|
112
111
|
}): React.JSX.Element | null;
|
|
113
112
|
declare namespace AttachmentPillRetry {
|
|
114
113
|
var displayName: string;
|
|
@@ -117,8 +116,9 @@ declare namespace AttachmentPillRetry {
|
|
|
117
116
|
* `AttachmentPill.Remove` — the remove (✕) control. Renders only when an
|
|
118
117
|
* `onRemove` handler is provided and the pill isn't a legacy uploading pill.
|
|
119
118
|
*/
|
|
120
|
-
declare function AttachmentPillRemove({ className }: {
|
|
119
|
+
declare function AttachmentPillRemove({ className, icon }: {
|
|
121
120
|
className?: string;
|
|
121
|
+
icon?: React.ReactNode;
|
|
122
122
|
}): React.JSX.Element | null;
|
|
123
123
|
declare namespace AttachmentPillRemove {
|
|
124
124
|
var displayName: string;
|
|
@@ -126,10 +126,10 @@ declare namespace AttachmentPillRemove {
|
|
|
126
126
|
/**
|
|
127
127
|
* AttachmentPill — render `<AttachmentPill attachment={…} />` for the default
|
|
128
128
|
* chip, or compose `AttachmentPill.Root` + `.Thumbnail` / `.Icon` / `.Label` /
|
|
129
|
-
* `.Retry` / `.Remove` for a custom layout.
|
|
129
|
+
* `.Retry` / `.Remove` for a custom layout.
|
|
130
130
|
*/
|
|
131
|
-
export declare const AttachmentPill:
|
|
132
|
-
Root:
|
|
131
|
+
export declare const AttachmentPill: typeof AttachmentPillRoot & {
|
|
132
|
+
Root: typeof AttachmentPillRoot;
|
|
133
133
|
Thumbnail: typeof AttachmentPillThumbnail;
|
|
134
134
|
Icon: typeof AttachmentPillIcon;
|
|
135
135
|
Label: typeof AttachmentPillLabel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-pill.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/attachment-pill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"attachment-pill.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/attachment-pill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,oFAAoF;AACpF,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,UAAU,GACV,OAAO,CAAC;AAEZ,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAC/B,8EAA8E;IAC9E,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yCAAyC;AACzC,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/E,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,oEAAoE;IACpE,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AA6FD,4EAA4E;AAC5E,MAAM,WAAW,0BAA0B;IACzC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AAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,CAkBnB;kBApBQ,kBAAkB;;;AAuB3B,uEAAuE;AACvE,iBAAS,mBAAmB,CAC1B,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,CAqBnB;kBAvBQ,mBAAmB;;;AA0B5B;;;GAGG;AACH,iBAAS,mBAAmB,CAC1B,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAClE,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgB1B;kBAlBQ,mBAAmB;;;AAqB5B;;;GAGG;AACH,iBAAS,oBAAoB,CAC3B,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAClE,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA8B1B;kBAhCQ,oBAAoB;;;AAmC7B;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;CAOzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { cn } from "../../theme.js";
|
|
3
3
|
import { CheckIcon, ClockIcon, FileTextIcon, RefreshCwIcon } from "../../../ui/icons/index.js";
|
|
4
4
|
import { Button } from "../../../ui/button.js";
|
|
@@ -78,7 +78,7 @@ export function useAttachmentPill() {
|
|
|
78
78
|
* `AttachmentPill.Root` — context provider + the chip wrapper. No children
|
|
79
79
|
* renders the default anatomy; pass children to recompose.
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
function AttachmentPillRoot({ attachment, onRemove, onRetry, bordered = true, className, children, ref, ...props }) {
|
|
82
82
|
const mediaType = attachment.type ?? "";
|
|
83
83
|
const ext = getExtension(attachment.name) ||
|
|
84
84
|
mediaType.split("/").pop()?.toLowerCase() || "";
|
|
@@ -97,8 +97,6 @@ const AttachmentPillRoot = React.forwardRef(function AttachmentPill({ attachment
|
|
|
97
97
|
const label = getStateLabel(attachment, ext, mediaType);
|
|
98
98
|
// Legacy dimming only applies to the old `status` API (new states stay solid).
|
|
99
99
|
const legacyUploading = !state && attachment.status === "uploading";
|
|
100
|
-
const showRemove = Boolean(onRemove) &&
|
|
101
|
-
(Boolean(state) || attachment.status !== "uploading");
|
|
102
100
|
// The left box shows a state glyph when a lifecycle `state` is set, otherwise
|
|
103
101
|
// the file-type extension badge (default behaviour).
|
|
104
102
|
const stateGlyph = state === "selected"
|
|
@@ -121,7 +119,6 @@ const AttachmentPillRoot = React.forwardRef(function AttachmentPill({ attachment
|
|
|
121
119
|
attachment,
|
|
122
120
|
onRemove,
|
|
123
121
|
onRetry,
|
|
124
|
-
icons,
|
|
125
122
|
ext,
|
|
126
123
|
colorClass,
|
|
127
124
|
isImage,
|
|
@@ -131,7 +128,6 @@ const AttachmentPillRoot = React.forwardRef(function AttachmentPill({ attachment
|
|
|
131
128
|
shimmerTitle,
|
|
132
129
|
label,
|
|
133
130
|
legacyUploading,
|
|
134
|
-
showRemove,
|
|
135
131
|
stateGlyph,
|
|
136
132
|
boxClass,
|
|
137
133
|
};
|
|
@@ -148,7 +144,7 @@ const AttachmentPillRoot = React.forwardRef(function AttachmentPill({ attachment
|
|
|
148
144
|
React.createElement(AttachmentPillLabel, null),
|
|
149
145
|
React.createElement(AttachmentPillRetry, null),
|
|
150
146
|
React.createElement(AttachmentPillRemove, null))))));
|
|
151
|
-
}
|
|
147
|
+
}
|
|
152
148
|
AttachmentPillRoot.displayName = "AttachmentPill.Root";
|
|
153
149
|
/**
|
|
154
150
|
* `AttachmentPill.Thumbnail` — the image square (with a busy overlay). Renders
|
|
@@ -190,22 +186,22 @@ AttachmentPillLabel.displayName = "AttachmentPill.Label";
|
|
|
190
186
|
* `AttachmentPill.Retry` — the retry control. Renders only in the `error` state
|
|
191
187
|
* when an `onRetry` handler is provided.
|
|
192
188
|
*/
|
|
193
|
-
function AttachmentPillRetry({ className }) {
|
|
194
|
-
const { attachment, isError, onRetry
|
|
189
|
+
function AttachmentPillRetry({ className, icon }) {
|
|
190
|
+
const { attachment, isError, onRetry } = useAttachmentPill();
|
|
195
191
|
if (!isError || !onRetry)
|
|
196
192
|
return null;
|
|
197
|
-
return (React.createElement(Button, { type: "button", variant: "icon-ghost", size: "icon-xs", on: "card", onClick: () => onRetry(attachment.id), "aria-label": `Retry ${attachment.name}`, className: cn("shrink-0", className) },
|
|
193
|
+
return (React.createElement(Button, { type: "button", variant: "icon-ghost", size: "icon-xs", on: "card", onClick: () => onRetry(attachment.id), "aria-label": `Retry ${attachment.name}`, className: cn("shrink-0", className) }, icon ?? React.createElement(RefreshCwIcon, null)));
|
|
198
194
|
}
|
|
199
195
|
AttachmentPillRetry.displayName = "AttachmentPill.Retry";
|
|
200
196
|
/**
|
|
201
197
|
* `AttachmentPill.Remove` — the remove (✕) control. Renders only when an
|
|
202
198
|
* `onRemove` handler is provided and the pill isn't a legacy uploading pill.
|
|
203
199
|
*/
|
|
204
|
-
function AttachmentPillRemove({ className }) {
|
|
205
|
-
const { attachment,
|
|
206
|
-
if (!
|
|
200
|
+
function AttachmentPillRemove({ className, icon }) {
|
|
201
|
+
const { attachment, onRemove, legacyUploading } = useAttachmentPill();
|
|
202
|
+
if (!onRemove || legacyUploading)
|
|
207
203
|
return null;
|
|
208
|
-
return (React.createElement(Button, { type: "button", variant: "icon-ghost", size: "icon-xs", on: "card", onClick: () => onRemove?.(attachment.id), "aria-label": `Remove ${attachment.name}`, className: cn("shrink-0 opacity-100 md:opacity-0 md:group-hover:opacity-100", className) },
|
|
204
|
+
return (React.createElement(Button, { type: "button", variant: "icon-ghost", size: "icon-xs", on: "card", onClick: () => onRemove?.(attachment.id), "aria-label": `Remove ${attachment.name}`, className: cn("shrink-0 opacity-100 md:opacity-0 md:group-hover:opacity-100", className) }, icon ?? (React.createElement("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" },
|
|
209
205
|
React.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
210
206
|
React.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))));
|
|
211
207
|
}
|
|
@@ -213,7 +209,7 @@ AttachmentPillRemove.displayName = "AttachmentPill.Remove";
|
|
|
213
209
|
/**
|
|
214
210
|
* AttachmentPill — render `<AttachmentPill attachment={…} />` for the default
|
|
215
211
|
* chip, or compose `AttachmentPill.Root` + `.Thumbnail` / `.Icon` / `.Label` /
|
|
216
|
-
* `.Retry` / `.Remove` for a custom layout.
|
|
212
|
+
* `.Retry` / `.Remove` for a custom layout.
|
|
217
213
|
*/
|
|
218
214
|
export const AttachmentPill = Object.assign(AttachmentPillRoot, {
|
|
219
215
|
Root: AttachmentPillRoot,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/** Public API contract for uploaded file. */
|
|
3
3
|
export interface UploadedFile {
|
|
4
4
|
id: string;
|
|
@@ -41,6 +41,17 @@ export interface AttachmentsPanelProps {
|
|
|
41
41
|
className?: string;
|
|
42
42
|
/** Compose your own panel; when omitted, the default anatomy is rendered. */
|
|
43
43
|
children?: React.ReactNode;
|
|
44
|
+
/** React 19: ref is a regular prop. */
|
|
45
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* `AttachmentsPanel.Root` — context provider + the panel wrapper (scroll area +
|
|
49
|
+
* hidden file input). No children renders the default anatomy (`Empty` when the
|
|
50
|
+
* list is empty, otherwise `List`); pass children to recompose.
|
|
51
|
+
*/
|
|
52
|
+
declare function AttachmentsPanelRoot({ uploads, loading, onRemoveUpload, onAttach, attachAccept, onClose, className, children, ref, }: AttachmentsPanelProps): React.ReactElement;
|
|
53
|
+
declare namespace AttachmentsPanelRoot {
|
|
54
|
+
var displayName: string;
|
|
44
55
|
}
|
|
45
56
|
/** Props for `AttachmentsPanel.Header` — the title row + close button. */
|
|
46
57
|
export interface AttachmentsPanelHeaderProps {
|
|
@@ -136,8 +147,8 @@ declare namespace AttachmentsPanelAction {
|
|
|
136
147
|
* custom layout. Mirrors the `ToolCall` / `Sources` compounds: render it, or
|
|
137
148
|
* compose it.
|
|
138
149
|
*/
|
|
139
|
-
export declare const AttachmentsPanel:
|
|
140
|
-
Root:
|
|
150
|
+
export declare const AttachmentsPanel: typeof AttachmentsPanelRoot & {
|
|
151
|
+
Root: typeof AttachmentsPanelRoot;
|
|
141
152
|
Header: typeof AttachmentsPanelHeader;
|
|
142
153
|
List: typeof AttachmentsPanelList;
|
|
143
154
|
Item: typeof AttachmentsPanelItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments-panel.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/attachments-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"attachments-panel.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/attachments-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAYD,kEAAkE;AAClE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,6EAA6E;IAC7E,OAAO,CAAC,EAA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AAChF,iBAAS,qBAAqB,CAC5B,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,0BAA0B,GAClD,KAAK,CAAC,GAAG,CAAC,OAAO,CA6BnB;kBA/BQ,qBAAqB;;;AAkC9B,sEAAsE;AACtE,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,8EAA8E;AAC9E,iBAAS,sBAAsB,CAC7B,EAAE,OAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,2BAA2B,GAC/E,KAAK,CAAC,GAAG,CAAC,OAAO,CA2BnB;kBA7BQ,sBAAsB;;;AAgC/B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;CAQ3B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { cn } from "../../theme.js";
|
|
3
3
|
import { ChatTokens } from "../../chat-tokens-style.js";
|
|
4
4
|
import { FileTextIcon, MoreHorizontalIcon, PaperclipIcon, TrashIcon, XIcon, } from "../../../ui/icons/index.js";
|
|
@@ -26,7 +26,7 @@ export function useAttachmentsPanel() {
|
|
|
26
26
|
* hidden file input). No children renders the default anatomy (`Empty` when the
|
|
27
27
|
* list is empty, otherwise `List`); pass children to recompose.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
function AttachmentsPanelRoot({ uploads = [], loading = false, onRemoveUpload, onAttach, attachAccept, onClose, className, children, ref, }) {
|
|
30
30
|
const fileInputRef = React.useRef(null);
|
|
31
31
|
const triggerAttach = () => fileInputRef.current?.click();
|
|
32
32
|
const context = {
|
|
@@ -63,7 +63,7 @@ const AttachmentsPanelRoot = React.forwardRef(function AttachmentsPanel({ upload
|
|
|
63
63
|
whiteSpace: "nowrap",
|
|
64
64
|
border: 0,
|
|
65
65
|
} })))));
|
|
66
|
-
}
|
|
66
|
+
}
|
|
67
67
|
AttachmentsPanelRoot.displayName = "AttachmentsPanel.Root";
|
|
68
68
|
/**
|
|
69
69
|
* The panel header: an "Attachments" title with a close `Button` on the right.
|
|
@@ -1,22 +1,52 @@
|
|
|
1
|
-
import * as React from "
|
|
2
|
-
/**
|
|
3
|
-
* Icon overrides for {@link BranchPicker}. Each defaults to the built-in
|
|
4
|
-
* chevron glyph.
|
|
5
|
-
*/
|
|
6
|
-
export interface BranchPickerIcons {
|
|
7
|
-
prev?: React.ReactNode;
|
|
8
|
-
next?: React.ReactNode;
|
|
9
|
-
}
|
|
1
|
+
import * as React from "react";
|
|
10
2
|
/** Props accepted by branch picker. */
|
|
11
|
-
export interface BranchPickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "
|
|
3
|
+
export interface BranchPickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "className" | "onClick"> {
|
|
12
4
|
current: number;
|
|
13
5
|
total: number;
|
|
14
6
|
onPrev: () => void;
|
|
15
7
|
onNext: () => void;
|
|
8
|
+
/** Compose the controls. The default renders previous, count, and next. */
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Props shared by `BranchPicker.Previous` and `BranchPicker.Next`. */
|
|
13
|
+
export interface BranchPickerActionProps {
|
|
14
|
+
/** Override the chevron glyph. */
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Props accepted by `BranchPicker.Count`. */
|
|
19
|
+
export interface BranchPickerCountProps {
|
|
20
|
+
/** Override the default `current/total` label. */
|
|
21
|
+
children?: React.ReactNode;
|
|
16
22
|
className?: string;
|
|
17
|
-
/** Override either of the chevron icons. */
|
|
18
|
-
icons?: BranchPickerIcons;
|
|
19
23
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
24
|
+
/** Previous-branch control. */
|
|
25
|
+
declare function BranchPickerPrevious({ icon, className, }: BranchPickerActionProps): React.ReactElement;
|
|
26
|
+
declare namespace BranchPickerPrevious {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
/** Current branch position. */
|
|
30
|
+
declare function BranchPickerCount({ children, className, }: BranchPickerCountProps): React.ReactElement;
|
|
31
|
+
declare namespace BranchPickerCount {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
/** Next-branch control. */
|
|
35
|
+
declare function BranchPickerNext({ icon, className, }: BranchPickerActionProps): React.ReactElement;
|
|
36
|
+
declare namespace BranchPickerNext {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
/** Render the branch picker default or compose its addressable controls. */
|
|
40
|
+
declare function BranchPickerRoot({ current, total, onPrev, onNext, children, className, ...props }: BranchPickerProps): React.ReactElement | null;
|
|
41
|
+
declare namespace BranchPickerRoot {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
44
|
+
/** Branch picker with addressable previous, count, and next leaves. */
|
|
45
|
+
export declare const BranchPicker: typeof BranchPickerRoot & {
|
|
46
|
+
Root: typeof BranchPickerRoot;
|
|
47
|
+
Previous: typeof BranchPickerPrevious;
|
|
48
|
+
Count: typeof BranchPickerCount;
|
|
49
|
+
Next: typeof BranchPickerNext;
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
22
52
|
//# sourceMappingURL=branch-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-picker.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/branch-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"branch-picker.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/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AK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA0B/C;kBAlCQ,gBAAgB;;;AAqCzB,uEAAuE;AACvE,eAAO,MAAM,YAAY;;;;;CAKvB,CAAC"}
|
|
@@ -1,16 +1,59 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { COMPONENT_ERROR } from "../../../../../errors/error-registry.js";
|
|
2
3
|
import { cn } from "../../theme.js";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
const BranchPickerContext = React.createContext(null);
|
|
5
|
+
function useBranchPicker() {
|
|
6
|
+
const context = React.useContext(BranchPickerContext);
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw COMPONENT_ERROR.create({
|
|
9
|
+
detail: "BranchPicker.* must be used within <BranchPicker>",
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
const ACTION_BUTTON = "size-5 flex items-center justify-center rounded-full transition-all hover:bg-[var(--foreground)]/5 disabled:opacity-50 disabled:pointer-events-none";
|
|
15
|
+
function PreviousIcon() {
|
|
16
|
+
return (React.createElement("svg", { "aria-hidden": "true", className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
|
|
17
|
+
React.createElement("polyline", { points: "15 18 9 12 15 6" })));
|
|
18
|
+
}
|
|
19
|
+
function NextIcon() {
|
|
20
|
+
return (React.createElement("svg", { "aria-hidden": "true", className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
|
|
21
|
+
React.createElement("polyline", { points: "9 18 15 12 9 6" })));
|
|
22
|
+
}
|
|
23
|
+
/** Previous-branch control. */
|
|
24
|
+
function BranchPickerPrevious({ icon, className, }) {
|
|
25
|
+
const { current, onPrev } = useBranchPicker();
|
|
26
|
+
return (React.createElement("button", { type: "button", onClick: onPrev, disabled: current <= 1, className: cn(ACTION_BUTTON, className), "aria-label": "Previous variant" }, icon ?? React.createElement(PreviousIcon, null)));
|
|
27
|
+
}
|
|
28
|
+
BranchPickerPrevious.displayName = "BranchPicker.Previous";
|
|
29
|
+
/** Current branch position. */
|
|
30
|
+
function BranchPickerCount({ children, className, }) {
|
|
31
|
+
const { current, total } = useBranchPicker();
|
|
32
|
+
return (React.createElement("span", { className: cn("tabular-nums min-w-[2ch] text-center", className) }, children ?? `${current}/${total}`));
|
|
33
|
+
}
|
|
34
|
+
BranchPickerCount.displayName = "BranchPicker.Count";
|
|
35
|
+
/** Next-branch control. */
|
|
36
|
+
function BranchPickerNext({ icon, className, }) {
|
|
37
|
+
const { current, total, onNext } = useBranchPicker();
|
|
38
|
+
return (React.createElement("button", { type: "button", onClick: onNext, disabled: current >= total, className: cn(ACTION_BUTTON, className), "aria-label": "Next variant" }, icon ?? React.createElement(NextIcon, null)));
|
|
39
|
+
}
|
|
40
|
+
BranchPickerNext.displayName = "BranchPicker.Next";
|
|
41
|
+
/** Render the branch picker default or compose its addressable controls. */
|
|
42
|
+
function BranchPickerRoot({ current, total, onPrev, onNext, children, className, ...props }) {
|
|
43
|
+
const context = React.useMemo(() => ({ current, total, onPrev, onNext }), [current, total, onPrev, onNext]);
|
|
5
44
|
if (total <= 1)
|
|
6
45
|
return null;
|
|
7
|
-
return (React.createElement(
|
|
8
|
-
React.createElement("
|
|
9
|
-
React.createElement(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"/",
|
|
13
|
-
total),
|
|
14
|
-
React.createElement("button", { type: "button", onClick: onNext, disabled: current >= total, className: cn("size-5 flex items-center justify-center rounded-full transition-all", "hover:bg-[var(--foreground)]/5", "disabled:opacity-50 disabled:pointer-events-none"), "aria-label": "Next variant" }, icons?.next ?? (React.createElement("svg", { className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
|
|
15
|
-
React.createElement("polyline", { points: "9 18 15 12 9 6" }))))));
|
|
46
|
+
return (React.createElement(BranchPickerContext.Provider, { value: context },
|
|
47
|
+
React.createElement("div", { ...props, className: cn("inline-flex items-center gap-1 text-xs text-[var(--faint)]", className) }, children ?? (React.createElement(React.Fragment, null,
|
|
48
|
+
React.createElement(BranchPickerPrevious, null),
|
|
49
|
+
React.createElement(BranchPickerCount, null),
|
|
50
|
+
React.createElement(BranchPickerNext, null))))));
|
|
16
51
|
}
|
|
52
|
+
BranchPickerRoot.displayName = "BranchPicker";
|
|
53
|
+
/** Branch picker with addressable previous, count, and next leaves. */
|
|
54
|
+
export const BranchPicker = Object.assign(BranchPickerRoot, {
|
|
55
|
+
Root: BranchPickerRoot,
|
|
56
|
+
Previous: BranchPickerPrevious,
|
|
57
|
+
Count: BranchPickerCount,
|
|
58
|
+
Next: BranchPickerNext,
|
|
59
|
+
});
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module react/components/chat/components/chat-messages-skeleton
|
|
9
9
|
*/
|
|
10
|
-
import * as React from "
|
|
10
|
+
import * as React from "react";
|
|
11
11
|
/** Props accepted by `<ChatMessagesSkeleton>`. */
|
|
12
12
|
export interface ChatMessagesSkeletonProps {
|
|
13
13
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-messages-skeleton.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/chat-messages-skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"chat-messages-skeleton.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/chat-messages-skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,kDAAkD;AAClD,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qDAAqD;AACrD,wBAAgB,oBAAoB,CAClC,EAAE,SAAS,EAAE,EAAE,yBAAyB,GACvC,KAAK,CAAC,YAAY,CAmBpB;yBArBe,oBAAoB"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module react/components/chat/components/chat-messages-skeleton
|
|
9
9
|
*/
|
|
10
|
-
import * as React from "
|
|
10
|
+
import * as React from "react";
|
|
11
11
|
import { cn } from "../../theme.js";
|
|
12
12
|
import { Skeleton } from "../../../ui/skeleton.js";
|
|
13
13
|
/** An assistant skeleton row: avatar + name, then a few text lines. */
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/** Props accepted by code block. */
|
|
3
3
|
export interface CodeBlockProps {
|
|
4
4
|
language?: string;
|
|
5
5
|
code: string;
|
|
6
6
|
inline?: boolean;
|
|
7
7
|
className?: string;
|
|
8
|
+
/** React 19: ref is a regular prop. */
|
|
9
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Render rich code block.
|
|
@@ -15,5 +17,8 @@ export interface CodeBlockProps {
|
|
|
15
17
|
* plain `<pre>` fork (no highlighting) is kept only for back-compat and will be
|
|
16
18
|
* removed. `Markdown` already renders fenced blocks through `CodeBlock`.
|
|
17
19
|
*/
|
|
18
|
-
export declare
|
|
20
|
+
export declare function RichCodeBlock({ language, code, inline, className, ref }: CodeBlockProps): React.ReactElement;
|
|
21
|
+
export declare namespace RichCodeBlock {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
19
24
|
//# sourceMappingURL=code-block.d.ts.map
|