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,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatThemeScope — establishes the `[data-vf-chat]` token scope that the chat
|
|
3
|
+
* UI's `[var(--token)]` classes resolve against. `<Chat>` injects this scope
|
|
4
|
+
* for itself, but when you compose the chat primitives *around* it — a sidebar,
|
|
5
|
+
* header tabs, an uploads panel in your own shell — those live outside `<Chat>`
|
|
6
|
+
* and would render unstyled. Wrap your shell in one `ChatThemeScope` so every
|
|
7
|
+
* chat primitive inside it is themed:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <ChatThemeScope className="h-screen">
|
|
11
|
+
* <AppShell> …sidebar… <Chat … /> </AppShell>
|
|
12
|
+
* </ChatThemeScope>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @module react/components/chat/chat-theme-scope
|
|
16
|
+
*/
|
|
17
|
+
import * as React from "../../../../react/react.js";
|
|
18
|
+
/** Props accepted by {@link ChatThemeScope}. */
|
|
19
|
+
export interface ChatThemeScopeProps {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
/** Extra classes for the scope element. */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/** Wrap chat primitives in the `[data-vf-chat]` token scope so they're themed. */
|
|
25
|
+
export declare function ChatThemeScope({ children, className }: ChatThemeScopeProps): React.ReactElement;
|
|
26
|
+
//# sourceMappingURL=chat-theme-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-theme-scope.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/chat-theme-scope.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAIpD,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAC5B,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,GAC3C,KAAK,CAAC,YAAY,CAYpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatThemeScope — establishes the `[data-vf-chat]` token scope that the chat
|
|
3
|
+
* UI's `[var(--token)]` classes resolve against. `<Chat>` injects this scope
|
|
4
|
+
* for itself, but when you compose the chat primitives *around* it — a sidebar,
|
|
5
|
+
* header tabs, an uploads panel in your own shell — those live outside `<Chat>`
|
|
6
|
+
* and would render unstyled. Wrap your shell in one `ChatThemeScope` so every
|
|
7
|
+
* chat primitive inside it is themed:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <ChatThemeScope className="h-screen">
|
|
11
|
+
* <AppShell> …sidebar… <Chat … /> </AppShell>
|
|
12
|
+
* </ChatThemeScope>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @module react/components/chat/chat-theme-scope
|
|
16
|
+
*/
|
|
17
|
+
import * as React from "../../../../react/react.js";
|
|
18
|
+
import { getDocumentNonce } from "./csp-nonce.js";
|
|
19
|
+
import { cn, generateTokenCSS } from "./theme.js";
|
|
20
|
+
/** Wrap chat primitives in the `[data-vf-chat]` token scope so they're themed. */
|
|
21
|
+
export function ChatThemeScope({ children, className }) {
|
|
22
|
+
const nonce = getDocumentNonce();
|
|
23
|
+
const tokenCSS = React.useMemo(() => generateTokenCSS(), []);
|
|
24
|
+
return (React.createElement("div", { "data-vf-chat": "", className: cn("bg-[var(--background)] text-[var(--foreground)]", className) },
|
|
25
|
+
React.createElement("style", { nonce: nonce, dangerouslySetInnerHTML: { __html: tokenCSS } }),
|
|
26
|
+
children));
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatTokens — injects the `[data-vf-chat]`-scoped chat design-token
|
|
3
|
+
* stylesheet.
|
|
4
|
+
*
|
|
5
|
+
* The tokens (`--primary`, `--accent`, …) are what every chat surface's utility
|
|
6
|
+
* classes (`bg-[var(--primary)]`, …) resolve against. They are deliberately
|
|
7
|
+
* NOT on `:root`: the names collide with host apps' own theme variables (see
|
|
8
|
+
* `generateTokenCSS`). `<Chat>` injects them for its own subtree; a surface
|
|
9
|
+
* rendered *outside* `<Chat>` — `<ChatSidebar>`, `<AttachmentsPanel>`,
|
|
10
|
+
* `<AppShell>` — renders this AND sets `data-vf-chat` on its root element.
|
|
11
|
+
* The CSS is identical everywhere, so duplicate tags are harmless.
|
|
12
|
+
*
|
|
13
|
+
* @module react/components/chat/chat-tokens-style
|
|
14
|
+
*/
|
|
15
|
+
import * as React from "../../../../react/react.js";
|
|
16
|
+
/** Scoped chat design-token stylesheet. Idempotent — render it anywhere. */
|
|
17
|
+
export declare function ChatTokens(): React.ReactElement;
|
|
18
|
+
export declare namespace ChatTokens {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=chat-tokens-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-tokens-style.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/chat-tokens-style.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAMpD,4EAA4E;AAC5E,wBAAgB,UAAU,IAAI,KAAK,CAAC,YAAY,CAG/C;yBAHe,UAAU"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatTokens — injects the `[data-vf-chat]`-scoped chat design-token
|
|
3
|
+
* stylesheet.
|
|
4
|
+
*
|
|
5
|
+
* The tokens (`--primary`, `--accent`, …) are what every chat surface's utility
|
|
6
|
+
* classes (`bg-[var(--primary)]`, …) resolve against. They are deliberately
|
|
7
|
+
* NOT on `:root`: the names collide with host apps' own theme variables (see
|
|
8
|
+
* `generateTokenCSS`). `<Chat>` injects them for its own subtree; a surface
|
|
9
|
+
* rendered *outside* `<Chat>` — `<ChatSidebar>`, `<AttachmentsPanel>`,
|
|
10
|
+
* `<AppShell>` — renders this AND sets `data-vf-chat` on its root element.
|
|
11
|
+
* The CSS is identical everywhere, so duplicate tags are harmless.
|
|
12
|
+
*
|
|
13
|
+
* @module react/components/chat/chat-tokens-style
|
|
14
|
+
*/
|
|
15
|
+
import * as React from "../../../../react/react.js";
|
|
16
|
+
import { getDocumentNonce } from "./csp-nonce.js";
|
|
17
|
+
import { generateTokenCSS } from "./theme.js";
|
|
18
|
+
const tokenCSS = generateTokenCSS();
|
|
19
|
+
/** Scoped chat design-token stylesheet. Idempotent — render it anywhere. */
|
|
20
|
+
export function ChatTokens() {
|
|
21
|
+
const nonce = getDocumentNonce();
|
|
22
|
+
return React.createElement("style", { nonce: nonce, dangerouslySetInnerHTML: { __html: tokenCSS } });
|
|
23
|
+
}
|
|
24
|
+
ChatTokens.displayName = "ChatTokens";
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @module react/components/chat
|
|
5
5
|
*/
|
|
6
6
|
export { Chat, ChatComponents, type ChatProps } from "./chat/index.js";
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export { type
|
|
11
|
-
export {
|
|
7
|
+
export { AgentAvatar, type AgentAvatarProps, ChatEmpty, type ChatEmptyProps, ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, ChatIf, type ChatIfProps, ChatInput, type ChatInputProps, ChatMessageList, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageProps, type MessageRootProps, ModelAvatar, type ModelAvatarProps, } from "./chat/index.js";
|
|
8
|
+
export { type Conversation, type ConversationPatch, ConversationsContextProvider, ConversationsProvider, type ConversationsProviderProps, type ConversationStore, type ConversationSummary, localConversationStore, memoryConversationStore, type StorageLike, useConversation, type UseConversationOptions, type UseConversationResult, useConversations, useConversationsContext, useConversationsContextOptional, type UseConversationsOptions, type UseConversationsResult, } from "./chat/index.js";
|
|
9
|
+
export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "./chat/index.js";
|
|
10
|
+
export { type AttachmentInfo, AttachmentPill, type AttachmentPillContextValue, type AttachmentPillProps, AttachmentsPanel, type AttachmentsPanelActionProps, type AttachmentsPanelContextValue, type AttachmentsPanelEmptyProps, type AttachmentsPanelHeaderProps, type AttachmentsPanelItemProps, type AttachmentsPanelListProps, type AttachmentsPanelLoadingProps, type AttachmentsPanelProps, BranchPicker, type BranchPickerProps, ChatMessagesSkeleton, type ChatMessagesSkeletonProps, ChatSidebar, type ChatSidebarComponent, type ChatSidebarEmptyProps, type ChatSidebarGroupProps, type ChatSidebarIcons, type ChatSidebarItemProps, type ChatSidebarListProps, type ChatSidebarNewButtonProps, type ChatSidebarProps, type ChatSidebarRootProps, type ChatTab, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, type MessageActionBarProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, Reasoning, ReasoningCard, type ReasoningContextValue, type ReasoningProps, type ReasoningTriggerProps, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, SourcePill, type SourcePillProps, Sources, type SourcesContextValue, type SourcesListProps, type SourcesProps, StepIndicator, type StepIndicatorContextValue, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, ToolCall, ToolCallCard, type ToolCallContextValue, type ToolCallProps, type ToolCallTriggerProps, ToolStatusBadge, type UploadedFile, useAttachmentPill, useAttachmentsPanel, useReasoning, useSources, useStepIndicator, useStickToBottom, type UseStickToBottomOptions, type UseStickToBottomResult, useToolCall, useUpload, type UseUploadOptions, type UseUploadResult, useUploadsRegistry, type UseUploadsRegistryOptions, type UseUploadsRegistryResult, } from "./chat/index.js";
|
|
11
|
+
export { type ModelOption, ModelSelector, type ModelSelectorContentProps, type ModelSelectorContextValue, type ModelSelectorItemProps, type ModelSelectorProps, type ModelSelectorTriggerProps, useModelSelector, } from "./model-selector.js";
|
|
12
12
|
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/chat.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKvE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/chat.tsx"],"names":[],"mappings":"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"}
|
|
@@ -10,17 +10,17 @@ export { Chat, ChatComponents } from "./chat/index.js";
|
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
11
|
// Composition building blocks
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
13
|
-
export {
|
|
13
|
+
export { AgentAvatar, ChatEmpty, ChatEmptyState, ChatIf, ChatInput, ChatMessageList, ChatRoot, ErrorBanner, Message, ModelAvatar, } from "./chat/index.js";
|
|
14
|
+
export { ConversationsContextProvider, ConversationsProvider, localConversationStore, memoryConversationStore, useConversation, useConversations, useConversationsContext, useConversationsContextOptional, } from "./chat/index.js";
|
|
14
15
|
// ---------------------------------------------------------------------------
|
|
15
16
|
// Contexts
|
|
16
17
|
// ---------------------------------------------------------------------------
|
|
17
|
-
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider,
|
|
18
|
+
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "./chat/index.js";
|
|
18
19
|
// ---------------------------------------------------------------------------
|
|
19
20
|
// Sub-components
|
|
20
21
|
// ---------------------------------------------------------------------------
|
|
21
|
-
export { AttachmentPill, BranchPicker, ChatSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader,
|
|
22
|
+
export { AttachmentPill, AttachmentsPanel, BranchPicker, ChatMessagesSkeleton, ChatSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, MessageEditForm, MessageFeedback, QuickActions, Reasoning, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, SourcePill, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCall, ToolCallCard, ToolStatusBadge, useAttachmentPill, useAttachmentsPanel, useReasoning, useSources, useStepIndicator, useStickToBottom, useToolCall, useUpload, useUploadsRegistry, } from "./chat/index.js";
|
|
22
23
|
// ---------------------------------------------------------------------------
|
|
23
24
|
// Adjacent components
|
|
24
25
|
// ---------------------------------------------------------------------------
|
|
25
|
-
export { ModelSelector } from "./model-selector.js";
|
|
26
|
-
export { ChatWithSidebar, } from "./chat-with-sidebar.js";
|
|
26
|
+
export { ModelSelector, useModelSelector, } from "./model-selector.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "../../../../react/react.js";
|
|
2
|
+
type ColorMode = "light" | "dark" | "system";
|
|
3
|
+
type ResolvedColorMode = "light" | "dark";
|
|
4
|
+
interface ColorModeContextValue {
|
|
5
|
+
mode: ColorMode;
|
|
6
|
+
resolvedMode: ResolvedColorMode;
|
|
7
|
+
setMode: (mode: ColorMode) => void;
|
|
8
|
+
toggleMode: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ColorModeProviderProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
defaultMode?: ColorMode;
|
|
13
|
+
storageKey?: string;
|
|
14
|
+
attribute?: "class" | "data-theme";
|
|
15
|
+
}
|
|
16
|
+
export declare function ColorModeProvider({ children, defaultMode, storageKey, attribute, }: ColorModeProviderProps): React.ReactElement;
|
|
17
|
+
export declare namespace ColorModeProvider {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function useColorMode(): ColorModeContextValue;
|
|
21
|
+
/**
|
|
22
|
+
* Non-throwing variant — returns `null` when there is no `ColorModeProvider`.
|
|
23
|
+
* Use for components that should render standalone (e.g. a `CodeBlock` dropped
|
|
24
|
+
* into markdown) and fall back to light mode.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useColorModeOptional(): ColorModeContextValue | null;
|
|
27
|
+
/**
|
|
28
|
+
* Inline script to prevent flash of wrong color mode on SSR.
|
|
29
|
+
* Render this in <head> before any content.
|
|
30
|
+
*
|
|
31
|
+
* Usage: <ColorModeScript defaultMode="system" />
|
|
32
|
+
*/
|
|
33
|
+
export declare function ColorModeScript({ defaultMode, storageKey, attribute, }: {
|
|
34
|
+
defaultMode?: ColorMode;
|
|
35
|
+
storageKey?: string;
|
|
36
|
+
attribute?: "class" | "data-theme";
|
|
37
|
+
}): React.ReactElement;
|
|
38
|
+
export declare namespace ColorModeScript {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Simple toggle button for color mode.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ColorModeToggle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=color-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-mode.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/color-mode.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAIpD,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC7C,KAAK,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1C,UAAU,qBAAqB;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAeD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;CACpC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,WAAsB,EACtB,UAAwB,EACxB,SAAmB,GACpB,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAyD7C;yBA9De,iBAAiB;;;AAiEjC,wBAAgB,YAAY,IAAI,qBAAqB,CAQpD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,qBAAqB,GAAG,IAAI,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAsB,EACtB,UAAwB,EACxB,SAAmB,GACpB,EAAE;IACD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;CACpC,GAAG,KAAK,CAAC,YAAY,CAQrB;yBAhBe,eAAe;;;AAmB/B;;GAEG;AACH,eAAO,MAAM,eAAe,yHAqD1B,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color Mode System
|
|
3
|
+
*
|
|
4
|
+
* Provides dark/light mode toggling with SSR flash prevention.
|
|
5
|
+
*
|
|
6
|
+
* @module react/components/color-mode
|
|
7
|
+
*/
|
|
8
|
+
import * as dntShim from "../../../../_dnt.shims.js";
|
|
9
|
+
import * as React from "../../../../react/react.js";
|
|
10
|
+
import { COMPONENT_ERROR } from "../../../errors/error-registry.js";
|
|
11
|
+
import { jsonForInlineScript } from "../../../security/client/html-sanitizer.js";
|
|
12
|
+
const ColorModeContext = React.createContext(null);
|
|
13
|
+
function getSystemPreference() {
|
|
14
|
+
if (typeof dntShim.dntGlobalThis === "undefined")
|
|
15
|
+
return "light";
|
|
16
|
+
return globalThis.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
17
|
+
}
|
|
18
|
+
function resolveMode(mode) {
|
|
19
|
+
return mode === "system" ? getSystemPreference() : mode;
|
|
20
|
+
}
|
|
21
|
+
const STORAGE_KEY = "vf-color-mode";
|
|
22
|
+
export function ColorModeProvider({ children, defaultMode = "system", storageKey = STORAGE_KEY, attribute = "class", }) {
|
|
23
|
+
const [mode, setModeState] = React.useState(() => {
|
|
24
|
+
if (typeof dntShim.dntGlobalThis === "undefined")
|
|
25
|
+
return defaultMode;
|
|
26
|
+
try {
|
|
27
|
+
return localStorage.getItem(storageKey) || defaultMode;
|
|
28
|
+
}
|
|
29
|
+
catch (_) {
|
|
30
|
+
/* expected: localStorage may be unavailable */
|
|
31
|
+
return defaultMode;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const resolvedMode = resolveMode(mode);
|
|
35
|
+
const setMode = React.useCallback((newMode) => {
|
|
36
|
+
setModeState(newMode);
|
|
37
|
+
try {
|
|
38
|
+
localStorage.setItem(storageKey, newMode);
|
|
39
|
+
}
|
|
40
|
+
catch (_) {
|
|
41
|
+
/* expected: localStorage may be unavailable */
|
|
42
|
+
}
|
|
43
|
+
}, [storageKey]);
|
|
44
|
+
const toggleMode = React.useCallback(() => {
|
|
45
|
+
setMode(resolvedMode === "dark" ? "light" : "dark");
|
|
46
|
+
}, [resolvedMode, setMode]);
|
|
47
|
+
// Apply attribute to <html>
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
const root = document.documentElement;
|
|
50
|
+
if (attribute === "class") {
|
|
51
|
+
root.classList.toggle("dark", resolvedMode === "dark");
|
|
52
|
+
root.classList.toggle("light", resolvedMode === "light");
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
root.setAttribute("data-theme", resolvedMode);
|
|
56
|
+
}
|
|
57
|
+
root.style.colorScheme = resolvedMode;
|
|
58
|
+
}, [resolvedMode, attribute]);
|
|
59
|
+
// Listen for system preference changes when mode is "system"
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
if (mode !== "system")
|
|
62
|
+
return;
|
|
63
|
+
const mq = globalThis.matchMedia("(prefers-color-scheme: dark)");
|
|
64
|
+
const forceUpdate = () => setModeState("system");
|
|
65
|
+
mq.addEventListener("change", forceUpdate);
|
|
66
|
+
return () => mq.removeEventListener("change", forceUpdate);
|
|
67
|
+
}, [mode]);
|
|
68
|
+
const value = React.useMemo(() => ({ mode, resolvedMode, setMode, toggleMode }), [mode, resolvedMode, setMode, toggleMode]);
|
|
69
|
+
return (React.createElement(ColorModeContext.Provider, { value: value }, children));
|
|
70
|
+
}
|
|
71
|
+
ColorModeProvider.displayName = "ColorModeProvider";
|
|
72
|
+
export function useColorMode() {
|
|
73
|
+
const context = React.useContext(ColorModeContext);
|
|
74
|
+
if (!context) {
|
|
75
|
+
throw COMPONENT_ERROR.create({
|
|
76
|
+
detail: "useColorMode must be used within a ColorModeProvider",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return context;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Non-throwing variant — returns `null` when there is no `ColorModeProvider`.
|
|
83
|
+
* Use for components that should render standalone (e.g. a `CodeBlock` dropped
|
|
84
|
+
* into markdown) and fall back to light mode.
|
|
85
|
+
*/
|
|
86
|
+
export function useColorModeOptional() {
|
|
87
|
+
return React.useContext(ColorModeContext);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Inline script to prevent flash of wrong color mode on SSR.
|
|
91
|
+
* Render this in <head> before any content.
|
|
92
|
+
*
|
|
93
|
+
* Usage: <ColorModeScript defaultMode="system" />
|
|
94
|
+
*/
|
|
95
|
+
export function ColorModeScript({ defaultMode = "system", storageKey = STORAGE_KEY, attribute = "class", }) {
|
|
96
|
+
const applyAttribute = attribute === "class"
|
|
97
|
+
? 'd.classList.add(r);d.classList.remove(r==="dark"?"light":"dark")'
|
|
98
|
+
: 'd.setAttribute("data-theme",r)';
|
|
99
|
+
const script = `(function(){try{var m=localStorage.getItem(${jsonForInlineScript(storageKey)})||${jsonForInlineScript(defaultMode)};var r=m==="system"?globalThis.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light":m;var d=document.documentElement;${applyAttribute};d.style.colorScheme=r}catch(e){}})()`;
|
|
100
|
+
return React.createElement("script", { dangerouslySetInnerHTML: { __html: script } });
|
|
101
|
+
}
|
|
102
|
+
ColorModeScript.displayName = "ColorModeScript";
|
|
103
|
+
/**
|
|
104
|
+
* Simple toggle button for color mode.
|
|
105
|
+
*/
|
|
106
|
+
export const ColorModeToggle = React.forwardRef(function ColorModeToggle({ className, ...props }, ref) {
|
|
107
|
+
const { resolvedMode, toggleMode } = useColorMode();
|
|
108
|
+
const isDark = resolvedMode === "dark";
|
|
109
|
+
return (React.createElement("button", { ref: ref, type: "button", onClick: toggleMode, "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode", className: className, ...props }, isDark
|
|
110
|
+
? (React.createElement("svg", { className: "size-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
|
|
111
|
+
React.createElement("circle", { cx: "12", cy: "12", r: "5" }),
|
|
112
|
+
React.createElement("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
|
|
113
|
+
React.createElement("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
|
|
114
|
+
React.createElement("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
|
|
115
|
+
React.createElement("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
|
|
116
|
+
React.createElement("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
|
|
117
|
+
React.createElement("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
|
|
118
|
+
React.createElement("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
|
|
119
|
+
React.createElement("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })))
|
|
120
|
+
: (React.createElement("svg", { className: "size-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
|
|
121
|
+
React.createElement("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })))));
|
|
122
|
+
});
|
|
123
|
+
ColorModeToggle.displayName = "ColorModeToggle";
|
|
@@ -22,7 +22,7 @@ export class ChatErrorBoundary extends React.Component {
|
|
|
22
22
|
return fallback(error, this.reset);
|
|
23
23
|
return fallback;
|
|
24
24
|
}
|
|
25
|
-
return (React.createElement("div", { className: "border border-[var(--destructive)]/20 bg-[var(--destructive)]/5
|
|
25
|
+
return (React.createElement("div", { className: "rounded-[var(--radius-lg)] border border-[var(--destructive)]/20 bg-[var(--destructive)]/5 p-6", role: "alert" },
|
|
26
26
|
React.createElement("div", { className: "flex items-start gap-4" },
|
|
27
27
|
React.createElement("div", { className: "size-10 rounded-full bg-[var(--destructive)]/10 flex items-center justify-center flex-shrink-0" },
|
|
28
28
|
React.createElement("svg", { className: "size-5 text-[var(--destructive)]", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" },
|
|
@@ -30,7 +30,7 @@ export class ChatErrorBoundary extends React.Component {
|
|
|
30
30
|
React.createElement("div", { className: "flex-1 min-w-0" },
|
|
31
31
|
React.createElement("h3", { className: "text-base font-semibold text-[var(--foreground)]" }, errorMessage ?? "An error occurred in the chat component"),
|
|
32
32
|
React.createElement("p", { className: "mt-1.5 text-sm text-[var(--destructive)] leading-relaxed" }, error.message),
|
|
33
|
-
React.createElement("button", { type: "button", onClick: this.reset, className: "mt-4 px-5 py-2.5 text-sm font-medium
|
|
33
|
+
React.createElement("button", { type: "button", onClick: this.reset, className: "mt-4 rounded-full bg-[var(--destructive)] px-5 py-2.5 text-sm font-medium text-[var(--destructive-foreground)] transition-colors hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--edge-medium)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background)]" }, "Try Again")))));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
/** Handler for use chat error. */
|
|
@@ -10,6 +10,8 @@ export interface IconProps {
|
|
|
10
10
|
export declare function CircleIcon({ className }: IconProps): React.ReactElement;
|
|
11
11
|
export declare function ClockIcon({ className }: IconProps): React.ReactElement;
|
|
12
12
|
export declare function CheckCircleIcon({ className }: IconProps): React.ReactElement;
|
|
13
|
+
export declare function InfoIcon({ className }: IconProps): React.ReactElement;
|
|
14
|
+
export declare function AlertTriangleIcon({ className }: IconProps): React.ReactElement;
|
|
13
15
|
export declare function XCircleIcon({ className }: IconProps): React.ReactElement;
|
|
14
16
|
export declare function WrenchIcon({ className }: IconProps): React.ReactElement;
|
|
15
17
|
export declare function ChevronDownIcon({ className }: IconProps): React.ReactElement;
|
|
@@ -23,8 +25,14 @@ export declare function CopyIcon({ className }: IconProps): React.ReactElement;
|
|
|
23
25
|
export declare function PaperclipIcon({ className }: IconProps): React.ReactElement;
|
|
24
26
|
export declare function CheckIcon({ className }: IconProps): React.ReactElement;
|
|
25
27
|
export declare function PlusIcon({ className }: IconProps): React.ReactElement;
|
|
28
|
+
export declare function SearchIcon({ className }: IconProps): React.ReactElement;
|
|
29
|
+
export declare function XIcon({ className }: IconProps): React.ReactElement;
|
|
30
|
+
export declare function ArrowRightIcon({ className }: IconProps): React.ReactElement;
|
|
31
|
+
export declare function ArrowUpIcon({ className }: IconProps): React.ReactElement;
|
|
26
32
|
export declare function TrashIcon({ className }: IconProps): React.ReactElement;
|
|
27
33
|
export declare function PanelLeftIcon({ className }: IconProps): React.ReactElement;
|
|
34
|
+
export declare function PanelRightIcon({ className }: IconProps): React.ReactElement;
|
|
35
|
+
export declare function MoreHorizontalIcon({ className }: IconProps): React.ReactElement;
|
|
28
36
|
export declare function PencilIcon({ className }: IconProps): React.ReactElement;
|
|
29
37
|
export declare function SparklesIcon({ className }: IconProps): React.ReactElement;
|
|
30
38
|
export declare function CodeBracketsIcon({ className }: IconProps): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/icons/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAGvD,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/icons/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -40,6 +40,21 @@ const X_CIRCLE_ICON_ELEMENTS = [
|
|
|
40
40
|
{ type: "line", props: { x1: "15", y1: "9", x2: "9", y2: "15" } },
|
|
41
41
|
{ type: "line", props: { x1: "9", y1: "9", x2: "15", y2: "15" } },
|
|
42
42
|
];
|
|
43
|
+
const INFO_ICON_ELEMENTS = [
|
|
44
|
+
{ type: "circle", props: { cx: "12", cy: "12", r: "10" } },
|
|
45
|
+
{ type: "line", props: { x1: "12", y1: "16", x2: "12", y2: "12" } },
|
|
46
|
+
{ type: "line", props: { x1: "12", y1: "8", x2: "12.01", y2: "8" } },
|
|
47
|
+
];
|
|
48
|
+
const ALERT_TRIANGLE_ICON_ELEMENTS = [
|
|
49
|
+
{
|
|
50
|
+
type: "path",
|
|
51
|
+
props: {
|
|
52
|
+
d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{ type: "line", props: { x1: "12", y1: "9", x2: "12", y2: "13" } },
|
|
56
|
+
{ type: "line", props: { x1: "12", y1: "17", x2: "12.01", y2: "17" } },
|
|
57
|
+
];
|
|
43
58
|
const WRENCH_ICON_ELEMENTS = [
|
|
44
59
|
{
|
|
45
60
|
type: "path",
|
|
@@ -136,6 +151,12 @@ export function ClockIcon({ className }) {
|
|
|
136
151
|
export function CheckCircleIcon({ className }) {
|
|
137
152
|
return renderIcon(className, CHECK_CIRCLE_ICON_ELEMENTS);
|
|
138
153
|
}
|
|
154
|
+
export function InfoIcon({ className }) {
|
|
155
|
+
return renderIcon(className, INFO_ICON_ELEMENTS);
|
|
156
|
+
}
|
|
157
|
+
export function AlertTriangleIcon({ className }) {
|
|
158
|
+
return renderIcon(className, ALERT_TRIANGLE_ICON_ELEMENTS);
|
|
159
|
+
}
|
|
139
160
|
export function XCircleIcon({ className }) {
|
|
140
161
|
return renderIcon(className, X_CIRCLE_ICON_ELEMENTS);
|
|
141
162
|
}
|
|
@@ -187,6 +208,15 @@ const PANEL_LEFT_ICON_ELEMENTS = [
|
|
|
187
208
|
{ type: "rect", props: { width: "18", height: "18", x: "3", y: "3", rx: "2" } },
|
|
188
209
|
{ type: "line", props: { x1: "9", y1: "3", x2: "9", y2: "21" } },
|
|
189
210
|
];
|
|
211
|
+
const PANEL_RIGHT_ICON_ELEMENTS = [
|
|
212
|
+
{ type: "rect", props: { width: "18", height: "18", x: "3", y: "3", rx: "2" } },
|
|
213
|
+
{ type: "line", props: { x1: "15", y1: "3", x2: "15", y2: "21" } },
|
|
214
|
+
];
|
|
215
|
+
const MORE_HORIZONTAL_ICON_ELEMENTS = [
|
|
216
|
+
{ type: "circle", props: { cx: "12", cy: "12", r: "1" } },
|
|
217
|
+
{ type: "circle", props: { cx: "19", cy: "12", r: "1" } },
|
|
218
|
+
{ type: "circle", props: { cx: "5", cy: "12", r: "1" } },
|
|
219
|
+
];
|
|
190
220
|
const PENCIL_ICON_ELEMENTS = [
|
|
191
221
|
{ type: "path", props: { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" } },
|
|
192
222
|
{ type: "path", props: { d: "m15 5 4 4" } },
|
|
@@ -194,12 +224,46 @@ const PENCIL_ICON_ELEMENTS = [
|
|
|
194
224
|
export function PlusIcon({ className }) {
|
|
195
225
|
return renderIcon(className, PLUS_ICON_ELEMENTS);
|
|
196
226
|
}
|
|
227
|
+
const SEARCH_ICON_ELEMENTS = [
|
|
228
|
+
{ type: "circle", props: { cx: "11", cy: "11", r: "8" } },
|
|
229
|
+
{ type: "line", props: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" } },
|
|
230
|
+
];
|
|
231
|
+
export function SearchIcon({ className }) {
|
|
232
|
+
return renderIcon(className, SEARCH_ICON_ELEMENTS);
|
|
233
|
+
}
|
|
234
|
+
const X_ICON_ELEMENTS = [
|
|
235
|
+
{ type: "line", props: { x1: "18", y1: "6", x2: "6", y2: "18" } },
|
|
236
|
+
{ type: "line", props: { x1: "6", y1: "6", x2: "18", y2: "18" } },
|
|
237
|
+
];
|
|
238
|
+
export function XIcon({ className }) {
|
|
239
|
+
return renderIcon(className, X_ICON_ELEMENTS);
|
|
240
|
+
}
|
|
241
|
+
const ARROW_RIGHT_ICON_ELEMENTS = [
|
|
242
|
+
{ type: "line", props: { x1: "5", y1: "12", x2: "19", y2: "12" } },
|
|
243
|
+
{ type: "polyline", props: { points: "12 5 19 12 12 19" } },
|
|
244
|
+
];
|
|
245
|
+
export function ArrowRightIcon({ className }) {
|
|
246
|
+
return renderIcon(className, ARROW_RIGHT_ICON_ELEMENTS);
|
|
247
|
+
}
|
|
248
|
+
const ARROW_UP_ICON_ELEMENTS = [
|
|
249
|
+
{ type: "line", props: { x1: "12", y1: "19", x2: "12", y2: "5" } },
|
|
250
|
+
{ type: "polyline", props: { points: "5 12 12 5 19 12" } },
|
|
251
|
+
];
|
|
252
|
+
export function ArrowUpIcon({ className }) {
|
|
253
|
+
return renderIcon(className, ARROW_UP_ICON_ELEMENTS);
|
|
254
|
+
}
|
|
197
255
|
export function TrashIcon({ className }) {
|
|
198
256
|
return renderIcon(className, TRASH_ICON_ELEMENTS);
|
|
199
257
|
}
|
|
200
258
|
export function PanelLeftIcon({ className }) {
|
|
201
259
|
return renderIcon(className, PANEL_LEFT_ICON_ELEMENTS);
|
|
202
260
|
}
|
|
261
|
+
export function PanelRightIcon({ className }) {
|
|
262
|
+
return renderIcon(className, PANEL_RIGHT_ICON_ELEMENTS);
|
|
263
|
+
}
|
|
264
|
+
export function MoreHorizontalIcon({ className }) {
|
|
265
|
+
return renderIcon(className, MORE_HORIZONTAL_ICON_ELEMENTS);
|
|
266
|
+
}
|
|
203
267
|
export function PencilIcon({ className }) {
|
|
204
268
|
return renderIcon(className, PENCIL_ICON_ELEMENTS);
|
|
205
269
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import * as React from "../../../../react/react.js";
|
|
2
|
+
/**
|
|
3
|
+
* Custom element renderers keyed by HTML tag name, the shape of
|
|
4
|
+
* react-markdown's `Components` option. Declared locally instead of
|
|
5
|
+
* type-importing from the esm.sh URL: a static remote import (even
|
|
6
|
+
* type-only) pulls react-markdown's remote graph into the deno graph, and
|
|
7
|
+
* the dnt npm build cannot map esm.sh-internal specifiers (`stable/react`)
|
|
8
|
+
* onto valid npm package names. The package itself still loads at runtime
|
|
9
|
+
* via the ESM URL below.
|
|
10
|
+
*/
|
|
11
|
+
export type Components = Partial<Record<keyof React.JSX.IntrinsicElements, React.ElementType>>;
|
|
12
|
+
/** remark/rehype plugin list (react-markdown's `PluggableList`), opaque here. */
|
|
13
|
+
export type PluggableList = readonly unknown[];
|
|
2
14
|
/** Props accepted by markdown. */
|
|
3
15
|
export interface MarkdownProps {
|
|
4
16
|
/** Markdown content to render */
|
|
@@ -9,6 +21,17 @@ export interface MarkdownProps {
|
|
|
9
21
|
enableMermaid?: boolean;
|
|
10
22
|
/** Custom code block renderer */
|
|
11
23
|
renderCodeBlock?: (props: CodeBlockProps) => React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Custom element renderers merged OVER the built-in defaults (consumer
|
|
26
|
+
* entries win). Lets callers override the anchor/table/heading/blockquote/etc
|
|
27
|
+
* renderers, not just code fences. `renderCodeBlock` still handles the
|
|
28
|
+
* `pre`/code path unless a `pre` entry is supplied here.
|
|
29
|
+
*/
|
|
30
|
+
components?: Components;
|
|
31
|
+
/** Extra remark plugins, appended after the built-in list (GFM etc.). */
|
|
32
|
+
remarkPlugins?: PluggableList;
|
|
33
|
+
/** Extra rehype plugins, appended after the built-in list. */
|
|
34
|
+
rehypePlugins?: PluggableList;
|
|
12
35
|
}
|
|
13
36
|
/** Props accepted by code block. */
|
|
14
37
|
export interface CodeBlockProps {
|
|
@@ -17,5 +40,5 @@ export interface CodeBlockProps {
|
|
|
17
40
|
inline?: boolean;
|
|
18
41
|
}
|
|
19
42
|
/** Render markdown. */
|
|
20
|
-
export declare function Markdown({ children, className, enableMermaid, renderCodeBlock, }: MarkdownProps): React.ReactElement;
|
|
43
|
+
export declare function Markdown({ children, className, enableMermaid, renderCodeBlock, components, remarkPlugins, rehypePlugins, }: MarkdownProps): React.ReactElement;
|
|
21
44
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAMpD,kCAAkC;AAClC,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iCAAiC;IACjC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAMpD;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,CAC9B,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,WAAW,CAAC,CAC7D,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,SAAS,OAAO,EAAE,CAAC;AAE/C,kCAAkC;AAClC,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iCAAiC;IACjC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7D;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,yEAAyE;IACzE,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,8DAA8D;IAC9D,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA0PD,uBAAuB;AACvB,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,aAAoB,EACpB,eAAe,EACf,UAAU,EACV,aAAa,EACb,aAAa,GACd,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CAyIpC"}
|