@inkeep/cxkit-react 0.0.0-dev-20250228071024 → 0.0.0-dev-20250228205857
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/embedded-chat.cjs +1 -1
- package/dist/components/embedded-chat.js +47 -46
- package/dist/components/embedded-search-and-chat.cjs +1 -1
- package/dist/components/embedded-search-and-chat.js +21 -20
- package/dist/components/embedded-search.cjs +1 -1
- package/dist/components/embedded-search.js +49 -48
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +12 -11
- package/dist/components/modal.cjs +1 -1
- package/dist/components/modal.d.cts +2 -0
- package/dist/components/modal.d.ts +2 -0
- package/dist/components/modal.js +13 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +16 -15
- package/package.json +4 -4
|
@@ -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");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(i,{...a})})}function i(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?d.Modal.Content: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(l,{...a}),e.jsx(x,{}),e.jsx(p,{})]}),e.jsx(k,{}),e.jsx(T,{})]})})}function l(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 x(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(j,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function j(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(E,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(u,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(F,{}),e.jsx(g,{}),e.jsx(A,{})]})]},t.id))]})})}function E(){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.QuickQuestions,{children:[e.jsx(d.EmbeddedChat.QuickQuestionsLabel,{}),e.jsx(d.EmbeddedChat.QuickQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.QuickQuestion,{children:e.jsx(d.EmbeddedChat.QuickQuestionButton,{question:t})},t))})]})]})]})}function u(){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 F(){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 g(){return e.jsxs(d.EmbeddedChat.MessageActions,{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,o)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${o}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function p(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(I,{}),e.jsx(M,{})]})}function I(){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 M(){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 k(){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 T(){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=i;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"),C=require("./modal.cjs");function l(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(i,{...a})})}function i(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?C.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(A,{}),e.jsx(p,{})]})]},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.QuickQuestions,{children:[e.jsx(d.EmbeddedChat.QuickQuestionsLabel,{}),e.jsx(d.EmbeddedChat.QuickQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.QuickQuestion,{children:e.jsx(d.EmbeddedChat.QuickQuestionButton,{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 A(){return e.jsxs(d.EmbeddedChat.MessageActions,{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 p(){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,o)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${o}`))}),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=l;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=i;exports.InkeepEmbeddedChatProvider=m;
|
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as n, Fragment as s } from "react/jsx-runtime";
|
|
3
|
-
import { Shadow as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { WidgetToggle as
|
|
6
|
-
|
|
3
|
+
import { Shadow as F, RootProvider as u, WebWidgetInteractionType as g, EmbeddedChat as e, useModal as A, useWidget as p, dataAttr as d, Modal as b, PortalWithTheme as l } from "@inkeep/cxkit-styled";
|
|
4
|
+
import { Fragment as h } from "react";
|
|
5
|
+
import { WidgetToggle as M } from "./widget-toggle.js";
|
|
6
|
+
import { ModalContent as I } from "./modal.js";
|
|
7
|
+
function $(a) {
|
|
7
8
|
const { baseSettings: r, aiChatSettings: c } = a;
|
|
8
9
|
return /* @__PURE__ */ t(
|
|
9
|
-
|
|
10
|
+
F,
|
|
10
11
|
{
|
|
11
12
|
wrapperStyles: {
|
|
12
13
|
height: "inherit",
|
|
13
14
|
width: "inherit"
|
|
14
15
|
},
|
|
15
16
|
children: /* @__PURE__ */ t(
|
|
16
|
-
|
|
17
|
+
u,
|
|
17
18
|
{
|
|
18
19
|
config: {
|
|
19
20
|
baseSettings: r,
|
|
20
21
|
aiChatSettings: c
|
|
21
22
|
},
|
|
22
|
-
componentType:
|
|
23
|
-
children: /* @__PURE__ */ t(
|
|
23
|
+
componentType: g.EmbeddedChat,
|
|
24
|
+
children: /* @__PURE__ */ t(k, { ...a })
|
|
24
25
|
}
|
|
25
26
|
)
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function C(a) {
|
|
30
31
|
const { children: r, onToggleView: c, isHidden: i, shouldAutoFocusInput: o = !c } = a;
|
|
31
32
|
return /* @__PURE__ */ t(e.Provider, { isHidden: i, shouldAutoFocusInput: o, children: r });
|
|
32
33
|
}
|
|
33
|
-
function C(a) {
|
|
34
|
-
return /* @__PURE__ */ t(M, { ...a, children: /* @__PURE__ */ t(k, { ...a }) });
|
|
35
|
-
}
|
|
36
34
|
function k(a) {
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
return /* @__PURE__ */ t(C, { ...a, children: /* @__PURE__ */ t(T, { ...a }) });
|
|
36
|
+
}
|
|
37
|
+
function T(a) {
|
|
38
|
+
const { onToggleView: r } = a, c = A(), i = p();
|
|
39
|
+
return /* @__PURE__ */ t(c && !i ? I : h, { children: /* @__PURE__ */ n(
|
|
39
40
|
e.Wrapper,
|
|
40
41
|
{
|
|
41
42
|
variant: r ? "no-shadow" : "container-with-shadow",
|
|
42
|
-
"data-composite":
|
|
43
|
+
"data-composite": d(!!a.onToggleView || c?.isOpen),
|
|
43
44
|
children: [
|
|
44
45
|
/* @__PURE__ */ t(e.ConversationLoading, {}),
|
|
45
46
|
/* @__PURE__ */ n(e.Root, { children: [
|
|
46
|
-
/* @__PURE__ */ t(
|
|
47
|
-
/* @__PURE__ */ t(
|
|
47
|
+
/* @__PURE__ */ t(B, { ...a }),
|
|
48
|
+
/* @__PURE__ */ t(S, {}),
|
|
48
49
|
/* @__PURE__ */ t(L, {})
|
|
49
50
|
] }),
|
|
50
|
-
/* @__PURE__ */ t(
|
|
51
|
-
/* @__PURE__ */ t(
|
|
51
|
+
/* @__PURE__ */ t(E, {}),
|
|
52
|
+
/* @__PURE__ */ t(P, {})
|
|
52
53
|
]
|
|
53
54
|
}
|
|
54
55
|
) });
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function B(a) {
|
|
57
58
|
const { onToggleView: r, askAILabel: c, searchLabel: i } = a, o = !!r;
|
|
58
|
-
return /* @__PURE__ */ n(e.Header, { "data-show-toolbar":
|
|
59
|
+
return /* @__PURE__ */ n(e.Header, { "data-show-toolbar": d(o), children: [
|
|
59
60
|
o && /* @__PURE__ */ n(e.HeaderToolbar, { children: [
|
|
60
61
|
/* @__PURE__ */ n(e.HeaderToolbarWrapper, { children: [
|
|
61
62
|
/* @__PURE__ */ t(e.ToolbarHeader, {}),
|
|
@@ -68,7 +69,7 @@ function T(a) {
|
|
|
68
69
|
] })
|
|
69
70
|
] }),
|
|
70
71
|
/* @__PURE__ */ t(
|
|
71
|
-
|
|
72
|
+
M,
|
|
72
73
|
{
|
|
73
74
|
onToggleView: r,
|
|
74
75
|
askAILabel: c,
|
|
@@ -77,32 +78,32 @@ function T(a) {
|
|
|
77
78
|
}
|
|
78
79
|
)
|
|
79
80
|
] }),
|
|
80
|
-
/* @__PURE__ */ t(
|
|
81
|
+
/* @__PURE__ */ t(b.Close, {})
|
|
81
82
|
] });
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
+
function S() {
|
|
84
85
|
return /* @__PURE__ */ t(e.Content, { children: /* @__PURE__ */ n(e.ContentScrollArea, { children: [
|
|
85
|
-
/* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: /* @__PURE__ */ t(
|
|
86
|
+
/* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: /* @__PURE__ */ t(v, {}) }),
|
|
86
87
|
/* @__PURE__ */ t(e.ContentScrollAreaScrollbar, { children: /* @__PURE__ */ t(e.ContentScrollAreaThumb, {}) }),
|
|
87
88
|
/* @__PURE__ */ t(e.ContentScrollAreaCorner, {})
|
|
88
89
|
] }) });
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
+
function v() {
|
|
91
92
|
return /* @__PURE__ */ t(e.Messages, { children: ({ messages: a }) => /* @__PURE__ */ n(s, { children: [
|
|
92
|
-
/* @__PURE__ */ t(
|
|
93
|
+
/* @__PURE__ */ t(w, {}),
|
|
93
94
|
a.map((r) => /* @__PURE__ */ n(e.MessageWrapper, { message: r, children: [
|
|
94
|
-
/* @__PURE__ */ t(
|
|
95
|
+
/* @__PURE__ */ t(H, {}),
|
|
95
96
|
/* @__PURE__ */ t(e.MessageLoading, {}),
|
|
96
97
|
/* @__PURE__ */ n(e.MessageContentWrapper, { children: [
|
|
97
98
|
/* @__PURE__ */ t(e.MessageContent, { children: /* @__PURE__ */ t(e.Message, {}) }),
|
|
98
|
-
/* @__PURE__ */ t(H, {}),
|
|
99
99
|
/* @__PURE__ */ t(x, {}),
|
|
100
|
+
/* @__PURE__ */ t(f, {}),
|
|
100
101
|
/* @__PURE__ */ t(y, {})
|
|
101
102
|
] })
|
|
102
103
|
] }, r.id))
|
|
103
104
|
] }) });
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function w() {
|
|
106
107
|
return /* @__PURE__ */ n(e.IntroMessageWrapper, { children: [
|
|
107
108
|
/* @__PURE__ */ n(e.MessageHeader, { children: [
|
|
108
109
|
/* @__PURE__ */ t(e.MessageAvatar, { children: /* @__PURE__ */ n(e.MessageAvatarContent, { children: [
|
|
@@ -128,7 +129,7 @@ function v() {
|
|
|
128
129
|
] })
|
|
129
130
|
] });
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
+
function H() {
|
|
132
133
|
return /* @__PURE__ */ n(e.MessageHeader, { children: [
|
|
133
134
|
/* @__PURE__ */ t(e.MessageAvatar, { children: /* @__PURE__ */ n(e.MessageAvatarContent, { children: [
|
|
134
135
|
/* @__PURE__ */ t(e.MessageAvatarFallback, {}),
|
|
@@ -137,7 +138,7 @@ function w() {
|
|
|
137
138
|
/* @__PURE__ */ t(e.MessageName, {})
|
|
138
139
|
] });
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
+
function x() {
|
|
141
142
|
return /* @__PURE__ */ n(e.MessageAttachments, { children: [
|
|
142
143
|
/* @__PURE__ */ t(e.MessageAttachmentsList, { children: (a) => a.map((r) => /* @__PURE__ */ n(e.MessageAttachmentsItem, { attachment: r, children: [
|
|
143
144
|
/* @__PURE__ */ t(e.MessageAttachmentsItemIcon, {}),
|
|
@@ -150,7 +151,7 @@ function H() {
|
|
|
150
151
|
] }) }) }) })
|
|
151
152
|
] });
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
+
function f() {
|
|
154
155
|
return /* @__PURE__ */ n(e.MessageActions, { children: [
|
|
155
156
|
/* @__PURE__ */ t(e.MessageToolActions, { children: (a) => a.map((r, c) => /* @__PURE__ */ t(e.MessageToolAction, { action: r }, `action-${c}`)) }),
|
|
156
157
|
/* @__PURE__ */ t(e.MessageAction, { action: "copy" }),
|
|
@@ -162,19 +163,19 @@ function y() {
|
|
|
162
163
|
return /* @__PURE__ */ n(e.MessageSources, { children: [
|
|
163
164
|
/* @__PURE__ */ t(e.MessageSourcesHeader, {}),
|
|
164
165
|
/* @__PURE__ */ t(e.MessageSourcesList, { children: (a) => a.map((r, c) => /* @__PURE__ */ n(e.MessageSourceItem, { href: r.url, source: r, children: [
|
|
165
|
-
/* @__PURE__ */ t(e.MessageSourceItemBreadcrumbs, { children: r.breadcrumbs?.map((i) => /* @__PURE__ */ n(
|
|
166
|
+
/* @__PURE__ */ t(e.MessageSourceItemBreadcrumbs, { children: r.breadcrumbs?.map((i) => /* @__PURE__ */ n(h, { children: [
|
|
166
167
|
i,
|
|
167
168
|
/* @__PURE__ */ t(e.MessageSourceItemBreadcrumbIcon, {})
|
|
168
169
|
] }, i)) }),
|
|
169
170
|
/* @__PURE__ */ t(e.MessageSourceItemIcon, {}),
|
|
170
171
|
/* @__PURE__ */ t(e.MessageSourceItemTitle, {}),
|
|
171
172
|
/* @__PURE__ */ t(e.MessageSourceItemTag, {}),
|
|
172
|
-
/* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (i) => i.map((o,
|
|
173
|
+
/* @__PURE__ */ t(e.MessageSourceItemDescription, { children: (i) => i.map((o, m) => /* @__PURE__ */ t(
|
|
173
174
|
e.MessageSourceItemDescriptionPart,
|
|
174
175
|
{
|
|
175
176
|
part: o
|
|
176
177
|
},
|
|
177
|
-
`part-${
|
|
178
|
+
`part-${m}`
|
|
178
179
|
)) }),
|
|
179
180
|
/* @__PURE__ */ t(e.MessageSourceItemIndicator, {})
|
|
180
181
|
] }, c)) })
|
|
@@ -182,11 +183,11 @@ function y() {
|
|
|
182
183
|
}
|
|
183
184
|
function L() {
|
|
184
185
|
return /* @__PURE__ */ n(e.Footer, { children: [
|
|
185
|
-
/* @__PURE__ */ t(
|
|
186
|
-
/* @__PURE__ */ t(
|
|
186
|
+
/* @__PURE__ */ t(D, {}),
|
|
187
|
+
/* @__PURE__ */ t(W, {})
|
|
187
188
|
] });
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function D() {
|
|
190
191
|
return /* @__PURE__ */ n(e.InputFieldset, { children: [
|
|
191
192
|
/* @__PURE__ */ n(e.InputGroup, { children: [
|
|
192
193
|
/* @__PURE__ */ t(e.Input, {}),
|
|
@@ -232,7 +233,7 @@ function f() {
|
|
|
232
233
|
] })
|
|
233
234
|
] });
|
|
234
235
|
}
|
|
235
|
-
function
|
|
236
|
+
function W() {
|
|
236
237
|
return /* @__PURE__ */ n(e.ActionBar, { children: [
|
|
237
238
|
/* @__PURE__ */ n(e.TaglineContainer, { children: [
|
|
238
239
|
/* @__PURE__ */ t(e.TaglineText, {}),
|
|
@@ -264,7 +265,7 @@ function D() {
|
|
|
264
265
|
] })
|
|
265
266
|
] });
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function E() {
|
|
268
269
|
return /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(e.FeedbackModal, { children: /* @__PURE__ */ t(e.FeedbackModalOverlay, { children: /* @__PURE__ */ n(e.FeedbackModalContent, { children: [
|
|
269
270
|
/* @__PURE__ */ t(e.FeedbackModalHeader, {}),
|
|
270
271
|
/* @__PURE__ */ t(e.FeedbackModalClose, {}),
|
|
@@ -292,7 +293,7 @@ function W() {
|
|
|
292
293
|
] }) })
|
|
293
294
|
] }) }) }) });
|
|
294
295
|
}
|
|
295
|
-
function
|
|
296
|
+
function P() {
|
|
296
297
|
return /* @__PURE__ */ n(e.FormWrapper, { children: [
|
|
297
298
|
/* @__PURE__ */ t(e.FormClose, {}),
|
|
298
299
|
/* @__PURE__ */ n(e.Form, { children: [
|
|
@@ -335,8 +336,8 @@ function E() {
|
|
|
335
336
|
] });
|
|
336
337
|
}
|
|
337
338
|
export {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
339
|
+
$ as InkeepEmbeddedChat,
|
|
340
|
+
k as InkeepEmbeddedChatImpl,
|
|
341
|
+
T as InkeepEmbeddedChatImplContent,
|
|
342
|
+
C as InkeepEmbeddedChatProvider
|
|
342
343
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./embedded-chat.cjs"),d=require("@inkeep/cxkit-styled"),p=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),C=require("react");function
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./embedded-chat.cjs"),d=require("@inkeep/cxkit-styled"),p=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),C=require("react"),A=require("./modal.cjs");function g(n){const{config:t,...r}=S.useWidgetImpl(n);return e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:t,componentType:d.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(m,{...r})})})}function m(n){const{view:t,setView:r,shouldShowAskAICard:I,onToggleView:o,defaultView:c,shouldAutoFocusInput:s,searchLabel:i,askAILabel:a}=n,b=d.useModal()?A.ModalContent:C.Fragment,h={isHidden:t==="chat",onToggleView:o,shouldShowAskAICard:I,shouldAutoFocusInput:s&&c==="search",searchLabel:i,askAILabel:a},l={isHidden:t==="search",onToggleView:o,shouldAutoFocusInput:s&&c==="chat",searchLabel:i,askAILabel:a};return e.jsx(d.WidgetProvider,{widget:{setView:r},children:e.jsx(p.InkeepEmbeddedSearchProvider,{...h,children:e.jsx(u.InkeepEmbeddedChatProvider,{...l,children:e.jsxs(b,{children:[e.jsx(p.InkeepEmbeddedSearchImplContent,{...h}),e.jsx(u.InkeepEmbeddedChatImplContent,{...l})]})})})})}exports.InkeepEmbeddedSearchAndChat=g;exports.InkeepEmbeddedSearchAndChatImpl=m;
|
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
3
3
|
import { InkeepEmbeddedChatProvider as u, InkeepEmbeddedChatImplContent as I } from "./embedded-chat.js";
|
|
4
|
-
import { Shadow as
|
|
5
|
-
import { InkeepEmbeddedSearchProvider as
|
|
6
|
-
import { useWidgetImpl as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { Shadow as f, RootProvider as b, WebWidgetInteractionType as C, useModal as g, WidgetProvider as w } from "@inkeep/cxkit-styled";
|
|
5
|
+
import { InkeepEmbeddedSearchProvider as A, InkeepEmbeddedSearchImplContent as k } from "./embedded-search.js";
|
|
6
|
+
import { useWidgetImpl as S } from "./embedded-search-and-chat.impl.js";
|
|
7
|
+
import { Fragment as E } from "react";
|
|
8
|
+
import { ModalContent as P } from "./modal.js";
|
|
9
|
+
function L(t) {
|
|
10
|
+
const { config: o, ...d } = S(t);
|
|
10
11
|
return /* @__PURE__ */ e(
|
|
11
|
-
|
|
12
|
+
f,
|
|
12
13
|
{
|
|
13
14
|
wrapperStyles: {
|
|
14
15
|
height: "inherit",
|
|
15
16
|
width: "inherit"
|
|
16
17
|
},
|
|
17
|
-
children: /* @__PURE__ */ e(
|
|
18
|
+
children: /* @__PURE__ */ e(b, { config: o, componentType: C.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(v, { ...d }) })
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
21
|
}
|
|
21
|
-
function v(
|
|
22
|
+
function v(t) {
|
|
22
23
|
const {
|
|
23
|
-
view:
|
|
24
|
+
view: o,
|
|
24
25
|
setView: d,
|
|
25
|
-
shouldShowAskAICard:
|
|
26
|
+
shouldShowAskAICard: s,
|
|
26
27
|
onToggleView: r,
|
|
27
28
|
defaultView: n,
|
|
28
29
|
shouldAutoFocusInput: i,
|
|
29
30
|
searchLabel: h,
|
|
30
31
|
askAILabel: c
|
|
31
|
-
} =
|
|
32
|
-
isHidden:
|
|
32
|
+
} = t, m = g() ? P : E, a = {
|
|
33
|
+
isHidden: o === "chat",
|
|
33
34
|
onToggleView: r,
|
|
34
|
-
shouldShowAskAICard:
|
|
35
|
+
shouldShowAskAICard: s,
|
|
35
36
|
shouldAutoFocusInput: i && n === "search",
|
|
36
37
|
searchLabel: h,
|
|
37
38
|
askAILabel: c
|
|
38
|
-
},
|
|
39
|
-
isHidden:
|
|
39
|
+
}, p = {
|
|
40
|
+
isHidden: o === "search",
|
|
40
41
|
onToggleView: r,
|
|
41
42
|
shouldAutoFocusInput: i && n === "chat",
|
|
42
43
|
searchLabel: h,
|
|
43
44
|
askAILabel: c
|
|
44
45
|
};
|
|
45
|
-
return /* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
/* @__PURE__ */ e(I, { ...
|
|
46
|
+
return /* @__PURE__ */ e(w, { widget: { setView: d }, children: /* @__PURE__ */ e(A, { ...a, children: /* @__PURE__ */ e(u, { ...p, children: /* @__PURE__ */ l(m, { children: [
|
|
47
|
+
/* @__PURE__ */ e(k, { ...a }),
|
|
48
|
+
/* @__PURE__ */ e(I, { ...p })
|
|
48
49
|
] }) }) }) });
|
|
49
50
|
}
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
L as InkeepEmbeddedSearchAndChat,
|
|
52
53
|
v as InkeepEmbeddedSearchAndChatImpl
|
|
53
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"),a=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),a=require("react"),o=require("./widget-toggle.cjs"),u=require("./modal.cjs");function S(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(i,{...r})})})}function l(r){const{children:s,onToggleView:t,isHidden:n,shouldAutoFocusInput:c=!t}=r;return e.jsx(d.EmbeddedSearch.Provider,{isHidden:n,shouldAutoFocusInput:c,children:s})}function i(r){return e.jsx(l,{...r,children:e.jsx(h,{...r})})}function h(r){const{onToggleView:s}=r,t=d.useModal(),n=d.useWidget(),c=t&&!n?u.ModalContent:a.Fragment;return e.jsx(c,{children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-composite":d.dataAttr(!!s||t?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(b,{...r}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(x,{...r}),e.jsx(j,{})]}),e.jsx(g,{})]})})})}function b(r){const{onToggleView:s,askAILabel:t,searchLabel:n}=r,{query:c}=d.useSearch();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(o.WidgetToggle,{onToggleView:s,query:c,askAILabel:t,searchLabel:n,view:"search"}),e.jsx(d.Modal.Close,{})]})}function x(r){const{askAILabel:s,onToggleView:t,shouldShowAskAICard:n=!!t}=r,{query:c}=d.useSearch(),{handleToggle:m}=o.useToggleView({onToggleView:t,query:c});return n?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>m("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[s||"Ask AI",c&&` "${c}"`]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function j(){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.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(E,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})]})}function E(){return 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(n=>e.jsxs(a.Fragment,{children:[n,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},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((n,c)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:n},`part-${c}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},s.id))})}function g(){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=S;exports.InkeepEmbeddedSearchImpl=i;exports.InkeepEmbeddedSearchImplContent=h;exports.InkeepEmbeddedSearchProvider=l;
|
|
@@ -1,99 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
3
|
-
import { Shadow as
|
|
4
|
-
import { Fragment as
|
|
3
|
+
import { Shadow as a, RootProvider as g, WebWidgetInteractionType as h, EmbeddedSearch as t, useModal as m, useWidget as I, dataAttr as p, useSearch as c, Modal as R } from "@inkeep/cxkit-styled";
|
|
4
|
+
import { Fragment as d } from "react";
|
|
5
5
|
import { WidgetToggle as T, useToggleView as A } from "./widget-toggle.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { ModalContent as S } from "./modal.js";
|
|
7
|
+
function P(r) {
|
|
8
|
+
const { baseSettings: n, searchSettings: o } = r;
|
|
9
|
+
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
|
|
10
|
+
g,
|
|
10
11
|
{
|
|
11
12
|
config: {
|
|
12
|
-
baseSettings:
|
|
13
|
+
baseSettings: n,
|
|
13
14
|
searchSettings: o
|
|
14
15
|
},
|
|
15
|
-
componentType:
|
|
16
|
-
children: /* @__PURE__ */ e(b, { ...
|
|
16
|
+
componentType: h.EmbeddedSearch,
|
|
17
|
+
children: /* @__PURE__ */ e(b, { ...r })
|
|
17
18
|
}
|
|
18
19
|
) });
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
const { children:
|
|
22
|
-
return /* @__PURE__ */ e(t.Provider, { isHidden:
|
|
21
|
+
function f(r) {
|
|
22
|
+
const { children: n, onToggleView: o, isHidden: l, shouldAutoFocusInput: s = !o } = r;
|
|
23
|
+
return /* @__PURE__ */ e(t.Provider, { isHidden: l, shouldAutoFocusInput: s, children: n });
|
|
23
24
|
}
|
|
24
|
-
function b(
|
|
25
|
-
return /* @__PURE__ */ e(
|
|
25
|
+
function b(r) {
|
|
26
|
+
return /* @__PURE__ */ e(f, { ...r, children: /* @__PURE__ */ e(k, { ...r }) });
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
const { onToggleView:
|
|
29
|
-
return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(t.Wrapper, { "data-composite":
|
|
30
|
-
/* @__PURE__ */ e(
|
|
28
|
+
function k(r) {
|
|
29
|
+
const { onToggleView: n } = r, o = m(), l = I();
|
|
30
|
+
return /* @__PURE__ */ e(o && !l ? S : d, { children: /* @__PURE__ */ e(t.Wrapper, { "data-composite": p(!!n || o?.isOpen), children: /* @__PURE__ */ i(t.Root, { children: [
|
|
31
|
+
/* @__PURE__ */ e(w, { ...r }),
|
|
31
32
|
/* @__PURE__ */ i(t.Content, { children: [
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ e(
|
|
33
|
+
/* @__PURE__ */ e(L, { ...r }),
|
|
34
|
+
/* @__PURE__ */ e(C, {})
|
|
34
35
|
] }),
|
|
35
|
-
/* @__PURE__ */ e(
|
|
36
|
+
/* @__PURE__ */ e(W, {})
|
|
36
37
|
] }) }) });
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
const { onToggleView:
|
|
39
|
+
function w(r) {
|
|
40
|
+
const { onToggleView: n, askAILabel: o, searchLabel: l } = r, { query: s } = c();
|
|
40
41
|
return /* @__PURE__ */ i(t.InputGroup, { children: [
|
|
41
42
|
/* @__PURE__ */ e(t.InputIcon, {}),
|
|
42
43
|
/* @__PURE__ */ e(t.Input, {}),
|
|
43
44
|
/* @__PURE__ */ e(t.Loading, {}),
|
|
44
|
-
|
|
45
|
+
n && /* @__PURE__ */ e(
|
|
45
46
|
T,
|
|
46
47
|
{
|
|
47
|
-
onToggleView:
|
|
48
|
-
query:
|
|
48
|
+
onToggleView: n,
|
|
49
|
+
query: s,
|
|
49
50
|
askAILabel: o,
|
|
50
|
-
searchLabel:
|
|
51
|
+
searchLabel: l,
|
|
51
52
|
view: "search"
|
|
52
53
|
}
|
|
53
54
|
),
|
|
54
|
-
/* @__PURE__ */ e(
|
|
55
|
+
/* @__PURE__ */ e(R.Close, {})
|
|
55
56
|
] });
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
const { askAILabel:
|
|
58
|
+
function L(r) {
|
|
59
|
+
const { askAILabel: n, onToggleView: o, shouldShowAskAICard: l = !!o } = r, { query: s } = c(), { handleToggle: u } = A({
|
|
59
60
|
onToggleView: o,
|
|
60
|
-
query:
|
|
61
|
+
query: s
|
|
61
62
|
});
|
|
62
|
-
return
|
|
63
|
+
return l ? /* @__PURE__ */ i(t.AskAITrigger, { onSelect: () => u("chat", !0), children: [
|
|
63
64
|
/* @__PURE__ */ e(t.AskAITriggerIcon, {}),
|
|
64
65
|
/* @__PURE__ */ i(t.AskAITriggerLabel, { children: [
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
n || "Ask AI",
|
|
67
|
+
s && ` "${s}"`
|
|
67
68
|
] }),
|
|
68
69
|
/* @__PURE__ */ e(t.AskAITriggerIndicator, {})
|
|
69
70
|
] }) : null;
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
+
function C() {
|
|
72
73
|
return /* @__PURE__ */ i(t.Results, { children: [
|
|
73
74
|
/* @__PURE__ */ e(t.ResultsLoading, {}),
|
|
74
|
-
/* @__PURE__ */ e(t.ResultsTabList, { children: (
|
|
75
|
+
/* @__PURE__ */ e(t.ResultsTabList, { children: (r) => r.map((n) => /* @__PURE__ */ e(t.ResultsTab, { tab: n }, n)) }),
|
|
75
76
|
/* @__PURE__ */ e(t.ResultsEmpty, {}),
|
|
76
77
|
/* @__PURE__ */ i(t.ResultsScrollArea, { children: [
|
|
77
|
-
/* @__PURE__ */ e(t.ResultsScrollAreaViewport, { children: /* @__PURE__ */ e(
|
|
78
|
+
/* @__PURE__ */ e(t.ResultsScrollAreaViewport, { children: /* @__PURE__ */ e(E, {}) }),
|
|
78
79
|
/* @__PURE__ */ e(t.ResultsScrollAreaScrollbar, { children: /* @__PURE__ */ e(t.ResultsScrollAreaThumb, {}) }),
|
|
79
80
|
/* @__PURE__ */ e(t.ResultsScrollAreaCorner, {})
|
|
80
81
|
] })
|
|
81
82
|
] });
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */ e(t.ResultsList, { children: (
|
|
85
|
-
/* @__PURE__ */ e(t.ResultsItemBreadcrumbs, { children: (o) => o.map((
|
|
86
|
-
|
|
84
|
+
function E() {
|
|
85
|
+
return /* @__PURE__ */ e(t.ResultsList, { children: (r) => r.map((n) => /* @__PURE__ */ i(t.ResultsItem, { item: n, children: [
|
|
86
|
+
/* @__PURE__ */ e(t.ResultsItemBreadcrumbs, { children: (o) => o.map((l) => /* @__PURE__ */ i(d, { children: [
|
|
87
|
+
l,
|
|
87
88
|
/* @__PURE__ */ e(t.ResultsItemBreadcrumbIcon, {})
|
|
88
|
-
] },
|
|
89
|
+
] }, l)) }),
|
|
89
90
|
/* @__PURE__ */ e(t.ResultsItemIcon, {}),
|
|
90
91
|
/* @__PURE__ */ e(t.ResultsItemTitle, {}),
|
|
91
92
|
/* @__PURE__ */ e(t.ResultsItemTag, {}),
|
|
92
|
-
/* @__PURE__ */ e(t.ResultsItemDescription, { children: (o) => o.map((
|
|
93
|
+
/* @__PURE__ */ e(t.ResultsItemDescription, { children: (o) => o.map((l, s) => /* @__PURE__ */ e(t.ResultsItemDescriptionPart, { part: l }, `part-${s}`)) }),
|
|
93
94
|
/* @__PURE__ */ e(t.ResultsItemIndicator, {})
|
|
94
|
-
] },
|
|
95
|
+
] }, n.id)) });
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function W() {
|
|
97
98
|
return /* @__PURE__ */ e(t.Footer, { children: /* @__PURE__ */ i(t.TaglineContainer, { children: [
|
|
98
99
|
/* @__PURE__ */ e(t.TaglineText, {}),
|
|
99
100
|
/* @__PURE__ */ e(t.TaglineLogo, {}),
|
|
@@ -101,8 +102,8 @@ function E() {
|
|
|
101
102
|
] }) });
|
|
102
103
|
}
|
|
103
104
|
export {
|
|
104
|
-
|
|
105
|
+
P as InkeepEmbeddedSearch,
|
|
105
106
|
b as InkeepEmbeddedSearchImpl,
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
k as InkeepEmbeddedSearchImplContent,
|
|
108
|
+
f as InkeepEmbeddedSearchProvider
|
|
108
109
|
};
|
|
@@ -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"),
|
|
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;
|
package/dist/components/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import { InkeepEmbeddedSearch as h, InkeepEmbeddedSearchImpl as k, InkeepEmbedde
|
|
|
4
4
|
import { InkeepModalChat as c } from "./modal.chat.js";
|
|
5
5
|
import { InkeepModalSearchAndChat as x } from "./modal.search-and-chat.js";
|
|
6
6
|
import { InkeepModalSearch as S } from "./modal.search.js";
|
|
7
|
-
import { InkeepModal as B } from "./modal.js";
|
|
8
|
-
import { ChatButtonImpl as
|
|
9
|
-
import { InkeepSearchBar as
|
|
10
|
-
import { InkeepIntelligentForm as
|
|
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";
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
g as ChatButtonImpl,
|
|
13
|
+
u as InkeepChatButton,
|
|
14
14
|
r as InkeepEmbeddedChat,
|
|
15
15
|
p as InkeepEmbeddedChatImpl,
|
|
16
16
|
o as InkeepEmbeddedChatImplContent,
|
|
@@ -21,12 +21,13 @@ export {
|
|
|
21
21
|
k as InkeepEmbeddedSearchImpl,
|
|
22
22
|
l as InkeepEmbeddedSearchImplContent,
|
|
23
23
|
C as InkeepEmbeddedSearchProvider,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
q as InkeepIntelligentForm,
|
|
25
|
+
s as InkeepIntelligentFormImpl,
|
|
26
|
+
i as InkeepModal,
|
|
27
27
|
c as InkeepModalChat,
|
|
28
28
|
S as InkeepModalSearch,
|
|
29
29
|
x as InkeepModalSearchAndChat,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
F as InkeepSearchBar,
|
|
31
|
+
B as ModalContent,
|
|
32
|
+
P as SearchBarImpl
|
|
32
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function d(o){const{componentType:t,children:r,modalSettings:l,...i}=o;return e.jsx(n.Portal,{children:e.jsx(n.Shadow,{children:e.jsx(n.RootProvider,{config:{...i},componentType:t,children:e.jsx(n.Modal.Root,{config:l,children:r})})})})}function c(o){return e.jsx(n.Modal.Overlay,{children:e.jsx(n.Modal.Content,{children:o.children})})}exports.InkeepModal=d;exports.ModalContent=c;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InkeepModalSettings } from '@inkeep/cxkit-types';
|
|
2
2
|
import { WebWidgetInteractionType, RootProviderProps } from '@inkeep/cxkit-styled';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
3
4
|
type RootConfig = RootProviderProps['config'];
|
|
4
5
|
interface ModalConfig extends RootConfig {
|
|
5
6
|
/**
|
|
@@ -18,4 +19,5 @@ export interface InkeepModalProps extends ModalConfig {
|
|
|
18
19
|
componentType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
|
|
19
20
|
}
|
|
20
21
|
export declare function InkeepModal(props: InkeepModalProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ModalContent(props: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InkeepModalSettings } from '@inkeep/cxkit-types';
|
|
2
2
|
import { WebWidgetInteractionType, RootProviderProps } from '@inkeep/cxkit-styled';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
3
4
|
type RootConfig = RootProviderProps['config'];
|
|
4
5
|
interface ModalConfig extends RootConfig {
|
|
5
6
|
/**
|
|
@@ -18,4 +19,5 @@ export interface InkeepModalProps extends ModalConfig {
|
|
|
18
19
|
componentType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
|
|
19
20
|
}
|
|
20
21
|
export declare function InkeepModal(props: InkeepModalProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ModalContent(props: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
package/dist/components/modal.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Portal as l, Shadow as d, RootProvider as
|
|
4
|
-
function
|
|
5
|
-
const { componentType:
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { Portal as l, Shadow as d, RootProvider as h, Modal as e } from "@inkeep/cxkit-styled";
|
|
4
|
+
function m(o) {
|
|
5
|
+
const { componentType: r, children: t, modalSettings: i, ...c } = o;
|
|
6
|
+
return /* @__PURE__ */ n(l, { children: /* @__PURE__ */ n(d, { children: /* @__PURE__ */ n(
|
|
7
|
+
h,
|
|
8
8
|
{
|
|
9
9
|
config: {
|
|
10
10
|
...c
|
|
11
11
|
},
|
|
12
|
-
componentType:
|
|
13
|
-
children: /* @__PURE__ */
|
|
12
|
+
componentType: r,
|
|
13
|
+
children: /* @__PURE__ */ n(e.Root, { config: i, children: t })
|
|
14
14
|
}
|
|
15
15
|
) }) });
|
|
16
16
|
}
|
|
17
|
+
function p(o) {
|
|
18
|
+
return /* @__PURE__ */ n(e.Overlay, { children: /* @__PURE__ */ n(e.Content, { children: o.children }) });
|
|
19
|
+
}
|
|
17
20
|
export {
|
|
18
|
-
|
|
21
|
+
m as InkeepModal,
|
|
22
|
+
p as ModalContent
|
|
19
23
|
};
|
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"),
|
|
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]})});
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { InkeepEmbeddedChat as
|
|
2
|
-
import { InkeepEmbeddedSearchAndChat as
|
|
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
3
|
import { InkeepEmbeddedSearch as h, InkeepEmbeddedSearchImpl as k, InkeepEmbeddedSearchImplContent as l, InkeepEmbeddedSearchProvider as C } from "./components/embedded-search.js";
|
|
4
4
|
import { InkeepModalChat as x } from "./components/modal.chat.js";
|
|
5
5
|
import { InkeepModalSearchAndChat as c } from "./components/modal.search-and-chat.js";
|
|
6
6
|
import { InkeepModalSearch as S } from "./components/modal.search.js";
|
|
7
|
-
import { InkeepModal as B } from "./components/modal.js";
|
|
8
|
-
import { ChatButtonImpl as
|
|
9
|
-
import { InkeepSearchBar as
|
|
10
|
-
import { InkeepIntelligentForm as
|
|
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";
|
|
11
11
|
export * from "@inkeep/cxkit-styled";
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
g as ChatButtonImpl,
|
|
14
|
+
u as InkeepChatButton,
|
|
15
|
+
r as InkeepEmbeddedChat,
|
|
16
16
|
p as InkeepEmbeddedChatImpl,
|
|
17
17
|
o as InkeepEmbeddedChatImplContent,
|
|
18
18
|
t as InkeepEmbeddedChatProvider,
|
|
19
19
|
h as InkeepEmbeddedSearch,
|
|
20
|
-
|
|
20
|
+
m as InkeepEmbeddedSearchAndChat,
|
|
21
21
|
I as InkeepEmbeddedSearchAndChatImpl,
|
|
22
22
|
k as InkeepEmbeddedSearchImpl,
|
|
23
23
|
l as InkeepEmbeddedSearchImplContent,
|
|
24
24
|
C as InkeepEmbeddedSearchProvider,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
q as InkeepIntelligentForm,
|
|
26
|
+
s as InkeepIntelligentFormImpl,
|
|
27
|
+
i as InkeepModal,
|
|
28
28
|
x as InkeepModalChat,
|
|
29
29
|
S as InkeepModalSearch,
|
|
30
30
|
c as InkeepModalSearchAndChat,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
F as InkeepSearchBar,
|
|
32
|
+
B as ModalContent,
|
|
33
|
+
P as SearchBarImpl
|
|
33
34
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-react",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250228205857",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@inkeep/cxkit-styled": "0.0.0-dev-
|
|
23
|
+
"@inkeep/cxkit-styled": "0.0.0-dev-20250228205857"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@biomejs/biome": "1.9.4",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"typescript": "5.7.3",
|
|
44
44
|
"vite": "5.4.11",
|
|
45
45
|
"vite-plugin-dts": "4.4.0",
|
|
46
|
-
"@inkeep/cxkit-color-mode": "0.0.0-dev-
|
|
47
|
-
"@inkeep/cxkit-types": "0.0.0-dev-
|
|
46
|
+
"@inkeep/cxkit-color-mode": "0.0.0-dev-20250228205857",
|
|
47
|
+
"@inkeep/cxkit-types": "0.0.0-dev-20250228205857"
|
|
48
48
|
},
|
|
49
49
|
"module": "dist/index.js",
|
|
50
50
|
"types": "dist/index.d.ts",
|