@inkeep/cxkit-react 0.5.2 → 0.5.4

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 t=require("react/jsx-runtime"),e=require("@inkeep/cxkit-styled"),m=require("react"),g=require("./modal.cjs"),x=require("./embedded-search-and-chat.cjs"),B=require("./embedded-search-and-chat.impl.cjs"),j=require("./embedded-chat.cjs");function I(n){const[r,o]=m.useState(!1),{modalSettings:a,label:i,defaultView:s="chat",canToggleView:p=!0,...c}=n,{config:d,...u}=B.useWidgetImpl({...c,defaultView:s}),C={...a,open:r,onOpenChange:h=>{n.forceDefaultView&&!h&&u.setView(s??"chat"),o(!!h)}};return t.jsxs(t.Fragment,{children:[t.jsx(e.Shadow,{wrapperStyles:{display:"contents"},children:t.jsx(e.RootProvider,{config:d,interactionType:e.WebWidgetInteractionType.ChatButton,children:t.jsx(l,{label:i,setOpen:o})})}),t.jsx(g.InkeepModal,{...d,interactionType:e.WebWidgetInteractionType.ChatButton,modalSettings:C,children:p?t.jsx(x.InkeepEmbeddedSearchAndChatImpl,{...u}):t.jsx(j.InkeepEmbeddedChatImpl,{...c})})]})}function l(n){const{label:r="Ask AI",setOpen:o}=n;return t.jsx(e.ChatButton.Container,{children:t.jsxs(e.ChatButton.ChatButton,{onPointerDown:a=>{a.button!==2&&(o(i=>!i),a.stopPropagation())},children:[t.jsx(e.ChatButton.ChatButtonText,{children:r}),t.jsx(e.ChatButton.ChatButtonAvatarContent,{children:t.jsx(e.ChatButton.ChatButtonAvatarImage,{})})]})})}exports.ChatButtonImpl=l;exports.InkeepChatButton=I;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("@inkeep/cxkit-styled"),m=require("react"),g=require("./modal.cjs"),x=require("./embedded-search-and-chat.cjs"),B=require("./embedded-search-and-chat.impl.cjs"),j=require("./embedded-chat.cjs");function I(n){const[r,o]=m.useState(!1),{modalSettings:a,label:i,defaultView:s="chat",canToggleView:p=!0,...c}=n,{config:d,...u}=B.useWidgetImpl({...c,defaultView:s}),C={...a,isOpen:r,onOpenChange:h=>{n.forceDefaultView&&!h&&u.setView(s??"chat"),o(!!h)}};return t.jsxs(t.Fragment,{children:[t.jsx(e.Shadow,{wrapperStyles:{display:"contents"},children:t.jsx(e.RootProvider,{config:d,componentType:e.WebWidgetInteractionType.ChatButton,children:t.jsx(l,{label:i,setOpen:o})})}),t.jsx(g.InkeepModal,{...d,componentType:e.WebWidgetInteractionType.ChatButton,modalSettings:C,children:p?t.jsx(x.InkeepEmbeddedSearchAndChatImpl,{...u}):t.jsx(j.InkeepEmbeddedChatImpl,{...c})})]})}function l(n){const{label:r="Ask AI",setOpen:o}=n;return t.jsx(e.ChatButton.Container,{children:t.jsxs(e.ChatButton.ChatButton,{onPointerDown:a=>{a.button!==2&&(o(i=>!i),a.stopPropagation())},children:[t.jsx(e.ChatButton.ChatButtonText,{children:r}),t.jsx(e.ChatButton.ChatButtonAvatarContent,{children:t.jsx(e.ChatButton.ChatButtonAvatarImage,{})})]})})}exports.ChatButtonImpl=l;exports.InkeepChatButton=I;
@@ -1,7 +1,7 @@
1
1
  import { InkeepModalSettings } from '@inkeep/cxkit-types';
2
2
  import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
3
3
  export interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
4
- modalSettings?: Omit<InkeepModalSettings, 'open' | 'onOpenChange'>;
4
+ modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
5
5
  label?: string;
6
6
  canToggleView?: boolean;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { InkeepModalSettings } from '@inkeep/cxkit-types';
2
2
  import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
3
3
  export interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
4
- modalSettings?: Omit<InkeepModalSettings, 'open' | 'onOpenChange'>;
4
+ modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
5
5
  label?: string;
6
6
  canToggleView?: boolean;
7
7
  }
@@ -10,25 +10,25 @@ function v(n) {
10
10
  const [a, o] = B(!1), {
11
11
  modalSettings: r,
12
12
  label: i,
13
- defaultView: l = "chat",
13
+ defaultView: p = "chat",
14
14
  canToggleView: u = !0,
15
- ...c
16
- } = n, { config: p, ...m } = b({ ...c, defaultView: l }), f = {
15
+ ...l
16
+ } = n, { config: m, ...c } = b({ ...l, defaultView: p }), f = {
17
17
  ...r,
18
- open: a,
18
+ isOpen: a,
19
19
  onOpenChange: (d) => {
20
- n.forceDefaultView && !d && m.setView(l ?? "chat"), o(!!d);
20
+ n.forceDefaultView && !d && c.setView(p ?? "chat"), o(!!d);
21
21
  }
22
22
  };
23
23
  return /* @__PURE__ */ s(C, { children: [
24
- /* @__PURE__ */ t(g, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(I, { config: p, interactionType: h.ChatButton, children: /* @__PURE__ */ t(y, { label: i, setOpen: o }) }) }),
24
+ /* @__PURE__ */ t(g, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(I, { config: m, componentType: h.ChatButton, children: /* @__PURE__ */ t(y, { label: i, setOpen: o }) }) }),
25
25
  /* @__PURE__ */ t(
26
26
  w,
27
27
  {
28
- ...p,
29
- interactionType: h.ChatButton,
28
+ ...m,
29
+ componentType: h.ChatButton,
30
30
  modalSettings: f,
31
- children: u ? /* @__PURE__ */ t(S, { ...m }) : /* @__PURE__ */ t(k, { ...c })
31
+ children: u ? /* @__PURE__ */ t(S, { ...c }) : /* @__PURE__ */ t(k, { ...l })
32
32
  }
33
33
  )
34
34
  ] });
@@ -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"),c=require("react"),i=require("./widget-toggle.cjs");function o(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},interactionType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(r,{...a})})})}function r(a){const{onToggleView:t,isHidden:s,shouldAutoFocusInput:n=!t}=a,h=d.useModal();return e.jsx(d.EmbeddedChat.Provider,{isHidden:s,shouldAutoFocusInput:n,children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||h?.open),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(b,{...a}),e.jsx(C,{}),e.jsx(g,{})]}),e.jsx(I,{}),e.jsx(M,{})]})})}function b(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,h=!!t;return e.jsxs(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(h),children:[h&&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(i.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"})]}),e.jsx(d.Modal.Close,{})]})}function C(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(l,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function l(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(x,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(j,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(E,{}),e.jsx(u,{}),e.jsx(F,{})]})]},t.id))]})})}function x(){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))})]}),e.jsxs(d.EmbeddedChat.Workflows,{children:[e.jsx(d.EmbeddedChat.WorkflowsLabel,{}),e.jsx(d.EmbeddedChat.WorkflowsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.Workflow,{workflow:t,children:[e.jsx(d.EmbeddedChat.WorkflowIcon,{}),t.displayName]},t.id))})]})]})]})}function j(){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 E(){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 u(){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 F(){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(c.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((h,m)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:h},`part-${m}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function g(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(A,{}),e.jsx(p,{})]})}function A(){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 p(){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 I(){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 M(){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=o;exports.InkeepEmbeddedChatImpl=r;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),c=require("react"),i=require("./widget-toggle.cjs");function o(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(r,{...a})})})}function r(a){const{onToggleView:t,isHidden:s,shouldAutoFocusInput:n=!t}=a,h=d.useModal();return e.jsx(d.EmbeddedChat.Provider,{isHidden:s,shouldAutoFocusInput:n,children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||h?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(b,{...a}),e.jsx(l,{}),e.jsx(g,{})]}),e.jsx(M,{}),e.jsx(I,{})]})})}function b(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,h=!!t;return e.jsxs(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(h),children:[h&&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(i.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"})]}),e.jsx(d.Modal.Close,{})]})}function l(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(C,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function C(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(x,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(j,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(E,{}),e.jsx(u,{}),e.jsx(F,{})]})]},t.id))]})})}function x(){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 j(){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 E(){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 u(){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 F(){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(c.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((h,m)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:h},`part-${m}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function g(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(A,{}),e.jsx(p,{})]})}function A(){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 p(){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 M(){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 I(){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=o;exports.InkeepEmbeddedChatImpl=r;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as n, Fragment as s } from "react/jsx-runtime";
3
- import { Shadow as m, RootProvider as F, WebWidgetInteractionType as u, useModal as A, EmbeddedChat as e, dataAttr as d, Modal as g, PortalWithTheme as l } from "@inkeep/cxkit-styled";
3
+ import { Shadow as m, RootProvider as F, WebWidgetInteractionType as u, useModal as g, EmbeddedChat as e, dataAttr as d, Modal as A, PortalWithTheme as l } from "@inkeep/cxkit-styled";
4
4
  import { Fragment as p } from "react";
5
5
  import { WidgetToggle as M } from "./widget-toggle.js";
6
- function Q(a) {
6
+ function E(a) {
7
7
  const { baseSettings: r, aiChatSettings: c } = a;
8
8
  return /* @__PURE__ */ t(
9
9
  m,
@@ -19,34 +19,34 @@ function Q(a) {
19
19
  baseSettings: r,
20
20
  aiChatSettings: c
21
21
  },
22
- interactionType: u.EmbeddedChat,
23
- children: /* @__PURE__ */ t(I, { ...a })
22
+ componentType: u.EmbeddedChat,
23
+ children: /* @__PURE__ */ t(b, { ...a })
24
24
  }
25
25
  )
26
26
  }
27
27
  );
28
28
  }
29
- function I(a) {
30
- const { onToggleView: r, isHidden: c, shouldAutoFocusInput: i = !r } = a, o = A();
29
+ function b(a) {
30
+ const { onToggleView: r, isHidden: c, shouldAutoFocusInput: i = !r } = a, o = g();
31
31
  return /* @__PURE__ */ t(e.Provider, { isHidden: c, shouldAutoFocusInput: i, children: /* @__PURE__ */ n(
32
32
  e.Wrapper,
33
33
  {
34
34
  variant: r ? "no-shadow" : "container-with-shadow",
35
- "data-composite": d(!!a.onToggleView || o?.open),
35
+ "data-composite": d(!!a.onToggleView || o?.isOpen),
36
36
  children: [
37
37
  /* @__PURE__ */ t(e.ConversationLoading, {}),
38
38
  /* @__PURE__ */ n(e.Root, { children: [
39
- /* @__PURE__ */ t(b, { ...a }),
39
+ /* @__PURE__ */ t(I, { ...a }),
40
40
  /* @__PURE__ */ t(C, {}),
41
41
  /* @__PURE__ */ t(w, {})
42
42
  ] }),
43
- /* @__PURE__ */ t(x, {}),
44
- /* @__PURE__ */ t(f, {})
43
+ /* @__PURE__ */ t(L, {}),
44
+ /* @__PURE__ */ t(D, {})
45
45
  ]
46
46
  }
47
47
  ) });
48
48
  }
49
- function b(a) {
49
+ function I(a) {
50
50
  const { onToggleView: r, askAILabel: c, searchLabel: i } = a, o = !!r;
51
51
  return /* @__PURE__ */ n(e.Header, { "data-show-toolbar": d(o), children: [
52
52
  o && /* @__PURE__ */ n(e.HeaderToolbar, { children: [
@@ -70,7 +70,7 @@ function b(a) {
70
70
  }
71
71
  )
72
72
  ] }),
73
- /* @__PURE__ */ t(g.Close, {})
73
+ /* @__PURE__ */ t(A.Close, {})
74
74
  ] });
75
75
  }
76
76
  function C() {
@@ -82,9 +82,9 @@ function C() {
82
82
  }
83
83
  function k() {
84
84
  return /* @__PURE__ */ t(e.Messages, { children: ({ messages: a }) => /* @__PURE__ */ n(s, { children: [
85
- /* @__PURE__ */ t(T, {}),
85
+ /* @__PURE__ */ t(B, {}),
86
86
  a.map((r) => /* @__PURE__ */ n(e.MessageWrapper, { message: r, children: [
87
- /* @__PURE__ */ t(B, {}),
87
+ /* @__PURE__ */ t(T, {}),
88
88
  /* @__PURE__ */ t(e.MessageLoading, {}),
89
89
  /* @__PURE__ */ n(e.MessageContentWrapper, { children: [
90
90
  /* @__PURE__ */ t(e.MessageContent, { children: /* @__PURE__ */ t(e.Message, {}) }),
@@ -95,7 +95,7 @@ function k() {
95
95
  ] }, r.id))
96
96
  ] }) });
97
97
  }
98
- function T() {
98
+ function B() {
99
99
  return /* @__PURE__ */ n(e.IntroMessageWrapper, { children: [
100
100
  /* @__PURE__ */ n(e.MessageHeader, { children: [
101
101
  /* @__PURE__ */ t(e.MessageAvatar, { children: /* @__PURE__ */ n(e.MessageAvatarContent, { children: [
@@ -117,18 +117,11 @@ function T() {
117
117
  /* @__PURE__ */ n(e.QuickQuestions, { children: [
118
118
  /* @__PURE__ */ t(e.QuickQuestionsLabel, {}),
119
119
  /* @__PURE__ */ t(e.QuickQuestionsList, { children: (a) => a.map((r) => /* @__PURE__ */ t(e.QuickQuestion, { children: /* @__PURE__ */ t(e.QuickQuestionButton, { question: r }) }, r)) })
120
- ] }),
121
- /* @__PURE__ */ n(e.Workflows, { children: [
122
- /* @__PURE__ */ t(e.WorkflowsLabel, {}),
123
- /* @__PURE__ */ t(e.WorkflowsList, { children: (a) => a.map((r) => /* @__PURE__ */ n(e.Workflow, { workflow: r, children: [
124
- /* @__PURE__ */ t(e.WorkflowIcon, {}),
125
- r.displayName
126
- ] }, r.id)) })
127
120
  ] })
128
121
  ] })
129
122
  ] });
130
123
  }
131
- function B() {
124
+ function T() {
132
125
  return /* @__PURE__ */ n(e.MessageHeader, { children: [
133
126
  /* @__PURE__ */ t(e.MessageAvatar, { children: /* @__PURE__ */ n(e.MessageAvatarContent, { children: [
134
127
  /* @__PURE__ */ t(e.MessageAvatarFallback, {}),
@@ -182,11 +175,11 @@ function H() {
182
175
  }
183
176
  function w() {
184
177
  return /* @__PURE__ */ n(e.Footer, { children: [
185
- /* @__PURE__ */ t(L, {}),
178
+ /* @__PURE__ */ t(x, {}),
186
179
  /* @__PURE__ */ t(y, {})
187
180
  ] });
188
181
  }
189
- function L() {
182
+ function x() {
190
183
  return /* @__PURE__ */ n(e.InputFieldset, { children: [
191
184
  /* @__PURE__ */ n(e.InputGroup, { children: [
192
185
  /* @__PURE__ */ t(e.Input, {}),
@@ -264,7 +257,7 @@ function y() {
264
257
  ] })
265
258
  ] });
266
259
  }
267
- function x() {
260
+ function L() {
268
261
  return /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(e.FeedbackModal, { children: /* @__PURE__ */ t(e.FeedbackModalOverlay, { children: /* @__PURE__ */ n(e.FeedbackModalContent, { children: [
269
262
  /* @__PURE__ */ t(e.FeedbackModalHeader, {}),
270
263
  /* @__PURE__ */ t(e.FeedbackModalClose, {}),
@@ -292,7 +285,7 @@ function x() {
292
285
  ] }) })
293
286
  ] }) }) }) });
294
287
  }
295
- function f() {
288
+ function D() {
296
289
  return /* @__PURE__ */ n(e.FormWrapper, { children: [
297
290
  /* @__PURE__ */ t(e.FormClose, {}),
298
291
  /* @__PURE__ */ n(e.Form, { children: [
@@ -303,12 +296,12 @@ function f() {
303
296
  /* @__PURE__ */ t(e.FormContent, { children: (a) => /* @__PURE__ */ n(s, { children: [
304
297
  a.map((r, c) => /* @__PURE__ */ n(e.FormField, { field: r, autoFocus: c === 0, children: [
305
298
  /* @__PURE__ */ t(e.FormFieldLabel, {}),
306
- r.inputType === "TEXT" && /* @__PURE__ */ t(e.FormFieldText, {}),
307
- r.inputType === "EMAIL" && /* @__PURE__ */ t(e.FormFieldEmail, {}),
308
- r.inputType === "FILE" && /* @__PURE__ */ t(e.FormFieldFile, {}),
309
- r.inputType === "TEXTAREA" && /* @__PURE__ */ t(e.FormFieldTextArea, {}),
310
- r.inputType === "CHECKBOX" && /* @__PURE__ */ t(e.FormFieldCheckbox, { children: /* @__PURE__ */ t(e.FormFieldCheckboxIndicator, {}) }),
311
- r.inputType === "SELECT" && /* @__PURE__ */ n(e.FormFieldSelect, { children: [
299
+ r.inputType === "text" && /* @__PURE__ */ t(e.FormFieldText, {}),
300
+ r.inputType === "email" && /* @__PURE__ */ t(e.FormFieldEmail, {}),
301
+ r.inputType === "file" && /* @__PURE__ */ t(e.FormFieldFile, {}),
302
+ r.inputType === "textarea" && /* @__PURE__ */ t(e.FormFieldTextArea, {}),
303
+ r.inputType === "checkbox" && /* @__PURE__ */ t(e.FormFieldCheckbox, { children: /* @__PURE__ */ t(e.FormFieldCheckboxIndicator, {}) }),
304
+ r.inputType === "select" && /* @__PURE__ */ n(e.FormFieldSelect, { children: [
312
305
  /* @__PURE__ */ n(e.FormFieldSelectTrigger, { children: [
313
306
  /* @__PURE__ */ t(e.FormFieldSelectValue, {}),
314
307
  /* @__PURE__ */ t(e.FormFieldSelectIcon, {})
@@ -335,6 +328,6 @@ function f() {
335
328
  ] });
336
329
  }
337
330
  export {
338
- Q as InkeepEmbeddedChat,
339
- I as InkeepEmbeddedChatImpl
331
+ E as InkeepEmbeddedChat,
332
+ b as InkeepEmbeddedChatImpl
340
333
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),p=require("./embedded-search.cjs"),m=require("./embedded-search-and-chat.impl.cjs");function I(n){const{config:d,...r}=m.useWidgetImpl(n);return e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(t.RootProvider,{config:d,interactionType:t.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(a,{...r})})})}function a(n){const{view:d,setView:r,shouldShowAskAICard:u,onToggleView:i,defaultView:c,shouldAutoFocusInput:h,searchLabel:s,askAILabel:o}=n;return e.jsxs(t.WidgetProvider,{widget:{setView:r},children:[e.jsx(p.InkeepEmbeddedSearchImpl,{isHidden:d==="chat",onToggleView:i,shouldShowAskAICard:u,shouldAutoFocusInput:h&&c==="search",searchLabel:s,askAILabel:o}),e.jsx(l.InkeepEmbeddedChatImpl,{isHidden:d==="search",onToggleView:i,shouldAutoFocusInput:h&&c==="chat",askAILabel:o,searchLabel:s})]})}exports.InkeepEmbeddedSearchAndChat=I;exports.InkeepEmbeddedSearchAndChatImpl=a;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),p=require("./embedded-search.cjs"),m=require("./embedded-search-and-chat.impl.cjs");function I(n){const{config:d,...r}=m.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(a,{...r})})})}function a(n){const{view:d,setView:r,shouldShowAskAICard:u,onToggleView:i,defaultView:c,shouldAutoFocusInput:h,searchLabel:o,askAILabel:s}=n;return e.jsxs(t.WidgetProvider,{widget:{setView:r},children:[e.jsx(p.InkeepEmbeddedSearchImpl,{isHidden:d==="chat",onToggleView:i,shouldShowAskAICard:u,shouldAutoFocusInput:h&&c==="search",searchLabel:o,askAILabel:s}),e.jsx(l.InkeepEmbeddedChatImpl,{isHidden:d==="search",onToggleView:i,shouldAutoFocusInput:h&&c==="chat",askAILabel:s,searchLabel:o})]})}exports.InkeepEmbeddedSearchAndChat=I;exports.InkeepEmbeddedSearchAndChatImpl=a;
@@ -4,7 +4,7 @@ import { RefObject } from 'react';
4
4
  export interface InkeepEmbeddedSearchAndChatFunctions {
5
5
  setView: (view: ModalViewTypes) => void;
6
6
  }
7
- export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'interactionType'>>, WidgetView {
7
+ export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'componentType'>>, WidgetView {
8
8
  /**
9
9
  * The default view to show when the widget is loaded.
10
10
  * @default 'search'
@@ -4,7 +4,7 @@ import { RefObject } from 'react';
4
4
  export interface InkeepEmbeddedSearchAndChatFunctions {
5
5
  setView: (view: ModalViewTypes) => void;
6
6
  }
7
- export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'interactionType'>>, WidgetView {
7
+ export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'componentType'>>, WidgetView {
8
8
  /**
9
9
  * The default view to show when the widget is loaded.
10
10
  * @default 'search'
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
3
- import { InkeepEmbeddedChatImpl as p } from "./embedded-chat.js";
2
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
3
+ import { InkeepEmbeddedChatImpl as a } from "./embedded-chat.js";
4
4
  import { Shadow as m, RootProvider as u, WebWidgetInteractionType as l, WidgetProvider as I } from "@inkeep/cxkit-styled";
5
5
  import { InkeepEmbeddedSearchImpl as f } from "./embedded-search.js";
6
6
  import { useWidgetImpl as w } from "./embedded-search-and-chat.impl.js";
7
7
  function E(d) {
8
- const { config: t, ...i } = w(d);
8
+ const { config: t, ...o } = w(d);
9
9
  return /* @__PURE__ */ e(
10
10
  m,
11
11
  {
@@ -13,46 +13,39 @@ function E(d) {
13
13
  height: "inherit",
14
14
  width: "inherit"
15
15
  },
16
- children: /* @__PURE__ */ e(
17
- u,
18
- {
19
- config: t,
20
- interactionType: l.EmbeddedSearchAndChat,
21
- children: /* @__PURE__ */ e(A, { ...i })
22
- }
23
- )
16
+ children: /* @__PURE__ */ e(u, { config: t, componentType: l.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(A, { ...o }) })
24
17
  }
25
18
  );
26
19
  }
27
20
  function A(d) {
28
21
  const {
29
22
  view: t,
30
- setView: i,
31
- shouldShowAskAICard: s,
32
- onToggleView: o,
33
- defaultView: r,
23
+ setView: o,
24
+ shouldShowAskAICard: p,
25
+ onToggleView: r,
26
+ defaultView: i,
34
27
  shouldAutoFocusInput: n,
35
28
  searchLabel: h,
36
29
  askAILabel: c
37
30
  } = d;
38
- return /* @__PURE__ */ a(I, { widget: { setView: i }, children: [
31
+ return /* @__PURE__ */ s(I, { widget: { setView: o }, children: [
39
32
  /* @__PURE__ */ e(
40
33
  f,
41
34
  {
42
35
  isHidden: t === "chat",
43
- onToggleView: o,
44
- shouldShowAskAICard: s,
45
- shouldAutoFocusInput: n && r === "search",
36
+ onToggleView: r,
37
+ shouldShowAskAICard: p,
38
+ shouldAutoFocusInput: n && i === "search",
46
39
  searchLabel: h,
47
40
  askAILabel: c
48
41
  }
49
42
  ),
50
43
  /* @__PURE__ */ e(
51
- p,
44
+ a,
52
45
  {
53
46
  isHidden: t === "search",
54
- onToggleView: o,
55
- shouldAutoFocusInput: n && r === "chat",
47
+ onToggleView: r,
48
+ shouldAutoFocusInput: n && i === "chat",
56
49
  askAILabel: c,
57
50
  searchLabel: h
58
51
  }
@@ -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"),o=require("react"),a=require("./widget-toggle.cjs");function h(s){const{baseSettings:r,searchSettings:c}=s;return e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:r,searchSettings:c},interactionType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(l,{...s})})})}function l(s){const{onToggleView:r,isHidden:c,shouldAutoFocusInput:t=!r}=s,n=d.useModal();return e.jsx(d.EmbeddedSearch.Provider,{isHidden:c,shouldAutoFocusInput:t,children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-composite":d.dataAttr(!!r||n?.open),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(u,{...s}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(m,{...s}),e.jsx(S,{})]}),e.jsx(x,{})]})})})}function u(s){const{onToggleView:r,askAILabel:c,searchLabel:t}=s,{query:n}=d.useSearch();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(a.WidgetToggle,{onToggleView:r,query:n,askAILabel:c,searchLabel:t,view:"search"}),e.jsx(d.Modal.Close,{})]})}function m(s){const{askAILabel:r,onToggleView:c,shouldShowAskAICard:t=!!c}=s,{query:n}=d.useSearch(),{handleToggle:i}=a.useToggleView({onToggleView:c,query:n});return t?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>i("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[r||"Ask AI",n&&` "${n}"`]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function S(){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.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(b,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})]})}function b(){return e.jsx(d.EmbeddedSearch.ResultsList,{children:s=>s.map(r=>e.jsxs(d.EmbeddedSearch.ResultsItem,{item:r,children:[e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbs,{children:c=>c.map(t=>e.jsxs(o.Fragment,{children:[t,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},t))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:c=>c.map((t,n)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:t},`part-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},r.id))})}function x(){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=h;exports.InkeepEmbeddedSearchImpl=l;
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"),a=require("./widget-toggle.cjs");function h(r){const{baseSettings:s,searchSettings:c}=r;return e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:s,searchSettings:c},componentType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(l,{...r})})})}function l(r){const{onToggleView:s,isHidden:c,shouldAutoFocusInput:t=!s}=r,n=d.useModal();return e.jsx(d.EmbeddedSearch.Provider,{isHidden:c,shouldAutoFocusInput:t,children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-composite":d.dataAttr(!!s||n?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(u,{...r}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(m,{...r}),e.jsx(S,{})]}),e.jsx(x,{})]})})})}function u(r){const{onToggleView:s,askAILabel:c,searchLabel:t}=r,{query:n}=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(a.WidgetToggle,{onToggleView:s,query:n,askAILabel:c,searchLabel:t,view:"search"}),e.jsx(d.Modal.Close,{})]})}function m(r){const{askAILabel:s,onToggleView:c,shouldShowAskAICard:t=!!c}=r,{query:n}=d.useSearch(),{handleToggle:o}=a.useToggleView({onToggleView:c,query:n});return t?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>o("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[s||"Ask AI",n&&` "${n}"`]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function S(){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(b,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})]})}function b(){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:c=>c.map(t=>e.jsxs(i.Fragment,{children:[t,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},t))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:c=>c.map((t,n)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:t},`part-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},s.id))})}function x(){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=h;exports.InkeepEmbeddedSearchImpl=l;
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as o } from "react/jsx-runtime";
3
- import { Shadow as a, RootProvider as d, WebWidgetInteractionType as g, useModal as h, EmbeddedSearch as r, dataAttr as I, useSearch as c, Modal as m } from "@inkeep/cxkit-styled";
3
+ import { Shadow as d, RootProvider as a, WebWidgetInteractionType as g, useModal as h, EmbeddedSearch as r, dataAttr as m, useSearch as c, Modal as I } from "@inkeep/cxkit-styled";
4
4
  import { Fragment as p } from "react";
5
5
  import { WidgetToggle as R, useToggleView as A } from "./widget-toggle.js";
6
6
  function V(n) {
7
7
  const { baseSettings: t, searchSettings: s } = n;
8
- return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
9
- d,
8
+ return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(
9
+ a,
10
10
  {
11
11
  config: {
12
12
  baseSettings: t,
13
13
  searchSettings: s
14
14
  },
15
- interactionType: g.EmbeddedSearch,
15
+ componentType: g.EmbeddedSearch,
16
16
  children: /* @__PURE__ */ e(T, { ...n })
17
17
  }
18
18
  ) });
19
19
  }
20
20
  function T(n) {
21
21
  const { onToggleView: t, isHidden: s, shouldAutoFocusInput: l = !t } = n, i = h();
22
- return /* @__PURE__ */ e(r.Provider, { isHidden: s, shouldAutoFocusInput: l, children: /* @__PURE__ */ e(r.Wrapper, { "data-composite": I(!!t || i?.open), children: /* @__PURE__ */ o(r.Root, { children: [
22
+ return /* @__PURE__ */ e(r.Provider, { isHidden: s, shouldAutoFocusInput: l, children: /* @__PURE__ */ e(r.Wrapper, { "data-composite": m(!!t || i?.isOpen), children: /* @__PURE__ */ o(r.Root, { children: [
23
23
  /* @__PURE__ */ e(S, { ...n }),
24
24
  /* @__PURE__ */ o(r.Content, { children: [
25
25
  /* @__PURE__ */ e(b, { ...n }),
@@ -44,7 +44,7 @@ function S(n) {
44
44
  view: "search"
45
45
  }
46
46
  ),
47
- /* @__PURE__ */ e(m.Close, {})
47
+ /* @__PURE__ */ e(I.Close, {})
48
48
  ] });
49
49
  }
50
50
  function b(n) {
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function m(r){const{baseSettings:t}=r;return e.jsx(n.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(n.RootProvider,{config:{baseSettings:t},interactionType:n.WebWidgetInteractionType.IntelligentForm,children:e.jsx(s,{...r})})})}function s(r){const{formConfig:t}=r;return e.jsx(n.IntelligentForm.Provider,{formConfig:t,children:e.jsxs(n.IntelligentForm.Root,{children:[e.jsx(n.IntelligentForm.Heading,{}),e.jsx(n.IntelligentForm.Content,{children:e.jsxs(n.IntelligentForm.ContentScrollArea,{children:[e.jsxs(n.IntelligentForm.ContentScrollAreaViewport,{children:[e.jsx(I,{}),e.jsx(g,{}),e.jsx(F,{}),e.jsx(u,{}),e.jsx(x,{})]}),e.jsx(n.IntelligentForm.ContentScrollAreaScrollbar,{children:e.jsx(n.IntelligentForm.ContentScrollAreaThumb,{})}),e.jsx(n.IntelligentForm.ContentScrollAreaCorner,{})]})})]})})}function I(){return e.jsxs(n.IntelligentForm.Success,{children:[e.jsx(n.IntelligentForm.SuccessIcon,{}),e.jsx(n.IntelligentForm.SuccessHeading,{}),e.jsx(n.IntelligentForm.SuccessMessage,{})]})}function g(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.PrimaryForm,{children:[e.jsx(n.IntelligentForm.PrimaryFormDescription,{}),e.jsx(n.IntelligentForm.PrimaryFormFields,{children:t=>t.map(l=>e.jsx(c,{field:l},l.name))}),e.jsx(n.IntelligentForm.PrimaryFormSubmit,{})]})}function o(){return e.jsxs(n.IntelligentForm.BotHeading,{children:[e.jsx(n.IntelligentForm.BotHeadingIcon,{}),e.jsx(n.IntelligentForm.BotHeadingName,{})]})}function F(){return e.jsxs(n.IntelligentForm.Loading,{children:[e.jsx(o,{}),e.jsx(n.LoadingIndicator,{})]})}function u(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.ConfidentResponse,{children:[e.jsx(o,{}),e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{}),e.jsx(n.IntelligentForm.SourcesList,{children:t=>t.map(l=>e.jsxs(n.IntelligentForm.Source,{source:l,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},l.url))})]}),e.jsx(n.IntelligentForm.ConfidentAnswer,{}),e.jsxs(n.IntelligentForm.ConfidentResponseButton,{children:[e.jsx(n.IntelligentForm.ConfidentResponseButtonIcon,{}),e.jsx(n.IntelligentForm.ConfidentResponseButtonLabel,{})]})]})}function x(){const{aiResponse:r}=n.useIntelligentForm(),{isSubmitSuccessful:t}=n.useIntelligentForm();return t?null:e.jsxs(n.IntelligentForm.SecondaryForm,{children:[e.jsx(o,{}),!r.answerConfidence&&e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{children:"I wasn't able to find a direct answer to your question, but here's some helpful sources:"}),e.jsx(n.IntelligentForm.SourcesList,{children:l=>l.map(i=>e.jsxs(n.IntelligentForm.Source,{source:i,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},i.url))})]}),e.jsx(n.IntelligentForm.SecondaryFormDescription,{}),e.jsx(n.IntelligentForm.SecondaryFormFields,{children:l=>l.map(i=>e.jsx(c,{field:i},i.name))}),e.jsx(n.IntelligentForm.Error,{}),e.jsx(n.IntelligentForm.SecondaryFormSubmit,{})]})}function c(r){const{field:t}=r;return e.jsxs(n.IntelligentForm.Field,{field:t,children:[e.jsx(n.IntelligentForm.FieldLabel,{}),t.inputType==="TEXT"&&e.jsx(n.IntelligentForm.Text,{}),t.inputType==="EMAIL"&&e.jsx(n.IntelligentForm.Email,{}),t.inputType==="FILE"&&e.jsx(n.IntelligentForm.File,{}),t.inputType==="TEXTAREA"&&e.jsx(n.IntelligentForm.TextArea,{}),t.inputType==="CHECKBOX"&&e.jsx(n.IntelligentForm.Checkbox,{children:e.jsx(n.IntelligentForm.CheckboxIndicator,{})}),t.inputType==="SELECT"&&e.jsxs(n.IntelligentForm.Select,{children:[e.jsxs(n.IntelligentForm.SelectTrigger,{children:[e.jsx(n.IntelligentForm.SelectValue,{}),e.jsx(n.IntelligentForm.SelectIcon,{})]}),e.jsx(n.IntelligentForm.SelectContent,{children:e.jsx(n.IntelligentForm.SelectViewport,{children:t.items.map(l=>e.jsxs(n.IntelligentForm.SelectItem,{value:l.value,children:[e.jsx(n.IntelligentForm.SelectItemText,{children:l.label}),e.jsx(n.IntelligentForm.SelectItemIndicator,{})]},l.value))})})]}),e.jsx(n.IntelligentForm.FieldError,{})]},t.name)}exports.InkeepIntelligentForm=m;exports.InkeepIntelligentFormImpl=s;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function m(r){const{baseSettings:t}=r;return e.jsx(n.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(n.RootProvider,{config:{baseSettings:t},componentType:n.WebWidgetInteractionType.IntelligentForm,children:e.jsx(s,{...r})})})}function s(r){const{formConfig:t}=r;return e.jsx(n.IntelligentForm.Provider,{formConfig:t,children:e.jsxs(n.IntelligentForm.Root,{children:[e.jsx(n.IntelligentForm.Heading,{}),e.jsx(n.IntelligentForm.Content,{children:e.jsxs(n.IntelligentForm.ContentScrollArea,{children:[e.jsxs(n.IntelligentForm.ContentScrollAreaViewport,{children:[e.jsx(I,{}),e.jsx(g,{}),e.jsx(F,{}),e.jsx(x,{}),e.jsx(u,{})]}),e.jsx(n.IntelligentForm.ContentScrollAreaScrollbar,{children:e.jsx(n.IntelligentForm.ContentScrollAreaThumb,{})}),e.jsx(n.IntelligentForm.ContentScrollAreaCorner,{})]})})]})})}function I(){return e.jsxs(n.IntelligentForm.Success,{children:[e.jsx(n.IntelligentForm.SuccessIcon,{}),e.jsx(n.IntelligentForm.SuccessHeading,{}),e.jsx(n.IntelligentForm.SuccessMessage,{})]})}function g(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.PrimaryForm,{children:[e.jsx(n.IntelligentForm.PrimaryFormDescription,{}),e.jsx(n.IntelligentForm.PrimaryFormFields,{children:t=>t.map(l=>e.jsx(c,{field:l},l.name))}),e.jsx(n.IntelligentForm.PrimaryFormSubmit,{})]})}function o(){return e.jsxs(n.IntelligentForm.BotHeading,{children:[e.jsx(n.IntelligentForm.BotHeadingIcon,{}),e.jsx(n.IntelligentForm.BotHeadingName,{})]})}function F(){return e.jsxs(n.IntelligentForm.Loading,{children:[e.jsx(o,{}),e.jsx(n.LoadingIndicator,{})]})}function x(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.ConfidentResponse,{children:[e.jsx(o,{}),e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{}),e.jsx(n.IntelligentForm.SourcesList,{children:t=>t.map(l=>e.jsxs(n.IntelligentForm.Source,{source:l,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},l.url))})]}),e.jsx(n.IntelligentForm.ConfidentAnswer,{}),e.jsxs(n.IntelligentForm.ConfidentResponseButton,{children:[e.jsx(n.IntelligentForm.ConfidentResponseButtonIcon,{}),e.jsx(n.IntelligentForm.ConfidentResponseButtonLabel,{})]})]})}function u(){const{aiResponse:r}=n.useIntelligentForm(),{isSubmitSuccessful:t}=n.useIntelligentForm();return t?null:e.jsxs(n.IntelligentForm.SecondaryForm,{children:[e.jsx(o,{}),!r.answerConfidence&&e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{children:"I wasn't able to find a direct answer to your question, but here's some helpful sources:"}),e.jsx(n.IntelligentForm.SourcesList,{children:l=>l.map(i=>e.jsxs(n.IntelligentForm.Source,{source:i,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},i.url))})]}),e.jsx(n.IntelligentForm.SecondaryFormDescription,{}),e.jsx(n.IntelligentForm.SecondaryFormFields,{children:l=>l.map(i=>e.jsx(c,{field:i},i.name))}),e.jsx(n.IntelligentForm.Error,{}),e.jsx(n.IntelligentForm.SecondaryFormSubmit,{})]})}function c(r){const{field:t}=r;return e.jsxs(n.IntelligentForm.Field,{field:t,children:[e.jsx(n.IntelligentForm.FieldLabel,{}),t.inputType==="text"&&e.jsx(n.IntelligentForm.Text,{}),t.inputType==="email"&&e.jsx(n.IntelligentForm.Email,{}),t.inputType==="file"&&e.jsx(n.IntelligentForm.File,{}),t.inputType==="textarea"&&e.jsx(n.IntelligentForm.TextArea,{}),t.inputType==="checkbox"&&e.jsx(n.IntelligentForm.Checkbox,{children:e.jsx(n.IntelligentForm.CheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(n.IntelligentForm.Select,{children:[e.jsxs(n.IntelligentForm.SelectTrigger,{children:[e.jsx(n.IntelligentForm.SelectValue,{}),e.jsx(n.IntelligentForm.SelectIcon,{})]}),e.jsx(n.IntelligentForm.SelectContent,{children:e.jsx(n.IntelligentForm.SelectViewport,{children:t.items.map(l=>e.jsxs(n.IntelligentForm.SelectItem,{value:l.value,children:[e.jsx(n.IntelligentForm.SelectItemText,{children:l.label}),e.jsx(n.IntelligentForm.SelectItemIndicator,{})]},l.value))})})]}),e.jsx(n.IntelligentForm.FieldError,{})]},t.name)}exports.InkeepIntelligentForm=m;exports.InkeepIntelligentFormImpl=s;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as n, jsxs as t } from "react/jsx-runtime";
3
3
  import { Shadow as s, RootProvider as a, WebWidgetInteractionType as S, IntelligentForm as e, useIntelligentForm as l, LoadingIndicator as m } from "@inkeep/cxkit-styled";
4
- function T(o) {
4
+ function b(o) {
5
5
  const { baseSettings: r } = o;
6
6
  return /* @__PURE__ */ n(
7
7
  s,
@@ -16,7 +16,7 @@ function T(o) {
16
16
  config: {
17
17
  baseSettings: r
18
18
  },
19
- interactionType: S.IntelligentForm,
19
+ componentType: S.IntelligentForm,
20
20
  children: /* @__PURE__ */ n(h, { ...o })
21
21
  }
22
22
  )
@@ -31,9 +31,9 @@ function h(o) {
31
31
  /* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: [
32
32
  /* @__PURE__ */ n(p, {}),
33
33
  /* @__PURE__ */ n(f, {}),
34
- /* @__PURE__ */ n(I, {}),
35
- /* @__PURE__ */ n(C, {}),
36
- /* @__PURE__ */ n(F, {})
34
+ /* @__PURE__ */ n(g, {}),
35
+ /* @__PURE__ */ n(F, {}),
36
+ /* @__PURE__ */ n(I, {})
37
37
  ] }),
38
38
  /* @__PURE__ */ n(e.ContentScrollAreaScrollbar, { children: /* @__PURE__ */ n(e.ContentScrollAreaThumb, {}) }),
39
39
  /* @__PURE__ */ n(e.ContentScrollAreaCorner, {})
@@ -61,13 +61,13 @@ function u() {
61
61
  /* @__PURE__ */ n(e.BotHeadingName, {})
62
62
  ] });
63
63
  }
64
- function I() {
64
+ function g() {
65
65
  return /* @__PURE__ */ t(e.Loading, { children: [
66
66
  /* @__PURE__ */ n(u, {}),
67
67
  /* @__PURE__ */ n(m, {})
68
68
  ] });
69
69
  }
70
- function C() {
70
+ function F() {
71
71
  const { isSubmitSuccessful: o } = l();
72
72
  return o ? null : /* @__PURE__ */ t(e.ConfidentResponse, { children: [
73
73
  /* @__PURE__ */ n(u, {}),
@@ -85,7 +85,7 @@ function C() {
85
85
  ] })
86
86
  ] });
87
87
  }
88
- function F() {
88
+ function I() {
89
89
  const { aiResponse: o } = l(), { isSubmitSuccessful: r } = l();
90
90
  return r ? null : /* @__PURE__ */ t(e.SecondaryForm, { children: [
91
91
  /* @__PURE__ */ n(u, {}),
@@ -106,12 +106,12 @@ function d(o) {
106
106
  const { field: r } = o;
107
107
  return /* @__PURE__ */ t(e.Field, { field: r, children: [
108
108
  /* @__PURE__ */ n(e.FieldLabel, {}),
109
- r.inputType === "TEXT" && /* @__PURE__ */ n(e.Text, {}),
110
- r.inputType === "EMAIL" && /* @__PURE__ */ n(e.Email, {}),
111
- r.inputType === "FILE" && /* @__PURE__ */ n(e.File, {}),
112
- r.inputType === "TEXTAREA" && /* @__PURE__ */ n(e.TextArea, {}),
113
- r.inputType === "CHECKBOX" && /* @__PURE__ */ n(e.Checkbox, { children: /* @__PURE__ */ n(e.CheckboxIndicator, {}) }),
114
- r.inputType === "SELECT" && /* @__PURE__ */ t(e.Select, { children: [
109
+ r.inputType === "text" && /* @__PURE__ */ n(e.Text, {}),
110
+ r.inputType === "email" && /* @__PURE__ */ n(e.Email, {}),
111
+ r.inputType === "file" && /* @__PURE__ */ n(e.File, {}),
112
+ r.inputType === "textarea" && /* @__PURE__ */ n(e.TextArea, {}),
113
+ r.inputType === "checkbox" && /* @__PURE__ */ n(e.Checkbox, { children: /* @__PURE__ */ n(e.CheckboxIndicator, {}) }),
114
+ r.inputType === "select" && /* @__PURE__ */ t(e.Select, { children: [
115
115
  /* @__PURE__ */ t(e.SelectTrigger, { children: [
116
116
  /* @__PURE__ */ n(e.SelectValue, {}),
117
117
  /* @__PURE__ */ n(e.SelectIcon, {})
@@ -125,6 +125,6 @@ function d(o) {
125
125
  ] }, r.name);
126
126
  }
127
127
  export {
128
- T as InkeepIntelligentForm,
128
+ b as InkeepIntelligentForm,
129
129
  h as InkeepIntelligentFormImpl
130
130
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./embedded-chat.cjs"),a=require("./modal.cjs"),d=require("@inkeep/cxkit-styled");function c(t){const{modalSettings:n,baseSettings:i,aiChatSettings:r,...o}=t;return e.jsx(a.InkeepModal,{interactionType:d.WebWidgetInteractionType.CustomTrigger,modalSettings:n,baseSettings:i,aiChatSettings:r,children:e.jsx(s.InkeepEmbeddedChatImpl,{...o})})}exports.InkeepModalChat=c;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./embedded-chat.cjs"),d=require("./modal.cjs"),a=require("@inkeep/cxkit-styled");function c(t){const{modalSettings:n,baseSettings:i,aiChatSettings:o,...r}=t;return e.jsx(d.InkeepModal,{componentType:a.WebWidgetInteractionType.CustomTrigger,modalSettings:n,baseSettings:i,aiChatSettings:o,children:e.jsx(s.InkeepEmbeddedChatImpl,{...r})})}exports.InkeepModalChat=c;
@@ -4,15 +4,15 @@ import { InkeepEmbeddedChatImpl as m } from "./embedded-chat.js";
4
4
  import { InkeepModal as p } from "./modal.js";
5
5
  import { WebWidgetInteractionType as a } from "@inkeep/cxkit-styled";
6
6
  function l(t) {
7
- const { modalSettings: o, baseSettings: r, aiChatSettings: i, ...n } = t;
7
+ const { modalSettings: o, baseSettings: n, aiChatSettings: r, ...i } = t;
8
8
  return /* @__PURE__ */ e(
9
9
  p,
10
10
  {
11
- interactionType: a.CustomTrigger,
11
+ componentType: a.CustomTrigger,
12
12
  modalSettings: o,
13
- baseSettings: r,
14
- aiChatSettings: i,
15
- children: /* @__PURE__ */ e(m, { ...n })
13
+ baseSettings: n,
14
+ aiChatSettings: r,
15
+ children: /* @__PURE__ */ e(m, { ...i })
16
16
  }
17
17
  );
18
18
  }
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function c(o){const{interactionType:t,children:r,modalSettings:i,...l}=o;return e.jsx(n.Portal,{children:e.jsx(n.Shadow,{children:e.jsx(n.RootProvider,{config:{...l},interactionType:t,children:e.jsx(n.Modal.Root,{config:i,children:e.jsx(n.Modal.Overlay,{children:e.jsx(n.Modal.Content,{children:r})})})})})})}exports.InkeepModal=c;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@inkeep/cxkit-styled");function c(n){const{componentType:t,children:r,modalSettings:i,...l}=n;return e.jsx(o.Portal,{children:e.jsx(o.Shadow,{children:e.jsx(o.RootProvider,{config:{...l},componentType:t,children:e.jsx(o.Modal.Root,{config:i,children:e.jsx(o.Modal.Overlay,{children:e.jsx(o.Modal.Content,{children:r})})})})})})}exports.InkeepModal=c;
@@ -15,7 +15,7 @@ export interface InkeepModalProps extends ModalConfig {
15
15
  /**
16
16
  * The interaction type for the modal widget.
17
17
  */
18
- interactionType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
18
+ componentType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
19
19
  }
20
20
  export declare function InkeepModal(props: InkeepModalProps): import("react/jsx-runtime").JSX.Element;
21
21
  export {};
@@ -15,7 +15,7 @@ export interface InkeepModalProps extends ModalConfig {
15
15
  /**
16
16
  * The interaction type for the modal widget.
17
17
  */
18
- interactionType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
18
+ componentType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
19
19
  }
20
20
  export declare function InkeepModal(props: InkeepModalProps): import("react/jsx-runtime").JSX.Element;
21
21
  export {};
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
- import { Portal as l, Shadow as d, RootProvider as a, Modal as e } from "@inkeep/cxkit-styled";
4
- function m(n) {
5
- const { interactionType: r, children: t, modalSettings: i, ...c } = n;
3
+ import { Portal as l, Shadow as d, RootProvider as h, Modal as e } from "@inkeep/cxkit-styled";
4
+ function p(n) {
5
+ const { componentType: r, children: t, modalSettings: i, ...c } = n;
6
6
  return /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(
7
- a,
7
+ h,
8
8
  {
9
9
  config: {
10
10
  ...c
11
11
  },
12
- interactionType: r,
12
+ componentType: r,
13
13
  children: /* @__PURE__ */ o(e.Root, { config: i, children: /* @__PURE__ */ o(e.Overlay, { children: /* @__PURE__ */ o(e.Content, { children: t }) }) })
14
14
  }
15
15
  ) }) });
16
16
  }
17
17
  export {
18
- m as InkeepModal
18
+ p as InkeepModal
19
19
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("./embedded-search-and-chat.cjs"),l=require("./modal.cjs"),u=require("./embedded-search-and-chat.impl.cjs"),m=require("@inkeep/cxkit-styled"),h=require("../utils.cjs");function g(e){const{modalSettings:t,...r}=e,{config:d,...n}=u.useWidgetImpl(r),o=h.composeEventHandlers(t?.onOpenChange,c=>{e.forceDefaultView&&!c&&n.setView(e.defaultView??"search")}),a={...t,onOpenChange:o};return i.jsx(l.InkeepModal,{...d,modalSettings:a,interactionType:m.WebWidgetInteractionType.CustomTrigger,children:i.jsx(s.InkeepEmbeddedSearchAndChatImpl,{...n})})}exports.InkeepModalSearchAndChat=g;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("./embedded-search-and-chat.cjs"),l=require("./modal.cjs"),u=require("./embedded-search-and-chat.impl.cjs"),m=require("@inkeep/cxkit-styled"),h=require("../utils.cjs");function g(e){const{modalSettings:t,...d}=e,{config:i,...n}=u.useWidgetImpl(d),r=h.composeEventHandlers(t?.onOpenChange,a=>{e.forceDefaultView&&!a&&n.setView(e.defaultView??"search")}),c={...t,onOpenChange:r};return o.jsx(l.InkeepModal,{...i,modalSettings:c,componentType:m.WebWidgetInteractionType.CustomTrigger,children:o.jsx(s.InkeepEmbeddedSearchAndChatImpl,{...n})})}exports.InkeepModalSearchAndChat=g;
@@ -1,24 +1,24 @@
1
1
  "use client";
2
- import { jsx as o } from "react/jsx-runtime";
2
+ import { jsx as n } from "react/jsx-runtime";
3
3
  import { InkeepEmbeddedSearchAndChatImpl as d } from "./embedded-search-and-chat.js";
4
4
  import { InkeepModal as p } from "./modal.js";
5
5
  import { useWidgetImpl as s } from "./embedded-search-and-chat.impl.js";
6
6
  import { WebWidgetInteractionType as l } from "@inkeep/cxkit-styled";
7
7
  import { composeEventHandlers as f } from "../utils.js";
8
8
  function k(e) {
9
- const { modalSettings: t, ...i } = e, { config: r, ...n } = s(i), m = f(t?.onOpenChange, (c) => {
10
- e.forceDefaultView && !c && n.setView(e.defaultView ?? "search");
9
+ const { modalSettings: t, ...r } = e, { config: i, ...o } = s(r), m = f(t?.onOpenChange, (c) => {
10
+ e.forceDefaultView && !c && o.setView(e.defaultView ?? "search");
11
11
  }), a = {
12
12
  ...t,
13
13
  onOpenChange: m
14
14
  };
15
- return /* @__PURE__ */ o(
15
+ return /* @__PURE__ */ n(
16
16
  p,
17
17
  {
18
- ...r,
18
+ ...i,
19
19
  modalSettings: a,
20
- interactionType: l.CustomTrigger,
21
- children: /* @__PURE__ */ o(d, { ...n })
20
+ componentType: l.CustomTrigger,
21
+ children: /* @__PURE__ */ n(d, { ...o })
22
22
  }
23
23
  );
24
24
  }
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./embedded-search.cjs"),c=require("./modal.cjs"),d=require("@inkeep/cxkit-styled");function u(t){const{modalSettings:r,baseSettings:n,searchSettings:o,...i}=t;return e.jsx(c.InkeepModal,{interactionType:d.WebWidgetInteractionType.CustomTrigger,modalSettings:r,baseSettings:n,searchSettings:o,children:e.jsx(s.InkeepEmbeddedSearchImpl,{shouldAutoFocusInput:!0,...i})})}exports.InkeepModalSearch=u;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./embedded-search.cjs"),i=require("./modal.cjs"),d=require("@inkeep/cxkit-styled");function u(t){const{modalSettings:n,baseSettings:r,searchSettings:o,...s}=t;return e.jsx(i.InkeepModal,{componentType:d.WebWidgetInteractionType.CustomTrigger,modalSettings:n,baseSettings:r,searchSettings:o,children:e.jsx(c.InkeepEmbeddedSearchImpl,{shouldAutoFocusInput:!0,...s})})}exports.InkeepModalSearch=u;
@@ -4,13 +4,13 @@ import { InkeepEmbeddedSearchImpl as m } from "./embedded-search.js";
4
4
  import { InkeepModal as p } from "./modal.js";
5
5
  import { WebWidgetInteractionType as s } from "@inkeep/cxkit-styled";
6
6
  function l(t) {
7
- const { modalSettings: r, baseSettings: o, searchSettings: n, ...i } = t;
7
+ const { modalSettings: o, baseSettings: r, searchSettings: n, ...i } = t;
8
8
  return /* @__PURE__ */ e(
9
9
  p,
10
10
  {
11
- interactionType: s.CustomTrigger,
12
- modalSettings: r,
13
- baseSettings: o,
11
+ componentType: s.CustomTrigger,
12
+ modalSettings: o,
13
+ baseSettings: r,
14
14
  searchSettings: n,
15
15
  children: /* @__PURE__ */ e(m, { shouldAutoFocusInput: !0, ...i })
16
16
  }
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),B=require("./embedded-search-and-chat.cjs"),m=require("./embedded-search-and-chat.impl.cjs"),x=require("./embedded-search.cjs"),r=require("@inkeep/cxkit-styled"),j=require("./modal.cjs");function g(a){const[s,t]=p.useState(!1),{modalSettings:n,defaultView:c="search",canToggleView:u=!0,...o}=a,{config:i,...h}=m.useWidgetImpl({...o,defaultView:c}),d={shortcutKey:"k",...n,open:s,onOpenChange:S=>{a.forceDefaultView&&!S&&h.setView(c??"search"),t(!!S)}};return e.jsxs(e.Fragment,{children:[e.jsx(r.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(r.RootProvider,{config:i,interactionType:r.WebWidgetInteractionType.SearchBar,children:e.jsx(l,{setOpen:t,modalSettings:d})})}),e.jsx(j.InkeepModal,{...i,modalSettings:d,interactionType:r.WebWidgetInteractionType.SearchBar,children:u?e.jsx(B.InkeepEmbeddedSearchAndChatImpl,{...h}):e.jsx(x.InkeepEmbeddedSearchImpl,{...o})})]})}function l(a){const{setOpen:s,modalSettings:t}=a;return e.jsx(r.SearchBar.SearchBarContainer,{children:e.jsxs(r.SearchBar.SearchBarButton,{onPointerDown:n=>{n.button!==2&&(s(c=>!c),n.stopPropagation())},children:[e.jsxs(r.SearchBar.SearchBarContentWrapper,{children:[e.jsx(r.SearchBar.SearchBarIcon,{}),e.jsx(r.SearchBar.SearchBarText,{})]}),e.jsxs(r.SearchBar.SearchBarKbdWrapper,{children:[e.jsx(r.SearchBar.SearchBarKbdModifier,{shortcutKey:t?.shortcutKey}),e.jsx(r.SearchBar.SearchBarKbdShortcutKey,{shortcutKey:t?.shortcutKey})]})]})})}exports.InkeepSearchBar=g;exports.SearchBarImpl=l;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),B=require("./embedded-search-and-chat.cjs"),m=require("./embedded-search-and-chat.impl.cjs"),x=require("./embedded-search.cjs"),r=require("@inkeep/cxkit-styled"),j=require("./modal.cjs");function g(a){const[o,t]=u.useState(!1),{modalSettings:n,defaultView:c="search",canToggleView:p=!0,...s}=a,{config:h,...i}=m.useWidgetImpl({...s,defaultView:c}),d={shortcutKey:"k",...n,isOpen:o,onOpenChange:S=>{a.forceDefaultView&&!S&&i.setView(c??"search"),t(!!S)}};return e.jsxs(e.Fragment,{children:[e.jsx(r.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(r.RootProvider,{config:h,componentType:r.WebWidgetInteractionType.SearchBar,children:e.jsx(l,{setOpen:t,modalSettings:d})})}),e.jsx(j.InkeepModal,{...h,modalSettings:d,componentType:r.WebWidgetInteractionType.SearchBar,children:p?e.jsx(B.InkeepEmbeddedSearchAndChatImpl,{...i}):e.jsx(x.InkeepEmbeddedSearchImpl,{...s})})]})}function l(a){const{setOpen:o,modalSettings:t}=a;return e.jsx(r.SearchBar.SearchBarContainer,{children:e.jsxs(r.SearchBar.SearchBarButton,{onPointerDown:n=>{n.button!==2&&(o(c=>!c),n.stopPropagation())},children:[e.jsxs(r.SearchBar.SearchBarContentWrapper,{children:[e.jsx(r.SearchBar.SearchBarIcon,{}),e.jsx(r.SearchBar.SearchBarText,{})]}),e.jsxs(r.SearchBar.SearchBarKbdWrapper,{children:[e.jsx(r.SearchBar.SearchBarKbdModifier,{shortcutKey:t?.shortcutKey}),e.jsx(r.SearchBar.SearchBarKbdShortcutKey,{shortcutKey:t?.shortcutKey})]})]})})}exports.InkeepSearchBar=g;exports.SearchBarImpl=l;
@@ -1,7 +1,7 @@
1
1
  import { InkeepModalSettings } from '@inkeep/cxkit-types';
2
2
  import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
3
3
  export interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
4
- modalSettings?: Omit<InkeepModalSettings, 'open' | 'onOpenChange'>;
4
+ modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
5
5
  canToggleView?: boolean;
6
6
  }
7
7
  export declare function InkeepSearchBar(props: InkeepSearchBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { InkeepModalSettings } from '@inkeep/cxkit-types';
2
2
  import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
3
3
  export interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
4
- modalSettings?: Omit<InkeepModalSettings, 'open' | 'onOpenChange'>;
4
+ modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
5
5
  canToggleView?: boolean;
6
6
  }
7
7
  export declare function InkeepSearchBar(props: InkeepSearchBarProps): import("react/jsx-runtime").JSX.Element;
@@ -15,19 +15,19 @@ function j(n) {
15
15
  } = n, { config: p, ...s } = g({ ...h, defaultView: a }), d = {
16
16
  shortcutKey: "k",
17
17
  ...o,
18
- open: i,
18
+ isOpen: i,
19
19
  onOpenChange: (m) => {
20
20
  n.forceDefaultView && !m && s.setView(a ?? "search"), t(!!m);
21
21
  }
22
22
  };
23
23
  return /* @__PURE__ */ c(u, { children: [
24
- /* @__PURE__ */ e(I, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(K, { config: p, interactionType: l.SearchBar, children: /* @__PURE__ */ e(w, { setOpen: t, modalSettings: d }) }) }),
24
+ /* @__PURE__ */ e(I, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(K, { config: p, componentType: l.SearchBar, children: /* @__PURE__ */ e(w, { setOpen: t, modalSettings: d }) }) }),
25
25
  /* @__PURE__ */ e(
26
26
  b,
27
27
  {
28
28
  ...p,
29
29
  modalSettings: d,
30
- interactionType: l.SearchBar,
30
+ componentType: l.SearchBar,
31
31
  children: S ? /* @__PURE__ */ e(B, { ...s }) : /* @__PURE__ */ e(y, { ...h })
32
32
  }
33
33
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
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.5.2"
23
+ "@inkeep/cxkit-styled": "0.5.4"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@biomejs/biome": "1.9.4",
@@ -30,7 +30,7 @@
30
30
  "@storybook/addon-essentials": "^8.5.3",
31
31
  "@storybook/react": "^8.5.3",
32
32
  "@storybook/react-vite": "^8.5.3",
33
- "@types/react": "19.0.7",
33
+ "@types/react": "19.0.10",
34
34
  "@types/react-dom": "19.0.3",
35
35
  "@vitejs/plugin-react": "4.3.4",
36
36
  "clean-package": "2.2.0",
@@ -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.5.2",
47
- "@inkeep/cxkit-types": "0.5.2"
46
+ "@inkeep/cxkit-color-mode": "0.5.4",
47
+ "@inkeep/cxkit-types": "0.5.4"
48
48
  },
49
49
  "module": "dist/index.js",
50
50
  "types": "dist/index.d.ts",