@inkeep/cxkit-react 0.5.84 → 0.5.86

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.
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),m=require("react"),b=require("./widget-toggle.cjs"),l=require("./modal.cjs");function C(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(o,{...a})})})})}function c(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function o(a){return e.jsx(c,{...a,children:e.jsx(i,{...a})})}function i(a){const{onToggleView:t,variant:s}=a,n=d.useModal(),r=d.useWidget(),h=n&&!r?l.ModalContent:m.Fragment;return e.jsx(h,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:s??(t?"no-shadow":"container-with-shadow"),"data-composite":d.dataAttr(!!a.onToggleView||n?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(x,{...a}),e.jsx(j,{}),e.jsx(I,{})]}),e.jsx(T,{}),e.jsx(B,{})]})})}function x(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsx(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:r?e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(b.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"}),e.jsx(d.Modal.Close,{})]}):e.jsx(d.Modal.Close,{})})}function j(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(E,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function E(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(F,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(g,{}),e.jsx(p,{}),e.jsx(A,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function F(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(m.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,h)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${h}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function I(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(M,{}),e.jsx(k,{})]})}function M(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function T(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function B(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=C;exports.InkeepEmbeddedChatImpl=o;exports.InkeepEmbeddedChatImplContent=i;exports.InkeepEmbeddedChatProvider=c;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),m=require("react"),l=require("./widget-toggle.cjs"),C=require("./modal.cjs");function x(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(o,{...a})})})})}function c(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function o(a){return e.jsx(c,{...a,children:e.jsx(i,{...a})})}function i(a){const{onToggleView:t,variant:s,header:n=j}=a,r=d.useModal(),h=d.useWidget(),b=r&&!h?C.ModalContent:m.Fragment;return e.jsx(b,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:s??(t?"no-shadow":"container-with-shadow"),"data-composite":d.dataAttr(!!a.onToggleView||r?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(n,{...a}),e.jsx(E,{}),e.jsx(M,{})]}),e.jsx(B,{}),e.jsx(S,{})]})})}function j(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsx(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:r?e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(l.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"}),e.jsx(d.Modal.Close,{})]}):e.jsx(d.Modal.Close,{})})}function E(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(u,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function u(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(F,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(g,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(p,{}),e.jsx(A,{}),e.jsx(I,{})]})]},t.id))]})})}function F(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function I(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(m.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,h)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${h}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function M(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(k,{}),e.jsx(T,{})]})}function k(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function T(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function B(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function S(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=x;exports.InkeepEmbeddedChatImpl=o;exports.InkeepEmbeddedChatImplContent=i;exports.InkeepEmbeddedChatProvider=c;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as n, Fragment as l } from "react/jsx-runtime";
3
- import { ErrorBoundary as u, Shadow as g, RootProvider as p, WebWidgetInteractionType as A, EmbeddedChat as e, useModal as b, useWidget as M, dataAttr as m, Modal as h, PortalWithTheme as s } from "@inkeep/cxkit-styled";
2
+ import { jsx as t, jsxs as n, Fragment as s } from "react/jsx-runtime";
3
+ import { ErrorBoundary as u, Shadow as g, RootProvider as p, WebWidgetInteractionType as A, EmbeddedChat as e, useModal as b, useWidget as M, dataAttr as m, Modal as h, PortalWithTheme as d } from "@inkeep/cxkit-styled";
4
4
  import { Fragment as F } from "react";
5
5
  import { WidgetToggle as I } from "./widget-toggle.js";
6
6
  import { ModalContent as C } from "./modal.js";
7
- function j(a) {
7
+ function R(a) {
8
8
  const { baseSettings: r, aiChatSettings: c } = a;
9
9
  return /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(
10
10
  g,
@@ -35,16 +35,16 @@ function T(a) {
35
35
  return /* @__PURE__ */ t(k, { ...a, children: /* @__PURE__ */ t(B, { ...a }) });
36
36
  }
37
37
  function B(a) {
38
- const { onToggleView: r, variant: c } = a, o = b(), i = M();
39
- return /* @__PURE__ */ t(o && !i ? C : F, { children: /* @__PURE__ */ n(
38
+ const { onToggleView: r, variant: c, header: o = S } = a, i = b(), l = M();
39
+ return /* @__PURE__ */ t(i && !l ? C : F, { children: /* @__PURE__ */ n(
40
40
  e.Wrapper,
41
41
  {
42
42
  variant: c ?? (r ? "no-shadow" : "container-with-shadow"),
43
- "data-composite": m(!!a.onToggleView || o?.isOpen),
43
+ "data-composite": m(!!a.onToggleView || i?.isOpen),
44
44
  children: [
45
45
  /* @__PURE__ */ t(e.ConversationLoading, {}),
46
46
  /* @__PURE__ */ n(e.Root, { children: [
47
- /* @__PURE__ */ t(S, { ...a }),
47
+ /* @__PURE__ */ t(o, { ...a }),
48
48
  /* @__PURE__ */ t(v, {}),
49
49
  /* @__PURE__ */ t(D, {})
50
50
  ] }),
@@ -87,7 +87,7 @@ function v() {
87
87
  ] }) });
88
88
  }
89
89
  function x() {
90
- return /* @__PURE__ */ t(e.Messages, { children: ({ messages: a }) => /* @__PURE__ */ n(l, { children: [
90
+ return /* @__PURE__ */ t(e.Messages, { children: ({ messages: a }) => /* @__PURE__ */ n(s, { children: [
91
91
  /* @__PURE__ */ t(w, {}),
92
92
  a.map((r) => /* @__PURE__ */ n(e.MessageWrapper, { message: r, children: [
93
93
  /* @__PURE__ */ t(H, {}),
@@ -142,7 +142,7 @@ function y() {
142
142
  /* @__PURE__ */ t(e.MessageAttachmentsItemIcon, {}),
143
143
  /* @__PURE__ */ t(e.MessageAttachmentsItemTitle, {})
144
144
  ] }, r.id)) }),
145
- /* @__PURE__ */ t(e.MessageAttachmentsPreview, { children: /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(e.MessageAttachmentsPreviewOverlay, { children: /* @__PURE__ */ n(e.MessageAttachmentsPreviewContent, { children: [
145
+ /* @__PURE__ */ t(e.MessageAttachmentsPreview, { children: /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(e.MessageAttachmentsPreviewOverlay, { children: /* @__PURE__ */ n(e.MessageAttachmentsPreviewContent, { children: [
146
146
  /* @__PURE__ */ t(e.MessageAttachmentsPreviewHeader, {}),
147
147
  /* @__PURE__ */ t(e.MessageAttachmentsPreviewClose, {}),
148
148
  /* @__PURE__ */ t(e.MessageAttachmentsPreviewBody, {})
@@ -168,12 +168,12 @@ function L() {
168
168
  /* @__PURE__ */ t(e.MessageSourceItemIcon, {}),
169
169
  /* @__PURE__ */ t(e.MessageSourceItemTitle, {}),
170
170
  /* @__PURE__ */ t(e.MessageSourceItemTag, {}),
171
- /* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (o) => o.map((i, d) => /* @__PURE__ */ t(
171
+ /* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (o) => o.map((i, l) => /* @__PURE__ */ t(
172
172
  e.MessageSourceItemDescriptionPart,
173
173
  {
174
174
  part: i
175
175
  },
176
- `part-${d}`
176
+ `part-${l}`
177
177
  )) }),
178
178
  /* @__PURE__ */ t(e.MessageSourceItemIndicator, {})
179
179
  ] }, c)) })
@@ -204,7 +204,7 @@ function E() {
204
204
  ] }),
205
205
  /* @__PURE__ */ t(e.AttachmentsBarInputs, { children: (a) => a.map((r) => /* @__PURE__ */ t(e.AttachmentsBarInput, { input: r, children: r.displayName }, r.id)) })
206
206
  ] }),
207
- /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(e.AttachmentsBarModal, { children: /* @__PURE__ */ t(e.AttachmentsBarModalOverlay, { children: /* @__PURE__ */ n(e.AttachmentsBarModalContent, { children: [
207
+ /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(e.AttachmentsBarModal, { children: /* @__PURE__ */ t(e.AttachmentsBarModalOverlay, { children: /* @__PURE__ */ n(e.AttachmentsBarModalContent, { children: [
208
208
  /* @__PURE__ */ n(e.AttachmentsBarModalHeader, { children: [
209
209
  /* @__PURE__ */ t(e.AttachmentsBarModalHeading, {}),
210
210
  /* @__PURE__ */ t(e.AttachmentsBarModalDescription, {}),
@@ -236,7 +236,7 @@ function W() {
236
236
  /* @__PURE__ */ t(e.TaglineBrandName, {})
237
237
  ] }),
238
238
  /* @__PURE__ */ n(e.Actions, { children: [
239
- /* @__PURE__ */ t(e.HelpActions, { children: ({ pinned: a, unpinned: r }) => /* @__PURE__ */ n(l, { children: [
239
+ /* @__PURE__ */ t(e.HelpActions, { children: ({ pinned: a, unpinned: r }) => /* @__PURE__ */ n(s, { children: [
240
240
  a.map((c) => /* @__PURE__ */ t(e.HelpAction, { action: c }, c.name)),
241
241
  r.length > 0 && /* @__PURE__ */ t(e.HelpActionsTrigger, {}),
242
242
  /* @__PURE__ */ n(e.HelpActionsMenu, { children: [
@@ -261,7 +261,7 @@ function W() {
261
261
  ] });
262
262
  }
263
263
  function P() {
264
- return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(e.FeedbackModal, { children: /* @__PURE__ */ t(e.FeedbackModalOverlay, { children: /* @__PURE__ */ n(e.FeedbackModalContent, { children: [
264
+ return /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(e.FeedbackModal, { children: /* @__PURE__ */ t(e.FeedbackModalOverlay, { children: /* @__PURE__ */ n(e.FeedbackModalContent, { children: [
265
265
  /* @__PURE__ */ t(e.FeedbackModalHeader, {}),
266
266
  /* @__PURE__ */ t(e.FeedbackModalClose, {}),
267
267
  /* @__PURE__ */ t(e.FeedbackModalBody, { children: /* @__PURE__ */ n(e.FeedbackForm, { children: [
@@ -296,7 +296,7 @@ function V() {
296
296
  /* @__PURE__ */ t(e.FormHeading, {}),
297
297
  /* @__PURE__ */ t(e.FormDescription, {})
298
298
  ] }),
299
- /* @__PURE__ */ t(e.FormContent, { children: (a) => /* @__PURE__ */ n(l, { children: [
299
+ /* @__PURE__ */ t(e.FormContent, { children: (a) => /* @__PURE__ */ n(s, { children: [
300
300
  a.map((r, c) => /* @__PURE__ */ n(e.FormField, { field: r, autoFocus: c === 0, children: [
301
301
  /* @__PURE__ */ t(e.FormFieldLabel, {}),
302
302
  r.inputType === "text" && /* @__PURE__ */ t(e.FormFieldText, {}),
@@ -331,7 +331,7 @@ function V() {
331
331
  ] });
332
332
  }
333
333
  export {
334
- j as InkeepEmbeddedChat,
334
+ R as InkeepEmbeddedChat,
335
335
  T as InkeepEmbeddedChatImpl,
336
336
  B as InkeepEmbeddedChatImplContent,
337
337
  k as InkeepEmbeddedChatProvider
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@inkeep/cxkit-styled"),a=require("./embedded-chat.cjs");function s(r){const{baseSettings:i,aiChatSettings:n,shouldAutoFocusInput:o,...d}=r;return e.jsx(t.ErrorBoundary,{children:e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit",overflowX:"hidden"},children:e.jsx(t.RootProvider,{config:{baseSettings:i,aiChatSettings:n},componentType:t.WebWidgetInteractionType.SidebarChat,children:e.jsxs(t.SidebarChat.Root,{...d,children:[e.jsx(t.SidebarChat.Resizer,{}),e.jsx(a.InkeepEmbeddedChatImpl,{variant:"no-shadow",shouldAutoFocusInput:o})]})})})})}exports.InkeepSidebarChat=s;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@inkeep/cxkit-styled"),o=require("./embedded-chat.cjs");function s(){return e.jsx(t.SidebarChat.Header,{children:e.jsx(t.SidebarChat.CloseButton,{})})}function h(r){const{baseSettings:i,aiChatSettings:n,shouldAutoFocusInput:d,...a}=r;return e.jsx(t.ErrorBoundary,{children:e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit",overflowX:"hidden"},children:e.jsx(t.RootProvider,{config:{baseSettings:i,aiChatSettings:n},componentType:t.WebWidgetInteractionType.SidebarChat,children:e.jsxs(t.SidebarChat.Root,{...a,children:[e.jsx(t.SidebarChat.Resizer,{}),e.jsx(o.InkeepEmbeddedChatImpl,{variant:"no-shadow",shouldAutoFocusInput:d,header:s})]})})})})}exports.InkeepSidebarChat=h;
@@ -1,10 +1,13 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as h } from "react/jsx-runtime";
3
- import { ErrorBoundary as a, Shadow as s, RootProvider as p, WebWidgetInteractionType as c, SidebarChat as t } from "@inkeep/cxkit-styled";
2
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
3
+ import { ErrorBoundary as h, Shadow as s, RootProvider as c, WebWidgetInteractionType as p, SidebarChat as r } from "@inkeep/cxkit-styled";
4
4
  import { InkeepEmbeddedChatImpl as l } from "./embedded-chat.js";
5
- function b(r) {
6
- const { baseSettings: i, aiChatSettings: o, shouldAutoFocusInput: n, ...d } = r;
7
- return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
5
+ function u() {
6
+ return /* @__PURE__ */ e(r.Header, { children: /* @__PURE__ */ e(r.CloseButton, {}) });
7
+ }
8
+ function f(t) {
9
+ const { baseSettings: i, aiChatSettings: o, shouldAutoFocusInput: n, ...d } = t;
10
+ return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
8
11
  s,
9
12
  {
10
13
  wrapperStyles: {
@@ -14,20 +17,21 @@ function b(r) {
14
17
  // prevent the horizontal scrollbar from appearing while the sidebar is animating
15
18
  },
16
19
  children: /* @__PURE__ */ e(
17
- p,
20
+ c,
18
21
  {
19
22
  config: {
20
23
  baseSettings: i,
21
24
  aiChatSettings: o
22
25
  },
23
- componentType: c.SidebarChat,
24
- children: /* @__PURE__ */ h(t.Root, { ...d, children: [
25
- /* @__PURE__ */ e(t.Resizer, {}),
26
+ componentType: p.SidebarChat,
27
+ children: /* @__PURE__ */ a(r.Root, { ...d, children: [
28
+ /* @__PURE__ */ e(r.Resizer, {}),
26
29
  /* @__PURE__ */ e(
27
30
  l,
28
31
  {
29
32
  variant: "no-shadow",
30
- shouldAutoFocusInput: n
33
+ shouldAutoFocusInput: n,
34
+ header: u
31
35
  }
32
36
  )
33
37
  ] })
@@ -37,5 +41,5 @@ function b(r) {
37
41
  ) });
38
42
  }
39
43
  export {
40
- b as InkeepSidebarChat
44
+ f as InkeepSidebarChat
41
45
  };
package/dist/index.d.cts CHANGED
@@ -40,6 +40,7 @@ export declare function InkeepEmbeddedChatImplContent(props: InkeepEmbeddedChatI
40
40
 
41
41
  declare type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView & {
42
42
  variant?: 'no-shadow' | 'container-with-shadow';
43
+ header?: React.ComponentType<InkeepEmbeddedChatImplProps>;
43
44
  };
44
45
 
45
46
  export declare type InkeepEmbeddedChatProps = InkeepEmbeddedChatImplProps & Partial<ChatConfig>;
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export declare function InkeepEmbeddedChatImplContent(props: InkeepEmbeddedChatI
40
40
 
41
41
  declare type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView & {
42
42
  variant?: 'no-shadow' | 'container-with-shadow';
43
+ header?: React.ComponentType<InkeepEmbeddedChatImplProps>;
43
44
  };
44
45
 
45
46
  export declare type InkeepEmbeddedChatProps = InkeepEmbeddedChatImplProps & Partial<ChatConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.84",
3
+ "version": "0.5.86",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@radix-ui/react-use-controllable-state": "^1.1.0",
24
24
  "lucide-react": "^0.503.0",
25
- "@inkeep/cxkit-styled": "0.5.84"
25
+ "@inkeep/cxkit-styled": "0.5.86"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@biomejs/biome": "1.9.4",
@@ -44,8 +44,8 @@
44
44
  "typescript": "5.7.3",
45
45
  "vite": "5.4.11",
46
46
  "vite-plugin-dts": "4.4.0",
47
- "@inkeep/cxkit-color-mode": "0.5.84",
48
- "@inkeep/cxkit-types": "0.5.84"
47
+ "@inkeep/cxkit-color-mode": "0.5.86",
48
+ "@inkeep/cxkit-types": "0.5.86"
49
49
  },
50
50
  "module": "dist/index.js",
51
51
  "types": "dist/index.d.ts",