@inkeep/cxkit-react 0.5.71 → 0.5.73

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.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.jsxs(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,{})]})}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.jsxs(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarInputIcon,{}),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"),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.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.jsxs(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarInputIcon,{}),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,26 +1,26 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as n, Fragment as l } from "react/jsx-runtime";
3
- import { Shadow as F, RootProvider as u, WebWidgetInteractionType as g, EmbeddedChat as e, useModal as p, useWidget as A, dataAttr as d, Modal as b, PortalWithTheme as s } from "@inkeep/cxkit-styled";
4
- import { Fragment as m } from "react";
3
+ import { Shadow as u, RootProvider as g, WebWidgetInteractionType as p, EmbeddedChat as e, useModal as A, useWidget as b, dataAttr as m, Modal as d, PortalWithTheme as s } from "@inkeep/cxkit-styled";
4
+ import { Fragment as h } from "react";
5
5
  import { WidgetToggle as M } from "./widget-toggle.js";
6
6
  import { ModalContent as I } from "./modal.js";
7
7
  function $(a) {
8
8
  const { baseSettings: r, aiChatSettings: c } = a;
9
9
  return /* @__PURE__ */ t(
10
- F,
10
+ u,
11
11
  {
12
12
  wrapperStyles: {
13
13
  height: "inherit",
14
14
  width: "inherit"
15
15
  },
16
16
  children: /* @__PURE__ */ t(
17
- u,
17
+ g,
18
18
  {
19
19
  config: {
20
20
  baseSettings: r,
21
21
  aiChatSettings: c
22
22
  },
23
- componentType: g.EmbeddedChat,
23
+ componentType: p.EmbeddedChat,
24
24
  children: /* @__PURE__ */ t(k, { ...a })
25
25
  }
26
26
  )
@@ -35,12 +35,12 @@ function k(a) {
35
35
  return /* @__PURE__ */ t(C, { ...a, children: /* @__PURE__ */ t(T, { ...a }) });
36
36
  }
37
37
  function T(a) {
38
- const { onToggleView: r } = a, c = p(), o = A();
39
- return /* @__PURE__ */ t(c && !o ? I : m, { children: /* @__PURE__ */ n(
38
+ const { onToggleView: r } = a, c = A(), o = b();
39
+ return /* @__PURE__ */ t(c && !o ? I : h, { children: /* @__PURE__ */ n(
40
40
  e.Wrapper,
41
41
  {
42
42
  variant: r ? "no-shadow" : "container-with-shadow",
43
- "data-composite": d(!!a.onToggleView || c?.isOpen),
43
+ "data-composite": m(!!a.onToggleView || c?.isOpen),
44
44
  children: [
45
45
  /* @__PURE__ */ t(e.ConversationLoading, {}),
46
46
  /* @__PURE__ */ n(e.Root, { children: [
@@ -56,30 +56,28 @@ function T(a) {
56
56
  }
57
57
  function B(a) {
58
58
  const { onToggleView: r, askAILabel: c, searchLabel: o } = a, i = !!r;
59
- return /* @__PURE__ */ n(e.Header, { "data-show-toolbar": d(i), children: [
60
- i && /* @__PURE__ */ n(e.HeaderToolbar, { children: [
61
- /* @__PURE__ */ n(e.HeaderToolbarWrapper, { children: [
62
- /* @__PURE__ */ t(e.ToolbarHeader, {}),
63
- /* @__PURE__ */ n(e.Disclaimer, { children: [
64
- /* @__PURE__ */ t(e.DisclaimerTrigger, {}),
65
- /* @__PURE__ */ n(e.DisclaimerContent, { side: "bottom", align: "start", children: [
66
- /* @__PURE__ */ t(e.DisclaimerText, {}),
67
- /* @__PURE__ */ t(e.DisclaimerArrow, {})
68
- ] })
59
+ return /* @__PURE__ */ t(e.Header, { "data-show-toolbar": m(i), children: i ? /* @__PURE__ */ n(e.HeaderToolbar, { children: [
60
+ /* @__PURE__ */ n(e.HeaderToolbarWrapper, { children: [
61
+ /* @__PURE__ */ t(e.ToolbarHeader, {}),
62
+ /* @__PURE__ */ n(e.Disclaimer, { children: [
63
+ /* @__PURE__ */ t(e.DisclaimerTrigger, {}),
64
+ /* @__PURE__ */ n(e.DisclaimerContent, { side: "bottom", align: "start", children: [
65
+ /* @__PURE__ */ t(e.DisclaimerText, {}),
66
+ /* @__PURE__ */ t(e.DisclaimerArrow, {})
69
67
  ] })
70
- ] }),
71
- /* @__PURE__ */ t(
72
- M,
73
- {
74
- onToggleView: r,
75
- askAILabel: c,
76
- searchLabel: o,
77
- view: "chat"
78
- }
79
- )
68
+ ] })
80
69
  ] }),
81
- /* @__PURE__ */ t(b.Close, {})
82
- ] });
70
+ /* @__PURE__ */ t(
71
+ M,
72
+ {
73
+ onToggleView: r,
74
+ askAILabel: c,
75
+ searchLabel: o,
76
+ view: "chat"
77
+ }
78
+ ),
79
+ /* @__PURE__ */ t(d.Close, {})
80
+ ] }) : /* @__PURE__ */ t(d.Close, {}) });
83
81
  }
84
82
  function S() {
85
83
  return /* @__PURE__ */ t(e.Content, { children: /* @__PURE__ */ n(e.ContentScrollArea, { children: [
@@ -163,19 +161,19 @@ function y() {
163
161
  return /* @__PURE__ */ n(e.MessageSources, { children: [
164
162
  /* @__PURE__ */ t(e.MessageSourcesHeader, {}),
165
163
  /* @__PURE__ */ t(e.MessageSourcesList, { children: (a) => a.map((r, c) => /* @__PURE__ */ n(e.MessageSourceItem, { href: r.url, source: r, children: [
166
- /* @__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(h, { children: [
167
165
  o,
168
166
  /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbIcon, {})
169
167
  ] }, o)) }),
170
168
  /* @__PURE__ */ t(e.MessageSourceItemIcon, {}),
171
169
  /* @__PURE__ */ t(e.MessageSourceItemTitle, {}),
172
170
  /* @__PURE__ */ t(e.MessageSourceItemTag, {}),
173
- /* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (o) => o.map((i, h) => /* @__PURE__ */ t(
171
+ /* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (o) => o.map((i, F) => /* @__PURE__ */ t(
174
172
  e.MessageSourceItemDescriptionPart,
175
173
  {
176
174
  part: i
177
175
  },
178
- `part-${h}`
176
+ `part-${F}`
179
177
  )) }),
180
178
  /* @__PURE__ */ t(e.MessageSourceItemIndicator, {})
181
179
  ] }, c)) })
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),a=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),C=require("react"),g=require("./modal.cjs");function j(n){const{config:d,...r}=S.useWidgetImpl(n);return e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(t.RootProvider,{config:d,componentType:t.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(h,{...r})})})}function h(n){const{view:d,setView:r,shouldShowAskAICard:l,onToggleView:p,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b}=n,I=t.useModal()?g.ModalContent:C.Fragment,o={onToggleView:p,shouldShowAskAICard:l,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b},i={isHidden:d==="chat",...o},s={isHidden:d==="search",...o};return e.jsx(t.WidgetProvider,{widget:{setView:r,view:d},children:e.jsx(a.InkeepEmbeddedSearchProvider,{...i,children:e.jsx(c.InkeepEmbeddedChatProvider,{...s,children:e.jsxs(I,{children:[e.jsx(a.InkeepEmbeddedSearchImplContent,{...i}),e.jsx(c.InkeepEmbeddedChatImplContent,{...s})]})})})})}exports.InkeepEmbeddedSearchAndChat=j;exports.InkeepEmbeddedSearchAndChatImpl=h;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),a=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),k=require("react"),g=require("./modal.cjs");function j(n){const{config:d,...r}=S.useWidgetImpl(n);return e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(t.RootProvider,{config:d,componentType:t.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(h,{...r})})})}function h(n){const{view:d,setView:r,shouldShowAskAICard:l,onToggleView:p,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b,askAICardLabel:I}=n,C=t.useModal()?g.ModalContent:k.Fragment,o={onToggleView:p,shouldShowAskAICard:l,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b,askAICardLabel:I},s={isHidden:d==="chat",...o},i={isHidden:d==="search",...o};return e.jsx(t.WidgetProvider,{widget:{setView:r,view:d},children:e.jsx(a.InkeepEmbeddedSearchProvider,{...s,children:e.jsx(c.InkeepEmbeddedChatProvider,{...i,children:e.jsxs(C,{children:[e.jsx(a.InkeepEmbeddedSearchImplContent,{...s}),e.jsx(c.InkeepEmbeddedChatImplContent,{...i})]})})})})}exports.InkeepEmbeddedSearchAndChat=j;exports.InkeepEmbeddedSearchAndChatImpl=h;
@@ -1,39 +1,41 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
3
- import { InkeepEmbeddedChatProvider as I, InkeepEmbeddedChatImplContent as u } from "./embedded-chat.js";
4
- import { Shadow as b, RootProvider as f, WebWidgetInteractionType as C, useModal as g, WidgetProvider as k } from "@inkeep/cxkit-styled";
5
- import { InkeepEmbeddedSearchProvider as w, InkeepEmbeddedSearchImplContent as S } from "./embedded-search.js";
6
- import { useWidgetImpl as A } from "./embedded-search-and-chat.impl.js";
7
- import { Fragment as E } from "react";
8
- import { ModalContent as P } from "./modal.js";
9
- function M(o) {
10
- const { config: r, ...d } = A(o);
2
+ import { jsx as e, jsxs as I } from "react/jsx-runtime";
3
+ import { InkeepEmbeddedChatProvider as u, InkeepEmbeddedChatImplContent as b } from "./embedded-chat.js";
4
+ import { Shadow as C, RootProvider as f, WebWidgetInteractionType as g, useModal as k, WidgetProvider as w } from "@inkeep/cxkit-styled";
5
+ import { InkeepEmbeddedSearchProvider as A, InkeepEmbeddedSearchImplContent as S } from "./embedded-search.js";
6
+ import { useWidgetImpl as E } from "./embedded-search-and-chat.impl.js";
7
+ import { Fragment as P } from "react";
8
+ import { ModalContent as v } from "./modal.js";
9
+ function V(d) {
10
+ const { config: r, ...o } = E(d);
11
11
  return /* @__PURE__ */ e(
12
- b,
12
+ C,
13
13
  {
14
14
  wrapperStyles: {
15
15
  height: "inherit",
16
16
  width: "inherit"
17
17
  },
18
- children: /* @__PURE__ */ e(f, { config: r, componentType: C.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(v, { ...d }) })
18
+ children: /* @__PURE__ */ e(f, { config: r, componentType: g.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(W, { ...o }) })
19
19
  }
20
20
  );
21
21
  }
22
- function v(o) {
22
+ function W(d) {
23
23
  const {
24
24
  view: r,
25
- setView: d,
26
- shouldShowAskAICard: h,
27
- onToggleView: c,
28
- shouldAutoFocusInput: m,
29
- searchLabel: p,
30
- askAILabel: a
31
- } = o, s = g() ? P : E, t = {
32
- onToggleView: c,
33
- shouldShowAskAICard: h,
34
- shouldAutoFocusInput: m,
35
- searchLabel: p,
36
- askAILabel: a
25
+ setView: o,
26
+ shouldShowAskAICard: a,
27
+ onToggleView: h,
28
+ shouldAutoFocusInput: c,
29
+ searchLabel: m,
30
+ askAILabel: p,
31
+ askAICardLabel: s
32
+ } = d, l = k() ? v : P, t = {
33
+ onToggleView: h,
34
+ shouldShowAskAICard: a,
35
+ shouldAutoFocusInput: c,
36
+ searchLabel: m,
37
+ askAILabel: p,
38
+ askAICardLabel: s
37
39
  }, n = {
38
40
  isHidden: r === "chat",
39
41
  ...t
@@ -41,12 +43,12 @@ function v(o) {
41
43
  isHidden: r === "search",
42
44
  ...t
43
45
  };
44
- return /* @__PURE__ */ e(k, { widget: { setView: d, view: r }, children: /* @__PURE__ */ e(w, { ...n, children: /* @__PURE__ */ e(I, { ...i, children: /* @__PURE__ */ l(s, { children: [
46
+ return /* @__PURE__ */ e(w, { widget: { setView: o, view: r }, children: /* @__PURE__ */ e(A, { ...n, children: /* @__PURE__ */ e(u, { ...i, children: /* @__PURE__ */ I(l, { children: [
45
47
  /* @__PURE__ */ e(S, { ...n }),
46
- /* @__PURE__ */ e(u, { ...i })
48
+ /* @__PURE__ */ e(b, { ...i })
47
49
  ] }) }) }) });
48
50
  }
49
51
  export {
50
- M as InkeepEmbeddedSearchAndChat,
51
- v as InkeepEmbeddedSearchAndChatImpl
52
+ V as InkeepEmbeddedSearchAndChat,
53
+ W as InkeepEmbeddedSearchAndChatImpl
52
54
  };
@@ -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"),i=require("react"),h=require("./widget-toggle.cjs"),S=require("./modal.cjs");function b(s){const{baseSettings:r,searchSettings:t}=s;return e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:r,searchSettings:t},componentType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(m,{...s})})})}function o(s){const{children:r,onToggleView:t,isHidden:n,shouldAutoFocusInput:c=!t}=s;return e.jsx(d.EmbeddedSearch.Provider,{isHidden:n,shouldAutoFocusInput:c,children:r})}function m(s){return e.jsx(o,{...s,children:e.jsx(u,{...s})})}function u(s){const{searchSettings:{view:r}}=d.useInkeepConfig(),{onToggleView:t,shouldShowAskAICard:n=!!t&&r!=="dual-pane"}=s,c=d.useModal(),a=d.useWidget(),l=c&&!a?S.ModalContent:i.Fragment;return e.jsx(l,{children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-show-ask-ai-card":d.dataAttr(n),"data-composite":d.dataAttr(!!t||c?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(x,{...s}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(j,{askAILabel:s.askAILabel,onToggleView:s.onToggleView,shouldShowAskAICard:n}),e.jsx(I,{})]}),e.jsx(R,{})]})})})}function x(s){const{onToggleView:r,askAILabel:t,searchLabel:n}=s,c=d.useCommandState(a=>a.search);return e.jsxs(d.EmbeddedSearch.InputGroup,{children:[e.jsx(d.EmbeddedSearch.InputIcon,{}),e.jsx(d.EmbeddedSearch.Input,{}),e.jsx(d.EmbeddedSearch.Loading,{}),r&&e.jsx(h.WidgetToggle,{onToggleView:r,query:c,askAILabel:t,searchLabel:n,view:"search"}),e.jsx(d.Modal.Close,{})]})}function j(s){const{askAILabel:r,onToggleView:t,shouldShowAskAICard:n}=s,c=d.useCommandState(l=>l.search),{handleToggle:a}=h.useToggleView({onToggleView:t,query:c});return n?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>a("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[r||"Ask AI",c&&e.jsx(d.EmbeddedSearch.AskAITriggerQuery,{children:`${c}`})]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicatorText,{children:"Start conversation"}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function I(){return e.jsxs(d.EmbeddedSearch.Results,{children:[e.jsx(d.EmbeddedSearch.ResultsLoading,{}),e.jsx(d.EmbeddedSearch.ResultsTabList,{children:s=>s.map(r=>e.jsx(d.EmbeddedSearch.ResultsTab,{tab:r},r))}),e.jsx(d.EmbeddedSearch.ResultsEmpty,{}),e.jsxs(d.EmbeddedSearch.ResultsContent,{children:[e.jsx(E,{}),e.jsx(g,{})]})]})}function E(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(d.EmbeddedSearch.ResultsList,{children:s=>s.map(r=>e.jsxs(d.EmbeddedSearch.ResultsItem,{item:r,children:[e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbs,{children:t=>t.map((n,c)=>e.jsxs(i.Fragment,{children:[n,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},`${n}-${c}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:t=>t.map((n,c)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:n},`part-${c}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},r.id))})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function g(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsxs(d.EmbeddedSearch.ResultsItemPreview,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeader,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeading,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbs,{children:s=>s.map((r,t)=>e.jsxs(i.Fragment,{children:[r,e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbIcon,{})]},`${r}-${t}`))})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBody,{}),e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutline,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineList,{children:s=>s.map((r,t)=>e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutlineItem,{href:r.url??void 0,"data-is-match":d.dataAttr(r.isMatch),children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemText,{children:r.content}),r.url&&e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${r.anchor}-${t}`))})]})]})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function R(){return e.jsx(d.EmbeddedSearch.Footer,{children:e.jsxs(d.EmbeddedSearch.TaglineContainer,{children:[e.jsx(d.EmbeddedSearch.TaglineText,{}),e.jsx(d.EmbeddedSearch.TaglineLogo,{}),e.jsx(d.EmbeddedSearch.TaglineBrandName,{})]})})}exports.InkeepEmbeddedSearch=b;exports.InkeepEmbeddedSearchImpl=m;exports.InkeepEmbeddedSearchImplContent=u;exports.InkeepEmbeddedSearchProvider=o;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),i=require("react"),h=require("./widget-toggle.cjs"),b=require("./modal.cjs");function x(r){const{baseSettings:s,searchSettings:t}=r;return e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:s,searchSettings:t},componentType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(m,{...r})})})}function o(r){const{children:s,onToggleView:t,isHidden:c,shouldAutoFocusInput:n=!t}=r;return e.jsx(d.EmbeddedSearch.Provider,{isHidden:c,shouldAutoFocusInput:n,children:s})}function m(r){return e.jsx(o,{...r,children:e.jsx(u,{...r})})}function u(r){const{searchSettings:{view:s}}=d.useInkeepConfig(),{onToggleView:t,shouldShowAskAICard:c=!!t&&s!=="dual-pane"}=r,n=d.useModal(),a=d.useWidget(),l=n&&!a?b.ModalContent:i.Fragment;return e.jsx(l,{children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-show-ask-ai-card":d.dataAttr(c),"data-composite":d.dataAttr(!!t||n?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(j,{...r}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(I,{askAICardLabel:r.askAICardLabel,askAILabel:r.askAILabel,onToggleView:r.onToggleView,shouldShowAskAICard:c}),e.jsx(E,{})]}),e.jsx(A,{})]})})})}function j(r){const{onToggleView:s,askAILabel:t,searchLabel:c}=r,n=d.useCommandState(a=>a.search);return e.jsxs(d.EmbeddedSearch.InputGroup,{children:[e.jsx(d.EmbeddedSearch.InputIcon,{}),e.jsx(d.EmbeddedSearch.Input,{}),e.jsx(d.EmbeddedSearch.Loading,{}),s&&e.jsx(h.WidgetToggle,{onToggleView:s,query:n,askAILabel:t,searchLabel:c,view:"search"}),e.jsx(d.Modal.Close,{})]})}function I(r){const{askAILabel:s,onToggleView:t,shouldShowAskAICard:c,askAICardLabel:n}=r,a=d.useCommandState(S=>S.search),{handleToggle:l}=h.useToggleView({onToggleView:t,query:a});return c?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>l("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[n||s||"Ask AI",a&&e.jsx(d.EmbeddedSearch.AskAITriggerQuery,{children:`${a}`})]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicatorText,{children:"Start conversation"}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function E(){return e.jsxs(d.EmbeddedSearch.Results,{children:[e.jsx(d.EmbeddedSearch.ResultsLoading,{}),e.jsx(d.EmbeddedSearch.ResultsTabList,{children:r=>r.map(s=>e.jsx(d.EmbeddedSearch.ResultsTab,{tab:s},s))}),e.jsx(d.EmbeddedSearch.ResultsEmpty,{}),e.jsxs(d.EmbeddedSearch.ResultsContent,{children:[e.jsx(g,{}),e.jsx(R,{})]})]})}function g(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(d.EmbeddedSearch.ResultsList,{children:r=>r.map(s=>e.jsxs(d.EmbeddedSearch.ResultsItem,{item:s,children:[e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbs,{children:t=>t.map((c,n)=>e.jsxs(i.Fragment,{children:[c,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},`${c}-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:t=>t.map((c,n)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:c},`part-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},s.id))})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function R(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsxs(d.EmbeddedSearch.ResultsItemPreview,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeader,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeading,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbs,{children:r=>r.map((s,t)=>e.jsxs(i.Fragment,{children:[s,e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbIcon,{})]},`${s}-${t}`))})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBody,{}),e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutline,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineList,{children:r=>r.map((s,t)=>e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutlineItem,{href:s.url??void 0,"data-is-match":d.dataAttr(s.isMatch),children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemText,{children:s.content}),s.url&&e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${s.anchor}-${t}`))})]})]})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function A(){return e.jsx(d.EmbeddedSearch.Footer,{children:e.jsxs(d.EmbeddedSearch.TaglineContainer,{children:[e.jsx(d.EmbeddedSearch.TaglineText,{}),e.jsx(d.EmbeddedSearch.TaglineLogo,{}),e.jsx(d.EmbeddedSearch.TaglineBrandName,{})]})})}exports.InkeepEmbeddedSearch=x;exports.InkeepEmbeddedSearchImpl=m;exports.InkeepEmbeddedSearchImplContent=u;exports.InkeepEmbeddedSearchProvider=o;
@@ -1,126 +1,127 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as s } from "react/jsx-runtime";
3
- import { Shadow as h, RootProvider as m, WebWidgetInteractionType as g, EmbeddedSearch as e, useInkeepConfig as R, useModal as A, useWidget as p, dataAttr as u, useCommandState as I, Modal as T } from "@inkeep/cxkit-styled";
4
- import { Fragment as d } from "react";
5
- import { WidgetToggle as w, useToggleView as S } from "./widget-toggle.js";
3
+ import { Shadow as m, RootProvider as g, WebWidgetInteractionType as R, EmbeddedSearch as e, useInkeepConfig as A, useModal as T, useWidget as p, dataAttr as a, useCommandState as I, Modal as w } from "@inkeep/cxkit-styled";
4
+ import { Fragment as u } from "react";
5
+ import { WidgetToggle as S, useToggleView as k } from "./widget-toggle.js";
6
6
  import { ModalContent as v } from "./modal.js";
7
- function F(n) {
8
- const { baseSettings: r, searchSettings: l } = n;
9
- return /* @__PURE__ */ t(h, { children: /* @__PURE__ */ t(
10
- m,
7
+ function M(r) {
8
+ const { baseSettings: n, searchSettings: l } = r;
9
+ return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
10
+ g,
11
11
  {
12
12
  config: {
13
- baseSettings: r,
13
+ baseSettings: n,
14
14
  searchSettings: l
15
15
  },
16
- componentType: g.EmbeddedSearch,
17
- children: /* @__PURE__ */ t(P, { ...n })
16
+ componentType: R.EmbeddedSearch,
17
+ children: /* @__PURE__ */ t(P, { ...r })
18
18
  }
19
19
  ) });
20
20
  }
21
- function k(n) {
22
- const { children: r, onToggleView: l, isHidden: o, shouldAutoFocusInput: i = !l } = n;
23
- return /* @__PURE__ */ t(e.Provider, { isHidden: o, shouldAutoFocusInput: i, children: r });
21
+ function b(r) {
22
+ const { children: n, onToggleView: l, isHidden: i, shouldAutoFocusInput: o = !l } = r;
23
+ return /* @__PURE__ */ t(e.Provider, { isHidden: i, shouldAutoFocusInput: o, children: n });
24
24
  }
25
- function P(n) {
26
- return /* @__PURE__ */ t(k, { ...n, children: /* @__PURE__ */ t(b, { ...n }) });
25
+ function P(r) {
26
+ return /* @__PURE__ */ t(b, { ...r, children: /* @__PURE__ */ t(f, { ...r }) });
27
27
  }
28
- function b(n) {
28
+ function f(r) {
29
29
  const {
30
- searchSettings: { view: r }
31
- } = R(), { onToggleView: l, shouldShowAskAICard: o = !!l && r !== "dual-pane" } = n, i = A(), c = p();
32
- return /* @__PURE__ */ t(i && !c ? v : d, { children: /* @__PURE__ */ t(
30
+ searchSettings: { view: n }
31
+ } = A(), { onToggleView: l, shouldShowAskAICard: i = !!l && n !== "dual-pane" } = r, o = T(), c = p();
32
+ return /* @__PURE__ */ t(o && !c ? v : u, { children: /* @__PURE__ */ t(
33
33
  e.Wrapper,
34
34
  {
35
- "data-show-ask-ai-card": u(o),
36
- "data-composite": u(!!l || i?.isOpen),
35
+ "data-show-ask-ai-card": a(i),
36
+ "data-composite": a(!!l || o?.isOpen),
37
37
  children: /* @__PURE__ */ s(e.Root, { children: [
38
- /* @__PURE__ */ t(f, { ...n }),
38
+ /* @__PURE__ */ t(L, { ...r }),
39
39
  /* @__PURE__ */ s(e.Content, { children: [
40
40
  /* @__PURE__ */ t(
41
- L,
41
+ C,
42
42
  {
43
- askAILabel: n.askAILabel,
44
- onToggleView: n.onToggleView,
45
- shouldShowAskAICard: o
43
+ askAICardLabel: r.askAICardLabel,
44
+ askAILabel: r.askAILabel,
45
+ onToggleView: r.onToggleView,
46
+ shouldShowAskAICard: i
46
47
  }
47
48
  ),
48
- /* @__PURE__ */ t(C, {})
49
+ /* @__PURE__ */ t(V, {})
49
50
  ] }),
50
- /* @__PURE__ */ t($, {})
51
+ /* @__PURE__ */ t(y, {})
51
52
  ] })
52
53
  }
53
54
  ) });
54
55
  }
55
- function f(n) {
56
- const { onToggleView: r, askAILabel: l, searchLabel: o } = n, i = I((c) => c.search);
56
+ function L(r) {
57
+ const { onToggleView: n, askAILabel: l, searchLabel: i } = r, o = I((c) => c.search);
57
58
  return /* @__PURE__ */ s(e.InputGroup, { children: [
58
59
  /* @__PURE__ */ t(e.InputIcon, {}),
59
60
  /* @__PURE__ */ t(e.Input, {}),
60
61
  /* @__PURE__ */ t(e.Loading, {}),
61
- r && /* @__PURE__ */ t(
62
- w,
62
+ n && /* @__PURE__ */ t(
63
+ S,
63
64
  {
64
- onToggleView: r,
65
- query: i,
65
+ onToggleView: n,
66
+ query: o,
66
67
  askAILabel: l,
67
- searchLabel: o,
68
+ searchLabel: i,
68
69
  view: "search"
69
70
  }
70
71
  ),
71
- /* @__PURE__ */ t(T.Close, {})
72
+ /* @__PURE__ */ t(w.Close, {})
72
73
  ] });
73
74
  }
74
- function L(n) {
75
- const { askAILabel: r, onToggleView: l, shouldShowAskAICard: o } = n, i = I((a) => a.search), { handleToggle: c } = S({
75
+ function C(r) {
76
+ const { askAILabel: n, onToggleView: l, shouldShowAskAICard: i, askAICardLabel: o } = r, c = I((h) => h.search), { handleToggle: d } = k({
76
77
  onToggleView: l,
77
- query: i
78
+ query: c
78
79
  });
79
- return o ? /* @__PURE__ */ s(e.AskAITrigger, { onSelect: () => c("chat", !0), children: [
80
+ return i ? /* @__PURE__ */ s(e.AskAITrigger, { onSelect: () => d("chat", !0), children: [
80
81
  /* @__PURE__ */ t(e.AskAITriggerIcon, {}),
81
82
  /* @__PURE__ */ s(e.AskAITriggerLabel, { children: [
82
- r || "Ask AI",
83
- i && /* @__PURE__ */ t(e.AskAITriggerQuery, { children: `${i}` })
83
+ o || n || "Ask AI",
84
+ c && /* @__PURE__ */ t(e.AskAITriggerQuery, { children: `${c}` })
84
85
  ] }),
85
86
  /* @__PURE__ */ t(e.AskAITriggerIndicatorText, { children: "Start conversation" }),
86
87
  /* @__PURE__ */ t(e.AskAITriggerIndicator, {})
87
88
  ] }) : null;
88
89
  }
89
- function C() {
90
+ function V() {
90
91
  return /* @__PURE__ */ s(e.Results, { children: [
91
92
  /* @__PURE__ */ t(e.ResultsLoading, {}),
92
- /* @__PURE__ */ t(e.ResultsTabList, { children: (n) => n.map((r) => /* @__PURE__ */ t(e.ResultsTab, { tab: r }, r)) }),
93
+ /* @__PURE__ */ t(e.ResultsTabList, { children: (r) => r.map((n) => /* @__PURE__ */ t(e.ResultsTab, { tab: n }, n)) }),
93
94
  /* @__PURE__ */ t(e.ResultsEmpty, {}),
94
95
  /* @__PURE__ */ s(e.ResultsContent, { children: [
95
- /* @__PURE__ */ t(V, {}),
96
- /* @__PURE__ */ t(O, {})
96
+ /* @__PURE__ */ t(O, {}),
97
+ /* @__PURE__ */ t($, {})
97
98
  ] })
98
99
  ] });
99
100
  }
100
- function V() {
101
+ function O() {
101
102
  return /* @__PURE__ */ s(e.ResultsScrollArea, { children: [
102
- /* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ t(e.ResultsList, { children: (n) => n.map((r) => /* @__PURE__ */ s(e.ResultsItem, { item: r, children: [
103
- /* @__PURE__ */ t(e.ResultsItemBreadcrumbs, { children: (l) => l.map((o, i) => /* @__PURE__ */ s(d, { children: [
104
- o,
103
+ /* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ t(e.ResultsList, { children: (r) => r.map((n) => /* @__PURE__ */ s(e.ResultsItem, { item: n, children: [
104
+ /* @__PURE__ */ t(e.ResultsItemBreadcrumbs, { children: (l) => l.map((i, o) => /* @__PURE__ */ s(u, { children: [
105
+ i,
105
106
  /* @__PURE__ */ t(e.ResultsItemBreadcrumbIcon, {})
106
- ] }, `${o}-${i}`)) }),
107
+ ] }, `${i}-${o}`)) }),
107
108
  /* @__PURE__ */ t(e.ResultsItemIcon, {}),
108
109
  /* @__PURE__ */ t(e.ResultsItemTitle, {}),
109
110
  /* @__PURE__ */ t(e.ResultsItemTag, {}),
110
- /* @__PURE__ */ t(e.ResultsItemDescription, { children: (l) => l.map((o, i) => /* @__PURE__ */ t(
111
+ /* @__PURE__ */ t(e.ResultsItemDescription, { children: (l) => l.map((i, o) => /* @__PURE__ */ t(
111
112
  e.ResultsItemDescriptionPart,
112
113
  {
113
- part: o
114
+ part: i
114
115
  },
115
- `part-${i}`
116
+ `part-${o}`
116
117
  )) }),
117
118
  /* @__PURE__ */ t(e.ResultsItemIndicator, {})
118
- ] }, r.id)) }) }),
119
+ ] }, n.id)) }) }),
119
120
  /* @__PURE__ */ t(e.ResultsScrollAreaScrollbar, { children: /* @__PURE__ */ t(e.ResultsScrollAreaThumb, {}) }),
120
121
  /* @__PURE__ */ t(e.ResultsScrollAreaCorner, {})
121
122
  ] });
122
123
  }
123
- function O() {
124
+ function $() {
124
125
  return /* @__PURE__ */ s(e.ResultsScrollArea, { children: [
125
126
  /* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ s(e.ResultsItemPreview, { children: [
126
127
  /* @__PURE__ */ s(e.ResultsItemPreviewHeader, { children: [
@@ -128,26 +129,26 @@ function O() {
128
129
  /* @__PURE__ */ t(e.ResultsItemPreviewTitle, {}),
129
130
  /* @__PURE__ */ t(e.ResultsItemPreviewTitleLinkIcon, {})
130
131
  ] }),
131
- /* @__PURE__ */ t(e.ResultsItemPreviewBreadcrumbs, { children: (n) => n.map((r, l) => /* @__PURE__ */ s(d, { children: [
132
- r,
132
+ /* @__PURE__ */ t(e.ResultsItemPreviewBreadcrumbs, { children: (r) => r.map((n, l) => /* @__PURE__ */ s(u, { children: [
133
+ n,
133
134
  /* @__PURE__ */ t(e.ResultsItemPreviewBreadcrumbIcon, {})
134
- ] }, `${r}-${l}`)) })
135
+ ] }, `${n}-${l}`)) })
135
136
  ] }),
136
137
  /* @__PURE__ */ t(e.ResultsItemPreviewBody, {}),
137
138
  /* @__PURE__ */ s(e.ResultsItemPreviewOutline, { children: [
138
139
  /* @__PURE__ */ t(e.ResultsItemPreviewOutlineTitle, {}),
139
- /* @__PURE__ */ t(e.ResultsItemPreviewOutlineList, { children: (n) => n.map((r, l) => /* @__PURE__ */ s(
140
+ /* @__PURE__ */ t(e.ResultsItemPreviewOutlineList, { children: (r) => r.map((n, l) => /* @__PURE__ */ s(
140
141
  e.ResultsItemPreviewOutlineItem,
141
142
  {
142
- href: r.url ?? void 0,
143
- "data-is-match": u(r.isMatch),
143
+ href: n.url ?? void 0,
144
+ "data-is-match": a(n.isMatch),
144
145
  children: [
145
146
  /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemIcon, {}),
146
- /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemText, { children: r.content }),
147
- r.url && /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemLinkIcon, {})
147
+ /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemText, { children: n.content }),
148
+ n.url && /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemLinkIcon, {})
148
149
  ]
149
150
  },
150
- `${r.anchor}-${l}`
151
+ `${n.anchor}-${l}`
151
152
  )) })
152
153
  ] })
153
154
  ] }) }),
@@ -155,7 +156,7 @@ function O() {
155
156
  /* @__PURE__ */ t(e.ResultsScrollAreaCorner, {})
156
157
  ] });
157
158
  }
158
- function $() {
159
+ function y() {
159
160
  return /* @__PURE__ */ t(e.Footer, { children: /* @__PURE__ */ s(e.TaglineContainer, { children: [
160
161
  /* @__PURE__ */ t(e.TaglineText, {}),
161
162
  /* @__PURE__ */ t(e.TaglineLogo, {}),
@@ -163,8 +164,8 @@ function $() {
163
164
  ] }) });
164
165
  }
165
166
  export {
166
- F as InkeepEmbeddedSearch,
167
+ M as InkeepEmbeddedSearch,
167
168
  P as InkeepEmbeddedSearchImpl,
168
- b as InkeepEmbeddedSearchImplContent,
169
- k as InkeepEmbeddedSearchProvider
169
+ f as InkeepEmbeddedSearchImplContent,
170
+ b as InkeepEmbeddedSearchProvider
170
171
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.71",
3
+ "version": "0.5.73",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -21,7 +21,7 @@
21
21
  "sideEffects": false,
22
22
  "dependencies": {
23
23
  "@radix-ui/react-use-controllable-state": "^1.1.0",
24
- "@inkeep/cxkit-styled": "0.5.71"
24
+ "@inkeep/cxkit-styled": "0.5.73"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@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.71",
48
- "@inkeep/cxkit-types": "0.5.71"
47
+ "@inkeep/cxkit-color-mode": "0.5.73",
48
+ "@inkeep/cxkit-types": "0.5.73"
49
49
  },
50
50
  "module": "dist/index.js",
51
51
  "types": "dist/index.d.ts",