@swisper.ai/web-chat-ui 0.0.2
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/LICENSE +202 -0
- package/README.md +251 -0
- package/dist/components/canvas-shell/canvas-shell.d.ts +64 -0
- package/dist/components/canvas-shell/canvas-shell.d.ts.map +1 -0
- package/dist/components/canvas-shell/canvas-shell.stories.d.ts +26 -0
- package/dist/components/canvas-shell/canvas-shell.stories.d.ts.map +1 -0
- package/dist/components/canvas-shell/index.d.ts +2 -0
- package/dist/components/canvas-shell/index.d.ts.map +1 -0
- package/dist/components/card-item-picker/card-item-picker-context.d.ts +21 -0
- package/dist/components/card-item-picker/card-item-picker-context.d.ts.map +1 -0
- package/dist/components/card-item-picker/card-item-picker-list.d.ts +24 -0
- package/dist/components/card-item-picker/card-item-picker-list.d.ts.map +1 -0
- package/dist/components/card-item-picker/card-item-picker-row-parts.d.ts +28 -0
- package/dist/components/card-item-picker/card-item-picker-row-parts.d.ts.map +1 -0
- package/dist/components/card-item-picker/card-item-picker-row.d.ts +12 -0
- package/dist/components/card-item-picker/card-item-picker-row.d.ts.map +1 -0
- package/dist/components/card-item-picker/card-item-picker.stories.d.ts +19 -0
- package/dist/components/card-item-picker/card-item-picker.stories.d.ts.map +1 -0
- package/dist/components/card-item-picker/index.d.ts +9 -0
- package/dist/components/card-item-picker/index.d.ts.map +1 -0
- package/dist/components/chat-card/chat-card.d.ts +4 -0
- package/dist/components/chat-card/chat-card.d.ts.map +1 -0
- package/dist/components/chat-card/chat-card.stories.d.ts +11 -0
- package/dist/components/chat-card/chat-card.stories.d.ts.map +1 -0
- package/dist/components/chat-card/components/chat-card-body.d.ts +22 -0
- package/dist/components/chat-card/components/chat-card-body.d.ts.map +1 -0
- package/dist/components/chat-card/components/chat-card-footer.d.ts +20 -0
- package/dist/components/chat-card/components/chat-card-footer.d.ts.map +1 -0
- package/dist/components/chat-card/components/chat-card-form.d.ts +28 -0
- package/dist/components/chat-card/components/chat-card-form.d.ts.map +1 -0
- package/dist/components/chat-card/components/chat-card-header.d.ts +36 -0
- package/dist/components/chat-card/components/chat-card-header.d.ts.map +1 -0
- package/dist/components/chat-card/components/index.d.ts +5 -0
- package/dist/components/chat-card/components/index.d.ts.map +1 -0
- package/dist/components/chat-card/context.d.ts +13 -0
- package/dist/components/chat-card/context.d.ts.map +1 -0
- package/dist/components/chat-card/contexts.d.ts +16 -0
- package/dist/components/chat-card/contexts.d.ts.map +1 -0
- package/dist/components/chat-card/hooks.d.ts +13 -0
- package/dist/components/chat-card/hooks.d.ts.map +1 -0
- package/dist/components/chat-card/index.d.ts +6 -0
- package/dist/components/chat-card/index.d.ts.map +1 -0
- package/dist/components/chat-card/types.d.ts +21 -0
- package/dist/components/chat-card/types.d.ts.map +1 -0
- package/dist/components/chat-card-container/chat-card-container.d.ts +43 -0
- package/dist/components/chat-card-container/chat-card-container.d.ts.map +1 -0
- package/dist/components/chat-card-container/chat-card-container.stories.d.ts +17 -0
- package/dist/components/chat-card-container/chat-card-container.stories.d.ts.map +1 -0
- package/dist/components/chat-card-container/index.d.ts +3 -0
- package/dist/components/chat-card-container/index.d.ts.map +1 -0
- package/dist/components/chat-container/chat-container.d.ts +51 -0
- package/dist/components/chat-container/chat-container.d.ts.map +1 -0
- package/dist/components/chat-container/chat-container.stories.d.ts +21 -0
- package/dist/components/chat-container/chat-container.stories.d.ts.map +1 -0
- package/dist/components/chat-container/index.d.ts +3 -0
- package/dist/components/chat-container/index.d.ts.map +1 -0
- package/dist/components/chat-input/chat-input.d.ts +35 -0
- package/dist/components/chat-input/chat-input.d.ts.map +1 -0
- package/dist/components/chat-input/chat-input.stories.d.ts +14 -0
- package/dist/components/chat-input/chat-input.stories.d.ts.map +1 -0
- package/dist/components/chat-input/index.d.ts +3 -0
- package/dist/components/chat-input/index.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/auto-focus-plugin.d.ts +8 -0
- package/dist/components/chat-input/plugins/auto-focus-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/controlled-value-plugin.d.ts +6 -0
- package/dist/components/chat-input/plugins/controlled-value-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/disabled-plugin.d.ts +7 -0
- package/dist/components/chat-input/plugins/disabled-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/focus-plugin.d.ts +6 -0
- package/dist/components/chat-input/plugins/focus-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/has-value-plugin.d.ts +6 -0
- package/dist/components/chat-input/plugins/has-value-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/hooks.d.ts +2 -0
- package/dist/components/chat-input/plugins/hooks.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/index.d.ts +8 -0
- package/dist/components/chat-input/plugins/index.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/markdown-plain-paste-plugin.d.ts +2 -0
- package/dist/components/chat-input/plugins/markdown-plain-paste-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/utils.d.ts +4 -0
- package/dist/components/chat-input/plugins/utils.d.ts.map +1 -0
- package/dist/components/chat-input/plugins/value-plugin.d.ts +6 -0
- package/dist/components/chat-input/plugins/value-plugin.d.ts.map +1 -0
- package/dist/components/chat-input/transformers.d.ts +3 -0
- package/dist/components/chat-input/transformers.d.ts.map +1 -0
- package/dist/components/chat-list/chat-list-item.d.ts +8 -0
- package/dist/components/chat-list/chat-list-item.d.ts.map +1 -0
- package/dist/components/chat-list/chat-list-items.d.ts +11 -0
- package/dist/components/chat-list/chat-list-items.d.ts.map +1 -0
- package/dist/components/chat-list/chat-list.d.ts +63 -0
- package/dist/components/chat-list/chat-list.d.ts.map +1 -0
- package/dist/components/chat-list/chat-list.stories.d.ts +13 -0
- package/dist/components/chat-list/chat-list.stories.d.ts.map +1 -0
- package/dist/components/chat-list/index.d.ts +4 -0
- package/dist/components/chat-list/index.d.ts.map +1 -0
- package/dist/components/chat-message/chat-message.d.ts +17 -0
- package/dist/components/chat-message/chat-message.d.ts.map +1 -0
- package/dist/components/chat-message/chat-message.stories.d.ts +11 -0
- package/dist/components/chat-message/chat-message.stories.d.ts.map +1 -0
- package/dist/components/chat-message/index.d.ts +2 -0
- package/dist/components/chat-message/index.d.ts.map +1 -0
- package/dist/components/chat-message-attachment-card/chat-message-attachment-card-icon.d.ts +9 -0
- package/dist/components/chat-message-attachment-card/chat-message-attachment-card-icon.d.ts.map +1 -0
- package/dist/components/chat-message-attachment-card/chat-message-attachment-card.d.ts +30 -0
- package/dist/components/chat-message-attachment-card/chat-message-attachment-card.d.ts.map +1 -0
- package/dist/components/chat-message-attachment-card/chat-message-attachment-card.stories.d.ts +11 -0
- package/dist/components/chat-message-attachment-card/chat-message-attachment-card.stories.d.ts.map +1 -0
- package/dist/components/chat-message-attachment-card/index.d.ts +4 -0
- package/dist/components/chat-message-attachment-card/index.d.ts.map +1 -0
- package/dist/components/chat-message-attachment-card/utils.d.ts +5 -0
- package/dist/components/chat-message-attachment-card/utils.d.ts.map +1 -0
- package/dist/components/chat-message-history/chat-message-history.d.ts +48 -0
- package/dist/components/chat-message-history/chat-message-history.d.ts.map +1 -0
- package/dist/components/chat-message-history/chat-message-history.stories.d.ts +7 -0
- package/dist/components/chat-message-history/chat-message-history.stories.d.ts.map +1 -0
- package/dist/components/chat-message-history/index.d.ts +2 -0
- package/dist/components/chat-message-history/index.d.ts.map +1 -0
- package/dist/components/chat-message-response/chat-message-response.d.ts +7 -0
- package/dist/components/chat-message-response/chat-message-response.d.ts.map +1 -0
- package/dist/components/chat-message-response/chat-message-response.stories.d.ts +7 -0
- package/dist/components/chat-message-response/chat-message-response.stories.d.ts.map +1 -0
- package/dist/components/chat-message-response/index.d.ts +2 -0
- package/dist/components/chat-message-response/index.d.ts.map +1 -0
- package/dist/components/chat-message-toolbar/chat-message-toolbar.d.ts +25 -0
- package/dist/components/chat-message-toolbar/chat-message-toolbar.d.ts.map +1 -0
- package/dist/components/chat-message-toolbar/chat-message-toolbar.stories.d.ts +7 -0
- package/dist/components/chat-message-toolbar/chat-message-toolbar.stories.d.ts.map +1 -0
- package/dist/components/chat-message-toolbar/index.d.ts +2 -0
- package/dist/components/chat-message-toolbar/index.d.ts.map +1 -0
- package/dist/components/chat-messages/chat-messages.d.ts +24 -0
- package/dist/components/chat-messages/chat-messages.d.ts.map +1 -0
- package/dist/components/chat-messages/chat-messages.stories.d.ts +8 -0
- package/dist/components/chat-messages/chat-messages.stories.d.ts.map +1 -0
- package/dist/components/chat-messages/index.d.ts +2 -0
- package/dist/components/chat-messages/index.d.ts.map +1 -0
- package/dist/components/chat-notification-card/chat-notification-card.d.ts +114 -0
- package/dist/components/chat-notification-card/chat-notification-card.d.ts.map +1 -0
- package/dist/components/chat-notification-card/chat-notification-card.stories.d.ts +10 -0
- package/dist/components/chat-notification-card/chat-notification-card.stories.d.ts.map +1 -0
- package/dist/components/chat-notification-card/index.d.ts +4 -0
- package/dist/components/chat-notification-card/index.d.ts.map +1 -0
- package/dist/components/chat-notification-card/types.d.ts +2 -0
- package/dist/components/chat-notification-card/types.d.ts.map +1 -0
- package/dist/components/chat-notification-card/utils.d.ts +3 -0
- package/dist/components/chat-notification-card/utils.d.ts.map +1 -0
- package/dist/components/chat-notification-popup/chat-notification-popup.d.ts +12 -0
- package/dist/components/chat-notification-popup/chat-notification-popup.d.ts.map +1 -0
- package/dist/components/chat-notification-popup/chat-notification-popup.stories.d.ts +8 -0
- package/dist/components/chat-notification-popup/chat-notification-popup.stories.d.ts.map +1 -0
- package/dist/components/chat-notification-popup/index.d.ts +2 -0
- package/dist/components/chat-notification-popup/index.d.ts.map +1 -0
- package/dist/components/chat-prompt-box/chat-prompt-box-context.d.ts +17 -0
- package/dist/components/chat-prompt-box/chat-prompt-box-context.d.ts.map +1 -0
- package/dist/components/chat-prompt-box/chat-prompt-box-focus-plugin.d.ts +2 -0
- package/dist/components/chat-prompt-box/chat-prompt-box-focus-plugin.d.ts.map +1 -0
- package/dist/components/chat-prompt-box/chat-prompt-box.d.ts +27 -0
- package/dist/components/chat-prompt-box/chat-prompt-box.d.ts.map +1 -0
- package/dist/components/chat-prompt-box/chat-prompt-box.stories.d.ts +9 -0
- package/dist/components/chat-prompt-box/chat-prompt-box.stories.d.ts.map +1 -0
- package/dist/components/chat-prompt-box/index.d.ts +3 -0
- package/dist/components/chat-prompt-box/index.d.ts.map +1 -0
- package/dist/components/chat-reply/chat-reply.d.ts +23 -0
- package/dist/components/chat-reply/chat-reply.d.ts.map +1 -0
- package/dist/components/chat-reply/chat-reply.stories.d.ts +7 -0
- package/dist/components/chat-reply/chat-reply.stories.d.ts.map +1 -0
- package/dist/components/chat-reply/index.d.ts +2 -0
- package/dist/components/chat-reply/index.d.ts.map +1 -0
- package/dist/components/chat-suggestion/chat-suggestion.d.ts +37 -0
- package/dist/components/chat-suggestion/chat-suggestion.d.ts.map +1 -0
- package/dist/components/chat-suggestion/chat-suggestion.stories.d.ts +9 -0
- package/dist/components/chat-suggestion/chat-suggestion.stories.d.ts.map +1 -0
- package/dist/components/chat-suggestion/index.d.ts +2 -0
- package/dist/components/chat-suggestion/index.d.ts.map +1 -0
- package/dist/components/chat-thinking-process/chat-thinking-process.d.ts +47 -0
- package/dist/components/chat-thinking-process/chat-thinking-process.d.ts.map +1 -0
- package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts +10 -0
- package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts.map +1 -0
- package/dist/components/chat-thinking-process/index.d.ts +2 -0
- package/dist/components/chat-thinking-process/index.d.ts.map +1 -0
- package/dist/components/chat-thread/chat-thread.d.ts +78 -0
- package/dist/components/chat-thread/chat-thread.d.ts.map +1 -0
- package/dist/components/chat-thread/chat-thread.stories.d.ts +14 -0
- package/dist/components/chat-thread/chat-thread.stories.d.ts.map +1 -0
- package/dist/components/chat-thread/index.d.ts +2 -0
- package/dist/components/chat-thread/index.d.ts.map +1 -0
- package/dist/components/deprecated-empty-state.d.ts +22 -0
- package/dist/components/deprecated-empty-state.d.ts.map +1 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/markdown-viewer/hooks.d.ts +9 -0
- package/dist/components/markdown-viewer/hooks.d.ts.map +1 -0
- package/dist/components/markdown-viewer/index.d.ts +3 -0
- package/dist/components/markdown-viewer/index.d.ts.map +1 -0
- package/dist/components/markdown-viewer/markdown-viewer.d.ts +10 -0
- package/dist/components/markdown-viewer/markdown-viewer.d.ts.map +1 -0
- package/dist/components/markdown-viewer/markdown-viewer.stories.d.ts +9 -0
- package/dist/components/markdown-viewer/markdown-viewer.stories.d.ts.map +1 -0
- package/dist/components/markdown-viewer/types.d.ts +9 -0
- package/dist/components/markdown-viewer/types.d.ts.map +1 -0
- package/dist/components/markdown-viewer/utils.d.ts +3 -0
- package/dist/components/markdown-viewer/utils.d.ts.map +1 -0
- package/dist/components/new-chat-trigger/index.d.ts +2 -0
- package/dist/components/new-chat-trigger/index.d.ts.map +1 -0
- package/dist/components/new-chat-trigger/new-chat-trigger.d.ts +8 -0
- package/dist/components/new-chat-trigger/new-chat-trigger.d.ts.map +1 -0
- package/dist/components/rich-text-area/constants/index.d.ts +3 -0
- package/dist/components/rich-text-area/constants/index.d.ts.map +1 -0
- package/dist/components/rich-text-area/hooks.d.ts +3 -0
- package/dist/components/rich-text-area/hooks.d.ts.map +1 -0
- package/dist/components/rich-text-area/html-config.d.ts +4 -0
- package/dist/components/rich-text-area/html-config.d.ts.map +1 -0
- package/dist/components/rich-text-area/index.d.ts +7 -0
- package/dist/components/rich-text-area/index.d.ts.map +1 -0
- package/dist/components/rich-text-area/nodes/div-block-node.d.ts +18 -0
- package/dist/components/rich-text-area/nodes/div-block-node.d.ts.map +1 -0
- package/dist/components/rich-text-area/nodes/image-node.d.ts +24 -0
- package/dist/components/rich-text-area/nodes/image-node.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/blur-plugin.d.ts +6 -0
- package/dist/components/rich-text-area/plugins/blur-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/controlled-plugin.d.ts +7 -0
- package/dist/components/rich-text-area/plugins/controlled-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/controlled-value-plugin.d.ts +7 -0
- package/dist/components/rich-text-area/plugins/controlled-value-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/disabled-plugin.d.ts +6 -0
- package/dist/components/rich-text-area/plugins/disabled-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/file-attachment-plugin.d.ts +10 -0
- package/dist/components/rich-text-area/plugins/file-attachment-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/focus-plugin.d.ts +6 -0
- package/dist/components/rich-text-area/plugins/focus-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/html-paste-plugin.d.ts +19 -0
- package/dist/components/rich-text-area/plugins/html-paste-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/image-drop-plugin.d.ts +12 -0
- package/dist/components/rich-text-area/plugins/image-drop-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/index.d.ts +11 -0
- package/dist/components/rich-text-area/plugins/index.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/markdown-plain-paste-plugin.d.ts +2 -0
- package/dist/components/rich-text-area/plugins/markdown-plain-paste-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/plugins/value-plugin.d.ts +7 -0
- package/dist/components/rich-text-area/plugins/value-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-area/rich-text-area.d.ts +20 -0
- package/dist/components/rich-text-area/rich-text-area.d.ts.map +1 -0
- package/dist/components/rich-text-area/rich-text-area.stories.d.ts +7 -0
- package/dist/components/rich-text-area/rich-text-area.stories.d.ts.map +1 -0
- package/dist/components/rich-text-area/styled.d.ts +3 -0
- package/dist/components/rich-text-area/styled.d.ts.map +1 -0
- package/dist/components/rich-text-area/transformers.d.ts +16 -0
- package/dist/components/rich-text-area/transformers.d.ts.map +1 -0
- package/dist/components/rich-text-area/types.d.ts +8 -0
- package/dist/components/rich-text-area/types.d.ts.map +1 -0
- package/dist/components/rich-text-area/utils/index.d.ts +6 -0
- package/dist/components/rich-text-area/utils/index.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/alignment-select.d.ts +5 -0
- package/dist/components/rich-text-field/components/alignment-select.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/attachment-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/attachment-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/bold-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/bold-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/clean-format-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/clean-format-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/formatting-toolbar-plugin.d.ts +11 -0
- package/dist/components/rich-text-field/components/formatting-toolbar-plugin.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/image-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/image-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/index.d.ts +14 -0
- package/dist/components/rich-text-field/components/index.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/italic-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/italic-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/link-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/link-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/size-select.d.ts +5 -0
- package/dist/components/rich-text-field/components/size-select.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/text-color-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/text-color-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/toolbar-button.d.ts +6 -0
- package/dist/components/rich-text-field/components/toolbar-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/toolbar-select.d.ts +5 -0
- package/dist/components/rich-text-field/components/toolbar-select.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/typography-select.d.ts +5 -0
- package/dist/components/rich-text-field/components/typography-select.d.ts.map +1 -0
- package/dist/components/rich-text-field/components/underline-button.d.ts +3 -0
- package/dist/components/rich-text-field/components/underline-button.d.ts.map +1 -0
- package/dist/components/rich-text-field/constants.d.ts +57 -0
- package/dist/components/rich-text-field/constants.d.ts.map +1 -0
- package/dist/components/rich-text-field/context.d.ts +26 -0
- package/dist/components/rich-text-field/context.d.ts.map +1 -0
- package/dist/components/rich-text-field/index.d.ts +3 -0
- package/dist/components/rich-text-field/index.d.ts.map +1 -0
- package/dist/components/rich-text-field/rich-text-field.d.ts +17 -0
- package/dist/components/rich-text-field/rich-text-field.d.ts.map +1 -0
- package/dist/components/rich-text-field/rich-text-field.stories.d.ts +10 -0
- package/dist/components/rich-text-field/rich-text-field.stories.d.ts.map +1 -0
- package/dist/components/rich-text-field/utils.d.ts +1759 -0
- package/dist/components/rich-text-field/utils.d.ts.map +1 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/spinner.d.ts +9 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.stories.d.ts +8 -0
- package/dist/components/spinner/spinner.stories.d.ts.map +1 -0
- package/dist/contexts/chat-context/chat-context.d.ts +20 -0
- package/dist/contexts/chat-context/chat-context.d.ts.map +1 -0
- package/dist/contexts/chat-context/index.d.ts +2 -0
- package/dist/contexts/chat-context/index.d.ts.map +1 -0
- package/dist/contexts/chat-context/utils.d.ts +3 -0
- package/dist/contexts/chat-context/utils.d.ts.map +1 -0
- package/dist/contexts/chat-conversation-context/chat-conversation-context.d.ts +20 -0
- package/dist/contexts/chat-conversation-context/chat-conversation-context.d.ts.map +1 -0
- package/dist/contexts/chat-conversation-context/index.d.ts +2 -0
- package/dist/contexts/chat-conversation-context/index.d.ts.map +1 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/docs/agent.stories.d.ts +41 -0
- package/dist/docs/agent.stories.d.ts.map +1 -0
- package/dist/docs/chat-panel.d.ts +33 -0
- package/dist/docs/chat-panel.d.ts.map +1 -0
- package/dist/docs/chatbot-panel.d.ts +20 -0
- package/dist/docs/chatbot-panel.d.ts.map +1 -0
- package/dist/docs/chatbot.stories.d.ts +11 -0
- package/dist/docs/chatbot.stories.d.ts.map +1 -0
- package/dist/domain/actions/constants.d.ts +2 -0
- package/dist/domain/actions/constants.d.ts.map +1 -0
- package/dist/domain/actions/hooks/index.d.ts +3 -0
- package/dist/domain/actions/hooks/index.d.ts.map +1 -0
- package/dist/domain/actions/index.d.ts +5 -0
- package/dist/domain/actions/index.d.ts.map +1 -0
- package/dist/domain/actions/types.d.ts +7 -0
- package/dist/domain/actions/types.d.ts.map +1 -0
- package/dist/domain/actions/utils/index.d.ts +11 -0
- package/dist/domain/actions/utils/index.d.ts.map +1 -0
- package/dist/domain/index.d.ts +2 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-chat-prompt-placeholder.d.ts +6 -0
- package/dist/hooks/use-chat-prompt-placeholder.d.ts.map +1 -0
- package/dist/hooks/use-chat-stream-message.d.ts +42 -0
- package/dist/hooks/use-chat-stream-message.d.ts.map +1 -0
- package/dist/hooks/use-current-chat-id.d.ts +2 -0
- package/dist/hooks/use-current-chat-id.d.ts.map +1 -0
- package/dist/hooks/use-is-current-chat-new.d.ts +2 -0
- package/dist/hooks/use-is-current-chat-new.d.ts.map +1 -0
- package/dist/hooks/use-loaded-chat-ids.d.ts +9 -0
- package/dist/hooks/use-loaded-chat-ids.d.ts.map +1 -0
- package/dist/hooks/use-on-chat-changed.d.ts +9 -0
- package/dist/hooks/use-on-chat-changed.d.ts.map +1 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +4404 -0
- package/dist/index.es.js.map +1 -0
- package/dist/layouts/chat-card-list-layout/chat-card-list-layout.d.ts +95 -0
- package/dist/layouts/chat-card-list-layout/chat-card-list-layout.d.ts.map +1 -0
- package/dist/layouts/chat-card-list-layout/chat-card-list-layout.stories.d.ts +24 -0
- package/dist/layouts/chat-card-list-layout/chat-card-list-layout.stories.d.ts.map +1 -0
- package/dist/layouts/chat-card-list-layout/index.d.ts +3 -0
- package/dist/layouts/chat-card-list-layout/index.d.ts.map +1 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.d.ts +84 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.d.ts.map +1 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.sizing.d.ts +45 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.sizing.d.ts.map +1 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts +37 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts.map +1 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.d.ts +81 -0
- package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.d.ts.map +1 -0
- package/dist/layouts/chat-card-three-column-layout/index.d.ts +5 -0
- package/dist/layouts/chat-card-three-column-layout/index.d.ts.map +1 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.d.ts +31 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.d.ts.map +1 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.sizing.d.ts +12 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.sizing.d.ts.map +1 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.d.ts +19 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.d.ts.map +1 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.variants.d.ts +35 -0
- package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.variants.d.ts.map +1 -0
- package/dist/layouts/chat-card-two-column-layout/index.d.ts +4 -0
- package/dist/layouts/chat-card-two-column-layout/index.d.ts.map +1 -0
- package/dist/layouts/index.d.ts +4 -0
- package/dist/layouts/index.d.ts.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/use-streaming-markdown.d.ts +18 -0
- package/dist/utils/use-streaming-markdown.d.ts.map +1 -0
- package/package.json +155 -0
- package/src/__tests__/setup.ts +5 -0
- package/src/components/canvas-shell/canvas-shell.json +126 -0
- package/src/components/canvas-shell/canvas-shell.stories.tsx +194 -0
- package/src/components/canvas-shell/canvas-shell.test.tsx +205 -0
- package/src/components/canvas-shell/canvas-shell.tsx +250 -0
- package/src/components/canvas-shell/index.ts +19 -0
- package/src/components/card-item-picker/__tests__/card-item-picker.spec.tsx +279 -0
- package/src/components/card-item-picker/card-item-picker-context.tsx +44 -0
- package/src/components/card-item-picker/card-item-picker-list.tsx +95 -0
- package/src/components/card-item-picker/card-item-picker-row-parts.tsx +96 -0
- package/src/components/card-item-picker/card-item-picker-row.tsx +109 -0
- package/src/components/card-item-picker/card-item-picker.json +147 -0
- package/src/components/card-item-picker/card-item-picker.stories.tsx +158 -0
- package/src/components/card-item-picker/index.ts +24 -0
- package/src/components/chat-card/__tests__/chat-card.spec.tsx +118 -0
- package/src/components/chat-card/chat-card.json +162 -0
- package/src/components/chat-card/chat-card.stories.tsx +349 -0
- package/src/components/chat-card/chat-card.tsx +106 -0
- package/src/components/chat-card/components/chat-card-body.tsx +115 -0
- package/src/components/chat-card/components/chat-card-footer.tsx +95 -0
- package/src/components/chat-card/components/chat-card-form.tsx +120 -0
- package/src/components/chat-card/components/chat-card-header.tsx +240 -0
- package/src/components/chat-card/components/index.ts +4 -0
- package/src/components/chat-card/context.tsx +34 -0
- package/src/components/chat-card/contexts.tsx +42 -0
- package/src/components/chat-card/hooks.ts +51 -0
- package/src/components/chat-card/index.ts +5 -0
- package/src/components/chat-card/types.ts +23 -0
- package/src/components/chat-card-container/chat-card-container.json +84 -0
- package/src/components/chat-card-container/chat-card-container.stories.tsx +149 -0
- package/src/components/chat-card-container/chat-card-container.tsx +75 -0
- package/src/components/chat-card-container/index.ts +2 -0
- package/src/components/chat-container/chat-container.json +93 -0
- package/src/components/chat-container/chat-container.stories.tsx +179 -0
- package/src/components/chat-container/chat-container.tsx +231 -0
- package/src/components/chat-container/index.ts +2 -0
- package/src/components/chat-input/chat-input.json +106 -0
- package/src/components/chat-input/chat-input.stories.tsx +291 -0
- package/src/components/chat-input/chat-input.tsx +220 -0
- package/src/components/chat-input/index.ts +2 -0
- package/src/components/chat-input/plugins/auto-focus-plugin.tsx +43 -0
- package/src/components/chat-input/plugins/controlled-value-plugin.tsx +47 -0
- package/src/components/chat-input/plugins/disabled-plugin.tsx +18 -0
- package/src/components/chat-input/plugins/focus-plugin.tsx +44 -0
- package/src/components/chat-input/plugins/has-value-plugin.tsx +51 -0
- package/src/components/chat-input/plugins/hooks.ts +7 -0
- package/src/components/chat-input/plugins/index.ts +7 -0
- package/src/components/chat-input/plugins/markdown-plain-paste-plugin.tsx +63 -0
- package/src/components/chat-input/plugins/utils.ts +48 -0
- package/src/components/chat-input/plugins/value-plugin.tsx +35 -0
- package/src/components/chat-input/transformers.ts +4 -0
- package/src/components/chat-list/chat-list-item.tsx +33 -0
- package/src/components/chat-list/chat-list-items.tsx +144 -0
- package/src/components/chat-list/chat-list.json +117 -0
- package/src/components/chat-list/chat-list.stories.tsx +332 -0
- package/src/components/chat-list/chat-list.tsx +278 -0
- package/src/components/chat-list/index.ts +18 -0
- package/src/components/chat-message/chat-message.json +105 -0
- package/src/components/chat-message/chat-message.stories.tsx +95 -0
- package/src/components/chat-message/chat-message.tsx +66 -0
- package/src/components/chat-message/index.ts +1 -0
- package/src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx +74 -0
- package/src/components/chat-message-attachment-card/chat-message-attachment-card.json +110 -0
- package/src/components/chat-message-attachment-card/chat-message-attachment-card.stories.tsx +131 -0
- package/src/components/chat-message-attachment-card/chat-message-attachment-card.tsx +142 -0
- package/src/components/chat-message-attachment-card/index.ts +12 -0
- package/src/components/chat-message-attachment-card/utils.ts +41 -0
- package/src/components/chat-message-history/chat-message-history.json +99 -0
- package/src/components/chat-message-history/chat-message-history.stories.tsx +136 -0
- package/src/components/chat-message-history/chat-message-history.tsx +277 -0
- package/src/components/chat-message-history/index.ts +13 -0
- package/src/components/chat-message-response/chat-message-response.json +68 -0
- package/src/components/chat-message-response/chat-message-response.stories.tsx +63 -0
- package/src/components/chat-message-response/chat-message-response.tsx +24 -0
- package/src/components/chat-message-response/index.ts +1 -0
- package/src/components/chat-message-toolbar/chat-message-toolbar.json +100 -0
- package/src/components/chat-message-toolbar/chat-message-toolbar.stories.tsx +62 -0
- package/src/components/chat-message-toolbar/chat-message-toolbar.tsx +97 -0
- package/src/components/chat-message-toolbar/index.ts +6 -0
- package/src/components/chat-messages/chat-messages.json +95 -0
- package/src/components/chat-messages/chat-messages.stories.tsx +284 -0
- package/src/components/chat-messages/chat-messages.tsx +264 -0
- package/src/components/chat-messages/index.ts +10 -0
- package/src/components/chat-notification-card/chat-notification-card.json +135 -0
- package/src/components/chat-notification-card/chat-notification-card.stories.tsx +290 -0
- package/src/components/chat-notification-card/chat-notification-card.tsx +684 -0
- package/src/components/chat-notification-card/index.ts +3 -0
- package/src/components/chat-notification-card/types.ts +1 -0
- package/src/components/chat-notification-card/utils.ts +34 -0
- package/src/components/chat-notification-popup/chat-notification-popup.json +97 -0
- package/src/components/chat-notification-popup/chat-notification-popup.stories.tsx +80 -0
- package/src/components/chat-notification-popup/chat-notification-popup.tsx +36 -0
- package/src/components/chat-notification-popup/index.ts +1 -0
- package/src/components/chat-prompt-box/chat-prompt-box-context.tsx +62 -0
- package/src/components/chat-prompt-box/chat-prompt-box-focus-plugin.tsx +22 -0
- package/src/components/chat-prompt-box/chat-prompt-box.json +106 -0
- package/src/components/chat-prompt-box/chat-prompt-box.stories.tsx +117 -0
- package/src/components/chat-prompt-box/chat-prompt-box.tsx +296 -0
- package/src/components/chat-prompt-box/index.ts +16 -0
- package/src/components/chat-reply/chat-reply.json +79 -0
- package/src/components/chat-reply/chat-reply.stories.tsx +72 -0
- package/src/components/chat-reply/chat-reply.tsx +103 -0
- package/src/components/chat-reply/index.ts +1 -0
- package/src/components/chat-suggestion/chat-suggestion.json +108 -0
- package/src/components/chat-suggestion/chat-suggestion.stories.tsx +147 -0
- package/src/components/chat-suggestion/chat-suggestion.tsx +184 -0
- package/src/components/chat-suggestion/index.ts +8 -0
- package/src/components/chat-thinking-process/chat-thinking-process.json +110 -0
- package/src/components/chat-thinking-process/chat-thinking-process.stories.tsx +202 -0
- package/src/components/chat-thinking-process/chat-thinking-process.tsx +268 -0
- package/src/components/chat-thinking-process/index.ts +9 -0
- package/src/components/chat-thread/__tests__/chat-thread.spec.tsx +385 -0
- package/src/components/chat-thread/chat-thread.json +120 -0
- package/src/components/chat-thread/chat-thread.stories.tsx +218 -0
- package/src/components/chat-thread/chat-thread.tsx +549 -0
- package/src/components/chat-thread/index.ts +18 -0
- package/src/components/deprecated-empty-state.ts +39 -0
- package/src/components/index.ts +26 -0
- package/src/components/markdown-viewer/hooks.ts +59 -0
- package/src/components/markdown-viewer/index.ts +2 -0
- package/src/components/markdown-viewer/markdown-viewer.json +84 -0
- package/src/components/markdown-viewer/markdown-viewer.stories.tsx +110 -0
- package/src/components/markdown-viewer/markdown-viewer.tsx +95 -0
- package/src/components/markdown-viewer/types.ts +10 -0
- package/src/components/markdown-viewer/utils.ts +5 -0
- package/src/components/new-chat-trigger/index.ts +1 -0
- package/src/components/new-chat-trigger/new-chat-trigger.tsx +29 -0
- package/src/components/rich-text-area/constants/index.ts +10 -0
- package/src/components/rich-text-area/hooks.ts +24 -0
- package/src/components/rich-text-area/html-config.ts +195 -0
- package/src/components/rich-text-area/index.ts +6 -0
- package/src/components/rich-text-area/nodes/div-block-node.tsx +145 -0
- package/src/components/rich-text-area/nodes/image-node.tsx +100 -0
- package/src/components/rich-text-area/plugins/blur-plugin.tsx +36 -0
- package/src/components/rich-text-area/plugins/controlled-plugin.tsx +23 -0
- package/src/components/rich-text-area/plugins/controlled-value-plugin.tsx +101 -0
- package/src/components/rich-text-area/plugins/disabled-plugin.tsx +17 -0
- package/src/components/rich-text-area/plugins/file-attachment-plugin.tsx +57 -0
- package/src/components/rich-text-area/plugins/focus-plugin.tsx +44 -0
- package/src/components/rich-text-area/plugins/html-paste-plugin.tsx +104 -0
- package/src/components/rich-text-area/plugins/image-drop-plugin.tsx +56 -0
- package/src/components/rich-text-area/plugins/index.ts +10 -0
- package/src/components/rich-text-area/plugins/markdown-plain-paste-plugin.tsx +63 -0
- package/src/components/rich-text-area/plugins/value-plugin.tsx +46 -0
- package/src/components/rich-text-area/rich-text-area.json +102 -0
- package/src/components/rich-text-area/rich-text-area.stories.tsx +140 -0
- package/src/components/rich-text-area/rich-text-area.tsx +156 -0
- package/src/components/rich-text-area/styled.tsx +20 -0
- package/src/components/rich-text-area/transformers.ts +175 -0
- package/src/components/rich-text-area/types.ts +8 -0
- package/src/components/rich-text-area/utils/index.ts +77 -0
- package/src/components/rich-text-field/components/alignment-select.tsx +103 -0
- package/src/components/rich-text-field/components/attachment-button.tsx +25 -0
- package/src/components/rich-text-field/components/bold-button.tsx +21 -0
- package/src/components/rich-text-field/components/clean-format-button.tsx +44 -0
- package/src/components/rich-text-field/components/formatting-toolbar-plugin.tsx +69 -0
- package/src/components/rich-text-field/components/image-button.tsx +11 -0
- package/src/components/rich-text-field/components/index.ts +14 -0
- package/src/components/rich-text-field/components/italic-button.tsx +21 -0
- package/src/components/rich-text-field/components/link-button.tsx +11 -0
- package/src/components/rich-text-field/components/size-select.tsx +27 -0
- package/src/components/rich-text-field/components/text-color-button.tsx +41 -0
- package/src/components/rich-text-field/components/toolbar-button.tsx +27 -0
- package/src/components/rich-text-field/components/toolbar-select.tsx +19 -0
- package/src/components/rich-text-field/components/typography-select.tsx +27 -0
- package/src/components/rich-text-field/components/underline-button.tsx +21 -0
- package/src/components/rich-text-field/constants.ts +33 -0
- package/src/components/rich-text-field/context.tsx +251 -0
- package/src/components/rich-text-field/index.tsx +6 -0
- package/src/components/rich-text-field/rich-text-field.json +118 -0
- package/src/components/rich-text-field/rich-text-field.stories.tsx +218 -0
- package/src/components/rich-text-field/rich-text-field.tsx +93 -0
- package/src/components/rich-text-field/utils.ts +532 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner/spinner.json +73 -0
- package/src/components/spinner/spinner.stories.tsx +41 -0
- package/src/components/spinner/spinner.tsx +32 -0
- package/src/contexts/chat-context/chat-context.tsx +97 -0
- package/src/contexts/chat-context/index.ts +1 -0
- package/src/contexts/chat-context/utils.ts +7 -0
- package/src/contexts/chat-conversation-context/chat-conversation-context.tsx +608 -0
- package/src/contexts/chat-conversation-context/index.ts +1 -0
- package/src/contexts/index.ts +2 -0
- package/src/docs/agent.stories.tsx +567 -0
- package/src/docs/chat-panel.tsx +174 -0
- package/src/docs/chatbot-panel.tsx +381 -0
- package/src/docs/chatbot.mdx +144 -0
- package/src/docs/chatbot.stories.tsx +63 -0
- package/src/domain/actions/constants.ts +1 -0
- package/src/domain/actions/hooks/index.ts +22 -0
- package/src/domain/actions/index.ts +4 -0
- package/src/domain/actions/types.ts +6 -0
- package/src/domain/actions/utils/index.ts +112 -0
- package/src/domain/index.ts +1 -0
- package/src/hooks/index.tsx +10 -0
- package/src/hooks/use-chat-prompt-placeholder.ts +7 -0
- package/src/hooks/use-chat-stream-message.ts +189 -0
- package/src/hooks/use-current-chat-id.ts +6 -0
- package/src/hooks/use-is-current-chat-new.ts +6 -0
- package/src/hooks/use-loaded-chat-ids.ts +32 -0
- package/src/hooks/use-on-chat-changed.ts +33 -0
- package/src/index.css +1 -0
- package/src/index.ts +6 -0
- package/src/layouts/chat-card-list-layout/__tests__/chat-card-list-layout.spec.tsx +204 -0
- package/src/layouts/chat-card-list-layout/chat-card-list-layout.json +116 -0
- package/src/layouts/chat-card-list-layout/chat-card-list-layout.stories.tsx +190 -0
- package/src/layouts/chat-card-list-layout/chat-card-list-layout.tsx +250 -0
- package/src/layouts/chat-card-list-layout/index.ts +11 -0
- package/src/layouts/chat-card-three-column-layout/__tests__/chat-card-three-column-layout.sizing.test.ts +73 -0
- package/src/layouts/chat-card-three-column-layout/__tests__/chat-card-three-column-layout.spec.tsx +282 -0
- package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.json +131 -0
- package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.sizing.ts +78 -0
- package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.tsx +273 -0
- package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.tsx +291 -0
- package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.ts +135 -0
- package/src/layouts/chat-card-three-column-layout/index.ts +24 -0
- package/src/layouts/chat-card-two-column-layout/__tests__/chat-card-two-column-layout.spec.tsx +109 -0
- package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.json +97 -0
- package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.sizing.ts +21 -0
- package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.tsx +138 -0
- package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.tsx +132 -0
- package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.variants.ts +65 -0
- package/src/layouts/chat-card-two-column-layout/index.ts +17 -0
- package/src/layouts/index.ts +3 -0
- package/src/types.ts +29 -0
- package/src/utils/use-streaming-markdown.ts +113 -0
- package/tailwind.css +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-item-picker-list.d.ts","sourceRoot":"","sources":["../../../src/components/card-item-picker/card-item-picker-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAKtD,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,uBAAuB,CACtC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,CACnD,SAAQ,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,kBAAkB,CAAC;IACvF,6DAA6D;IAC7D,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,+FAA+F;IAC/F,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,gFAAgF;IAChF,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAClC,gEAAgE;IAChE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,EAAE,EAChE,KAAK,EACL,YAAmB,EACnB,aAAa,EACb,aAAa,EACb,WAAwB,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,CAAC,CAAC,+BAiD5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type CardItemPickerRowMediaProps = ComponentPropsWithoutRef<'div'>;
|
|
3
|
+
/** Leading visual of a card (a thumbnail); hidden from assistive tech. */
|
|
4
|
+
export declare function CardItemPickerRowMedia({ className, ...props }: CardItemPickerRowMediaProps): import('react').JSX.Element;
|
|
5
|
+
export type CardItemPickerRowContentProps = ComponentPropsWithoutRef<'div'>;
|
|
6
|
+
/** The text column of a card, beside its media. */
|
|
7
|
+
export declare function CardItemPickerRowContent({ className, ...props }: CardItemPickerRowContentProps): import('react').JSX.Element;
|
|
8
|
+
export interface CardItemPickerRowTitleProps {
|
|
9
|
+
children: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/** The card's name — becomes the option's accessible name. */
|
|
13
|
+
export declare function CardItemPickerRowTitle({ children, className }: CardItemPickerRowTitleProps): import('react').JSX.Element;
|
|
14
|
+
export type CardItemPickerRowDescriptionProps = ComponentPropsWithoutRef<'div'>;
|
|
15
|
+
/** Secondary details of a card — announced as the option's description. */
|
|
16
|
+
export declare function CardItemPickerRowDescription({ className, ...props }: CardItemPickerRowDescriptionProps): import('react').JSX.Element;
|
|
17
|
+
export interface CardItemPickerRowCheckboxProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A checkbox in the card's top-right corner that mirrors its selection. It only
|
|
22
|
+
* shows the selection: the option already announces it through `aria-selected`,
|
|
23
|
+
* and a listbox option can't hold a control of its own, so the checkbox is out of
|
|
24
|
+
* the tab order, hidden from assistive tech, and clicks pass through to the card.
|
|
25
|
+
* Leave room for it on the right of the card's content.
|
|
26
|
+
*/
|
|
27
|
+
export declare function CardItemPickerRowCheckbox({ className }: CardItemPickerRowCheckboxProps): import('react').JSX.Element;
|
|
28
|
+
//# sourceMappingURL=card-item-picker-row-parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-item-picker-row-parts.d.ts","sourceRoot":"","sources":["../../../src/components/card-item-picker/card-item-picker-row-parts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAOtD,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1E,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,2BAA2B,+BAa1F;AAED,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE5E,mDAAmD;AACnD,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,6BAA6B,+BAI9F;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,2BAA2B,+BAgB1F;AAED,MAAM,MAAM,iCAAiC,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEhF,2EAA2E;AAC3E,wBAAgB,4BAA4B,CAAC,EAC3C,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iCAAiC,+BAMnC;AAED,MAAM,WAAW,8BAA8B;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,EAAE,8BAA8B,+BAYtF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { CardItemPickerValue } from './card-item-picker-context';
|
|
3
|
+
export interface CardItemPickerRowProps extends Omit<ComponentPropsWithoutRef<'li'>, 'role' | 'tabIndex' | 'aria-selected' | 'aria-labelledby' | 'aria-describedby'> {
|
|
4
|
+
value: CardItemPickerValue;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* One card of a {@link CardItemPickerList}: a listbox option. Its accessible name
|
|
8
|
+
* comes from {@link CardItemPickerRowTitle} and its description from
|
|
9
|
+
* {@link CardItemPickerRowDescription}, when rendered.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CardItemPickerRow: import('react').ForwardRefExoticComponent<CardItemPickerRowProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
12
|
+
//# sourceMappingURL=card-item-picker-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-item-picker-row.d.ts","sourceRoot":"","sources":["../../../src/components/card-item-picker/card-item-picker-row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAiB,MAAM,OAAO,CAAC;AAKrE,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAClD,wBAAwB,CAAC,IAAI,CAAC,EAC9B,MAAM,GAAG,UAAU,GAAG,eAAe,GAAG,iBAAiB,GAAG,kBAAkB,CAC/E;IACC,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,kHAmF7B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { CardItemPickerOrientation } from '.';
|
|
3
|
+
interface DemoProps {
|
|
4
|
+
orientation?: CardItemPickerOrientation;
|
|
5
|
+
withMedia?: boolean;
|
|
6
|
+
withCheckbox?: boolean;
|
|
7
|
+
initialValue?: string | null;
|
|
8
|
+
}
|
|
9
|
+
/** A controlled list, so selecting, hovering and keyboard focus can be tried out. */
|
|
10
|
+
declare function Demo({ orientation, withMedia, withCheckbox, initialValue, }: DemoProps): import('react').JSX.Element;
|
|
11
|
+
declare const meta: Meta<typeof Demo>;
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof Demo>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const WithMedia: Story;
|
|
16
|
+
/** A checkbox in each card's top-right corner mirrors the selection. */
|
|
17
|
+
export declare const WithCheckbox: Story;
|
|
18
|
+
export declare const Horizontal: Story;
|
|
19
|
+
//# sourceMappingURL=card-item-picker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-item-picker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/card-item-picker/card-item-picker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAQL,KAAK,yBAAyB,EAC/B,MAAM,GAAG,CAAC;AAgBX,UAAU,SAAS;IACjB,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,qFAAqF;AACrF,iBAAS,IAAI,CAAC,EACZ,WAAW,EACX,SAAiB,EACjB,YAAoB,EACpB,YAAmB,GACpB,EAAE,SAAS,+BAgDX;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA8C3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { CardItemPickerList } from './card-item-picker-list';
|
|
2
|
+
export { CardItemPickerRow } from './card-item-picker-row';
|
|
3
|
+
export { CardItemPickerRowCheckbox, CardItemPickerRowContent, CardItemPickerRowDescription, CardItemPickerRowMedia, CardItemPickerRowTitle, } from './card-item-picker-row-parts';
|
|
4
|
+
export { useCardItemPickerListContext, useCardItemPickerRowContext, } from './card-item-picker-context';
|
|
5
|
+
export type { CardItemPickerListProps } from './card-item-picker-list';
|
|
6
|
+
export type { CardItemPickerRowProps } from './card-item-picker-row';
|
|
7
|
+
export type { CardItemPickerRowMediaProps, CardItemPickerRowContentProps, CardItemPickerRowTitleProps, CardItemPickerRowDescriptionProps, CardItemPickerRowCheckboxProps, } from './card-item-picker-row-parts';
|
|
8
|
+
export type { CardItemPickerValue, CardItemPickerOrientation } from './card-item-picker-context';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card-item-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,YAAY,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,iCAAiC,EACjC,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChatCardProps } from './types';
|
|
2
|
+
export { useChatCardContext } from './context';
|
|
3
|
+
export declare const ChatCard: import('react').ForwardRefExoticComponent<Omit<ChatCardProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
4
|
+
//# sourceMappingURL=chat-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/chat-card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,eAAO,MAAM,QAAQ,oHA6FnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChatCard } from '.';
|
|
3
|
+
declare const meta: Meta<typeof ChatCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ChatCard>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Level2: Story;
|
|
8
|
+
export declare const Collapsed: Story;
|
|
9
|
+
export declare const Editable: Story;
|
|
10
|
+
export declare const WithPreview: Story;
|
|
11
|
+
//# sourceMappingURL=chat-card.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/chat-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,OAAO,EACL,QAAQ,EAqBT,MAAM,GAAG,CAAC;AAEX,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAwF/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AA4CvC,eAAO,MAAM,OAAO,EAAE,KAoCrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAqCpB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA2BvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA+CtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA0BzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface ChatCardMediaProps extends Omit<ComponentProps<'figure'>, 'aria-label'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function ChatCardMedia({ className, children, ...rest }: ChatCardMediaProps): import('react').JSX.Element;
|
|
6
|
+
export interface ChatCardBodyProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function ChatCardBody({ className, children, asChild, ...rest }: ChatCardBodyProps): import('react').JSX.Element;
|
|
11
|
+
export interface ChatCardContentProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
hasPadding?: boolean;
|
|
15
|
+
hasHeaderPadding?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function ChatCardContent({ className, children, asChild, hasPadding, hasHeaderPadding, ...rest }: ChatCardContentProps): import('react').JSX.Element;
|
|
18
|
+
export interface ChatCardPreviewProps extends ComponentProps<'div'> {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function ChatCardPreview({ className, children, ...rest }: ChatCardPreviewProps): import('react').JSX.Element;
|
|
22
|
+
//# sourceMappingURL=chat-card-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card-body.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-body.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACtF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAUjF;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAe,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAmBhG;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,OAAe,EACf,UAAiB,EACjB,gBAAuB,EACvB,GAAG,IAAI,EACR,EAAE,oBAAoB,+BAwBtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACjE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,+BAoBrF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface ChatCardFooterProps extends ComponentProps<'footer'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function ChatCardFooter({ className, children, ...rest }: ChatCardFooterProps): import('react').JSX.Element;
|
|
6
|
+
export interface ChatCardFooterNotesProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ChatCardFooterNotes({ className, children }: ChatCardFooterNotesProps): import('react').JSX.Element;
|
|
11
|
+
export interface ChatCardFooterPriceProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function ChatCardFooterPrice({ className, children }: ChatCardFooterPriceProps): import('react').JSX.Element;
|
|
16
|
+
export interface ChatCardFooterActionsProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function ChatCardFooterActions({ className, children, ...rest }: ChatCardFooterActionsProps): import('react').JSX.Element;
|
|
20
|
+
//# sourceMappingURL=chat-card-footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card-footer.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BAqBnF;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAcpF;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAcpF;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC3F,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,0BAA0B,+BAW5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface ChatCardForm extends ComponentProps<'form'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ChatCardForm: import('react').ForwardRefExoticComponent<Omit<ChatCardForm, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
7
|
+
export interface ChatCardAttributesProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChatCardAttributes({ className, children }: ChatCardAttributesProps): import('react').JSX.Element;
|
|
12
|
+
export interface ChatCardAttributeProps {
|
|
13
|
+
className?: string;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function ChatCardAttribute({ className, children, ...rest }: ChatCardAttributeProps): import('react').JSX.Element;
|
|
17
|
+
export interface ChatCardAttributeLabelProps {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
hasPadding?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function ChatCardAttributeLabel({ className, children, hasPadding, ...rest }: ChatCardAttributeLabelProps): import('react').JSX.Element;
|
|
23
|
+
export interface ChatCardAttributeValueProps extends Omit<ComponentProps<'dt'>, 'aria-Value'> {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function ChatCardAttributeValue({ className, children, asChild, ...rest }: ChatCardAttributeValueProps): import('react').JSX.Element;
|
|
28
|
+
//# sourceMappingURL=chat-card-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card-form.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,uHAsBvB,CAAC;AAEH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,uBAAuB,+BASlF;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,sBAAsB,+BAUzF;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAQ,EACR,UAAkB,EAClB,GAAG,IAAI,EACR,EAAE,2BAA2B,+BAc7B;AAED,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC3F,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAQ,EACR,OAAe,EACf,GAAG,IAAI,EACR,EAAE,2BAA2B,+BAa7B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { IconButtonProps, TypographyProps } from '@swisper.ai/ui';
|
|
3
|
+
export interface ChatCardHeaderProps extends Omit<ComponentProps<'header'>, 'aria-label'> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function ChatCardHeader({ className, children, ...rest }: ChatCardHeaderProps): import('react').JSX.Element;
|
|
7
|
+
export interface ChatCardIconProps extends ComponentProps<'div'> {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function ChatCardIcon({ className, children, ...rest }: ChatCardIconProps): import('react').JSX.Element;
|
|
11
|
+
export interface ChatCardHeaderContentProps extends ComponentProps<'div'> {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function ChatCardHeaderContent({ className, children, ...rest }: ChatCardHeaderContentProps): import('react').JSX.Element;
|
|
15
|
+
export interface ChatCardTitleProps extends Omit<TypographyProps, 'variant'> {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function ChatCardTitle({ className, children, ...rest }: ChatCardTitleProps): import('react').JSX.Element;
|
|
19
|
+
export interface ChatCardSubTitleProps extends Omit<TypographyProps, 'variant'> {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function ChatCardSubTitle({ className, children, ...rest }: ChatCardSubTitleProps): import('react').JSX.Element;
|
|
23
|
+
export interface ChatCardActionsProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare function ChatCardActions({ className, children, ...rest }: ChatCardActionsProps): import('react').JSX.Element;
|
|
27
|
+
export interface ChatCardActionButtonProps extends Omit<IconButtonProps, 'variant' | 'size'> {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
shouldPreventCollapse?: boolean;
|
|
30
|
+
tooltip?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function ChatCardActionButton({ className, children, shouldPreventCollapse, tooltip, onClick, ...rest }: ChatCardActionButtonProps): import('react').JSX.Element;
|
|
33
|
+
export interface ChatCardCollapsibleButtonProps extends Omit<ChatCardActionButtonProps, 'children' | 'shouldPreventCollapse'> {
|
|
34
|
+
}
|
|
35
|
+
export declare function ChatCardCollapsibleButton({ className, ...rest }: ChatCardCollapsibleButtonProps): import('react').JSX.Element | undefined;
|
|
36
|
+
//# sourceMappingURL=chat-card-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card-header.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAKxB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACvF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BAuCnF;AAED,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC9D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAoB/E;AAED,MAAM,WAAW,0BAA2B,SAAQ,cAAc,CAAC,KAAK,CAAC;IACvE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,0BAA0B,+BAiB5B;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC1E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAWjF;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC7E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,qBAAqB,+BAWvF;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,+BAoBrF;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1F,QAAQ,EAAE,SAAS,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,QAAQ,EACR,qBAA4B,EAC5B,OAAO,EACP,OAAO,EACP,GAAG,IAAI,EACR,EAAE,yBAAyB,+BA0B3B;AAED,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAC1D,yBAAyB,EACzB,UAAU,GAAG,uBAAuB,CACrC;CAAG;AAEJ,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,8BAA8B,2CAoB/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ChatCardLevel } from './types';
|
|
3
|
+
export interface ChatCardContextValue {
|
|
4
|
+
isCollapsible: boolean;
|
|
5
|
+
level: ChatCardLevel;
|
|
6
|
+
open: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function useChatCardContext(): ChatCardContextValue;
|
|
9
|
+
export declare function ChatCardProvider({ value, children, }: {
|
|
10
|
+
value: ChatCardContextValue;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): import('react').JSX.Element;
|
|
13
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;CACf;AAID,wBAAgB,kBAAkB,yBAWjC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAEA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function useEditableChatCardContext(): {
|
|
3
|
+
isEditable: boolean;
|
|
4
|
+
isEditing: boolean;
|
|
5
|
+
startEdit: () => void;
|
|
6
|
+
discard: () => void;
|
|
7
|
+
toggleEdit: () => void;
|
|
8
|
+
};
|
|
9
|
+
interface EditableChatCardContextProviderProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
defaultEditing?: boolean;
|
|
12
|
+
isEditable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function EditableChatCardContextProvider({ children, defaultEditing, isEditable, }: EditableChatCardContextProviderProps): import('react').JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=contexts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/contexts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAQlE,wBAAgB,0BAA0B;;;;;;EAUzC;AAED,UAAU,oCAAoC;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,cAAsB,EACtB,UAAkB,GACnB,EAAE,oCAAoC,+BAWtC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface UseEditChatCardProps {
|
|
2
|
+
isEditable: boolean;
|
|
3
|
+
defaultEditing?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useEditChatCard({ isEditable, defaultEditing }: UseEditChatCardProps): {
|
|
6
|
+
isEditable: boolean;
|
|
7
|
+
isEditing: boolean;
|
|
8
|
+
startEdit: () => void;
|
|
9
|
+
discard: () => void;
|
|
10
|
+
toggleEdit: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/hooks.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,cAAsB,EAAE,EAAE,oBAAoB;;;;;;EA2C3F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export { ChatCard } from './chat-card';
|
|
3
|
+
export { useEditChatCard } from './hooks';
|
|
4
|
+
export { EditableChatCardContextProvider, useEditableChatCardContext } from './contexts';
|
|
5
|
+
export type { ChatCardProps, ChatCardVariant, ChatCardLevel } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACzF,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export type ChatCardVariant = 'default' | 'action';
|
|
3
|
+
export type ChatCardLevel = 1 | 2;
|
|
4
|
+
export interface ChatCardProps extends Omit<ComponentProps<'section'>, 'aria-label'> {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
variant?: ChatCardVariant;
|
|
7
|
+
/**
|
|
8
|
+
* Figma Card `Property 1`. Lvl 1 is the outer chat card (16px radius, header hover
|
|
9
|
+
* area). Lvl 2 is a nested card (8px radius, tighter padding). A separate prop so
|
|
10
|
+
* `variant` can keep meaning hover-as-action, which is a different axis.
|
|
11
|
+
*/
|
|
12
|
+
level?: ChatCardLevel;
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
defaultOpen?: boolean;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
isCollapsible?: boolean;
|
|
18
|
+
isRounded?: boolean;
|
|
19
|
+
isSelected?: boolean;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;AAElC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export type ChatCardContainerVariant = 'fixed' | 'fluid' | 'full';
|
|
3
|
+
export interface ChatCardContainerProps extends ComponentProps<'div'> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* How the card is sized against the chat window published by `ChatContainer`:
|
|
7
|
+
*
|
|
8
|
+
* - `fixed` — clamped to the reading column (`--message-list-content-width`) from
|
|
9
|
+
* `md` up, so body cards line up with the message text.
|
|
10
|
+
* - `fluid` — shrinks to its content from `md` up, still capped at the window.
|
|
11
|
+
* - `full` — always the full chat window width.
|
|
12
|
+
*
|
|
13
|
+
* Below `md` (820px in this design system, not Tailwind's default 768px) all three
|
|
14
|
+
* are full width. There is no room to distinguish them on a phone, and a card
|
|
15
|
+
* narrower than the viewport there reads as a layout bug.
|
|
16
|
+
*/
|
|
17
|
+
variant?: ChatCardContainerVariant;
|
|
18
|
+
/**
|
|
19
|
+
* Set when the card is rendered inside a message body rather than as its own block,
|
|
20
|
+
* so it aligns with the surrounding text.
|
|
21
|
+
*
|
|
22
|
+
* This swaps the inset from margin to padding rather than adding a second one: the
|
|
23
|
+
* width cap opens up to the full `--chat-window-width` and `px-message` supplies the
|
|
24
|
+
* gutter, so the total inset stays at one `--spacing-message` either way. Applying
|
|
25
|
+
* `px-message` on top of the block cap instead would inset an inlined card by two
|
|
26
|
+
* gutters and it would visibly not line up with the text around it.
|
|
27
|
+
*/
|
|
28
|
+
inline?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Sizes a card inside a `ChatContainer`, against the `--chat-window-width` and
|
|
32
|
+
* `--message-list-content-width` variables that container publishes.
|
|
33
|
+
*
|
|
34
|
+
* `full` is the base behaviour and adds no classes of its own — every variant starts
|
|
35
|
+
* at the window width less one `--spacing-message` gutter, and `fixed` and `fluid`
|
|
36
|
+
* narrow it from `md` up.
|
|
37
|
+
*
|
|
38
|
+
* Both variables are read with a `100%` fallback, so a card rendered outside a
|
|
39
|
+
* `ChatContainer` (a portal, a test, a Storybook story) degrades to its parent's width
|
|
40
|
+
* instead of collapsing to zero.
|
|
41
|
+
*/
|
|
42
|
+
export declare function ChatCardContainer({ children, variant, inline, className, ...rest }: ChatCardContainerProps): import('react').JSX.Element;
|
|
43
|
+
//# sourceMappingURL=chat-card-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card-container.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card-container/chat-card-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAiB,EACjB,MAAc,EACd,SAAS,EACT,GAAG,IAAI,EACR,EAAE,sBAAsB,+BAsBxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChatCardContainer } from './chat-card-container';
|
|
3
|
+
declare const meta: Meta<typeof ChatCardContainer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ChatCardContainer>;
|
|
6
|
+
/**
|
|
7
|
+
* Drag the right edge past 820px: `fixed` stops growing at the reading column
|
|
8
|
+
* (736 − 16 = 720px), `fluid` hugs its content, `full` keeps tracking the window.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Variants: Story;
|
|
11
|
+
/**
|
|
12
|
+
* The inlined card must sit at the same visual inset as the text around it — one
|
|
13
|
+
* `--spacing-message` gutter, not two. Compare the card's left edge to the paragraphs.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Inline: Story;
|
|
16
|
+
export declare const Playground: Story;
|
|
17
|
+
//# sourceMappingURL=chat-card-container.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-card-container.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card-container/chat-card-container.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAY5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AA6B1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAgCxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KA6BtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KAkBpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card-container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export interface ChatContainerProps extends ComponentProps<'section'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Max width of the reading column, published as `--message-list-content-width` and
|
|
6
|
+
* consumed by `ChatCardContainer`'s `fixed` variant. Any CSS length.
|
|
7
|
+
*
|
|
8
|
+
* The published value is clamped with `min()` against the measured window width, so
|
|
9
|
+
* a container narrower than the reading column never sizes a child wider than
|
|
10
|
+
* itself — the case that makes a card overflow horizontally in a split-pane layout.
|
|
11
|
+
*/
|
|
12
|
+
contentWidth?: string;
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Root of a chat surface. Measures its own box and republishes it as CSS custom
|
|
17
|
+
* properties, so descendants size themselves against the chat window without a width
|
|
18
|
+
* being prop-drilled through every layer:
|
|
19
|
+
*
|
|
20
|
+
* - `--chat-window-width` / `--chat-window-height` — the measured border box, or
|
|
21
|
+
* `100%` until the first measurement lands.
|
|
22
|
+
* - `--message-list-content-width` — the reading column (see `contentWidth`).
|
|
23
|
+
* - `--type-window-height` / `--welcome-screen-box-height` — reported up by
|
|
24
|
+
* `ChatContainerPrompt` and `ChatContainerWelcome`; `unset` while unmounted.
|
|
25
|
+
*
|
|
26
|
+
* Deliberately applies **no horizontal padding of its own**. `useElementMeasure`
|
|
27
|
+
* reports the border box, so padding here would be counted inside
|
|
28
|
+
* `--chat-window-width`, and every child sizing against that variable would overflow
|
|
29
|
+
* by exactly that padding. Insetting is the child's job instead, through the
|
|
30
|
+
* `--spacing-message` gutter that `ChatCardContainer` subtracts.
|
|
31
|
+
*
|
|
32
|
+
* Every read site carries a `100%` fallback, so children still lay out sensibly when
|
|
33
|
+
* rendered outside a `ChatContainer` (portals, tests, Storybook).
|
|
34
|
+
*/
|
|
35
|
+
export declare function ChatContainer({ asChild, children, className, contentWidth, style, ...rest }: ChatContainerProps): import('react').JSX.Element;
|
|
36
|
+
export interface ChatContainerSlotProps extends ComponentProps<'div'> {
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Wraps the composer. Publishes its measured height as `--type-window-height` on the
|
|
42
|
+
* container, so the message list can reserve room for a composer that grows as the
|
|
43
|
+
* user types.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ChatContainerPrompt({ asChild, children, className, ...rest }: ChatContainerSlotProps): import('react').JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* Wraps the empty-chat welcome box. Publishes its measured height as
|
|
48
|
+
* `--welcome-screen-box-height` on the container.
|
|
49
|
+
*/
|
|
50
|
+
export declare function ChatContainerWelcome({ asChild, children, className, ...rest }: ChatContainerSlotProps): import('react').JSX.Element;
|
|
51
|
+
//# sourceMappingURL=chat-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-container.d.ts","sourceRoot":"","sources":["../../../src/components/chat-container/chat-container.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAyDf,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,SAAS,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAe,EACf,QAAQ,EACR,SAAS,EACT,YAAoC,EACpC,KAAK,EACL,GAAG,IAAI,EACR,EAAE,kBAAkB,+BA+CpB;AAoBD,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAe,EACf,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,sBAAsB,+BAcxB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAe,EACf,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,sBAAsB,+BAcxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChatContainer } from './chat-container';
|
|
3
|
+
declare const meta: Meta<typeof ChatContainer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ChatContainer>;
|
|
6
|
+
/**
|
|
7
|
+
* Drag the dashed wrapper's right edge. `--chat-window-width` tracks the measured box,
|
|
8
|
+
* and `--message-list-content-width` is clamped by `min()` — it stops at 736px when
|
|
9
|
+
* the window is wider, and follows the window when it is narrower.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
/**
|
|
13
|
+
* Proves the slot round-trip: a slot measures itself and the height lands on the
|
|
14
|
+
* *container*, where siblings can read it.
|
|
15
|
+
*
|
|
16
|
+
* Drag the textarea taller and watch `--type-window-height` follow. Toggle the welcome
|
|
17
|
+
* box off and `--welcome-screen-box-height` returns to `unset` rather than leaving a
|
|
18
|
+
* stale height behind for the message list to reserve space for.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MeasuredSlots: Story;
|
|
21
|
+
//# sourceMappingURL=chat-container.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-container.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-container/chat-container.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,aAAa,EAA6C,MAAM,kBAAkB,CAAC;AA2D5F,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAoCpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,KA0C3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { InitialConfigType } from '@lexical/react/LexicalComposer';
|
|
2
|
+
import { CSSProperties, ComponentPropsWithoutRef, KeyboardEvent, ReactNode } from 'react';
|
|
3
|
+
export type ChatInputConfig = InitialConfigType;
|
|
4
|
+
interface ChatInputContextValue {
|
|
5
|
+
isFocused: boolean;
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
hasValue: boolean;
|
|
8
|
+
setIsFocused: (isFocused: boolean) => void;
|
|
9
|
+
setHasError: (hasError: boolean) => void;
|
|
10
|
+
setHasValue: (hasValue: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function useChatInputContext(): ChatInputContextValue;
|
|
13
|
+
export declare const DEFAULT_CONFIG: ChatInputConfig;
|
|
14
|
+
export interface ChatInputProps extends ComponentPropsWithoutRef<'div'> {
|
|
15
|
+
initialConfig?: ChatInputConfig;
|
|
16
|
+
}
|
|
17
|
+
export declare const ChatInput: import('react').ForwardRefExoticComponent<ChatInputProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export type ChatInputPlaceholderProps = ComponentPropsWithoutRef<'span'>;
|
|
19
|
+
export declare const ChatInputPlaceholder: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
export interface ChatInputTextareaProps {
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties | undefined;
|
|
23
|
+
placeholderClassName?: string;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
value?: string;
|
|
27
|
+
autoFocus?: boolean;
|
|
28
|
+
isDisabled?: boolean;
|
|
29
|
+
isReadOnly?: boolean;
|
|
30
|
+
onChange?: (value: string) => void;
|
|
31
|
+
onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const ChatInputTextarea: import('react').ForwardRefExoticComponent<ChatInputTextareaProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=chat-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../src/components/chat-input/chat-input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,gCAAgC,CAAC;AAOzF,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAe/F,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEhD,UAAU,qBAAqB;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAElB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAID,wBAAgB,mBAAmB,0BAQlC;AAED,eAAO,MAAM,cAAc,EAAE,eAe5B,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACrE,aAAa,CAAC,EAAE,eAAe,CAAC;CACjC;AAED,eAAO,MAAM,SAAS,2GAsCpB,CAAC;AAIH,MAAM,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,oBAAoB,8MAkBhC,CAAC;AAIF,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,iBAAiB,mHAmE7B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChatInput } from './chat-input';
|
|
3
|
+
declare const meta: Meta<typeof ChatInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ChatInput>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AutoFocus: Story;
|
|
8
|
+
export declare const Controlled: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
10
|
+
export declare const ReadOnly: Story;
|
|
11
|
+
export declare const ControlledMarkdown: Story;
|
|
12
|
+
export declare const SubmitOnEnter: Story;
|
|
13
|
+
export declare const SimplePromptBox: Story;
|
|
14
|
+
//# sourceMappingURL=chat-input.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-input/chat-input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAAE,SAAS,EAA0C,MAAM,cAAc,CAAC;AAcjF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAgChC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAYvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoCxB,CAAC;AAKF,eAAO,MAAM,QAAQ,EAAE,KActB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAqBF,eAAO,MAAM,kBAAkB,EAAE,KAiChC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAgC3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA4C7B,CAAC"}
|