@inkeep/cxkit-react 0.5.77 → 0.5.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@inkeep/cxkit-styled"),x=require("./modal.cjs"),B=require("./embedded-search-and-chat.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),j=require("./embedded-chat.cjs"),b=require("../utils.cjs"),k=require("@radix-ui/react-use-controllable-state");function A(o){const{modalSettings:n,label:s,defaultView:a="chat",canToggleView:r=!0,avatar:i,...l}=o,p={...l,shouldShowAskAICard:r?o.shouldShowAskAICard:!1},{config:c,...u}=S.useWidgetImpl({...p,defaultView:a}),m=h=>{n?.isOpen===void 0&&(o.forceDefaultView&&!h&&u.setView(a??"search"),d(!!h))},[g=!1,d]=k.useControllableState({prop:n?.isOpen,defaultProp:!1,onChange:b.composeEventHandlers(n?.onOpenChange,m)}),I={...n,isOpen:g,onOpenChange:d},f=()=>r?e.jsx(B.InkeepEmbeddedSearchAndChatImpl,{...u}):e.jsx(j.InkeepEmbeddedChatImpl,{...l});return e.jsxs(e.Fragment,{children:[e.jsx(t.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(t.RootProvider,{config:c,componentType:t.WebWidgetInteractionType.ChatButton,children:e.jsx(C,{label:s,avatar:i,onOpenChange:d})})}),e.jsx(x.InkeepModal,{...c,componentType:t.WebWidgetInteractionType.ChatButton,modalSettings:I,children:f()})]})}function C({label:o="Ask AI",avatar:n,onOpenChange:s}){const a=r=>{r.button!==2&&s(i=>!i)};return e.jsx(t.ChatButton.Container,{children:e.jsxs(t.ChatButton.ChatButton,{onClick:a,children:[e.jsx(t.ChatButton.ChatButtonText,{children:o}),e.jsx(t.ChatButton.ChatButtonAvatarContent,{children:e.jsx(t.ChatButton.ChatButtonAvatarImage,{avatar:n})})]})})}exports.ChatButtonImpl=C;exports.InkeepChatButton=A;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@inkeep/cxkit-styled"),I=require("./modal.cjs"),f=require("./embedded-search-and-chat.cjs"),j=require("./embedded-search-and-chat.impl.cjs"),S=require("./embedded-chat.cjs"),b=require("../utils.cjs"),k=require("@radix-ui/react-use-controllable-state");function A(o){const{modalSettings:n,label:s,defaultView:r="chat",canToggleView:a=!0,avatar:i,...l}=o,p={...l,shouldShowAskAICard:a?o.shouldShowAskAICard:!1},{config:c,...u}=j.useWidgetImpl({...p,defaultView:r}),m=h=>{n?.isOpen===void 0&&(o.forceDefaultView&&!h&&u.setView(r??"search"),d(!!h))},[g=!1,d]=k.useControllableState({prop:n?.isOpen,defaultProp:!1,onChange:b.composeEventHandlers(n?.onOpenChange,m)}),x={...n,isOpen:g,onOpenChange:d},B=()=>a?e.jsx(f.InkeepEmbeddedSearchAndChatImpl,{...u}):e.jsx(S.InkeepEmbeddedChatImpl,{...l});return e.jsxs(e.Fragment,{children:[e.jsx(t.ErrorBoundary,{children:e.jsx(t.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(t.RootProvider,{config:c,componentType:t.WebWidgetInteractionType.ChatButton,children:e.jsx(C,{label:s,avatar:i,onOpenChange:d})})})}),e.jsx(I.InkeepModal,{...c,componentType:t.WebWidgetInteractionType.ChatButton,modalSettings:x,children:B()})]})}function C({label:o="Ask AI",avatar:n,onOpenChange:s}){const r=a=>{a.button!==2&&s(i=>!i)};return e.jsx(t.ChatButton.Container,{children:e.jsxs(t.ChatButton.ChatButton,{onClick:r,children:[e.jsx(t.ChatButton.ChatButtonText,{children:o}),e.jsx(t.ChatButton.ChatButtonAvatarContent,{children:e.jsx(t.ChatButton.ChatButtonAvatarImage,{avatar:n})})]})})}exports.ChatButtonImpl=C;exports.InkeepChatButton=A;
@@ -1,48 +1,48 @@
1
1
  "use client";
2
- import { jsxs as u, Fragment as A, jsx as t } from "react/jsx-runtime";
3
- import { Shadow as B, RootProvider as S, WebWidgetInteractionType as p, ChatButton as o } from "@inkeep/cxkit-styled";
4
- import { InkeepModal as w } from "./modal.js";
5
- import { InkeepEmbeddedSearchAndChatImpl as b } from "./embedded-search-and-chat.js";
6
- import { useWidgetImpl as v } from "./embedded-search-and-chat.impl.js";
7
- import { InkeepEmbeddedChatImpl as y } from "./embedded-chat.js";
8
- import { composeEventHandlers as O } from "../utils.js";
9
- import { useControllableState as T } from "@radix-ui/react-use-controllable-state";
10
- function M(n) {
2
+ import { jsxs as u, Fragment as k, jsx as t } from "react/jsx-runtime";
3
+ import { ErrorBoundary as A, Shadow as S, RootProvider as w, WebWidgetInteractionType as p, ChatButton as o } from "@inkeep/cxkit-styled";
4
+ import { InkeepModal as b } from "./modal.js";
5
+ import { InkeepEmbeddedSearchAndChatImpl as v } from "./embedded-search-and-chat.js";
6
+ import { useWidgetImpl as y } from "./embedded-search-and-chat.impl.js";
7
+ import { InkeepEmbeddedChatImpl as O } from "./embedded-chat.js";
8
+ import { composeEventHandlers as T } from "../utils.js";
9
+ import { useControllableState as x } from "@radix-ui/react-use-controllable-state";
10
+ function R(n) {
11
11
  const {
12
12
  modalSettings: e,
13
13
  label: i,
14
14
  defaultView: r = "chat",
15
15
  canToggleView: a = !0,
16
16
  avatar: l,
17
- ...d
17
+ ...s
18
18
  } = n, C = {
19
- ...d,
19
+ ...s,
20
20
  shouldShowAskAICard: a ? n.shouldShowAskAICard : !1
21
- }, { config: c, ...h } = v({ ...C, defaultView: r }), f = (m) => {
22
- e?.isOpen === void 0 && (n.forceDefaultView && !m && h.setView(r ?? "search"), s(!!m));
23
- }, [g = !1, s] = T({
21
+ }, { config: c, ...h } = y({ ...C, defaultView: r }), f = (m) => {
22
+ e?.isOpen === void 0 && (n.forceDefaultView && !m && h.setView(r ?? "search"), d(!!m));
23
+ }, [g = !1, d] = x({
24
24
  prop: e?.isOpen,
25
25
  defaultProp: !1,
26
- onChange: O(e?.onOpenChange, f)
26
+ onChange: T(e?.onOpenChange, f)
27
27
  }), I = {
28
28
  ...e,
29
29
  isOpen: g,
30
- onOpenChange: s
31
- }, k = () => a ? /* @__PURE__ */ t(b, { ...h }) : /* @__PURE__ */ t(y, { ...d });
32
- return /* @__PURE__ */ u(A, { children: [
33
- /* @__PURE__ */ t(B, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(S, { config: c, componentType: p.ChatButton, children: /* @__PURE__ */ t(x, { label: i, avatar: l, onOpenChange: s }) }) }),
30
+ onOpenChange: d
31
+ }, B = () => a ? /* @__PURE__ */ t(v, { ...h }) : /* @__PURE__ */ t(O, { ...s });
32
+ return /* @__PURE__ */ u(k, { children: [
33
+ /* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(S, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(w, { config: c, componentType: p.ChatButton, children: /* @__PURE__ */ t(E, { label: i, avatar: l, onOpenChange: d }) }) }) }),
34
34
  /* @__PURE__ */ t(
35
- w,
35
+ b,
36
36
  {
37
37
  ...c,
38
38
  componentType: p.ChatButton,
39
39
  modalSettings: I,
40
- children: k()
40
+ children: B()
41
41
  }
42
42
  )
43
43
  ] });
44
44
  }
45
- function x({ label: n = "Ask AI", avatar: e, onOpenChange: i }) {
45
+ function E({ label: n = "Ask AI", avatar: e, onOpenChange: i }) {
46
46
  const r = (a) => {
47
47
  a.button !== 2 && i((l) => !l);
48
48
  };
@@ -52,6 +52,6 @@ function x({ label: n = "Ask AI", avatar: e, onOpenChange: i }) {
52
52
  ] }) });
53
53
  }
54
54
  export {
55
- x as ChatButtonImpl,
56
- M as InkeepChatButton
55
+ E as ChatButtonImpl,
56
+ R as InkeepChatButton
57
57
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),h=require("react"),b=require("./widget-toggle.cjs"),l=require("./modal.cjs");function C(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(c,{...a})})})}function m(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function c(a){return e.jsx(m,{...a,children:e.jsx(o,{...a})})}function o(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?l.ModalContent:h.Fragment;return e.jsx(r,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||s?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(x,{...a}),e.jsx(j,{}),e.jsx(I,{})]}),e.jsx(T,{}),e.jsx(B,{})]})})}function x(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsx(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:r?e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(b.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"}),e.jsx(d.Modal.Close,{})]}):e.jsx(d.Modal.Close,{})})}function j(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(E,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function E(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(F,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(g,{}),e.jsx(p,{}),e.jsx(A,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function F(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(h.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,i)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${i}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function I(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(M,{}),e.jsx(k,{})]})}function M(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function T(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function B(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=C;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=o;exports.InkeepEmbeddedChatProvider=m;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),h=require("react"),b=require("./widget-toggle.cjs"),l=require("./modal.cjs");function C(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(c,{...a})})})})}function m(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function c(a){return e.jsx(m,{...a,children:e.jsx(o,{...a})})}function o(a){const{onToggleView:t}=a,s=d.useModal(),n=d.useWidget(),r=s&&!n?l.ModalContent:h.Fragment;return e.jsx(r,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:t?"no-shadow":"container-with-shadow","data-composite":d.dataAttr(!!a.onToggleView||s?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(x,{...a}),e.jsx(j,{}),e.jsx(I,{})]}),e.jsx(T,{}),e.jsx(B,{})]})})}function x(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsx(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:r?e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(b.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"}),e.jsx(d.Modal.Close,{})]}):e.jsx(d.Modal.Close,{})})}function j(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(E,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function E(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(F,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(g,{}),e.jsx(p,{}),e.jsx(A,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function F(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(h.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,i)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${i}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function I(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(M,{}),e.jsx(k,{})]})}function M(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function T(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function B(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=C;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=o;exports.InkeepEmbeddedChatProvider=m;
@@ -1,62 +1,62 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as n, Fragment as l } from "react/jsx-runtime";
3
- import { Shadow as u, RootProvider as g, WebWidgetInteractionType as p, EmbeddedChat as e, useModal as A, useWidget as b, dataAttr as m, Modal as d, PortalWithTheme as s } from "@inkeep/cxkit-styled";
4
- import { Fragment as h } from "react";
5
- import { WidgetToggle as M } from "./widget-toggle.js";
6
- import { ModalContent as I } from "./modal.js";
7
- function $(a) {
3
+ import { ErrorBoundary as u, Shadow as g, RootProvider as p, WebWidgetInteractionType as A, EmbeddedChat as e, useModal as b, useWidget as M, dataAttr as h, Modal as d, PortalWithTheme as s } from "@inkeep/cxkit-styled";
4
+ import { Fragment as m } from "react";
5
+ import { WidgetToggle as I } from "./widget-toggle.js";
6
+ import { ModalContent as C } from "./modal.js";
7
+ function j(a) {
8
8
  const { baseSettings: r, aiChatSettings: c } = a;
9
- return /* @__PURE__ */ t(
10
- u,
9
+ return /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(
10
+ g,
11
11
  {
12
12
  wrapperStyles: {
13
13
  height: "inherit",
14
14
  width: "inherit"
15
15
  },
16
16
  children: /* @__PURE__ */ t(
17
- g,
17
+ p,
18
18
  {
19
19
  config: {
20
20
  baseSettings: r,
21
21
  aiChatSettings: c
22
22
  },
23
- componentType: p.EmbeddedChat,
24
- children: /* @__PURE__ */ t(k, { ...a })
23
+ componentType: A.EmbeddedChat,
24
+ children: /* @__PURE__ */ t(T, { ...a })
25
25
  }
26
26
  )
27
27
  }
28
- );
28
+ ) });
29
29
  }
30
- function C(a) {
30
+ function k(a) {
31
31
  const { children: r, onToggleView: c, isHidden: o, shouldAutoFocusInput: i = !c } = a;
32
32
  return /* @__PURE__ */ t(e.Provider, { isHidden: o, shouldAutoFocusInput: i, children: r });
33
33
  }
34
- function k(a) {
35
- return /* @__PURE__ */ t(C, { ...a, children: /* @__PURE__ */ t(T, { ...a }) });
36
- }
37
34
  function T(a) {
38
- const { onToggleView: r } = a, c = A(), o = b();
39
- return /* @__PURE__ */ t(c && !o ? I : h, { children: /* @__PURE__ */ n(
35
+ return /* @__PURE__ */ t(k, { ...a, children: /* @__PURE__ */ t(B, { ...a }) });
36
+ }
37
+ function B(a) {
38
+ const { onToggleView: r } = a, c = b(), o = M();
39
+ return /* @__PURE__ */ t(c && !o ? C : m, { children: /* @__PURE__ */ n(
40
40
  e.Wrapper,
41
41
  {
42
42
  variant: r ? "no-shadow" : "container-with-shadow",
43
- "data-composite": m(!!a.onToggleView || c?.isOpen),
43
+ "data-composite": h(!!a.onToggleView || c?.isOpen),
44
44
  children: [
45
45
  /* @__PURE__ */ t(e.ConversationLoading, {}),
46
46
  /* @__PURE__ */ n(e.Root, { children: [
47
- /* @__PURE__ */ t(B, { ...a }),
48
- /* @__PURE__ */ t(S, {}),
49
- /* @__PURE__ */ t(L, {})
47
+ /* @__PURE__ */ t(S, { ...a }),
48
+ /* @__PURE__ */ t(v, {}),
49
+ /* @__PURE__ */ t(D, {})
50
50
  ] }),
51
- /* @__PURE__ */ t(W, {}),
52
- /* @__PURE__ */ t(P, {})
51
+ /* @__PURE__ */ t(P, {}),
52
+ /* @__PURE__ */ t(V, {})
53
53
  ]
54
54
  }
55
55
  ) });
56
56
  }
57
- function B(a) {
57
+ function S(a) {
58
58
  const { onToggleView: r, askAILabel: c, searchLabel: o } = a, i = !!r;
59
- return /* @__PURE__ */ t(e.Header, { "data-show-toolbar": m(i), children: i ? /* @__PURE__ */ n(e.HeaderToolbar, { children: [
59
+ return /* @__PURE__ */ t(e.Header, { "data-show-toolbar": h(i), children: i ? /* @__PURE__ */ n(e.HeaderToolbar, { children: [
60
60
  /* @__PURE__ */ n(e.HeaderToolbarWrapper, { children: [
61
61
  /* @__PURE__ */ t(e.ToolbarHeader, {}),
62
62
  /* @__PURE__ */ n(e.Disclaimer, { children: [
@@ -68,7 +68,7 @@ function B(a) {
68
68
  ] })
69
69
  ] }),
70
70
  /* @__PURE__ */ t(
71
- M,
71
+ I,
72
72
  {
73
73
  onToggleView: r,
74
74
  askAILabel: c,
@@ -79,29 +79,29 @@ function B(a) {
79
79
  /* @__PURE__ */ t(d.Close, {})
80
80
  ] }) : /* @__PURE__ */ t(d.Close, {}) });
81
81
  }
82
- function S() {
82
+ function v() {
83
83
  return /* @__PURE__ */ t(e.Content, { children: /* @__PURE__ */ n(e.ContentScrollArea, { children: [
84
- /* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: /* @__PURE__ */ t(v, {}) }),
84
+ /* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: /* @__PURE__ */ t(x, {}) }),
85
85
  /* @__PURE__ */ t(e.ContentScrollAreaScrollbar, { children: /* @__PURE__ */ t(e.ContentScrollAreaThumb, {}) }),
86
86
  /* @__PURE__ */ t(e.ContentScrollAreaCorner, {})
87
87
  ] }) });
88
88
  }
89
- function v() {
89
+ function x() {
90
90
  return /* @__PURE__ */ t(e.Messages, { children: ({ messages: a }) => /* @__PURE__ */ n(l, { children: [
91
- /* @__PURE__ */ t(x, {}),
91
+ /* @__PURE__ */ t(w, {}),
92
92
  a.map((r) => /* @__PURE__ */ n(e.MessageWrapper, { message: r, children: [
93
- /* @__PURE__ */ t(w, {}),
93
+ /* @__PURE__ */ t(H, {}),
94
94
  /* @__PURE__ */ t(e.MessageLoading, {}),
95
95
  /* @__PURE__ */ n(e.MessageContentWrapper, { children: [
96
96
  /* @__PURE__ */ t(e.MessageContent, { children: /* @__PURE__ */ t(e.Message, {}) }),
97
- /* @__PURE__ */ t(H, {}),
97
+ /* @__PURE__ */ t(y, {}),
98
98
  /* @__PURE__ */ t(f, {}),
99
- /* @__PURE__ */ t(y, {})
99
+ /* @__PURE__ */ t(L, {})
100
100
  ] })
101
101
  ] }, r.id))
102
102
  ] }) });
103
103
  }
104
- function x() {
104
+ function w() {
105
105
  return /* @__PURE__ */ n(e.IntroMessageWrapper, { children: [
106
106
  /* @__PURE__ */ n(e.MessageHeader, { children: [
107
107
  /* @__PURE__ */ t(e.MessageAvatar, { children: /* @__PURE__ */ n(e.MessageAvatarContent, { children: [
@@ -127,7 +127,7 @@ function x() {
127
127
  ] })
128
128
  ] });
129
129
  }
130
- function w() {
130
+ function H() {
131
131
  return /* @__PURE__ */ n(e.MessageHeader, { children: [
132
132
  /* @__PURE__ */ t(e.MessageAvatar, { children: /* @__PURE__ */ n(e.MessageAvatarContent, { children: [
133
133
  /* @__PURE__ */ t(e.MessageAvatarFallback, {}),
@@ -136,7 +136,7 @@ function w() {
136
136
  /* @__PURE__ */ t(e.MessageName, {})
137
137
  ] });
138
138
  }
139
- function H() {
139
+ function y() {
140
140
  return /* @__PURE__ */ n(e.MessageAttachments, { children: [
141
141
  /* @__PURE__ */ t(e.MessageAttachmentsList, { children: (a) => a.map((r) => /* @__PURE__ */ n(e.MessageAttachmentsItem, { attachment: r, children: [
142
142
  /* @__PURE__ */ t(e.MessageAttachmentsItemIcon, {}),
@@ -157,11 +157,11 @@ function f() {
157
157
  /* @__PURE__ */ t(e.MessageAction, { action: "downvote" })
158
158
  ] });
159
159
  }
160
- function y() {
160
+ function L() {
161
161
  return /* @__PURE__ */ n(e.MessageSources, { children: [
162
162
  /* @__PURE__ */ t(e.MessageSourcesHeader, {}),
163
163
  /* @__PURE__ */ t(e.MessageSourcesList, { children: (a) => a.map((r, c) => /* @__PURE__ */ n(e.MessageSourceItem, { href: r.url, source: r, children: [
164
- /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbs, { children: r.breadcrumbs?.map((o) => /* @__PURE__ */ n(h, { children: [
164
+ /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbs, { children: r.breadcrumbs?.map((o) => /* @__PURE__ */ n(m, { children: [
165
165
  o,
166
166
  /* @__PURE__ */ t(e.MessageSourceItemBreadcrumbIcon, {})
167
167
  ] }, o)) }),
@@ -179,13 +179,13 @@ function y() {
179
179
  ] }, c)) })
180
180
  ] });
181
181
  }
182
- function L() {
182
+ function D() {
183
183
  return /* @__PURE__ */ n(e.Footer, { children: [
184
- /* @__PURE__ */ t(D, {}),
185
- /* @__PURE__ */ t(E, {})
184
+ /* @__PURE__ */ t(E, {}),
185
+ /* @__PURE__ */ t(W, {})
186
186
  ] });
187
187
  }
188
- function D() {
188
+ function E() {
189
189
  return /* @__PURE__ */ n(e.InputFieldset, { children: [
190
190
  /* @__PURE__ */ n(e.InputGroup, { children: [
191
191
  /* @__PURE__ */ t(e.Input, {}),
@@ -228,7 +228,7 @@ function D() {
228
228
  ] })
229
229
  ] });
230
230
  }
231
- function E() {
231
+ function W() {
232
232
  return /* @__PURE__ */ n(e.ActionBar, { children: [
233
233
  /* @__PURE__ */ n(e.TaglineContainer, { children: [
234
234
  /* @__PURE__ */ t(e.TaglineText, {}),
@@ -260,7 +260,7 @@ function E() {
260
260
  ] })
261
261
  ] });
262
262
  }
263
- function W() {
263
+ function P() {
264
264
  return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(e.FeedbackModal, { children: /* @__PURE__ */ t(e.FeedbackModalOverlay, { children: /* @__PURE__ */ n(e.FeedbackModalContent, { children: [
265
265
  /* @__PURE__ */ t(e.FeedbackModalHeader, {}),
266
266
  /* @__PURE__ */ t(e.FeedbackModalClose, {}),
@@ -288,7 +288,7 @@ function W() {
288
288
  ] }) })
289
289
  ] }) }) }) });
290
290
  }
291
- function P() {
291
+ function V() {
292
292
  return /* @__PURE__ */ n(e.FormWrapper, { children: [
293
293
  /* @__PURE__ */ t(e.FormClose, {}),
294
294
  /* @__PURE__ */ n(e.Form, { children: [
@@ -331,8 +331,8 @@ function P() {
331
331
  ] });
332
332
  }
333
333
  export {
334
- $ as InkeepEmbeddedChat,
335
- k as InkeepEmbeddedChatImpl,
336
- T as InkeepEmbeddedChatImplContent,
337
- C as InkeepEmbeddedChatProvider
334
+ j as InkeepEmbeddedChat,
335
+ T as InkeepEmbeddedChatImpl,
336
+ B as InkeepEmbeddedChatImplContent,
337
+ k as InkeepEmbeddedChatProvider
338
338
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./embedded-chat.cjs"),t=require("@inkeep/cxkit-styled"),a=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),k=require("react"),g=require("./modal.cjs");function j(n){const{config:d,...r}=S.useWidgetImpl(n);return e.jsx(t.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(t.RootProvider,{config:d,componentType:t.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(h,{...r})})})}function h(n){const{view:d,setView:r,shouldShowAskAICard:l,onToggleView:p,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b,askAICardLabel:I}=n,C=t.useModal()?g.ModalContent:k.Fragment,o={onToggleView:p,shouldShowAskAICard:l,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b,askAICardLabel:I},s={isHidden:d==="chat",...o},i={isHidden:d==="search",...o};return e.jsx(t.WidgetProvider,{widget:{setView:r,view:d},children:e.jsx(a.InkeepEmbeddedSearchProvider,{...s,children:e.jsx(c.InkeepEmbeddedChatProvider,{...i,children:e.jsxs(C,{children:[e.jsx(a.InkeepEmbeddedSearchImplContent,{...s}),e.jsx(c.InkeepEmbeddedChatImplContent,{...i})]})})})})}exports.InkeepEmbeddedSearchAndChat=j;exports.InkeepEmbeddedSearchAndChatImpl=h;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./embedded-chat.cjs"),d=require("@inkeep/cxkit-styled"),a=require("./embedded-search.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),j=require("react"),k=require("./modal.cjs");function x(n){const{config:r,...t}=S.useWidgetImpl(n);return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:r,componentType:d.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(h,{...t})})})})}function h(n){const{view:r,setView:t,shouldShowAskAICard:l,onToggleView:p,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b,askAICardLabel:I}=n,C=d.useModal()?k.ModalContent:j.Fragment,o={onToggleView:p,shouldShowAskAICard:l,shouldAutoFocusInput:m,searchLabel:u,askAILabel:b,askAICardLabel:I},s={isHidden:r==="chat",...o},i={isHidden:r==="search",...o};return e.jsx(d.WidgetProvider,{widget:{setView:t,view:r},children:e.jsx(a.InkeepEmbeddedSearchProvider,{...s,children:e.jsx(c.InkeepEmbeddedChatProvider,{...i,children:e.jsxs(C,{children:[e.jsx(a.InkeepEmbeddedSearchImplContent,{...s}),e.jsx(c.InkeepEmbeddedChatImplContent,{...i})]})})})})}exports.InkeepEmbeddedSearchAndChat=x;exports.InkeepEmbeddedSearchAndChatImpl=h;
@@ -1,25 +1,32 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as I } from "react/jsx-runtime";
3
3
  import { InkeepEmbeddedChatProvider as u, InkeepEmbeddedChatImplContent as b } from "./embedded-chat.js";
4
- import { Shadow as C, RootProvider as f, WebWidgetInteractionType as g, useModal as k, WidgetProvider as w } from "@inkeep/cxkit-styled";
5
- import { InkeepEmbeddedSearchProvider as A, InkeepEmbeddedSearchImplContent as S } from "./embedded-search.js";
6
- import { useWidgetImpl as E } from "./embedded-search-and-chat.impl.js";
7
- import { Fragment as P } from "react";
8
- import { ModalContent as v } from "./modal.js";
9
- function V(d) {
10
- const { config: r, ...o } = E(d);
11
- return /* @__PURE__ */ e(
12
- C,
4
+ import { ErrorBoundary as C, Shadow as f, RootProvider as g, WebWidgetInteractionType as k, useModal as w, WidgetProvider as A } from "@inkeep/cxkit-styled";
5
+ import { InkeepEmbeddedSearchProvider as E, InkeepEmbeddedSearchImplContent as S } from "./embedded-search.js";
6
+ import { useWidgetImpl as P } from "./embedded-search-and-chat.impl.js";
7
+ import { Fragment as v } from "react";
8
+ import { ModalContent as W } from "./modal.js";
9
+ function B(d) {
10
+ const { config: r, ...o } = P(d);
11
+ return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
12
+ f,
13
13
  {
14
14
  wrapperStyles: {
15
15
  height: "inherit",
16
16
  width: "inherit"
17
17
  },
18
- children: /* @__PURE__ */ e(f, { config: r, componentType: g.EmbeddedSearchAndChat, children: /* @__PURE__ */ e(W, { ...o }) })
18
+ children: /* @__PURE__ */ e(
19
+ g,
20
+ {
21
+ config: r,
22
+ componentType: k.EmbeddedSearchAndChat,
23
+ children: /* @__PURE__ */ e(y, { ...o })
24
+ }
25
+ )
19
26
  }
20
- );
27
+ ) });
21
28
  }
22
- function W(d) {
29
+ function y(d) {
23
30
  const {
24
31
  view: r,
25
32
  setView: o,
@@ -29,7 +36,7 @@ function W(d) {
29
36
  searchLabel: m,
30
37
  askAILabel: p,
31
38
  askAICardLabel: s
32
- } = d, l = k() ? v : P, t = {
39
+ } = d, l = w() ? W : v, t = {
33
40
  onToggleView: h,
34
41
  shouldShowAskAICard: a,
35
42
  shouldAutoFocusInput: c,
@@ -43,12 +50,12 @@ function W(d) {
43
50
  isHidden: r === "search",
44
51
  ...t
45
52
  };
46
- return /* @__PURE__ */ e(w, { widget: { setView: o, view: r }, children: /* @__PURE__ */ e(A, { ...n, children: /* @__PURE__ */ e(u, { ...i, children: /* @__PURE__ */ I(l, { children: [
53
+ return /* @__PURE__ */ e(A, { widget: { setView: o, view: r }, children: /* @__PURE__ */ e(E, { ...n, children: /* @__PURE__ */ e(u, { ...i, children: /* @__PURE__ */ I(l, { children: [
47
54
  /* @__PURE__ */ e(S, { ...n }),
48
55
  /* @__PURE__ */ e(b, { ...i })
49
56
  ] }) }) }) });
50
57
  }
51
58
  export {
52
- V as InkeepEmbeddedSearchAndChat,
53
- W as InkeepEmbeddedSearchAndChatImpl
59
+ B as InkeepEmbeddedSearchAndChat,
60
+ y as InkeepEmbeddedSearchAndChatImpl
54
61
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),i=require("react"),h=require("./widget-toggle.cjs"),b=require("./modal.cjs");function x(r){const{baseSettings:s,searchSettings:t}=r;return e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:s,searchSettings:t},componentType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(m,{...r})})})}function o(r){const{children:s,onToggleView:t,isHidden:c,shouldAutoFocusInput:n=!t}=r;return e.jsx(d.EmbeddedSearch.Provider,{isHidden:c,shouldAutoFocusInput:n,children:s})}function m(r){return e.jsx(o,{...r,children:e.jsx(u,{...r})})}function u(r){const{searchSettings:{view:s}}=d.useInkeepConfig(),{onToggleView:t,shouldShowAskAICard:c=!!t&&s!=="dual-pane"}=r,n=d.useModal(),a=d.useWidget(),l=n&&!a?b.ModalContent:i.Fragment;return e.jsx(l,{children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-show-ask-ai-card":d.dataAttr(c),"data-composite":d.dataAttr(!!t||n?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(j,{...r}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(I,{askAICardLabel:r.askAICardLabel,askAILabel:r.askAILabel,onToggleView:r.onToggleView,shouldShowAskAICard:c}),e.jsx(E,{})]}),e.jsx(A,{})]})})})}function j(r){const{onToggleView:s,askAILabel:t,searchLabel:c}=r,n=d.useCommandState(a=>a.search);return e.jsxs(d.EmbeddedSearch.InputGroup,{children:[e.jsx(d.EmbeddedSearch.InputIcon,{}),e.jsx(d.EmbeddedSearch.Input,{}),e.jsx(d.EmbeddedSearch.Loading,{}),s&&e.jsx(h.WidgetToggle,{onToggleView:s,query:n,askAILabel:t,searchLabel:c,view:"search"}),e.jsx(d.Modal.Close,{})]})}function I(r){const{askAILabel:s,onToggleView:t,shouldShowAskAICard:c,askAICardLabel:n}=r,a=d.useCommandState(S=>S.search),{handleToggle:l}=h.useToggleView({onToggleView:t,query:a});return c?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>l("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[n||s||"Ask AI",a&&e.jsx(d.EmbeddedSearch.AskAITriggerQuery,{children:`${a}`})]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicatorText,{children:"Start conversation"}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function E(){return e.jsxs(d.EmbeddedSearch.Results,{children:[e.jsx(d.EmbeddedSearch.ResultsLoading,{}),e.jsx(d.EmbeddedSearch.ResultsTabList,{children:r=>r.map(s=>e.jsx(d.EmbeddedSearch.ResultsTab,{tab:s},s))}),e.jsx(d.EmbeddedSearch.ResultsEmpty,{}),e.jsxs(d.EmbeddedSearch.ResultsContent,{children:[e.jsx(g,{}),e.jsx(R,{})]})]})}function g(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(d.EmbeddedSearch.ResultsList,{children:r=>r.map(s=>e.jsxs(d.EmbeddedSearch.ResultsItem,{item:s,children:[e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbs,{children:t=>t.map((c,n)=>e.jsxs(i.Fragment,{children:[c,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},`${c}-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:t=>t.map((c,n)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:c},`part-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},s.id))})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function R(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsxs(d.EmbeddedSearch.ResultsItemPreview,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeader,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeading,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbs,{children:r=>r.map((s,t)=>e.jsxs(i.Fragment,{children:[s,e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbIcon,{})]},`${s}-${t}`))})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBody,{}),e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutline,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineList,{children:r=>r.map((s,t)=>e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutlineItem,{href:s.url??void 0,"data-is-match":d.dataAttr(s.isMatch),children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemText,{children:s.content}),s.url&&e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${s.anchor}-${t}`))})]})]})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function A(){return e.jsx(d.EmbeddedSearch.Footer,{children:e.jsxs(d.EmbeddedSearch.TaglineContainer,{children:[e.jsx(d.EmbeddedSearch.TaglineText,{}),e.jsx(d.EmbeddedSearch.TaglineLogo,{}),e.jsx(d.EmbeddedSearch.TaglineBrandName,{})]})})}exports.InkeepEmbeddedSearch=x;exports.InkeepEmbeddedSearchImpl=m;exports.InkeepEmbeddedSearchImplContent=u;exports.InkeepEmbeddedSearchProvider=o;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),i=require("react"),h=require("./widget-toggle.cjs"),b=require("./modal.cjs");function x(r){const{baseSettings:s,searchSettings:t}=r;return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{children:e.jsx(d.RootProvider,{config:{baseSettings:s,searchSettings:t},componentType:d.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(m,{...r})})})})}function o(r){const{children:s,onToggleView:t,isHidden:c,shouldAutoFocusInput:n=!t}=r;return e.jsx(d.EmbeddedSearch.Provider,{isHidden:c,shouldAutoFocusInput:n,children:s})}function m(r){return e.jsx(o,{...r,children:e.jsx(u,{...r})})}function u(r){const{searchSettings:{view:s}}=d.useInkeepConfig(),{onToggleView:t,shouldShowAskAICard:c=!!t&&s!=="dual-pane"}=r,n=d.useModal(),a=d.useWidget(),l=n&&!a?b.ModalContent:i.Fragment;return e.jsx(l,{children:e.jsx(d.EmbeddedSearch.Wrapper,{"data-show-ask-ai-card":d.dataAttr(c),"data-composite":d.dataAttr(!!t||n?.isOpen),children:e.jsxs(d.EmbeddedSearch.Root,{children:[e.jsx(j,{...r}),e.jsxs(d.EmbeddedSearch.Content,{children:[e.jsx(I,{askAICardLabel:r.askAICardLabel,askAILabel:r.askAILabel,onToggleView:r.onToggleView,shouldShowAskAICard:c}),e.jsx(E,{})]}),e.jsx(A,{})]})})})}function j(r){const{onToggleView:s,askAILabel:t,searchLabel:c}=r,n=d.useCommandState(a=>a.search);return e.jsxs(d.EmbeddedSearch.InputGroup,{children:[e.jsx(d.EmbeddedSearch.InputIcon,{}),e.jsx(d.EmbeddedSearch.Input,{}),e.jsx(d.EmbeddedSearch.Loading,{}),s&&e.jsx(h.WidgetToggle,{onToggleView:s,query:n,askAILabel:t,searchLabel:c,view:"search"}),e.jsx(d.Modal.Close,{})]})}function I(r){const{askAILabel:s,onToggleView:t,shouldShowAskAICard:c,askAICardLabel:n}=r,a=d.useCommandState(S=>S.search),{handleToggle:l}=h.useToggleView({onToggleView:t,query:a});return c?e.jsxs(d.EmbeddedSearch.AskAITrigger,{onSelect:()=>l("chat",!0),children:[e.jsx(d.EmbeddedSearch.AskAITriggerIcon,{}),e.jsxs(d.EmbeddedSearch.AskAITriggerLabel,{children:[n||s||"Ask AI",a&&e.jsx(d.EmbeddedSearch.AskAITriggerQuery,{children:`${a}`})]}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicatorText,{children:"Start conversation"}),e.jsx(d.EmbeddedSearch.AskAITriggerIndicator,{})]}):null}function E(){return e.jsxs(d.EmbeddedSearch.Results,{children:[e.jsx(d.EmbeddedSearch.ResultsLoading,{}),e.jsx(d.EmbeddedSearch.ResultsTabList,{children:r=>r.map(s=>e.jsx(d.EmbeddedSearch.ResultsTab,{tab:s},s))}),e.jsx(d.EmbeddedSearch.ResultsEmpty,{}),e.jsxs(d.EmbeddedSearch.ResultsContent,{children:[e.jsx(g,{}),e.jsx(R,{})]})]})}function g(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsx(d.EmbeddedSearch.ResultsList,{children:r=>r.map(s=>e.jsxs(d.EmbeddedSearch.ResultsItem,{item:s,children:[e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbs,{children:t=>t.map((c,n)=>e.jsxs(i.Fragment,{children:[c,e.jsx(d.EmbeddedSearch.ResultsItemBreadcrumbIcon,{})]},`${c}-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemTag,{}),e.jsx(d.EmbeddedSearch.ResultsItemDescription,{children:t=>t.map((c,n)=>e.jsx(d.EmbeddedSearch.ResultsItemDescriptionPart,{part:c},`part-${n}`))}),e.jsx(d.EmbeddedSearch.ResultsItemIndicator,{})]},s.id))})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function R(){return e.jsxs(d.EmbeddedSearch.ResultsScrollArea,{children:[e.jsx(d.EmbeddedSearch.ResultsScrollAreaViewport,{children:e.jsxs(d.EmbeddedSearch.ResultsItemPreview,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeader,{children:[e.jsxs(d.EmbeddedSearch.ResultsItemPreviewHeading,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbs,{children:r=>r.map((s,t)=>e.jsxs(i.Fragment,{children:[s,e.jsx(d.EmbeddedSearch.ResultsItemPreviewBreadcrumbIcon,{})]},`${s}-${t}`))})]}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewBody,{}),e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutline,{children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineTitle,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineList,{children:r=>r.map((s,t)=>e.jsxs(d.EmbeddedSearch.ResultsItemPreviewOutlineItem,{href:s.url??void 0,"data-is-match":d.dataAttr(s.isMatch),children:[e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemText,{children:s.content}),s.url&&e.jsx(d.EmbeddedSearch.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${s.anchor}-${t}`))})]})]})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaScrollbar,{children:e.jsx(d.EmbeddedSearch.ResultsScrollAreaThumb,{})}),e.jsx(d.EmbeddedSearch.ResultsScrollAreaCorner,{})]})}function A(){return e.jsx(d.EmbeddedSearch.Footer,{children:e.jsxs(d.EmbeddedSearch.TaglineContainer,{children:[e.jsx(d.EmbeddedSearch.TaglineText,{}),e.jsx(d.EmbeddedSearch.TaglineLogo,{}),e.jsx(d.EmbeddedSearch.TaglineBrandName,{})]})})}exports.InkeepEmbeddedSearch=x;exports.InkeepEmbeddedSearchImpl=m;exports.InkeepEmbeddedSearchImplContent=u;exports.InkeepEmbeddedSearchProvider=o;
@@ -1,66 +1,66 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as s } from "react/jsx-runtime";
3
- import { Shadow as m, RootProvider as g, WebWidgetInteractionType as R, EmbeddedSearch as e, useInkeepConfig as A, useModal as T, useWidget as p, dataAttr as a, useCommandState as I, Modal as w } from "@inkeep/cxkit-styled";
2
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
3
+ import { ErrorBoundary as m, Shadow as g, RootProvider as R, WebWidgetInteractionType as A, EmbeddedSearch as e, useInkeepConfig as T, useModal as p, useWidget as w, dataAttr as a, useCommandState as I, Modal as S } from "@inkeep/cxkit-styled";
4
4
  import { Fragment as u } from "react";
5
- import { WidgetToggle as S, useToggleView as k } from "./widget-toggle.js";
6
- import { ModalContent as v } from "./modal.js";
7
- function M(r) {
8
- const { baseSettings: n, searchSettings: l } = r;
9
- return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
10
- g,
5
+ import { WidgetToggle as k, useToggleView as v } from "./widget-toggle.js";
6
+ import { ModalContent as b } from "./modal.js";
7
+ function H(t) {
8
+ const { baseSettings: n, searchSettings: l } = t;
9
+ return /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
10
+ R,
11
11
  {
12
12
  config: {
13
13
  baseSettings: n,
14
14
  searchSettings: l
15
15
  },
16
- componentType: R.EmbeddedSearch,
17
- children: /* @__PURE__ */ t(P, { ...r })
16
+ componentType: A.EmbeddedSearch,
17
+ children: /* @__PURE__ */ r(f, { ...t })
18
18
  }
19
- ) });
19
+ ) }) });
20
20
  }
21
- function b(r) {
22
- const { children: n, onToggleView: l, isHidden: i, shouldAutoFocusInput: o = !l } = r;
23
- return /* @__PURE__ */ t(e.Provider, { isHidden: i, shouldAutoFocusInput: o, children: n });
21
+ function P(t) {
22
+ const { children: n, onToggleView: l, isHidden: i, shouldAutoFocusInput: o = !l } = t;
23
+ return /* @__PURE__ */ r(e.Provider, { isHidden: i, shouldAutoFocusInput: o, children: n });
24
24
  }
25
- function P(r) {
26
- return /* @__PURE__ */ t(b, { ...r, children: /* @__PURE__ */ t(f, { ...r }) });
25
+ function f(t) {
26
+ return /* @__PURE__ */ r(P, { ...t, children: /* @__PURE__ */ r(L, { ...t }) });
27
27
  }
28
- function f(r) {
28
+ function L(t) {
29
29
  const {
30
30
  searchSettings: { view: n }
31
- } = A(), { onToggleView: l, shouldShowAskAICard: i = !!l && n !== "dual-pane" } = r, o = T(), c = p();
32
- return /* @__PURE__ */ t(o && !c ? v : u, { children: /* @__PURE__ */ t(
31
+ } = T(), { onToggleView: l, shouldShowAskAICard: i = !!l && n !== "dual-pane" } = t, o = p(), c = w();
32
+ return /* @__PURE__ */ r(o && !c ? b : u, { children: /* @__PURE__ */ r(
33
33
  e.Wrapper,
34
34
  {
35
35
  "data-show-ask-ai-card": a(i),
36
36
  "data-composite": a(!!l || o?.isOpen),
37
37
  children: /* @__PURE__ */ s(e.Root, { children: [
38
- /* @__PURE__ */ t(L, { ...r }),
38
+ /* @__PURE__ */ r(C, { ...t }),
39
39
  /* @__PURE__ */ s(e.Content, { children: [
40
- /* @__PURE__ */ t(
41
- C,
40
+ /* @__PURE__ */ r(
41
+ V,
42
42
  {
43
- askAICardLabel: r.askAICardLabel,
44
- askAILabel: r.askAILabel,
45
- onToggleView: r.onToggleView,
43
+ askAICardLabel: t.askAICardLabel,
44
+ askAILabel: t.askAILabel,
45
+ onToggleView: t.onToggleView,
46
46
  shouldShowAskAICard: i
47
47
  }
48
48
  ),
49
- /* @__PURE__ */ t(V, {})
49
+ /* @__PURE__ */ r(y, {})
50
50
  ] }),
51
- /* @__PURE__ */ t(y, {})
51
+ /* @__PURE__ */ r($, {})
52
52
  ] })
53
53
  }
54
54
  ) });
55
55
  }
56
- function L(r) {
57
- const { onToggleView: n, askAILabel: l, searchLabel: i } = r, o = I((c) => c.search);
56
+ function C(t) {
57
+ const { onToggleView: n, askAILabel: l, searchLabel: i } = t, o = I((c) => c.search);
58
58
  return /* @__PURE__ */ s(e.InputGroup, { children: [
59
- /* @__PURE__ */ t(e.InputIcon, {}),
60
- /* @__PURE__ */ t(e.Input, {}),
61
- /* @__PURE__ */ t(e.Loading, {}),
62
- n && /* @__PURE__ */ t(
63
- S,
59
+ /* @__PURE__ */ r(e.InputIcon, {}),
60
+ /* @__PURE__ */ r(e.Input, {}),
61
+ /* @__PURE__ */ r(e.Loading, {}),
62
+ n && /* @__PURE__ */ r(
63
+ k,
64
64
  {
65
65
  onToggleView: n,
66
66
  query: o,
@@ -69,103 +69,103 @@ function L(r) {
69
69
  view: "search"
70
70
  }
71
71
  ),
72
- /* @__PURE__ */ t(w.Close, {})
72
+ /* @__PURE__ */ r(S.Close, {})
73
73
  ] });
74
74
  }
75
- function C(r) {
76
- const { askAILabel: n, onToggleView: l, shouldShowAskAICard: i, askAICardLabel: o } = r, c = I((h) => h.search), { handleToggle: d } = k({
75
+ function V(t) {
76
+ const { askAILabel: n, onToggleView: l, shouldShowAskAICard: i, askAICardLabel: o } = t, c = I((h) => h.search), { handleToggle: d } = v({
77
77
  onToggleView: l,
78
78
  query: c
79
79
  });
80
80
  return i ? /* @__PURE__ */ s(e.AskAITrigger, { onSelect: () => d("chat", !0), children: [
81
- /* @__PURE__ */ t(e.AskAITriggerIcon, {}),
81
+ /* @__PURE__ */ r(e.AskAITriggerIcon, {}),
82
82
  /* @__PURE__ */ s(e.AskAITriggerLabel, { children: [
83
83
  o || n || "Ask AI",
84
- c && /* @__PURE__ */ t(e.AskAITriggerQuery, { children: `${c}` })
84
+ c && /* @__PURE__ */ r(e.AskAITriggerQuery, { children: `${c}` })
85
85
  ] }),
86
- /* @__PURE__ */ t(e.AskAITriggerIndicatorText, { children: "Start conversation" }),
87
- /* @__PURE__ */ t(e.AskAITriggerIndicator, {})
86
+ /* @__PURE__ */ r(e.AskAITriggerIndicatorText, { children: "Start conversation" }),
87
+ /* @__PURE__ */ r(e.AskAITriggerIndicator, {})
88
88
  ] }) : null;
89
89
  }
90
- function V() {
90
+ function y() {
91
91
  return /* @__PURE__ */ s(e.Results, { children: [
92
- /* @__PURE__ */ t(e.ResultsLoading, {}),
93
- /* @__PURE__ */ t(e.ResultsTabList, { children: (r) => r.map((n) => /* @__PURE__ */ t(e.ResultsTab, { tab: n }, n)) }),
94
- /* @__PURE__ */ t(e.ResultsEmpty, {}),
92
+ /* @__PURE__ */ r(e.ResultsLoading, {}),
93
+ /* @__PURE__ */ r(e.ResultsTabList, { children: (t) => t.map((n) => /* @__PURE__ */ r(e.ResultsTab, { tab: n }, n)) }),
94
+ /* @__PURE__ */ r(e.ResultsEmpty, {}),
95
95
  /* @__PURE__ */ s(e.ResultsContent, { children: [
96
- /* @__PURE__ */ t(O, {}),
97
- /* @__PURE__ */ t($, {})
96
+ /* @__PURE__ */ r(E, {}),
97
+ /* @__PURE__ */ r(O, {})
98
98
  ] })
99
99
  ] });
100
100
  }
101
- function O() {
101
+ function E() {
102
102
  return /* @__PURE__ */ s(e.ResultsScrollArea, { children: [
103
- /* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ t(e.ResultsList, { children: (r) => r.map((n) => /* @__PURE__ */ s(e.ResultsItem, { item: n, children: [
104
- /* @__PURE__ */ t(e.ResultsItemBreadcrumbs, { children: (l) => l.map((i, o) => /* @__PURE__ */ s(u, { children: [
103
+ /* @__PURE__ */ r(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ r(e.ResultsList, { children: (t) => t.map((n) => /* @__PURE__ */ s(e.ResultsItem, { item: n, children: [
104
+ /* @__PURE__ */ r(e.ResultsItemBreadcrumbs, { children: (l) => l.map((i, o) => /* @__PURE__ */ s(u, { children: [
105
105
  i,
106
- /* @__PURE__ */ t(e.ResultsItemBreadcrumbIcon, {})
106
+ /* @__PURE__ */ r(e.ResultsItemBreadcrumbIcon, {})
107
107
  ] }, `${i}-${o}`)) }),
108
- /* @__PURE__ */ t(e.ResultsItemIcon, {}),
109
- /* @__PURE__ */ t(e.ResultsItemTitle, {}),
110
- /* @__PURE__ */ t(e.ResultsItemTag, {}),
111
- /* @__PURE__ */ t(e.ResultsItemDescription, { children: (l) => l.map((i, o) => /* @__PURE__ */ t(
108
+ /* @__PURE__ */ r(e.ResultsItemIcon, {}),
109
+ /* @__PURE__ */ r(e.ResultsItemTitle, {}),
110
+ /* @__PURE__ */ r(e.ResultsItemTag, {}),
111
+ /* @__PURE__ */ r(e.ResultsItemDescription, { children: (l) => l.map((i, o) => /* @__PURE__ */ r(
112
112
  e.ResultsItemDescriptionPart,
113
113
  {
114
114
  part: i
115
115
  },
116
116
  `part-${o}`
117
117
  )) }),
118
- /* @__PURE__ */ t(e.ResultsItemIndicator, {})
118
+ /* @__PURE__ */ r(e.ResultsItemIndicator, {})
119
119
  ] }, n.id)) }) }),
120
- /* @__PURE__ */ t(e.ResultsScrollAreaScrollbar, { children: /* @__PURE__ */ t(e.ResultsScrollAreaThumb, {}) }),
121
- /* @__PURE__ */ t(e.ResultsScrollAreaCorner, {})
120
+ /* @__PURE__ */ r(e.ResultsScrollAreaScrollbar, { children: /* @__PURE__ */ r(e.ResultsScrollAreaThumb, {}) }),
121
+ /* @__PURE__ */ r(e.ResultsScrollAreaCorner, {})
122
122
  ] });
123
123
  }
124
- function $() {
124
+ function O() {
125
125
  return /* @__PURE__ */ s(e.ResultsScrollArea, { children: [
126
- /* @__PURE__ */ t(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ s(e.ResultsItemPreview, { children: [
126
+ /* @__PURE__ */ r(e.ResultsScrollAreaViewport, { children: /* @__PURE__ */ s(e.ResultsItemPreview, { children: [
127
127
  /* @__PURE__ */ s(e.ResultsItemPreviewHeader, { children: [
128
128
  /* @__PURE__ */ s(e.ResultsItemPreviewHeading, { children: [
129
- /* @__PURE__ */ t(e.ResultsItemPreviewTitle, {}),
130
- /* @__PURE__ */ t(e.ResultsItemPreviewTitleLinkIcon, {})
129
+ /* @__PURE__ */ r(e.ResultsItemPreviewTitle, {}),
130
+ /* @__PURE__ */ r(e.ResultsItemPreviewTitleLinkIcon, {})
131
131
  ] }),
132
- /* @__PURE__ */ t(e.ResultsItemPreviewBreadcrumbs, { children: (r) => r.map((n, l) => /* @__PURE__ */ s(u, { children: [
132
+ /* @__PURE__ */ r(e.ResultsItemPreviewBreadcrumbs, { children: (t) => t.map((n, l) => /* @__PURE__ */ s(u, { children: [
133
133
  n,
134
- /* @__PURE__ */ t(e.ResultsItemPreviewBreadcrumbIcon, {})
134
+ /* @__PURE__ */ r(e.ResultsItemPreviewBreadcrumbIcon, {})
135
135
  ] }, `${n}-${l}`)) })
136
136
  ] }),
137
- /* @__PURE__ */ t(e.ResultsItemPreviewBody, {}),
137
+ /* @__PURE__ */ r(e.ResultsItemPreviewBody, {}),
138
138
  /* @__PURE__ */ s(e.ResultsItemPreviewOutline, { children: [
139
- /* @__PURE__ */ t(e.ResultsItemPreviewOutlineTitle, {}),
140
- /* @__PURE__ */ t(e.ResultsItemPreviewOutlineList, { children: (r) => r.map((n, l) => /* @__PURE__ */ s(
139
+ /* @__PURE__ */ r(e.ResultsItemPreviewOutlineTitle, {}),
140
+ /* @__PURE__ */ r(e.ResultsItemPreviewOutlineList, { children: (t) => t.map((n, l) => /* @__PURE__ */ s(
141
141
  e.ResultsItemPreviewOutlineItem,
142
142
  {
143
143
  href: n.url ?? void 0,
144
144
  "data-is-match": a(n.isMatch),
145
145
  children: [
146
- /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemIcon, {}),
147
- /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemText, { children: n.content }),
148
- n.url && /* @__PURE__ */ t(e.ResultsItemPreviewOutlineItemLinkIcon, {})
146
+ /* @__PURE__ */ r(e.ResultsItemPreviewOutlineItemIcon, {}),
147
+ /* @__PURE__ */ r(e.ResultsItemPreviewOutlineItemText, { children: n.content }),
148
+ n.url && /* @__PURE__ */ r(e.ResultsItemPreviewOutlineItemLinkIcon, {})
149
149
  ]
150
150
  },
151
151
  `${n.anchor}-${l}`
152
152
  )) })
153
153
  ] })
154
154
  ] }) }),
155
- /* @__PURE__ */ t(e.ResultsScrollAreaScrollbar, { children: /* @__PURE__ */ t(e.ResultsScrollAreaThumb, {}) }),
156
- /* @__PURE__ */ t(e.ResultsScrollAreaCorner, {})
155
+ /* @__PURE__ */ r(e.ResultsScrollAreaScrollbar, { children: /* @__PURE__ */ r(e.ResultsScrollAreaThumb, {}) }),
156
+ /* @__PURE__ */ r(e.ResultsScrollAreaCorner, {})
157
157
  ] });
158
158
  }
159
- function y() {
160
- return /* @__PURE__ */ t(e.Footer, { children: /* @__PURE__ */ s(e.TaglineContainer, { children: [
161
- /* @__PURE__ */ t(e.TaglineText, {}),
162
- /* @__PURE__ */ t(e.TaglineLogo, {}),
163
- /* @__PURE__ */ t(e.TaglineBrandName, {})
159
+ function $() {
160
+ return /* @__PURE__ */ r(e.Footer, { children: /* @__PURE__ */ s(e.TaglineContainer, { children: [
161
+ /* @__PURE__ */ r(e.TaglineText, {}),
162
+ /* @__PURE__ */ r(e.TaglineLogo, {}),
163
+ /* @__PURE__ */ r(e.TaglineBrandName, {})
164
164
  ] }) });
165
165
  }
166
166
  export {
167
- M as InkeepEmbeddedSearch,
168
- P as InkeepEmbeddedSearchImpl,
169
- f as InkeepEmbeddedSearchImplContent,
170
- b as InkeepEmbeddedSearchProvider
167
+ H as InkeepEmbeddedSearch,
168
+ f as InkeepEmbeddedSearchImpl,
169
+ L as InkeepEmbeddedSearchImplContent,
170
+ P as InkeepEmbeddedSearchProvider
171
171
  };
@@ -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},componentType:n.WebWidgetInteractionType.IntelligentForm,children:e.jsx(s,{...r})})})}function s(r){const{formSettings:t}=r;return e.jsx(n.IntelligentForm.Provider,{formSettings: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
+ "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.ErrorBoundary,{children: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{formSettings:t}=r;return e.jsx(n.IntelligentForm.Provider,{formSettings: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,57 +1,57 @@
1
1
  "use client";
2
2
  import { jsx as n, jsxs as t } from "react/jsx-runtime";
3
- import { Shadow as d, RootProvider as a, WebWidgetInteractionType as S, IntelligentForm as e, useIntelligentForm as l, LoadingIndicator as m } from "@inkeep/cxkit-styled";
4
- function b(o) {
3
+ import { ErrorBoundary as s, Shadow as a, RootProvider as S, WebWidgetInteractionType as m, IntelligentForm as e, useIntelligentForm as l, LoadingIndicator as h } from "@inkeep/cxkit-styled";
4
+ function T(o) {
5
5
  const { baseSettings: r } = o;
6
- return /* @__PURE__ */ n(
7
- d,
6
+ return /* @__PURE__ */ n(s, { children: /* @__PURE__ */ n(
7
+ a,
8
8
  {
9
9
  wrapperStyles: {
10
10
  height: "inherit",
11
11
  width: "inherit"
12
12
  },
13
13
  children: /* @__PURE__ */ n(
14
- a,
14
+ S,
15
15
  {
16
16
  config: {
17
17
  baseSettings: r
18
18
  },
19
- componentType: S.IntelligentForm,
20
- children: /* @__PURE__ */ n(h, { ...o })
19
+ componentType: m.IntelligentForm,
20
+ children: /* @__PURE__ */ n(p, { ...o })
21
21
  }
22
22
  )
23
23
  }
24
- );
24
+ ) });
25
25
  }
26
- function h(o) {
26
+ function p(o) {
27
27
  const { formSettings: r } = o;
28
28
  return /* @__PURE__ */ n(e.Provider, { formSettings: r, children: /* @__PURE__ */ t(e.Root, { children: [
29
29
  /* @__PURE__ */ n(e.Heading, {}),
30
30
  /* @__PURE__ */ n(e.Content, { children: /* @__PURE__ */ t(e.ContentScrollArea, { children: [
31
31
  /* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: [
32
- /* @__PURE__ */ n(p, {}),
33
32
  /* @__PURE__ */ n(f, {}),
34
33
  /* @__PURE__ */ n(g, {}),
35
34
  /* @__PURE__ */ n(F, {}),
36
- /* @__PURE__ */ n(I, {})
35
+ /* @__PURE__ */ n(I, {}),
36
+ /* @__PURE__ */ n(y, {})
37
37
  ] }),
38
38
  /* @__PURE__ */ n(e.ContentScrollAreaScrollbar, { children: /* @__PURE__ */ n(e.ContentScrollAreaThumb, {}) }),
39
39
  /* @__PURE__ */ n(e.ContentScrollAreaCorner, {})
40
40
  ] }) })
41
41
  ] }) });
42
42
  }
43
- function p() {
43
+ function f() {
44
44
  return /* @__PURE__ */ t(e.Success, { children: [
45
45
  /* @__PURE__ */ n(e.SuccessIcon, {}),
46
46
  /* @__PURE__ */ n(e.SuccessHeading, {}),
47
47
  /* @__PURE__ */ n(e.SuccessMessage, {})
48
48
  ] });
49
49
  }
50
- function f() {
50
+ function g() {
51
51
  const { isSubmitSuccessful: o } = l();
52
52
  return o ? null : /* @__PURE__ */ t(e.PrimaryForm, { children: [
53
53
  /* @__PURE__ */ n(e.PrimaryFormDescription, {}),
54
- /* @__PURE__ */ n(e.PrimaryFormFields, { children: (r) => r.map((i) => /* @__PURE__ */ n(s, { field: i }, i.name)) }),
54
+ /* @__PURE__ */ n(e.PrimaryFormFields, { children: (r) => r.map((i) => /* @__PURE__ */ n(d, { field: i }, i.name)) }),
55
55
  /* @__PURE__ */ n(e.PrimaryFormSubmit, {})
56
56
  ] });
57
57
  }
@@ -61,13 +61,13 @@ function u() {
61
61
  /* @__PURE__ */ n(e.BotHeadingName, {})
62
62
  ] });
63
63
  }
64
- function g() {
64
+ function F() {
65
65
  return /* @__PURE__ */ t(e.Loading, { children: [
66
66
  /* @__PURE__ */ n(u, {}),
67
- /* @__PURE__ */ n(m, {})
67
+ /* @__PURE__ */ n(h, {})
68
68
  ] });
69
69
  }
70
- function F() {
70
+ function I() {
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 F() {
85
85
  ] })
86
86
  ] });
87
87
  }
88
- function I() {
88
+ function y() {
89
89
  const { aiResponse: o } = l(), { isSubmitSuccessful: r } = l();
90
90
  return r ? null : /* @__PURE__ */ t(e.SecondaryForm, { children: [
91
91
  /* @__PURE__ */ n(u, {}),
@@ -97,12 +97,12 @@ function I() {
97
97
  ] }, c.url)) })
98
98
  ] }),
99
99
  /* @__PURE__ */ n(e.SecondaryFormDescription, {}),
100
- /* @__PURE__ */ n(e.SecondaryFormFields, { children: (i) => i.map((c) => /* @__PURE__ */ n(s, { field: c }, c.name)) }),
100
+ /* @__PURE__ */ n(e.SecondaryFormFields, { children: (i) => i.map((c) => /* @__PURE__ */ n(d, { field: c }, c.name)) }),
101
101
  /* @__PURE__ */ n(e.Error, {}),
102
102
  /* @__PURE__ */ n(e.SecondaryFormSubmit, {})
103
103
  ] });
104
104
  }
105
- function s(o) {
105
+ 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, {}),
@@ -125,6 +125,6 @@ function s(o) {
125
125
  ] }, r.name);
126
126
  }
127
127
  export {
128
- b as InkeepIntelligentForm,
129
- h as InkeepIntelligentFormImpl
128
+ T as InkeepIntelligentForm,
129
+ p as InkeepIntelligentFormImpl
130
130
  };
@@ -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 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
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function i(o){const{componentType:t,children:r,modalSettings:l,...d}=o;return e.jsx(n.ErrorBoundary,{children:e.jsx(n.Portal,{children:e.jsx(n.Shadow,{children:e.jsx(n.RootProvider,{config:{...d},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=i;exports.ModalContent=c;
@@ -1,23 +1,23 @@
1
1
  "use client";
2
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,
3
+ import { ErrorBoundary as d, Portal as l, Shadow as h, RootProvider as a, Modal as r } from "@inkeep/cxkit-styled";
4
+ function p(o) {
5
+ const { componentType: e, children: t, modalSettings: i, ...c } = o;
6
+ return /* @__PURE__ */ n(d, { children: /* @__PURE__ */ n(l, { children: /* @__PURE__ */ n(h, { children: /* @__PURE__ */ n(
7
+ a,
8
8
  {
9
9
  config: {
10
10
  ...c
11
11
  },
12
- componentType: r,
13
- children: /* @__PURE__ */ n(e.Root, { config: i, children: t })
12
+ componentType: e,
13
+ children: /* @__PURE__ */ n(r.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 }) });
17
+ function u(o) {
18
+ return /* @__PURE__ */ n(r.Overlay, { children: /* @__PURE__ */ n(r.Content, { children: o.children }) });
19
19
  }
20
20
  export {
21
- m as InkeepModal,
22
- p as ModalContent
21
+ p as InkeepModal,
22
+ u as ModalContent
23
23
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("./embedded-search-and-chat.cjs"),j=require("./embedded-search-and-chat.impl.cjs"),f=require("./embedded-search.cjs"),r=require("@inkeep/cxkit-styled"),C=require("./modal.cjs"),b=require("../utils.cjs"),g=require("@radix-ui/react-use-controllable-state");function y(a){const{modalSettings:t,defaultView:n="search",canToggleView:c=!0,...o}=a,h={...o,shouldShowAskAICard:c?a.shouldShowAskAICard:!1},{config:i,...d}=j.useWidgetImpl({...h,defaultView:n}),p=S=>{t?.isOpen===void 0&&(a.forceDefaultView&&!S&&d.setView(n),s(!!S))},[B=!1,s]=g.useControllableState({prop:t?.isOpen,defaultProp:!1,onChange:b.composeEventHandlers(t?.onOpenChange,p)}),l={shortcutKey:"k",...t,isOpen:B,onOpenChange:s},m=()=>c?e.jsx(x.InkeepEmbeddedSearchAndChatImpl,{...d}):e.jsx(f.InkeepEmbeddedSearchImpl,{...h});return e.jsxs(e.Fragment,{children:[e.jsx(r.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(r.RootProvider,{config:i,componentType:r.WebWidgetInteractionType.SearchBar,children:e.jsx(u,{onOpenChange:s,modalSettings:l})})}),e.jsx(C.InkeepModal,{...i,modalSettings:l,componentType:r.WebWidgetInteractionType.SearchBar,children:m()})]})}function u({onOpenChange:a,modalSettings:t}){const n=c=>{c.button!==2&&a(o=>!o)};return e.jsx(r.SearchBar.SearchBarContainer,{children:e.jsxs(r.SearchBar.SearchBarButton,{onClick:n,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=y;exports.SearchBarImpl=u;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("./embedded-search-and-chat.cjs"),j=require("./embedded-search-and-chat.impl.cjs"),f=require("./embedded-search.cjs"),r=require("@inkeep/cxkit-styled"),y=require("./modal.cjs"),C=require("../utils.cjs"),b=require("@radix-ui/react-use-controllable-state");function g(n){const{modalSettings:t,defaultView:a="search",canToggleView:c=!0,...o}=n,h={...o,shouldShowAskAICard:c?n.shouldShowAskAICard:!1},{config:d,...i}=j.useWidgetImpl({...h,defaultView:a}),p=S=>{t?.isOpen===void 0&&(n.forceDefaultView&&!S&&i.setView(a),s(!!S))},[B=!1,s]=b.useControllableState({prop:t?.isOpen,defaultProp:!1,onChange:C.composeEventHandlers(t?.onOpenChange,p)}),l={shortcutKey:"k",...t,isOpen:B,onOpenChange:s},m=()=>c?e.jsx(x.InkeepEmbeddedSearchAndChatImpl,{...i}):e.jsx(f.InkeepEmbeddedSearchImpl,{...h});return e.jsxs(e.Fragment,{children:[e.jsx(r.ErrorBoundary,{children:e.jsx(r.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(r.RootProvider,{config:d,componentType:r.WebWidgetInteractionType.SearchBar,children:e.jsx(u,{onOpenChange:s,modalSettings:l})})})}),e.jsx(y.InkeepModal,{...d,modalSettings:l,componentType:r.WebWidgetInteractionType.SearchBar,children:m()})]})}function u({onOpenChange:n,modalSettings:t}){const a=c=>{c.button!==2&&n(o=>!o)};return e.jsx(r.SearchBar.SearchBarContainer,{children:e.jsxs(r.SearchBar.SearchBarButton,{onClick:a,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=u;
@@ -1,42 +1,42 @@
1
1
  "use client";
2
2
  import { jsxs as c, Fragment as C, jsx as e } from "react/jsx-runtime";
3
3
  import { InkeepEmbeddedSearchAndChatImpl as g } from "./embedded-search-and-chat.js";
4
- import { useWidgetImpl as I } from "./embedded-search-and-chat.impl.js";
5
- import { InkeepEmbeddedSearchImpl as y } from "./embedded-search.js";
6
- import { Shadow as k, RootProvider as K, WebWidgetInteractionType as u, SearchBar as r } from "@inkeep/cxkit-styled";
7
- import { InkeepModal as b } from "./modal.js";
8
- import { composeEventHandlers as w } from "../utils.js";
9
- import { useControllableState as A } from "@radix-ui/react-use-controllable-state";
10
- function M(n) {
4
+ import { useWidgetImpl as y } from "./embedded-search-and-chat.impl.js";
5
+ import { InkeepEmbeddedSearchImpl as I } from "./embedded-search.js";
6
+ import { ErrorBoundary as k, Shadow as K, RootProvider as b, WebWidgetInteractionType as u, SearchBar as r } from "@inkeep/cxkit-styled";
7
+ import { InkeepModal as w } from "./modal.js";
8
+ import { composeEventHandlers as A } from "../utils.js";
9
+ import { useControllableState as O } from "@radix-ui/react-use-controllable-state";
10
+ function D(n) {
11
11
  const {
12
12
  modalSettings: t,
13
13
  defaultView: o = "search",
14
14
  canToggleView: a = !0,
15
15
  ...i
16
- } = n, s = {
16
+ } = n, d = {
17
17
  ...i,
18
18
  shouldShowAskAICard: a ? n.shouldShowAskAICard : !1
19
- }, { config: d, ...l } = I({
20
- ...s,
19
+ }, { config: s, ...l } = y({
20
+ ...d,
21
21
  defaultView: o
22
22
  }), f = (m) => {
23
23
  t?.isOpen === void 0 && (n.forceDefaultView && !m && l.setView(o), h(!!m));
24
- }, [S = !1, h] = A({
24
+ }, [S = !1, h] = O({
25
25
  prop: t?.isOpen,
26
26
  defaultProp: !1,
27
- onChange: w(t?.onOpenChange, f)
27
+ onChange: A(t?.onOpenChange, f)
28
28
  }), p = {
29
29
  shortcutKey: "k",
30
30
  ...t,
31
31
  isOpen: S,
32
32
  onOpenChange: h
33
- }, B = () => a ? /* @__PURE__ */ e(g, { ...l }) : /* @__PURE__ */ e(y, { ...s });
33
+ }, B = () => a ? /* @__PURE__ */ e(g, { ...l }) : /* @__PURE__ */ e(I, { ...d });
34
34
  return /* @__PURE__ */ c(C, { children: [
35
- /* @__PURE__ */ e(k, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(K, { config: d, componentType: u.SearchBar, children: /* @__PURE__ */ e(O, { onOpenChange: h, modalSettings: p }) }) }),
35
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(K, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(b, { config: s, componentType: u.SearchBar, children: /* @__PURE__ */ e(T, { onOpenChange: h, modalSettings: p }) }) }) }),
36
36
  /* @__PURE__ */ e(
37
- b,
37
+ w,
38
38
  {
39
- ...d,
39
+ ...s,
40
40
  modalSettings: p,
41
41
  componentType: u.SearchBar,
42
42
  children: B()
@@ -44,7 +44,7 @@ function M(n) {
44
44
  )
45
45
  ] });
46
46
  }
47
- function O({ onOpenChange: n, modalSettings: t }) {
47
+ function T({ onOpenChange: n, modalSettings: t }) {
48
48
  const o = (a) => {
49
49
  a.button !== 2 && n((i) => !i);
50
50
  };
@@ -60,6 +60,6 @@ function O({ onOpenChange: n, modalSettings: t }) {
60
60
  ] }) });
61
61
  }
62
62
  export {
63
- M as InkeepSearchBar,
64
- O as SearchBarImpl
63
+ D as InkeepSearchBar,
64
+ T as SearchBarImpl
65
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.77",
3
+ "version": "0.5.79",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@radix-ui/react-use-controllable-state": "^1.1.0",
24
24
  "lucide-react": "^0.503.0",
25
- "@inkeep/cxkit-styled": "0.5.77"
25
+ "@inkeep/cxkit-styled": "0.5.79"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@biomejs/biome": "1.9.4",
@@ -44,8 +44,8 @@
44
44
  "typescript": "5.7.3",
45
45
  "vite": "5.4.11",
46
46
  "vite-plugin-dts": "4.4.0",
47
- "@inkeep/cxkit-color-mode": "0.5.77",
48
- "@inkeep/cxkit-types": "0.5.77"
47
+ "@inkeep/cxkit-color-mode": "0.5.79",
48
+ "@inkeep/cxkit-types": "0.5.79"
49
49
  },
50
50
  "module": "dist/index.js",
51
51
  "types": "dist/index.d.ts",