veryfront 0.1.997 → 0.1.998
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 +1 -1
- package/esm/deno.d.ts +7 -0
- package/esm/deno.js +11 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
- package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
- package/esm/react/react-dom.d.ts +3 -0
- package/esm/react/react-dom.d.ts.map +1 -0
- package/esm/react/react-dom.js +2 -0
- package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/host-support.js +12 -0
- package/esm/src/agent/react/index.d.ts +4 -2
- package/esm/src/agent/react/index.d.ts.map +1 -1
- package/esm/src/agent/react/index.js +2 -1
- package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
- package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
- package/esm/src/agent/react/use-agent-metadata.js +18 -9
- package/esm/src/agent/react/use-agents.d.ts +33 -0
- package/esm/src/agent/react/use-agents.d.ts.map +1 -0
- package/esm/src/agent/react/use-agents.js +72 -0
- package/esm/src/agent/react/use-chat/index.d.ts +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +3 -2
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +47 -7
- package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/utils.js +4 -0
- package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
- package/esm/src/agent/runtime/message-adapter.js +3 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
- package/esm/src/chat/index.d.ts +17 -7
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +33 -7
- package/esm/src/chat/protocol.d.ts +13 -1
- package/esm/src/chat/protocol.d.ts.map +1 -1
- package/esm/src/chat/upload-handler.d.ts +55 -0
- package/esm/src/chat/upload-handler.d.ts.map +1 -0
- package/esm/src/chat/upload-handler.js +180 -0
- package/esm/src/discovery/import-rewriter.d.ts +1 -1
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +2 -0
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +2 -0
- package/esm/src/react/components/chat/agent-card.d.ts +84 -11
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +151 -57
- package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
- package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker.js +183 -0
- package/esm/src/react/components/chat/chat/components/animations.js +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
- 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 +209 -25
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
- 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 +6 -8
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
- 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 +14 -6
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
- 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 +10 -8
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -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 +7 -8
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
- 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 +5 -4
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
- 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 +19 -20
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
- 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 +24 -36
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
- 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 +5 -5
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
- 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 +9 -11
- 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 +3 -1
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -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 +6 -5
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
- package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +50 -16
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -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 +55 -12
- 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 +3 -3
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
- 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 +158 -36
- package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/api.js +4 -2
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
- 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 +251 -61
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
- 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 +11 -10
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
- 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 +81 -111
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
- 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 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
- 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 +10 -7
- package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +332 -53
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -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 +3 -4
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
- 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 +2 -0
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
- package/esm/src/react/components/chat/chat/index.d.ts +171 -31
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +371 -77
- package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
- package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
- package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
- package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-actions.js +191 -0
- package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
- package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
- package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
- package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
- package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
- package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
- package/esm/src/react/components/chat/chat.d.ts +5 -5
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.js +5 -5
- package/esm/src/react/components/chat/color-mode.d.ts +46 -0
- package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
- package/esm/src/react/components/chat/color-mode.js +123 -0
- package/esm/src/react/components/chat/error-boundary.js +2 -2
- package/esm/src/react/components/chat/icons/index.d.ts +8 -0
- package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/icons/index.js +64 -0
- package/esm/src/react/components/chat/markdown.d.ts +24 -1
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +122 -38
- package/esm/src/react/components/chat/model-selector.d.ts +130 -8
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +148 -121
- package/esm/src/react/components/chat/theme.d.ts +9 -12
- package/esm/src/react/components/chat/theme.d.ts.map +1 -1
- package/esm/src/react/components/chat/theme.js +149 -93
- package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
- package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/alert.js +35 -0
- package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
- package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/app-shell.js +276 -0
- package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
- package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/avatar.js +44 -0
- package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
- package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/badge.js +30 -0
- package/esm/src/react/components/chat/ui/button.d.ts +44 -0
- package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/button.js +108 -0
- package/esm/src/react/components/chat/ui/card.d.ts +42 -0
- package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/card.js +55 -0
- package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
- package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/checkbox.js +36 -0
- package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
- package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/code-block.js +277 -0
- package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
- package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/collapsible.js +44 -0
- package/esm/src/react/components/chat/ui/command.d.ts +65 -0
- package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/command.js +121 -0
- package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
- package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/cva.js +45 -0
- package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
- package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/dialog.js +116 -0
- package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
- package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/drawer.js +92 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
- package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
- package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/file-type.js +235 -0
- package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
- package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/floating.js +90 -0
- package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
- package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/icon-button.js +20 -0
- package/esm/src/react/components/chat/ui/index.d.ts +43 -0
- package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/index.js +42 -0
- package/esm/src/react/components/chat/ui/input.d.ts +27 -0
- package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/input.js +41 -0
- package/esm/src/react/components/chat/ui/label.d.ts +29 -0
- package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/label.js +40 -0
- package/esm/src/react/components/chat/ui/list.d.ts +47 -0
- package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/list.js +40 -0
- package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
- package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/pill.js +39 -0
- package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
- package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/popover.js +68 -0
- package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
- package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
- package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
- package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/radio.js +29 -0
- package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
- package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
- package/esm/src/react/components/chat/ui/select.d.ts +64 -0
- package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/select.js +148 -0
- package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
- package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/shimmer.js +24 -0
- package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
- package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/skeleton.js +12 -0
- package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
- package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/slot.js +70 -0
- package/esm/src/react/components/chat/ui/status.d.ts +28 -0
- package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/status.js +23 -0
- package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
- package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/switch.js +58 -0
- package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
- package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tabs.js +51 -0
- package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
- package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tag.js +27 -0
- package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
- package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/textarea.js +35 -0
- package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
- package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tooltip.js +132 -0
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +17 -4
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
- package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
- package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
- package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
- package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
- package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
- package/esm/src/server/runtime-handler/index.d.ts +1 -1
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +3 -0
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/blob/local-storage.d.ts +32 -0
- package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
- package/esm/src/workflow/blob/local-storage.js +179 -0
- package/esm/src/workflow/blob/types.d.ts +5 -0
- package/esm/src/workflow/blob/types.d.ts.map +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
- package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
- package/package.json +5 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
- package/esm/src/react/components/chat/message.d.ts +0 -42
- package/esm/src/react/components/chat/message.d.ts.map +0 -1
- package/esm/src/react/components/chat/message.js +0 -69
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabs — ported from Veryfront Studio `components/Tabs/Tabs.tsx`, with the
|
|
3
|
+
* `motion/react` spring-slide forked out: the active pill is a static
|
|
4
|
+
* background (no dependency, no layout animation), only the `transition-colors`
|
|
5
|
+
* CSS that Studio already ships. Semantic classes remapped to veryfront's
|
|
6
|
+
* `[var(--token)]` vocabulary. Private to the chat module.
|
|
7
|
+
*
|
|
8
|
+
* Flat, prefixed exports (`Tabs` + `TabsItem`) to match the other `ui/`
|
|
9
|
+
* primitives (`SelectItem`, `DialogTrigger`, …). Note: `cn` is clsx-only (no
|
|
10
|
+
* tailwind-merge), so overriding a base utility via `className` needs the `!`
|
|
11
|
+
* suffix (e.g. `px-8!`).
|
|
12
|
+
*
|
|
13
|
+
* Two sizes:
|
|
14
|
+
* - `default` — filled track (`--input-bg`), 34/38px, accent pill.
|
|
15
|
+
* - `sm` — flat, outlined, 32px, for panel headers.
|
|
16
|
+
*
|
|
17
|
+
* @module react/components/chat/ui/tabs
|
|
18
|
+
*/
|
|
19
|
+
import * as React from "../../../../../react/react.js";
|
|
20
|
+
import { cn } from "../theme.js";
|
|
21
|
+
const TabsContext = React.createContext(null);
|
|
22
|
+
/** Tablist container — manages active state and passes context to items. */
|
|
23
|
+
export const Tabs = React.forwardRef(function Tabs({ value, onValueChange, size = "default", className, children, ...props }, ref) {
|
|
24
|
+
return (React.createElement(TabsContext.Provider, { value: { value, onValueChange, size } },
|
|
25
|
+
React.createElement("div", { ref: ref, ...props, role: "tablist", className: cn("inline-flex w-fit items-center rounded-full", size === "sm"
|
|
26
|
+
? "h-[32px] gap-0 border border-[var(--edge)] bg-transparent p-0.5"
|
|
27
|
+
: "h-[34px] gap-2 bg-[var(--input-bg)] p-1 md:h-[38px]", className) }, children)));
|
|
28
|
+
});
|
|
29
|
+
Tabs.displayName = "Tabs";
|
|
30
|
+
/**
|
|
31
|
+
* Individual tab — renders as a button, or an anchor when `href` is set.
|
|
32
|
+
* Forwards native props/ref and composes the caller's `onClick` with the
|
|
33
|
+
* internal selection (caller's runs first, then the tab activates), so a
|
|
34
|
+
* consumer-supplied handler adds to — never overrides — selection.
|
|
35
|
+
*/
|
|
36
|
+
export const TabsItem = React.forwardRef(function TabsItem({ value, href, children, className, onClick, ...props }, ref) {
|
|
37
|
+
const ctx = React.useContext(TabsContext);
|
|
38
|
+
if (!ctx)
|
|
39
|
+
throw new Error("TabsItem must be used within Tabs");
|
|
40
|
+
const isActive = ctx.value === value;
|
|
41
|
+
const Comp = (href ? "a" : "button");
|
|
42
|
+
return (React.createElement(Comp, { ref: ref, ...(href ? { href } : { type: "button" }), ...props, role: "tab", "aria-selected": isActive, onClick: (e) => {
|
|
43
|
+
onClick?.(e);
|
|
44
|
+
ctx.onValueChange(value);
|
|
45
|
+
}, className: cn("relative inline-flex items-center h-full rounded-full font-normal transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)]", ctx.size === "sm" ? "px-3 text-sm" : "px-5 md:px-6 text-sm md:text-base", isActive
|
|
46
|
+
? cn("text-[var(--foreground)]", ctx.size === "default" && "dark:text-[var(--background)]")
|
|
47
|
+
: "text-[var(--foreground)] opacity-50 hover:opacity-100", className) },
|
|
48
|
+
isActive && (React.createElement("div", { className: cn("absolute inset-0 rounded-full bg-[var(--accent)]", ctx.size === "default" && "dark:bg-[var(--foreground)]") })),
|
|
49
|
+
React.createElement("span", { className: "relative z-10" }, children)));
|
|
50
|
+
});
|
|
51
|
+
TabsItem.displayName = "TabsItem";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag — ported 1:1 from Veryfront Studio. A small rounded chip for metadata /
|
|
3
|
+
* labels, with link and button affordances plus a wrapping group. Semantic
|
|
4
|
+
* classes remapped to veryfront's `[var(--token)]` vocabulary. Private to the
|
|
5
|
+
* chat module.
|
|
6
|
+
*
|
|
7
|
+
* @module react/components/chat/ui/tag
|
|
8
|
+
*/
|
|
9
|
+
import * as React from "../../../../../react/react.js";
|
|
10
|
+
/** Static metadata chip. */
|
|
11
|
+
export declare function Tag({ className, children, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.ReactElement;
|
|
12
|
+
/** Props accepted by `<TagLink>`. */
|
|
13
|
+
export interface TagLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
14
|
+
href: string;
|
|
15
|
+
}
|
|
16
|
+
/** Tag rendered as an external link. */
|
|
17
|
+
export declare function TagLink({ className, ...props }: TagLinkProps): React.ReactElement;
|
|
18
|
+
/** Tag rendered as a button. */
|
|
19
|
+
export declare function TagButton({ className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>): React.ReactElement;
|
|
20
|
+
/** Wrapping container for a row of tags. */
|
|
21
|
+
export declare function TagGroup({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
22
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/tag.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAMvD,4BAA4B;AAC5B,wBAAgB,GAAG,CACjB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GACvE,KAAK,CAAC,YAAY,CAMpB;AAED,qCAAqC;AACrC,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACjF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wCAAwC;AACxC,wBAAgB,OAAO,CACrB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GACpC,KAAK,CAAC,YAAY,CAapB;AAED,gCAAgC;AAChC,wBAAgB,SAAS,CACvB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GACrE,KAAK,CAAC,YAAY,CAYpB;AAED,4CAA4C;AAC5C,wBAAgB,QAAQ,CACtB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GACtE,KAAK,CAAC,YAAY,CASpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag — ported 1:1 from Veryfront Studio. A small rounded chip for metadata /
|
|
3
|
+
* labels, with link and button affordances plus a wrapping group. Semantic
|
|
4
|
+
* classes remapped to veryfront's `[var(--token)]` vocabulary. Private to the
|
|
5
|
+
* chat module.
|
|
6
|
+
*
|
|
7
|
+
* @module react/components/chat/ui/tag
|
|
8
|
+
*/
|
|
9
|
+
import * as React from "../../../../../react/react.js";
|
|
10
|
+
import { cn } from "../theme.js";
|
|
11
|
+
const tagClasses = "inline-flex items-center rounded-full bg-[var(--edge)] px-3 py-1 text-xs text-[var(--foreground)] whitespace-nowrap";
|
|
12
|
+
/** Static metadata chip. */
|
|
13
|
+
export function Tag({ className, children, ...props }) {
|
|
14
|
+
return (React.createElement("span", { className: cn(tagClasses, className), ...props }, children));
|
|
15
|
+
}
|
|
16
|
+
/** Tag rendered as an external link. */
|
|
17
|
+
export function TagLink({ className, ...props }) {
|
|
18
|
+
return (React.createElement("a", { className: cn(tagClasses, "hover:bg-[var(--tertiary)] transition-colors", className), target: "_blank", rel: "noopener noreferrer", ...props }));
|
|
19
|
+
}
|
|
20
|
+
/** Tag rendered as a button. */
|
|
21
|
+
export function TagButton({ className, ...props }) {
|
|
22
|
+
return (React.createElement("button", { type: "button", className: cn(tagClasses, "hover:bg-[var(--tertiary)] transition-colors", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
/** Wrapping container for a row of tags. */
|
|
25
|
+
export function TagGroup({ className, children, ...props }) {
|
|
26
|
+
return (React.createElement("div", { className: cn("flex flex-wrap items-center gap-1.5", className), ...props }, children));
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Textarea — ported 1:1 from Veryfront Studio, semantic classes remapped to
|
|
3
|
+
* veryfront's `[var(--token)]` vocabulary. Private to the chat module.
|
|
4
|
+
*
|
|
5
|
+
* @module react/components/chat/ui/textarea
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "../../../../../react/react.js";
|
|
8
|
+
import { type VariantProps } from "./cva.js";
|
|
9
|
+
declare const textareaVariants: (props?: ({
|
|
10
|
+
size?: "default" | "sm" | null | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
class?: import("../../../../utils/clsx.js").ClassValue;
|
|
13
|
+
className?: import("../../../../utils/clsx.js").ClassValue;
|
|
14
|
+
}) | undefined) => string;
|
|
15
|
+
/** Props accepted by `<Textarea>`. */
|
|
16
|
+
export interface TextareaProps extends Omit<React.ComponentProps<"textarea">, "size">, VariantProps<typeof textareaVariants> {
|
|
17
|
+
ref?: React.Ref<HTMLTextAreaElement>;
|
|
18
|
+
}
|
|
19
|
+
/** Render a textarea. */
|
|
20
|
+
export declare function Textarea({ className, size, ref, ...props }: TextareaProps): React.ReactElement;
|
|
21
|
+
export { textareaVariants };
|
|
22
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/textarea.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAEvD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAElD,QAAA,MAAM,gBAAgB;;;;;yBAuBrB,CAAC;AAEF,sCAAsC;AACtC,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC;IAC7F,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;CACtC;AAED,yBAAyB;AACzB,wBAAgB,QAAQ,CACtB,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAChD,KAAK,CAAC,YAAY,CAQpB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Textarea — ported 1:1 from Veryfront Studio, semantic classes remapped to
|
|
3
|
+
* veryfront's `[var(--token)]` vocabulary. Private to the chat module.
|
|
4
|
+
*
|
|
5
|
+
* @module react/components/chat/ui/textarea
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "../../../../../react/react.js";
|
|
8
|
+
import { cn } from "../theme.js";
|
|
9
|
+
import { cva } from "./cva.js";
|
|
10
|
+
const textareaVariants = cva([
|
|
11
|
+
"flex w-full text-[var(--foreground)]",
|
|
12
|
+
"placeholder:text-[var(--foreground)] placeholder:opacity-25",
|
|
13
|
+
"transition-[background-color,box-shadow,border-color] duration-150 ease-in",
|
|
14
|
+
"focus-visible:outline-none",
|
|
15
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
"resize-none",
|
|
17
|
+
"rounded-md bg-[var(--input-bg)] border border-[var(--background)] dark:border-transparent",
|
|
18
|
+
// veryfront has no --status-error token yet; fall back to --destructive.
|
|
19
|
+
"data-[invalid=true]:border-[var(--destructive)]",
|
|
20
|
+
], {
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
default: "min-h-32 md:min-h-28 px-4 py-3 text-base",
|
|
24
|
+
sm: "min-h-20 px-3 py-2 text-base",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
size: "default",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
/** Render a textarea. */
|
|
32
|
+
export function Textarea({ className, size, ref, ...props }) {
|
|
33
|
+
return (React.createElement("textarea", { className: cn(textareaVariants({ size }), className), ref: ref, ...props }));
|
|
34
|
+
}
|
|
35
|
+
export { textareaVariants };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tooltip — API-compatible with Studio's (Radix-shaped: `TooltipProvider` /
|
|
3
|
+
* `Tooltip` / `TooltipTrigger` / `TooltipContent`). Hover/focus opens it.
|
|
4
|
+
*
|
|
5
|
+
* Content is PORTALLED to `document.body` and positioned with `getBounding
|
|
6
|
+
* ClientRect`, so it escapes the Storybook iframe / any `overflow:hidden`
|
|
7
|
+
* ancestor (the recurring clip bug). Positioning is collision-aware: the
|
|
8
|
+
* requested `side` flips to its opposite when it would overflow the viewport,
|
|
9
|
+
* and the cross-axis is clamped to stay on-screen.
|
|
10
|
+
*
|
|
11
|
+
* TODO(a11y): `aria-describedby` wiring, open/close delay grouping, `Escape`
|
|
12
|
+
* dismissal. Private to the chat module.
|
|
13
|
+
*
|
|
14
|
+
* @module react/components/chat/ui/tooltip
|
|
15
|
+
*/
|
|
16
|
+
import * as React from "../../../../../react/react.js";
|
|
17
|
+
type Side = "top" | "bottom" | "left" | "right";
|
|
18
|
+
/** Provider for shared tooltip config. Basic: a passthrough for API parity. */
|
|
19
|
+
export declare function TooltipProvider({ children }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
delayDuration?: number;
|
|
22
|
+
}): React.ReactElement;
|
|
23
|
+
/** Tooltip root — owns open state and the positioning anchor. */
|
|
24
|
+
export declare function Tooltip({ children }: {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}): React.ReactElement;
|
|
27
|
+
/** Tooltip trigger. `asChild` merges onto the child element (e.g. a Button). */
|
|
28
|
+
export declare function TooltipTrigger({ children, asChild, ...props }: React.HTMLAttributes<HTMLElement> & {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
asChild?: boolean;
|
|
31
|
+
}): React.ReactElement;
|
|
32
|
+
/** Props accepted by `<TooltipContent>`. */
|
|
33
|
+
export interface TooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
side?: Side;
|
|
35
|
+
sideOffset?: number;
|
|
36
|
+
}
|
|
37
|
+
/** Tooltip content — portalled + positioned while hovered/focused. */
|
|
38
|
+
export declare function TooltipContent({ side, sideOffset, className, children, style, ...props }: TooltipContentProps): React.ReactElement | null;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/tooltip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAKvD,KAAK,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAMhD,+EAA+E;AAC/E,wBAAgB,eAAe,CAC7B,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAClE,KAAK,CAAC,YAAY,CAEpB;AAED,iEAAiE;AACjE,wBAAgB,OAAO,CACrB,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAC1C,KAAK,CAAC,YAAY,CAiBpB;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAC5B,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAC3B,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GACjC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACnD,KAAK,CAAC,YAAY,CAKpB;AA6DD,4CAA4C;AAC5C,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/E,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAC5B,EAAE,IAAY,EAAE,UAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAC1F,KAAK,CAAC,YAAY,GAAG,IAAI,CAgE3B"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tooltip — API-compatible with Studio's (Radix-shaped: `TooltipProvider` /
|
|
3
|
+
* `Tooltip` / `TooltipTrigger` / `TooltipContent`). Hover/focus opens it.
|
|
4
|
+
*
|
|
5
|
+
* Content is PORTALLED to `document.body` and positioned with `getBounding
|
|
6
|
+
* ClientRect`, so it escapes the Storybook iframe / any `overflow:hidden`
|
|
7
|
+
* ancestor (the recurring clip bug). Positioning is collision-aware: the
|
|
8
|
+
* requested `side` flips to its opposite when it would overflow the viewport,
|
|
9
|
+
* and the cross-axis is clamped to stay on-screen.
|
|
10
|
+
*
|
|
11
|
+
* TODO(a11y): `aria-describedby` wiring, open/close delay grouping, `Escape`
|
|
12
|
+
* dismissal. Private to the chat module.
|
|
13
|
+
*
|
|
14
|
+
* @module react/components/chat/ui/tooltip
|
|
15
|
+
*/
|
|
16
|
+
import * as React from "../../../../../react/react.js";
|
|
17
|
+
import { createPortal } from "../../../../../react/react-dom.js";
|
|
18
|
+
import { cn } from "../theme.js";
|
|
19
|
+
import { Slot } from "./slot.js";
|
|
20
|
+
const TooltipContext = React.createContext(null);
|
|
21
|
+
/** Provider for shared tooltip config. Basic: a passthrough for API parity. */
|
|
22
|
+
export function TooltipProvider({ children }) {
|
|
23
|
+
return React.createElement(React.Fragment, null, children);
|
|
24
|
+
}
|
|
25
|
+
/** Tooltip root — owns open state and the positioning anchor. */
|
|
26
|
+
export function Tooltip({ children }) {
|
|
27
|
+
const [open, setOpen] = React.useState(false);
|
|
28
|
+
const anchorRef = React.useRef(null);
|
|
29
|
+
return (React.createElement("span", { ref: anchorRef, className: "relative inline-flex", onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false), onFocusCapture: () => setOpen(true), onBlurCapture: () => setOpen(false) },
|
|
30
|
+
React.createElement(TooltipContext.Provider, { value: { open, anchorRef } }, children)));
|
|
31
|
+
}
|
|
32
|
+
/** Tooltip trigger. `asChild` merges onto the child element (e.g. a Button). */
|
|
33
|
+
export function TooltipTrigger({ children, asChild, ...props }) {
|
|
34
|
+
const Comp = asChild ? Slot : "span";
|
|
35
|
+
// Forward native props (onClick, aria-*, data-*) to the trigger element —
|
|
36
|
+
// without this they were dropped unless `asChild` was used.
|
|
37
|
+
return React.createElement(Comp, { ...props }, children);
|
|
38
|
+
}
|
|
39
|
+
/** Which viewport edge each side would collide with, and its opposite. */
|
|
40
|
+
const opposite = {
|
|
41
|
+
top: "bottom",
|
|
42
|
+
bottom: "top",
|
|
43
|
+
left: "right",
|
|
44
|
+
right: "left",
|
|
45
|
+
};
|
|
46
|
+
/** Compute a fixed-position rect for `side`, flipping on collision. */
|
|
47
|
+
function place(anchor, cw, ch, side, offset) {
|
|
48
|
+
const vw = globalThis.innerWidth;
|
|
49
|
+
const vh = globalThis.innerHeight;
|
|
50
|
+
const pad = 8;
|
|
51
|
+
const fits = (s) => {
|
|
52
|
+
if (s === "top")
|
|
53
|
+
return anchor.top - offset - ch >= pad;
|
|
54
|
+
if (s === "bottom")
|
|
55
|
+
return anchor.bottom + offset + ch <= vh - pad;
|
|
56
|
+
if (s === "left")
|
|
57
|
+
return anchor.left - offset - cw >= pad;
|
|
58
|
+
return anchor.right + offset + cw <= vw - pad;
|
|
59
|
+
};
|
|
60
|
+
const chosen = fits(side) || !fits(opposite[side]) ? side : opposite[side];
|
|
61
|
+
let top;
|
|
62
|
+
let left;
|
|
63
|
+
if (chosen === "top") {
|
|
64
|
+
top = anchor.top - offset - ch;
|
|
65
|
+
left = anchor.left + anchor.width / 2 - cw / 2;
|
|
66
|
+
}
|
|
67
|
+
else if (chosen === "bottom") {
|
|
68
|
+
top = anchor.bottom + offset;
|
|
69
|
+
left = anchor.left + anchor.width / 2 - cw / 2;
|
|
70
|
+
}
|
|
71
|
+
else if (chosen === "left") {
|
|
72
|
+
top = anchor.top + anchor.height / 2 - ch / 2;
|
|
73
|
+
left = anchor.left - offset - cw;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
top = anchor.top + anchor.height / 2 - ch / 2;
|
|
77
|
+
left = anchor.right + offset;
|
|
78
|
+
}
|
|
79
|
+
left = Math.max(pad, Math.min(left, vw - cw - pad));
|
|
80
|
+
top = Math.max(pad, Math.min(top, vh - ch - pad));
|
|
81
|
+
return { top, left, side: chosen };
|
|
82
|
+
}
|
|
83
|
+
// A rotated square centred on the trigger-facing edge — half straddles the
|
|
84
|
+
// bubble so the outer half reads as a triangle pointing at the trigger.
|
|
85
|
+
const arrowClasses = {
|
|
86
|
+
top: "top-full left-1/2 -translate-x-1/2 -translate-y-1/2 rotate-45",
|
|
87
|
+
bottom: "bottom-full left-1/2 -translate-x-1/2 translate-y-1/2 rotate-45",
|
|
88
|
+
left: "left-full top-1/2 -translate-x-1/2 -translate-y-1/2 rotate-45",
|
|
89
|
+
right: "right-full top-1/2 translate-x-1/2 -translate-y-1/2 rotate-45",
|
|
90
|
+
};
|
|
91
|
+
/** Tooltip content — portalled + positioned while hovered/focused. */
|
|
92
|
+
export function TooltipContent({ side = "top", sideOffset = 6, className, children, style, ...props }) {
|
|
93
|
+
const ctx = React.useContext(TooltipContext);
|
|
94
|
+
const ref = React.useRef(null);
|
|
95
|
+
const [pos, setPos] = React.useState({ top: 0, left: 0, side, visible: false });
|
|
96
|
+
const open = ctx?.open ?? false;
|
|
97
|
+
const anchorRef = ctx?.anchorRef;
|
|
98
|
+
React.useLayoutEffect(() => {
|
|
99
|
+
if (!open || !anchorRef)
|
|
100
|
+
return;
|
|
101
|
+
const update = () => {
|
|
102
|
+
const a = anchorRef.current?.getBoundingClientRect();
|
|
103
|
+
const c = ref.current;
|
|
104
|
+
if (!a || !c)
|
|
105
|
+
return;
|
|
106
|
+
const next = place(a, c.offsetWidth, c.offsetHeight, side, sideOffset);
|
|
107
|
+
setPos({ ...next, visible: true });
|
|
108
|
+
};
|
|
109
|
+
update();
|
|
110
|
+
globalThis.addEventListener("scroll", update, true);
|
|
111
|
+
globalThis.addEventListener("resize", update);
|
|
112
|
+
return () => {
|
|
113
|
+
globalThis.removeEventListener("scroll", update, true);
|
|
114
|
+
globalThis.removeEventListener("resize", update);
|
|
115
|
+
};
|
|
116
|
+
}, [open, side, sideOffset, anchorRef]);
|
|
117
|
+
if (!open)
|
|
118
|
+
return null;
|
|
119
|
+
// Portal into the nearest chat root, not <body>: the design tokens live on
|
|
120
|
+
// `[data-vf-chat]`, so a surface under <body> resolves every `var(--…)` to
|
|
121
|
+
// nothing (transparent, wrong colors).
|
|
122
|
+
const container = anchorRef?.current?.closest("[data-vf-chat]") ??
|
|
123
|
+
document.body;
|
|
124
|
+
return createPortal(React.createElement("div", { ref: ref, role: "tooltip", className: cn("fixed z-[60] w-max max-w-xs whitespace-nowrap rounded-md bg-[var(--primary)] px-2.5 py-1 text-xs font-medium text-[var(--secondary)] shadow-sm pointer-events-none", "dark:bg-[var(--secondary)] dark:text-[var(--foreground)]", className), style: {
|
|
125
|
+
top: pos.top,
|
|
126
|
+
left: pos.left,
|
|
127
|
+
visibility: pos.visible ? "visible" : "hidden",
|
|
128
|
+
...style,
|
|
129
|
+
}, ...props },
|
|
130
|
+
children,
|
|
131
|
+
React.createElement("span", { "aria-hidden": "true", className: cn("absolute size-2 bg-[var(--primary)] dark:bg-[var(--secondary)]", arrowClasses[pos.side]) })), container);
|
|
132
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-box.d.ts","sourceRoot":"","sources":["../../../../src/src/react/primitives/input-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"input-box.d.ts","sourceRoot":"","sources":["../../../../src/src/react/primitives/input-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,yBAAyB,CAAC;AASjD,MAAM,WAAW,aAAc,SAC7B,IAAI,CACF,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,EACjE,UAAU,GAAG,UAAU,CACxB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CACR,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KACzD,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,8GA6DnB,CAAC;AAIH,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACzB,CAAC;IACF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA8CD,eAAO,MAAM,YAAY,6FA2ExB,CAAC;AAIF,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB,8FAY3B,CAAC"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import * as React from "../../../react/react.js";
|
|
2
|
+
// SSR-safe layout effect: run before paint on the client (so the textarea's
|
|
3
|
+
// auto-resize height is applied in the same frame as hydration — no visible
|
|
4
|
+
// jump), and fall back to a no-op effect on the server.
|
|
5
|
+
const useIsomorphicLayoutEffect = typeof document !== "undefined"
|
|
6
|
+
? React.useLayoutEffect
|
|
7
|
+
: React.useEffect;
|
|
2
8
|
export const InputBox = React.forwardRef(({ className, value, onChange, onSubmit, multiline, ...props }, ref) => {
|
|
3
9
|
const internalRef = React.useRef(null);
|
|
4
|
-
const textareaRef = ref ||
|
|
10
|
+
const textareaRef = ref ||
|
|
11
|
+
internalRef;
|
|
5
12
|
const handleKeyDown = (e) => {
|
|
6
13
|
if (e.key !== "Enter" || e.shiftKey || !onSubmit)
|
|
7
14
|
return;
|
|
8
15
|
e.preventDefault();
|
|
9
16
|
onSubmit();
|
|
10
17
|
};
|
|
11
|
-
// Auto-resize textarea to fit content
|
|
12
|
-
|
|
18
|
+
// Auto-resize textarea to fit content. Runs in a layout effect (before paint)
|
|
19
|
+
// so the height is set in the same frame as hydration — the fixed `min-h`
|
|
20
|
+
// class on the textarea holds the SSR height, so there is no post-hydration
|
|
21
|
+
// jump.
|
|
22
|
+
useIsomorphicLayoutEffect(() => {
|
|
13
23
|
const el = textareaRef.current;
|
|
14
24
|
if (!el || !multiline)
|
|
15
25
|
return;
|
|
@@ -19,7 +29,10 @@ export const InputBox = React.forwardRef(({ className, value, onChange, onSubmit
|
|
|
19
29
|
}
|
|
20
30
|
}, [value, multiline, textareaRef]);
|
|
21
31
|
if (multiline) {
|
|
22
|
-
return (React.createElement("textarea", { ref: textareaRef, className: className,
|
|
32
|
+
return (React.createElement("textarea", { ref: textareaRef, className: className,
|
|
33
|
+
// The auto-resize height is applied client-side only, so the inline
|
|
34
|
+
// `height` differs between SSR and first client render.
|
|
35
|
+
suppressHydrationWarning: true, style: { resize: "none", border: "none", outline: "none" }, value: value, onChange: onChange, onKeyDown: handleKeyDown, "data-input-box": "", "data-multiline": "true", rows: 1, ...props }));
|
|
23
36
|
}
|
|
24
37
|
return (React.createElement("input", { ref: ref, type: "text", className: className, value: value, onChange: onChange, onKeyDown: handleKeyDown, "data-input-box": "", ...props }));
|
|
25
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-candidates.generated.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/dev/framework-candidates.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"framework-candidates.generated.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/dev/framework-candidates.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAm4bjD,CAAC"}
|