@inkeep/cxkit-react 0.5.80 → 0.5.82

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"),h=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(c,{...a})})})})}function m(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 c(a){return e.jsx(m,{...a,children:e.jsx(o,{...a})})}function o(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?l.ModalContent:h.Fragment;return e.jsx(r,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||s?.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(h.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,i)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${i}`))}),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=c;exports.InkeepEmbeddedChatImplContent=o;exports.InkeepEmbeddedChatProvider=m;
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,7 +1,7 @@
1
1
  "use client";
2
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 h, Modal as d, PortalWithTheme as s } from "@inkeep/cxkit-styled";
4
- import { Fragment as m } from "react";
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";
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
7
  function j(a) {
@@ -35,12 +35,12 @@ 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 } = a, c = b(), o = M();
39
- return /* @__PURE__ */ t(c && !o ? C : m, { children: /* @__PURE__ */ n(
38
+ const { onToggleView: r, variant: c } = a, o = b(), i = M();
39
+ return /* @__PURE__ */ t(o && !i ? C : F, { children: /* @__PURE__ */ n(
40
40
  e.Wrapper,
41
41
  {
42
- variant: r ? "no-shadow" : "container-with-shadow",
43
- "data-composite": h(!!a.onToggleView || c?.isOpen),
42
+ variant: c ?? (r ? "no-shadow" : "container-with-shadow"),
43
+ "data-composite": m(!!a.onToggleView || o?.isOpen),
44
44
  children: [
45
45
  /* @__PURE__ */ t(e.ConversationLoading, {}),
46
46
  /* @__PURE__ */ n(e.Root, { children: [
@@ -56,7 +56,7 @@ function B(a) {
56
56
  }
57
57
  function S(a) {
58
58
  const { onToggleView: r, askAILabel: c, searchLabel: o } = a, i = !!r;
59
- return /* @__PURE__ */ t(e.Header, { "data-show-toolbar": h(i), children: i ? /* @__PURE__ */ n(e.HeaderToolbar, { children: [
59
+ return /* @__PURE__ */ t(e.Header, { "data-show-toolbar": m(i), children: i ? /* @__PURE__ */ n(e.HeaderToolbar, { children: [
60
60
  /* @__PURE__ */ n(e.HeaderToolbarWrapper, { children: [
61
61
  /* @__PURE__ */ t(e.ToolbarHeader, {}),
62
62
  /* @__PURE__ */ n(e.Disclaimer, { children: [
@@ -76,8 +76,8 @@ function S(a) {
76
76
  view: "chat"
77
77
  }
78
78
  ),
79
- /* @__PURE__ */ t(d.Close, {})
80
- ] }) : /* @__PURE__ */ t(d.Close, {}) });
79
+ /* @__PURE__ */ t(h.Close, {})
80
+ ] }) : /* @__PURE__ */ t(h.Close, {}) });
81
81
  }
82
82
  function v() {
83
83
  return /* @__PURE__ */ t(e.Content, { children: /* @__PURE__ */ n(e.ContentScrollArea, { children: [
@@ -161,19 +161,19 @@ function L() {
161
161
  return /* @__PURE__ */ n(e.MessageSources, { children: [
162
162
  /* @__PURE__ */ t(e.MessageSourcesHeader, {}),
163
163
  /* @__PURE__ */ t(e.MessageSourcesList, { children: (a) => a.map((r, c) => /* @__PURE__ */ n(e.MessageSourceItem, { href: r.url, source: r, children: [
164
- /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbs, { children: r.breadcrumbs?.map((o) => /* @__PURE__ */ n(m, { children: [
164
+ /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbs, { children: r.breadcrumbs?.map((o) => /* @__PURE__ */ n(F, { children: [
165
165
  o,
166
166
  /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbIcon, {})
167
167
  ] }, o)) }),
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, F) => /* @__PURE__ */ t(
171
+ /* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (o) => o.map((i, d) => /* @__PURE__ */ t(
172
172
  e.MessageSourceItemDescriptionPart,
173
173
  {
174
174
  part: i
175
175
  },
176
- `part-${F}`
176
+ `part-${d}`
177
177
  )) }),
178
178
  /* @__PURE__ */ t(e.MessageSourceItemIndicator, {})
179
179
  ] }, c)) })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./embedded-chat.cjs"),n=require("./embedded-search-and-chat.cjs"),d=require("./embedded-search.cjs"),p=require("./modal.chat.cjs"),h=require("./modal.search-and-chat.cjs"),m=require("./modal.search.cjs"),t=require("./modal.cjs"),a=require("./chat-button.cjs"),r=require("./searchbar.cjs"),I=require("./intelligent-form.cjs");exports.InkeepEmbeddedChat=e.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=e.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=e.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=e.InkeepEmbeddedChatProvider;exports.InkeepEmbeddedSearchAndChat=n.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=n.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=d.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=d.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=d.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=d.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=p.InkeepModalChat;exports.InkeepModalSearchAndChat=h.InkeepModalSearchAndChat;exports.InkeepModalSearch=m.InkeepModalSearch;exports.InkeepModal=t.InkeepModal;exports.ModalContent=t.ModalContent;exports.ChatButtonImpl=a.ChatButtonImpl;exports.InkeepChatButton=a.InkeepChatButton;exports.InkeepSearchBar=r.InkeepSearchBar;exports.SearchBarImpl=r.SearchBarImpl;exports.InkeepIntelligentForm=I.InkeepIntelligentForm;exports.InkeepIntelligentFormImpl=I.InkeepIntelligentFormImpl;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./embedded-chat.cjs"),p=require("./sidebar-chat.cjs"),n=require("./embedded-search-and-chat.cjs"),d=require("./embedded-search.cjs"),h=require("./modal.chat.cjs"),m=require("./modal.search-and-chat.cjs"),o=require("./modal.search.cjs"),a=require("./modal.cjs"),t=require("./chat-button.cjs"),r=require("./searchbar.cjs"),I=require("./intelligent-form.cjs");exports.InkeepEmbeddedChat=e.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=e.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=e.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=e.InkeepEmbeddedChatProvider;exports.InkeepSidebarChat=p.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=n.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=n.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=d.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=d.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=d.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=d.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=h.InkeepModalChat;exports.InkeepModalSearchAndChat=m.InkeepModalSearchAndChat;exports.InkeepModalSearch=o.InkeepModalSearch;exports.InkeepModal=a.InkeepModal;exports.ModalContent=a.ModalContent;exports.ChatButtonImpl=t.ChatButtonImpl;exports.InkeepChatButton=t.InkeepChatButton;exports.InkeepSearchBar=r.InkeepSearchBar;exports.SearchBarImpl=r.SearchBarImpl;exports.InkeepIntelligentForm=I.InkeepIntelligentForm;exports.InkeepIntelligentFormImpl=I.InkeepIntelligentFormImpl;
@@ -1,33 +1,35 @@
1
1
  import { InkeepEmbeddedChat as r, InkeepEmbeddedChatImpl as p, InkeepEmbeddedChatImplContent as o, InkeepEmbeddedChatProvider as t } from "./embedded-chat.js";
2
- import { InkeepEmbeddedSearchAndChat as m, InkeepEmbeddedSearchAndChatImpl as I } from "./embedded-search-and-chat.js";
3
- import { InkeepEmbeddedSearch as h, InkeepEmbeddedSearchImpl as k, InkeepEmbeddedSearchImplContent as l, InkeepEmbeddedSearchProvider as C } from "./embedded-search.js";
4
- import { InkeepModalChat as c } from "./modal.chat.js";
5
- import { InkeepModalSearchAndChat as x } from "./modal.search-and-chat.js";
6
- import { InkeepModalSearch as S } from "./modal.search.js";
7
- import { InkeepModal as i, ModalContent as B } from "./modal.js";
8
- import { ChatButtonImpl as g, InkeepChatButton as u } from "./chat-button.js";
9
- import { InkeepSearchBar as F, SearchBarImpl as P } from "./searchbar.js";
10
- import { InkeepIntelligentForm as q, InkeepIntelligentFormImpl as s } from "./intelligent-form.js";
2
+ import { InkeepSidebarChat as m } from "./sidebar-chat.js";
3
+ import { InkeepEmbeddedSearchAndChat as I, InkeepEmbeddedSearchAndChatImpl as h } from "./embedded-search-and-chat.js";
4
+ import { InkeepEmbeddedSearch as l, InkeepEmbeddedSearchImpl as C, InkeepEmbeddedSearchImplContent as b, InkeepEmbeddedSearchProvider as f } from "./embedded-search.js";
5
+ import { InkeepModalChat as S } from "./modal.chat.js";
6
+ import { InkeepModalSearchAndChat as E } from "./modal.search-and-chat.js";
7
+ import { InkeepModalSearch as M } from "./modal.search.js";
8
+ import { InkeepModal as A, ModalContent as g } from "./modal.js";
9
+ import { ChatButtonImpl as v, InkeepChatButton as F } from "./chat-button.js";
10
+ import { InkeepSearchBar as j, SearchBarImpl as q } from "./searchbar.js";
11
+ import { InkeepIntelligentForm as w, InkeepIntelligentFormImpl as y } from "./intelligent-form.js";
11
12
  export {
12
- g as ChatButtonImpl,
13
- u as InkeepChatButton,
13
+ v as ChatButtonImpl,
14
+ F as InkeepChatButton,
14
15
  r as InkeepEmbeddedChat,
15
16
  p as InkeepEmbeddedChatImpl,
16
17
  o as InkeepEmbeddedChatImplContent,
17
18
  t as InkeepEmbeddedChatProvider,
18
- h as InkeepEmbeddedSearch,
19
- m as InkeepEmbeddedSearchAndChat,
20
- I as InkeepEmbeddedSearchAndChatImpl,
21
- k as InkeepEmbeddedSearchImpl,
22
- l as InkeepEmbeddedSearchImplContent,
23
- C as InkeepEmbeddedSearchProvider,
24
- q as InkeepIntelligentForm,
25
- s as InkeepIntelligentFormImpl,
26
- i as InkeepModal,
27
- c as InkeepModalChat,
28
- S as InkeepModalSearch,
29
- x as InkeepModalSearchAndChat,
30
- F as InkeepSearchBar,
31
- B as ModalContent,
32
- P as SearchBarImpl
19
+ l as InkeepEmbeddedSearch,
20
+ I as InkeepEmbeddedSearchAndChat,
21
+ h as InkeepEmbeddedSearchAndChatImpl,
22
+ C as InkeepEmbeddedSearchImpl,
23
+ b as InkeepEmbeddedSearchImplContent,
24
+ f as InkeepEmbeddedSearchProvider,
25
+ w as InkeepIntelligentForm,
26
+ y as InkeepIntelligentFormImpl,
27
+ A as InkeepModal,
28
+ S as InkeepModalChat,
29
+ M as InkeepModalSearch,
30
+ E as InkeepModalSearchAndChat,
31
+ j as InkeepSearchBar,
32
+ m as InkeepSidebarChat,
33
+ g as ModalContent,
34
+ q as SearchBarImpl
33
35
  };
@@ -0,0 +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;
@@ -0,0 +1,41 @@
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";
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(
8
+ s,
9
+ {
10
+ wrapperStyles: {
11
+ height: "inherit",
12
+ width: "inherit",
13
+ overflowX: "hidden"
14
+ // prevent the horizontal scrollbar from appearing while the sidebar is animating
15
+ },
16
+ children: /* @__PURE__ */ e(
17
+ p,
18
+ {
19
+ config: {
20
+ baseSettings: i,
21
+ aiChatSettings: o
22
+ },
23
+ componentType: c.SidebarChat,
24
+ children: /* @__PURE__ */ h(t.Root, { ...d, children: [
25
+ /* @__PURE__ */ e(t.Resizer, {}),
26
+ /* @__PURE__ */ e(
27
+ l,
28
+ {
29
+ variant: "no-shadow",
30
+ shouldAutoFocusInput: n
31
+ }
32
+ )
33
+ ] })
34
+ }
35
+ )
36
+ }
37
+ ) });
38
+ }
39
+ export {
40
+ b as InkeepSidebarChat
41
+ };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./components/embedded-chat.cjs"),r=require("./components/embedded-search-and-chat.cjs"),n=require("./components/embedded-search.cjs"),h=require("./components/modal.chat.cjs"),m=require("./components/modal.search-and-chat.cjs"),l=require("./components/modal.search.cjs"),a=require("./components/modal.cjs"),p=require("./components/chat-button.cjs"),I=require("./components/searchbar.cjs"),o=require("./components/intelligent-form.cjs"),t=require("@inkeep/cxkit-styled");exports.InkeepEmbeddedChat=d.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=d.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=d.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=d.InkeepEmbeddedChatProvider;exports.InkeepEmbeddedSearchAndChat=r.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=r.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=n.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=n.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=n.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=n.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=h.InkeepModalChat;exports.InkeepModalSearchAndChat=m.InkeepModalSearchAndChat;exports.InkeepModalSearch=l.InkeepModalSearch;exports.InkeepModal=a.InkeepModal;exports.ModalContent=a.ModalContent;exports.ChatButtonImpl=p.ChatButtonImpl;exports.InkeepChatButton=p.InkeepChatButton;exports.InkeepSearchBar=I.InkeepSearchBar;exports.SearchBarImpl=I.SearchBarImpl;exports.InkeepIntelligentForm=o.InkeepIntelligentForm;exports.InkeepIntelligentFormImpl=o.InkeepIntelligentFormImpl;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./components/embedded-chat.cjs"),o=require("./components/sidebar-chat.cjs"),a=require("./components/embedded-search-and-chat.cjs"),n=require("./components/embedded-search.cjs"),m=require("./components/modal.chat.cjs"),l=require("./components/modal.search-and-chat.cjs"),c=require("./components/modal.search.cjs"),r=require("./components/modal.cjs"),p=require("./components/chat-button.cjs"),I=require("./components/searchbar.cjs"),h=require("./components/intelligent-form.cjs"),t=require("@inkeep/cxkit-styled");exports.InkeepEmbeddedChat=d.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=d.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=d.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=d.InkeepEmbeddedChatProvider;exports.InkeepSidebarChat=o.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=a.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=a.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=n.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=n.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=n.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=n.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=m.InkeepModalChat;exports.InkeepModalSearchAndChat=l.InkeepModalSearchAndChat;exports.InkeepModalSearch=c.InkeepModalSearch;exports.InkeepModal=r.InkeepModal;exports.ModalContent=r.ModalContent;exports.ChatButtonImpl=p.ChatButtonImpl;exports.InkeepChatButton=p.InkeepChatButton;exports.InkeepSearchBar=I.InkeepSearchBar;exports.SearchBarImpl=I.SearchBarImpl;exports.InkeepIntelligentForm=h.InkeepIntelligentForm;exports.InkeepIntelligentFormImpl=h.InkeepIntelligentFormImpl;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
package/dist/index.d.cts CHANGED
@@ -9,6 +9,7 @@ import { ModalViewTypes } from '@inkeep/cxkit-types';
9
9
  import { PropsWithChildren } from 'react';
10
10
  import { RefObject } from 'react';
11
11
  import { RootProviderProps } from '@inkeep/cxkit-styled';
12
+ import { SidebarChatProps } from '@inkeep/cxkit-styled';
12
13
  import { WebWidgetInteractionType } from '@inkeep/cxkit-styled';
13
14
  import { WidgetView } from '@inkeep/cxkit-types';
14
15
 
@@ -20,6 +21,8 @@ declare interface ChatButtonImplProps extends Pick<InkeepChatButtonProps, 'label
20
21
 
21
22
  declare type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
22
23
 
24
+ declare type ChatConfig_2 = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
25
+
23
26
  export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Element;
24
27
 
25
28
  export declare interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
@@ -35,7 +38,9 @@ export declare function InkeepEmbeddedChatImpl(props: InkeepEmbeddedChatImplProp
35
38
 
36
39
  export declare function InkeepEmbeddedChatImplContent(props: InkeepEmbeddedChatImplProps): JSX.Element;
37
40
 
38
- declare type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView;
41
+ declare type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView & {
42
+ variant?: 'no-shadow' | 'container-with-shadow';
43
+ };
39
44
 
40
45
  export declare type InkeepEmbeddedChatProps = InkeepEmbeddedChatImplProps & Partial<ChatConfig>;
41
46
 
@@ -148,6 +153,10 @@ export declare interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchA
148
153
  canToggleView?: boolean;
149
154
  }
150
155
 
156
+ export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): JSX.Element;
157
+
158
+ export declare type InkeepSidebarChatProps = Omit<EmbeddedChatProviderProps, 'isHidden'> & Partial<ChatConfig_2> & SidebarChatProps;
159
+
151
160
  declare interface ModalConfig extends RootConfig {
152
161
  /**
153
162
  * The configuration for the modal.
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { ModalViewTypes } from '@inkeep/cxkit-types';
9
9
  import { PropsWithChildren } from 'react';
10
10
  import { RefObject } from 'react';
11
11
  import { RootProviderProps } from '@inkeep/cxkit-styled';
12
+ import { SidebarChatProps } from '@inkeep/cxkit-styled';
12
13
  import { WebWidgetInteractionType } from '@inkeep/cxkit-styled';
13
14
  import { WidgetView } from '@inkeep/cxkit-types';
14
15
 
@@ -20,6 +21,8 @@ declare interface ChatButtonImplProps extends Pick<InkeepChatButtonProps, 'label
20
21
 
21
22
  declare type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
22
23
 
24
+ declare type ChatConfig_2 = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
25
+
23
26
  export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Element;
24
27
 
25
28
  export declare interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
@@ -35,7 +38,9 @@ export declare function InkeepEmbeddedChatImpl(props: InkeepEmbeddedChatImplProp
35
38
 
36
39
  export declare function InkeepEmbeddedChatImplContent(props: InkeepEmbeddedChatImplProps): JSX.Element;
37
40
 
38
- declare type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView;
41
+ declare type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView & {
42
+ variant?: 'no-shadow' | 'container-with-shadow';
43
+ };
39
44
 
40
45
  export declare type InkeepEmbeddedChatProps = InkeepEmbeddedChatImplProps & Partial<ChatConfig>;
41
46
 
@@ -148,6 +153,10 @@ export declare interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchA
148
153
  canToggleView?: boolean;
149
154
  }
150
155
 
156
+ export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): JSX.Element;
157
+
158
+ export declare type InkeepSidebarChatProps = Omit<EmbeddedChatProviderProps, 'isHidden'> & Partial<ChatConfig_2> & SidebarChatProps;
159
+
151
160
  declare interface ModalConfig extends RootConfig {
152
161
  /**
153
162
  * The configuration for the modal.
package/dist/index.js CHANGED
@@ -1,34 +1,36 @@
1
- import { InkeepEmbeddedChat as r, InkeepEmbeddedChatImpl as p, InkeepEmbeddedChatImplContent as o, InkeepEmbeddedChatProvider as t } from "./components/embedded-chat.js";
2
- import { InkeepEmbeddedSearchAndChat as m, InkeepEmbeddedSearchAndChatImpl as I } from "./components/embedded-search-and-chat.js";
3
- import { InkeepEmbeddedSearch as h, InkeepEmbeddedSearchImpl as k, InkeepEmbeddedSearchImplContent as l, InkeepEmbeddedSearchProvider as C } from "./components/embedded-search.js";
4
- import { InkeepModalChat as x } from "./components/modal.chat.js";
5
- import { InkeepModalSearchAndChat as c } from "./components/modal.search-and-chat.js";
6
- import { InkeepModalSearch as S } from "./components/modal.search.js";
7
- import { InkeepModal as i, ModalContent as B } from "./components/modal.js";
8
- import { ChatButtonImpl as g, InkeepChatButton as u } from "./components/chat-button.js";
9
- import { InkeepSearchBar as F, SearchBarImpl as P } from "./components/searchbar.js";
10
- import { InkeepIntelligentForm as q, InkeepIntelligentFormImpl as s } from "./components/intelligent-form.js";
1
+ import { InkeepEmbeddedChat as d, InkeepEmbeddedChatImpl as p, InkeepEmbeddedChatImplContent as o, InkeepEmbeddedChatProvider as t } from "./components/embedded-chat.js";
2
+ import { InkeepSidebarChat as m } from "./components/sidebar-chat.js";
3
+ import { InkeepEmbeddedSearchAndChat as I, InkeepEmbeddedSearchAndChatImpl as h } from "./components/embedded-search-and-chat.js";
4
+ import { InkeepEmbeddedSearch as l, InkeepEmbeddedSearchImpl as C, InkeepEmbeddedSearchImplContent as f, InkeepEmbeddedSearchProvider as x } from "./components/embedded-search.js";
5
+ import { InkeepModalChat as S } from "./components/modal.chat.js";
6
+ import { InkeepModalSearchAndChat as E } from "./components/modal.search-and-chat.js";
7
+ import { InkeepModalSearch as M } from "./components/modal.search.js";
8
+ import { InkeepModal as A, ModalContent as g } from "./components/modal.js";
9
+ import { ChatButtonImpl as v, InkeepChatButton as F } from "./components/chat-button.js";
10
+ import { InkeepSearchBar as j, SearchBarImpl as q } from "./components/searchbar.js";
11
+ import { InkeepIntelligentForm as w, InkeepIntelligentFormImpl as y } from "./components/intelligent-form.js";
11
12
  export * from "@inkeep/cxkit-styled";
12
13
  export {
13
- g as ChatButtonImpl,
14
- u as InkeepChatButton,
15
- r as InkeepEmbeddedChat,
14
+ v as ChatButtonImpl,
15
+ F as InkeepChatButton,
16
+ d as InkeepEmbeddedChat,
16
17
  p as InkeepEmbeddedChatImpl,
17
18
  o as InkeepEmbeddedChatImplContent,
18
19
  t as InkeepEmbeddedChatProvider,
19
- h as InkeepEmbeddedSearch,
20
- m as InkeepEmbeddedSearchAndChat,
21
- I as InkeepEmbeddedSearchAndChatImpl,
22
- k as InkeepEmbeddedSearchImpl,
23
- l as InkeepEmbeddedSearchImplContent,
24
- C as InkeepEmbeddedSearchProvider,
25
- q as InkeepIntelligentForm,
26
- s as InkeepIntelligentFormImpl,
27
- i as InkeepModal,
28
- x as InkeepModalChat,
29
- S as InkeepModalSearch,
30
- c as InkeepModalSearchAndChat,
31
- F as InkeepSearchBar,
32
- B as ModalContent,
33
- P as SearchBarImpl
20
+ l as InkeepEmbeddedSearch,
21
+ I as InkeepEmbeddedSearchAndChat,
22
+ h as InkeepEmbeddedSearchAndChatImpl,
23
+ C as InkeepEmbeddedSearchImpl,
24
+ f as InkeepEmbeddedSearchImplContent,
25
+ x as InkeepEmbeddedSearchProvider,
26
+ w as InkeepIntelligentForm,
27
+ y as InkeepIntelligentFormImpl,
28
+ A as InkeepModal,
29
+ S as InkeepModalChat,
30
+ M as InkeepModalSearch,
31
+ E as InkeepModalSearchAndChat,
32
+ j as InkeepSearchBar,
33
+ m as InkeepSidebarChat,
34
+ g as ModalContent,
35
+ q as SearchBarImpl
34
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.80",
3
+ "version": "0.5.82",
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.80"
25
+ "@inkeep/cxkit-styled": "0.5.82"
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.80",
48
- "@inkeep/cxkit-types": "0.5.80"
47
+ "@inkeep/cxkit-color-mode": "0.5.82",
48
+ "@inkeep/cxkit-types": "0.5.82"
49
49
  },
50
50
  "module": "dist/index.js",
51
51
  "types": "dist/index.d.ts",