@inkeep/agents-ui 0.15.27 → 0.15.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +1 -1
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +185 -175
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.d.ts +2 -3
- package/dist/primitives/components/embedded-chat.js +667 -672
- package/dist/primitives/components/embedded-search.cjs +1 -1
- package/dist/primitives/components/embedded-search.d.ts +3 -4
- package/dist/primitives/components/embedded-search.js +290 -294
- package/dist/primitives/components/tagline-logo-icon.cjs +1 -1
- package/dist/primitives/components/tagline-logo-icon.js +11 -21
- package/dist/primitives/hooks/use-initial-conversation.cjs +1 -0
- package/dist/primitives/hooks/use-initial-conversation.d.ts +16 -0
- package/dist/primitives/hooks/use-initial-conversation.js +31 -0
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.d.ts +0 -4
- package/dist/primitives/utils/component-ids.js +1 -3
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +133 -134
- package/dist/react/embedded-search.cjs +1 -1
- package/dist/react/embedded-search.js +63 -64
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.d.ts +1 -2
- package/dist/styled/components/embedded-chat.js +372 -386
- package/dist/styled/components/embedded-search.cjs +1 -1
- package/dist/styled/components/embedded-search.d.ts +1 -2
- package/dist/styled/components/embedded-search.js +119 -133
- package/dist/styled/inkeep.css.cjs +3 -3
- package/dist/styled/inkeep.css.js +3 -3
- package/dist/types/config/ai.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as d, Fragment as u } from "react/jsx-runtime";
|
|
3
3
|
import x, { Fragment as k } from "react";
|
|
4
|
-
import { Provider as R, Wrapper as O, Root as j, Header as G, HeaderToolbar as U, HeaderToolbarWrapper as K, ChatHistoryTrigger as Z, Content as z, ContentScrollArea as J, ContentScrollAreaViewport as X, MessagesSessionLoading as Y, ContentScrollAreaScrollbar as q, ContentScrollAreaThumb as ee, ContentScrollAreaCorner as de, Footer as te, FeedbackModal as ae, FeedbackModalOverlay as oe, FeedbackModalContent as re, FeedbackModalHeader as ne, FeedbackModalClose as ie, FeedbackModalBody as me, FeedbackForm as se, FeedbackItem as b, FeedbackItemCheckbox as C, FeedbackItemCheckboxIndicator as F, FeedbackItemLabel as E, FeedbackItemDescription as g, FeedbackSubmitButton as ce, FormWrapper as le, FormClose as he, Form as be, FormHeader as Ce, FormHeading as Fe, FormDescription as Ee, FormContent as ue, FormField as pe, FormFieldLabel as ge, FormFieldText as Ie, FormFieldEmail as Me, FormFieldFile as Se, FormFieldTextArea as Te, FormFieldCheckbox as xe, FormFieldCheckboxIndicator as Ae, FormFieldSelect as He, FormFieldSelectTrigger as ke, FormFieldSelectValue as ye, FormFieldSelectIcon as fe, FormFieldSelectContent as we, FormFieldSelectViewport as ve, FormFieldSelectItem as Le, FormFieldSelectItemText as
|
|
5
|
-
import { EmbeddedChatHistoryRoot as
|
|
4
|
+
import { Provider as R, Wrapper as O, Root as j, Header as G, HeaderToolbar as U, HeaderToolbarWrapper as K, ChatHistoryTrigger as Z, Content as z, ContentScrollArea as J, ContentScrollAreaViewport as X, MessagesSessionLoading as Y, ContentScrollAreaScrollbar as q, ContentScrollAreaThumb as ee, ContentScrollAreaCorner as de, Footer as te, FeedbackModal as ae, FeedbackModalOverlay as oe, FeedbackModalContent as re, FeedbackModalHeader as ne, FeedbackModalClose as ie, FeedbackModalBody as me, FeedbackForm as se, FeedbackItem as b, FeedbackItemCheckbox as C, FeedbackItemCheckboxIndicator as F, FeedbackItemLabel as E, FeedbackItemDescription as g, FeedbackSubmitButton as ce, FormWrapper as le, FormClose as he, Form as be, FormHeader as Ce, FormHeading as Fe, FormDescription as Ee, FormContent as ue, FormField as pe, FormFieldLabel as ge, FormFieldText as Ie, FormFieldEmail as Me, FormFieldFile as Se, FormFieldTextArea as Te, FormFieldCheckbox as xe, FormFieldCheckboxIndicator as Ae, FormFieldSelect as He, FormFieldSelectTrigger as ke, FormFieldSelectValue as ye, FormFieldSelectIcon as fe, FormFieldSelectContent as we, FormFieldSelectViewport as ve, FormFieldSelectItem as Le, FormFieldSelectItemText as De, FormFieldSelectItemIndicator as Be, FormFieldCombobox as Pe, FormFieldComboboxControl as We, FormFieldComboboxSelectedTags as _e, FormFieldComboboxInput as Ve, FormFieldComboboxTrigger as Ne, FormFieldComboboxPositioner as Qe, FormFieldComboboxContent as $e, FormFieldComboboxList as Re, FormFieldComboboxListItems as Oe, FormFieldComboboxListEmpty as je, FormFieldComboboxItem as Ge, FormFieldComboboxItemText as Ue, FormFieldComboboxItemIndicator as Ke, FormFieldDescription as Ze, FormFieldError as ze, FormError as Je, FormFooter as Xe, FormCancel as Ye, FormSubmit as qe, FormSuccess as ed, FormSuccessHeading as dd, FormSuccessMessage as td, FormSuccessButton as ad, Messages as od, MessageWrapper as A, MessageContentWrapper as y, MessageContent as f, DynamicComponent as rd, MessageLoading as nd, InputFieldset as id, InputGroup as md, Input as sd, SendButton as cd, SendButtonIcon as ld, ActionBar as hd, TaglineContainer as bd, TaglineText as Cd, TaglineLogo as Fd, Actions as Ed, HelpActions as ud, HelpAction as pd, HelpActionsTrigger as gd, HelpActionsMenu as Id, HelpActionsMenuArrow as Md, HelpActionsMenuItem as Sd, HelpActionsMenuItemIcon as Td, ChatAction as I, ChatActionLabel as xd, ChatActionFeedback as Ad, IntroMessageWrapper as Hd, MessageHeader as w, MessageAvatar as v, MessageAvatarContent as L, MessageAvatarImage as D, MessageName as B, Disclaimer as kd, DisclaimerLabel as yd, DisclaimerTrigger as fd, DisclaimerContent as wd, DisclaimerText as vd, DisclaimerArrow as Ld, ExampleQuestions as Dd, ExampleQuestionsLabel as Bd, ExampleQuestionsList as Pd, ExampleQuestion as Wd, ExampleQuestionButton as _d, Markdown as Vd, MessageSources as Nd, MessageSourcesHeader as Qd, MessageSourcesList as $d, MessageSourceItem as Rd, MessageSourceItemBreadcrumbs as Od, MessageSourceItemBreadcrumbIcon as jd, MessageSourceItemIcon as Gd, MessageSourceItemTitle as Ud, MessageSourceItemTag as Kd, MessageSourceItemDescription as Zd, MessageSourceItemDescriptionPart as zd, MessageSourceItemIndicator as Jd, MessageToolbar as Xd, MessageCustomActions as Yd, MessageCustomAction as qd, MessageAction as M } from "../styled/components/embedded-chat.js";
|
|
5
|
+
import { EmbeddedChatHistoryRoot as et, EmbeddedChatHistoryHeader as dt, EmbeddedChatHistoryBackButton as tt, EmbeddedChatHistoryBackButtonIcon as at, EmbeddedChatHistoryTitle as ot, EmbeddedChatHistoryList as rt, EmbeddedChatHistoryItem as nt, EmbeddedChatHistoryItemTitle as it, EmbeddedChatHistoryItemDate as mt, formatSessionDate as st, EmbeddedChatHistoryEmptyState as ct, EmbeddedChatHistoryLoadingState as lt, EmbeddedChatHistoryFooter as ht, EmbeddedChatHistoryNewConversationButton as bt } from "../styled/components/chat-history.js";
|
|
6
6
|
import { Close as S } from "../styled/components/modal.js";
|
|
7
|
-
import { Shadow as
|
|
7
|
+
import { Shadow as Ct } from "../styled/components/shadow.js";
|
|
8
8
|
import { EmbeddedChatMessagePart as P } from "../styled/components/message.js";
|
|
9
|
-
import { useChatHistory as
|
|
10
|
-
import { WebWidgetInteractionType as
|
|
11
|
-
import { RootProvider as
|
|
12
|
-
import { useWidget as
|
|
13
|
-
import { useChat as
|
|
14
|
-
import { useModal as
|
|
9
|
+
import { useChatHistory as Ft } from "../primitives/providers/chat-history-provider.js";
|
|
10
|
+
import { WebWidgetInteractionType as Et, useInkeepConfig as W } from "../primitives/providers/config-provider.js";
|
|
11
|
+
import { RootProvider as ut } from "../primitives/providers/root-provider.js";
|
|
12
|
+
import { useWidget as pt } from "../primitives/providers/widget-provider.js";
|
|
13
|
+
import { useChat as _ } from "../primitives/components/embedded-chat/chat-provider.js";
|
|
14
|
+
import { useModal as gt } from "../primitives/components/modal/modal-provider.js";
|
|
15
15
|
import { dataAttr as p } from "../primitives/utils/misc.js";
|
|
16
|
-
import { PortalWithTheme as
|
|
17
|
-
import { ErrorBoundary as
|
|
18
|
-
import { ModalContent as
|
|
19
|
-
import { ImagePreviewProvider as
|
|
20
|
-
import { WidgetToggle as
|
|
21
|
-
import { isImageMimeType as
|
|
22
|
-
import { EmbeddedChatInputNotification as
|
|
23
|
-
import { EmbeddedChatImagePreviewModal as
|
|
24
|
-
function
|
|
16
|
+
import { PortalWithTheme as V } from "../primitives/atoms/portal-with-theme.js";
|
|
17
|
+
import { ErrorBoundary as It } from "../primitives/atoms/error-boundary.js";
|
|
18
|
+
import { ModalContent as Mt } from "./modal.js";
|
|
19
|
+
import { ImagePreviewProvider as St } from "../primitives/providers/image-preview-provider.js";
|
|
20
|
+
import { WidgetToggle as Tt } from "./widget-toggle.js";
|
|
21
|
+
import { isImageMimeType as N } from "../primitives/components/embedded-chat/file-upload-input.js";
|
|
22
|
+
import { EmbeddedChatInputNotification as xt, EmbeddedChatInputNotificationContent as At, EmbeddedChatInputNotificationHeader as Ht, EmbeddedChatInputNotificationTitle as kt, EmbeddedChatInputNotificationClose as yt, EmbeddedChatInputNotificationMessage as ft, EmbeddedChatFileInput as wt, EmbeddedChatDropZone as vt, EmbeddedChatFileList as Lt, EmbeddedChatFileItem as Dt, EmbeddedChatFilePreviewTrigger as Bt, EmbeddedChatFileThumbnail as Q, EmbeddedChatFileName as T, EmbeddedChatFileContent as Pt, EmbeddedChatFileTypeIcon as $, EmbeddedChatFileRemove as Wt, EmbeddedChatFileUploadButton as _t, EmbeddedChatMessageFiles as Vt, EmbeddedChatMessageFile as Nt } from "../styled/components/embedded-chat/file-upload-input.js";
|
|
23
|
+
import { EmbeddedChatImagePreviewModal as Qt, EmbeddedChatImagePreviewModalOverlay as $t, EmbeddedChatImagePreviewModalContent as Rt, EmbeddedChatImagePreviewModalClose as Ot, EmbeddedChatImagePreviewModalImage as jt, EmbeddedChatImagePreviewModalFooter as Gt, EmbeddedChatImagePreviewModalFileName as Ut } from "../styled/components/embedded-chat/image-preview-modal.js";
|
|
24
|
+
function La(a) {
|
|
25
25
|
const { baseSettings: t, aiChatSettings: o } = a;
|
|
26
|
-
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
26
|
+
return /* @__PURE__ */ e(It, { children: /* @__PURE__ */ e(
|
|
27
|
+
Ct,
|
|
28
28
|
{
|
|
29
29
|
wrapperStyles: {
|
|
30
30
|
height: "inherit",
|
|
31
31
|
width: "inherit"
|
|
32
32
|
},
|
|
33
33
|
children: /* @__PURE__ */ e(
|
|
34
|
-
|
|
34
|
+
ut,
|
|
35
35
|
{
|
|
36
36
|
config: {
|
|
37
37
|
baseSettings: t,
|
|
38
38
|
aiChatSettings: o
|
|
39
39
|
},
|
|
40
|
-
componentType:
|
|
41
|
-
children: /* @__PURE__ */ e(
|
|
40
|
+
componentType: Et.EmbeddedChat,
|
|
41
|
+
children: /* @__PURE__ */ e(Zt, { ...a })
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
}
|
|
45
45
|
) });
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Kt(a) {
|
|
48
48
|
const { children: t, onToggleView: o, isHidden: r, shouldAutoFocusInput: n = !o } = a;
|
|
49
49
|
return /* @__PURE__ */ e(R, { isHidden: r, shouldAutoFocusInput: n, children: t });
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return /* @__PURE__ */ e(
|
|
51
|
+
function Zt(a) {
|
|
52
|
+
return /* @__PURE__ */ e(Kt, { ...a, children: /* @__PURE__ */ e(zt, { ...a }) });
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const { onToggleView: t, variant: o, header: r =
|
|
56
|
-
return /* @__PURE__ */ e(
|
|
54
|
+
function zt(a) {
|
|
55
|
+
const { onToggleView: t, variant: o, header: r = Jt } = a, n = gt(), m = pt();
|
|
56
|
+
return /* @__PURE__ */ e(St, { children: /* @__PURE__ */ e(n && !m ? Mt : k, { children: /* @__PURE__ */ d(
|
|
57
57
|
O,
|
|
58
58
|
{
|
|
59
59
|
variant: o ?? (t ? "no-shadow" : "container-with-shadow"),
|
|
60
60
|
"data-composite": p(!!a.onToggleView || n?.isOpen),
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ e(ia, {}),
|
|
63
63
|
/* @__PURE__ */ d(j, { children: [
|
|
64
64
|
r && /* @__PURE__ */ e(r, { ...a }),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(Xt, {}),
|
|
66
|
+
/* @__PURE__ */ e(oa, {})
|
|
67
67
|
] }),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(ma, {}),
|
|
69
|
+
/* @__PURE__ */ e(ea, {}),
|
|
70
|
+
/* @__PURE__ */ e(sa, {})
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
) }) });
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const Jt = (a) => {
|
|
76
76
|
const { onToggleView: t, askAILabel: o, searchLabel: r } = a, { aiChatSettings: n } = W(), m = n.isChatHistoryButtonVisible, s = !!t || m;
|
|
77
77
|
return /* @__PURE__ */ e(G, { "data-show-toolbar": p(s), children: s ? /* @__PURE__ */ d(U, { "data-show-widget-toggle": p(!!t), children: [
|
|
78
78
|
/* @__PURE__ */ e(K, { children: m && /* @__PURE__ */ e(Z, {}) }),
|
|
79
79
|
t && /* @__PURE__ */ e(
|
|
80
|
-
|
|
80
|
+
Tt,
|
|
81
81
|
{
|
|
82
82
|
onToggleView: t,
|
|
83
83
|
askAILabel: o,
|
|
@@ -88,15 +88,15 @@ const Xt = (a) => {
|
|
|
88
88
|
/* @__PURE__ */ e(S, {})
|
|
89
89
|
] }) : /* @__PURE__ */ e(S, {}) });
|
|
90
90
|
};
|
|
91
|
-
function
|
|
92
|
-
const { isSessionLoading: a } =
|
|
91
|
+
function Xt() {
|
|
92
|
+
const { isSessionLoading: a } = _();
|
|
93
93
|
return /* @__PURE__ */ e(z, { children: /* @__PURE__ */ d(J, { children: [
|
|
94
|
-
/* @__PURE__ */ e(X, { children: a ? /* @__PURE__ */ e(Y, {}) : /* @__PURE__ */ e(
|
|
94
|
+
/* @__PURE__ */ e(X, { children: a ? /* @__PURE__ */ e(Y, {}) : /* @__PURE__ */ e(Yt, {}) }),
|
|
95
95
|
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(ee, {}) }),
|
|
96
96
|
/* @__PURE__ */ e(de, {})
|
|
97
97
|
] }) });
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Yt() {
|
|
100
100
|
const {
|
|
101
101
|
aiChatSettings: { components: a }
|
|
102
102
|
} = W();
|
|
@@ -115,7 +115,7 @@ function qt() {
|
|
|
115
115
|
}
|
|
116
116
|
}, s = (i) => /* @__PURE__ */ e(Vd, { text: i });
|
|
117
117
|
return /* @__PURE__ */ d(u, { children: [
|
|
118
|
-
/* @__PURE__ */ e(
|
|
118
|
+
/* @__PURE__ */ e(qt, {}),
|
|
119
119
|
t.map((i) => {
|
|
120
120
|
const c = n?.id === i.id;
|
|
121
121
|
return /* @__PURE__ */ d(A, { message: i, children: [
|
|
@@ -130,10 +130,10 @@ function qt() {
|
|
|
130
130
|
}
|
|
131
131
|
) : /* @__PURE__ */ d(u, { children: [
|
|
132
132
|
/* @__PURE__ */ e(P, { isLast: c }),
|
|
133
|
-
(!r || !c) && /* @__PURE__ */ e(
|
|
133
|
+
(!r || !c) && /* @__PURE__ */ e(aa, {})
|
|
134
134
|
] }) }),
|
|
135
|
-
/* @__PURE__ */ e(
|
|
136
|
-
/* @__PURE__ */ e(
|
|
135
|
+
/* @__PURE__ */ e(da, {}),
|
|
136
|
+
/* @__PURE__ */ e(ta, {})
|
|
137
137
|
] })
|
|
138
138
|
] }, i.id);
|
|
139
139
|
}),
|
|
@@ -154,26 +154,26 @@ function qt() {
|
|
|
154
154
|
] });
|
|
155
155
|
} });
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return /* @__PURE__ */ d(
|
|
157
|
+
function qt() {
|
|
158
|
+
return /* @__PURE__ */ d(Hd, { children: [
|
|
159
159
|
/* @__PURE__ */ d(w, { children: [
|
|
160
|
-
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
|
|
161
|
-
/* @__PURE__ */ e(
|
|
160
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(D, {}) }) }),
|
|
161
|
+
/* @__PURE__ */ e(B, {})
|
|
162
162
|
] }),
|
|
163
163
|
/* @__PURE__ */ d(y, { children: [
|
|
164
164
|
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(P, { isLast: !1 }) }),
|
|
165
|
-
/* @__PURE__ */ d(
|
|
165
|
+
/* @__PURE__ */ d(kd, { children: [
|
|
166
|
+
/* @__PURE__ */ e(yd, {}),
|
|
166
167
|
/* @__PURE__ */ e(fd, {}),
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
|
|
169
|
-
/* @__PURE__ */ e(Ld, {})
|
|
170
|
-
/* @__PURE__ */ e(Bd, {})
|
|
168
|
+
/* @__PURE__ */ d(wd, { children: [
|
|
169
|
+
/* @__PURE__ */ e(vd, {}),
|
|
170
|
+
/* @__PURE__ */ e(Ld, {})
|
|
171
171
|
] })
|
|
172
172
|
] }),
|
|
173
173
|
/* @__PURE__ */ d(Dd, { children: [
|
|
174
|
-
/* @__PURE__ */ e(
|
|
175
|
-
/* @__PURE__ */ e(
|
|
176
|
-
|
|
174
|
+
/* @__PURE__ */ e(Bd, {}),
|
|
175
|
+
/* @__PURE__ */ e(Pd, { children: (a) => a.map((t) => /* @__PURE__ */ e(
|
|
176
|
+
Wd,
|
|
177
177
|
{
|
|
178
178
|
children: /* @__PURE__ */ e(_d, { question: t })
|
|
179
179
|
},
|
|
@@ -185,84 +185,84 @@ function ea() {
|
|
|
185
185
|
}
|
|
186
186
|
function H() {
|
|
187
187
|
return /* @__PURE__ */ d(w, { children: [
|
|
188
|
-
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
|
|
189
|
-
/* @__PURE__ */ e(
|
|
188
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(D, {}) }) }),
|
|
189
|
+
/* @__PURE__ */ e(B, {})
|
|
190
190
|
] });
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
return /* @__PURE__ */ e(
|
|
192
|
+
function ea() {
|
|
193
|
+
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(Qt, { children: /* @__PURE__ */ e($t, { children: /* @__PURE__ */ d(Rt, { children: [
|
|
194
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
194
195
|
/* @__PURE__ */ e(jt, {}),
|
|
195
|
-
/* @__PURE__ */ e(Gt, {})
|
|
196
|
-
/* @__PURE__ */ e(Ut, { children: /* @__PURE__ */ e(Kt, {}) })
|
|
196
|
+
/* @__PURE__ */ e(Gt, { children: /* @__PURE__ */ e(Ut, {}) })
|
|
197
197
|
] }) }) }) });
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function da() {
|
|
200
200
|
return /* @__PURE__ */ e(Vt, { children: (a) => a.map((t, o) => {
|
|
201
|
-
const r = t.url, n = t.mediaType ?? "", m = n.split("/").pop(), s = t.filename ?? (m ? `untitled.${m}` : "untitled"), i =
|
|
202
|
-
return /* @__PURE__ */ d(
|
|
201
|
+
const r = t.url, n = t.mediaType ?? "", m = n.split("/").pop(), s = t.filename ?? (m ? `untitled.${m}` : "untitled"), i = N(n);
|
|
202
|
+
return /* @__PURE__ */ d(Nt, { url: r, name: s, mediaType: n, children: [
|
|
203
203
|
i ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ e($, {}),
|
|
204
204
|
/* @__PURE__ */ e(T, {})
|
|
205
205
|
] }, r || o);
|
|
206
206
|
}) });
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return /* @__PURE__ */ d(
|
|
210
|
-
/* @__PURE__ */ e(
|
|
208
|
+
function ta() {
|
|
209
|
+
return /* @__PURE__ */ d(Xd, { children: [
|
|
210
|
+
/* @__PURE__ */ e(Yd, { children: (a) => a.map((t, o) => /* @__PURE__ */ e(qd, { action: t }, `action-${o}`)) }),
|
|
211
211
|
/* @__PURE__ */ e(M, { action: "copy" }),
|
|
212
212
|
/* @__PURE__ */ e(M, { action: "upvote" }),
|
|
213
213
|
/* @__PURE__ */ e(M, { action: "downvote" })
|
|
214
214
|
] });
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
return /* @__PURE__ */ d(
|
|
218
|
-
/* @__PURE__ */ e(
|
|
219
|
-
/* @__PURE__ */ e(
|
|
220
|
-
/* @__PURE__ */ e(
|
|
216
|
+
function aa() {
|
|
217
|
+
return /* @__PURE__ */ d(Nd, { children: [
|
|
218
|
+
/* @__PURE__ */ e(Qd, {}),
|
|
219
|
+
/* @__PURE__ */ e($d, { children: (a) => a.map((t, o) => /* @__PURE__ */ d(Rd, { href: t.url, source: t, children: [
|
|
220
|
+
/* @__PURE__ */ e(Od, { children: t.breadcrumbs?.map((r) => /* @__PURE__ */ d(k, { children: [
|
|
221
221
|
r,
|
|
222
|
-
/* @__PURE__ */ e(
|
|
222
|
+
/* @__PURE__ */ e(jd, {})
|
|
223
223
|
] }, r)) }),
|
|
224
|
+
/* @__PURE__ */ e(Gd, {}),
|
|
224
225
|
/* @__PURE__ */ e(Ud, {}),
|
|
225
226
|
/* @__PURE__ */ e(Kd, {}),
|
|
226
|
-
/* @__PURE__ */ e(Zd, {
|
|
227
|
-
|
|
228
|
-
Jd,
|
|
227
|
+
/* @__PURE__ */ e(Zd, { children: (r) => r.map((n, m) => /* @__PURE__ */ e(
|
|
228
|
+
zd,
|
|
229
229
|
{
|
|
230
230
|
part: n
|
|
231
231
|
},
|
|
232
232
|
`part-${m}`
|
|
233
233
|
)) }),
|
|
234
|
-
/* @__PURE__ */ e(
|
|
234
|
+
/* @__PURE__ */ e(Jd, {})
|
|
235
235
|
] }, o)) })
|
|
236
236
|
] });
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function oa() {
|
|
239
239
|
return /* @__PURE__ */ d(te, { children: [
|
|
240
|
-
/* @__PURE__ */ e(
|
|
241
|
-
/* @__PURE__ */ d(
|
|
242
|
-
/* @__PURE__ */ e(
|
|
243
|
-
/* @__PURE__ */ e(
|
|
240
|
+
/* @__PURE__ */ e(xt, { children: /* @__PURE__ */ d(At, { children: [
|
|
241
|
+
/* @__PURE__ */ d(Ht, { children: [
|
|
242
|
+
/* @__PURE__ */ e(kt, {}),
|
|
243
|
+
/* @__PURE__ */ e(yt, {})
|
|
244
244
|
] }),
|
|
245
|
-
/* @__PURE__ */ e(
|
|
245
|
+
/* @__PURE__ */ e(ft, {})
|
|
246
246
|
] }) }),
|
|
247
|
-
/* @__PURE__ */ e(
|
|
248
|
-
/* @__PURE__ */ e(
|
|
247
|
+
/* @__PURE__ */ e(ra, {}),
|
|
248
|
+
/* @__PURE__ */ e(na, {})
|
|
249
249
|
] });
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function ra() {
|
|
252
252
|
return /* @__PURE__ */ d(id, { children: [
|
|
253
|
-
/* @__PURE__ */ e(
|
|
254
|
-
/* @__PURE__ */ e(
|
|
255
|
-
/* @__PURE__ */ e(
|
|
256
|
-
const r =
|
|
253
|
+
/* @__PURE__ */ e(wt, {}),
|
|
254
|
+
/* @__PURE__ */ e(vt, { children: "Drop files here to add to chat" }),
|
|
255
|
+
/* @__PURE__ */ e(Lt, { children: (a) => a.map((t, o) => {
|
|
256
|
+
const r = N(t.type);
|
|
257
257
|
return /* @__PURE__ */ d(Dt, { file: t, children: [
|
|
258
|
-
r ? /* @__PURE__ */ d(
|
|
258
|
+
r ? /* @__PURE__ */ d(Bt, { children: [
|
|
259
259
|
/* @__PURE__ */ e(Q, {}),
|
|
260
260
|
/* @__PURE__ */ e(T, {})
|
|
261
|
-
] }) : /* @__PURE__ */ d(
|
|
261
|
+
] }) : /* @__PURE__ */ d(Pt, { children: [
|
|
262
262
|
/* @__PURE__ */ e($, {}),
|
|
263
263
|
/* @__PURE__ */ e(T, {})
|
|
264
264
|
] }),
|
|
265
|
-
/* @__PURE__ */ e(
|
|
265
|
+
/* @__PURE__ */ e(Wt, {})
|
|
266
266
|
] }, `${t.name}-${t.lastModified}-${o}`);
|
|
267
267
|
}) }),
|
|
268
268
|
/* @__PURE__ */ d(md, { children: [
|
|
@@ -272,66 +272,65 @@ function na() {
|
|
|
272
272
|
] })
|
|
273
273
|
] });
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function na() {
|
|
276
276
|
return /* @__PURE__ */ d(hd, { children: [
|
|
277
277
|
/* @__PURE__ */ d(bd, { children: [
|
|
278
278
|
/* @__PURE__ */ e(Cd, {}),
|
|
279
|
-
/* @__PURE__ */ e(Fd, {})
|
|
280
|
-
/* @__PURE__ */ e(Ed, {})
|
|
279
|
+
/* @__PURE__ */ e(Fd, {})
|
|
281
280
|
] }),
|
|
282
|
-
/* @__PURE__ */ d(
|
|
283
|
-
/* @__PURE__ */ e(
|
|
284
|
-
a.map((o) => /* @__PURE__ */ e(
|
|
285
|
-
t.length > 0 && /* @__PURE__ */ e(
|
|
286
|
-
/* @__PURE__ */ d(
|
|
287
|
-
/* @__PURE__ */ e(
|
|
288
|
-
t.map((o) => /* @__PURE__ */ d(
|
|
289
|
-
/* @__PURE__ */ e(
|
|
281
|
+
/* @__PURE__ */ d(Ed, { children: [
|
|
282
|
+
/* @__PURE__ */ e(ud, { children: ({ pinned: a, unpinned: t }) => /* @__PURE__ */ d(u, { children: [
|
|
283
|
+
a.map((o) => /* @__PURE__ */ e(pd, { action: o }, o.name)),
|
|
284
|
+
t.length > 0 && /* @__PURE__ */ e(gd, {}),
|
|
285
|
+
/* @__PURE__ */ d(Id, { children: [
|
|
286
|
+
/* @__PURE__ */ e(Md, {}),
|
|
287
|
+
t.map((o) => /* @__PURE__ */ d(Sd, { action: o, children: [
|
|
288
|
+
/* @__PURE__ */ e(Td, { action: o }),
|
|
290
289
|
o.name
|
|
291
290
|
] }, o.name))
|
|
292
291
|
] })
|
|
293
292
|
] }) }),
|
|
294
293
|
/* @__PURE__ */ d(I, { action: "copy", children: [
|
|
295
|
-
/* @__PURE__ */ e(
|
|
296
|
-
/* @__PURE__ */ e(
|
|
294
|
+
/* @__PURE__ */ e(xd, { action: "copy" }),
|
|
295
|
+
/* @__PURE__ */ e(Ad, { action: "copy" })
|
|
297
296
|
] }),
|
|
298
297
|
/* @__PURE__ */ e(I, { action: "clear" }),
|
|
299
298
|
/* @__PURE__ */ e(I, { action: "stop" })
|
|
300
299
|
] })
|
|
301
300
|
] });
|
|
302
301
|
}
|
|
303
|
-
function
|
|
304
|
-
const { sessions: a } =
|
|
305
|
-
return /* @__PURE__ */ d(
|
|
306
|
-
/* @__PURE__ */ d(
|
|
307
|
-
/* @__PURE__ */ d(
|
|
308
|
-
/* @__PURE__ */ e(
|
|
302
|
+
function ia() {
|
|
303
|
+
const { sessions: a } = Ft(), { conversationId: t } = _();
|
|
304
|
+
return /* @__PURE__ */ d(et, { children: [
|
|
305
|
+
/* @__PURE__ */ d(dt, { children: [
|
|
306
|
+
/* @__PURE__ */ d(tt, { children: [
|
|
307
|
+
/* @__PURE__ */ e(at, { iconKey: "backToChat" }),
|
|
309
308
|
"Back to chat"
|
|
310
309
|
] }),
|
|
311
|
-
/* @__PURE__ */ e(
|
|
310
|
+
/* @__PURE__ */ e(ot, {}),
|
|
312
311
|
/* @__PURE__ */ e(S, {})
|
|
313
312
|
] }),
|
|
314
|
-
/* @__PURE__ */ d(
|
|
313
|
+
/* @__PURE__ */ d(rt, { children: [
|
|
315
314
|
a.map((o) => /* @__PURE__ */ d(
|
|
316
|
-
|
|
315
|
+
nt,
|
|
317
316
|
{
|
|
318
317
|
sessionId: o.id,
|
|
319
318
|
"data-active": p(o.id === t),
|
|
320
319
|
children: [
|
|
321
|
-
/* @__PURE__ */ e(
|
|
322
|
-
/* @__PURE__ */ e(
|
|
320
|
+
/* @__PURE__ */ e(it, { children: o.title }),
|
|
321
|
+
/* @__PURE__ */ e(mt, { children: st(o.updatedAt) })
|
|
323
322
|
]
|
|
324
323
|
},
|
|
325
324
|
o.id
|
|
326
325
|
)),
|
|
327
|
-
/* @__PURE__ */ e(
|
|
328
|
-
/* @__PURE__ */ e(
|
|
326
|
+
/* @__PURE__ */ e(ct, {}),
|
|
327
|
+
/* @__PURE__ */ e(lt, {})
|
|
329
328
|
] }),
|
|
330
|
-
/* @__PURE__ */ e(
|
|
329
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(bt, {}) })
|
|
331
330
|
] });
|
|
332
331
|
}
|
|
333
|
-
function
|
|
334
|
-
return /* @__PURE__ */ e(
|
|
332
|
+
function ma() {
|
|
333
|
+
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ d(re, { children: [
|
|
335
334
|
/* @__PURE__ */ e(ne, {}),
|
|
336
335
|
/* @__PURE__ */ e(ie, {}),
|
|
337
336
|
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ d(se, { children: [
|
|
@@ -358,7 +357,7 @@ function sa() {
|
|
|
358
357
|
] }) })
|
|
359
358
|
] }) }) }) });
|
|
360
359
|
}
|
|
361
|
-
function
|
|
360
|
+
function sa() {
|
|
362
361
|
return /* @__PURE__ */ d(le, { children: [
|
|
363
362
|
/* @__PURE__ */ e(he, {}),
|
|
364
363
|
/* @__PURE__ */ d(be, { children: [
|
|
@@ -380,15 +379,15 @@ function ca() {
|
|
|
380
379
|
/* @__PURE__ */ e(fe, {})
|
|
381
380
|
] }),
|
|
382
381
|
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(ve, { children: t.items.map((r) => /* @__PURE__ */ d(Le, { value: r.value, children: [
|
|
383
|
-
/* @__PURE__ */ e(
|
|
384
|
-
/* @__PURE__ */ e(
|
|
382
|
+
/* @__PURE__ */ e(De, { children: r.label }),
|
|
383
|
+
/* @__PURE__ */ e(Be, {})
|
|
385
384
|
] }, r.value)) }) })
|
|
386
385
|
] }),
|
|
387
386
|
t.inputType === "combobox" && /* @__PURE__ */ d(Pe, { children: [
|
|
388
387
|
/* @__PURE__ */ d(We, { children: [
|
|
389
|
-
"multiple" in t && t.multiple && /* @__PURE__ */ e(
|
|
390
|
-
/* @__PURE__ */ e(
|
|
391
|
-
/* @__PURE__ */ e(
|
|
388
|
+
"multiple" in t && t.multiple && /* @__PURE__ */ e(_e, {}),
|
|
389
|
+
/* @__PURE__ */ e(Ve, {}),
|
|
390
|
+
/* @__PURE__ */ e(Ne, {})
|
|
392
391
|
] }),
|
|
393
392
|
/* @__PURE__ */ e(Qe, { children: /* @__PURE__ */ e($e, { children: /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ e(Oe, { children: (r) => r.length === 0 ? /* @__PURE__ */ e(je, {}) : r.map((n) => /* @__PURE__ */ d(
|
|
394
393
|
Ge,
|
|
@@ -420,8 +419,8 @@ function ca() {
|
|
|
420
419
|
] });
|
|
421
420
|
}
|
|
422
421
|
export {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
422
|
+
La as InkeepEmbeddedChat,
|
|
423
|
+
Zt as InkeepEmbeddedChatImpl,
|
|
424
|
+
zt as InkeepEmbeddedChatImplContent,
|
|
425
|
+
Kt as InkeepEmbeddedChatProvider
|
|
427
426
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../styled/components/embedded-search.cjs"),R=require("../styled/components/modal.cjs"),A=require("../styled/components/shadow.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../styled/components/embedded-search.cjs"),R=require("../styled/components/modal.cjs"),A=require("../styled/components/shadow.cjs"),a=require("../primitives/providers/config-provider.cjs"),w=require("../primitives/providers/root-provider.cjs"),S=require("../primitives/providers/widget-provider.cjs"),T=require("../primitives/components/embedded-search/search-provider.cjs"),p=require("../primitives/components/modal/modal-provider.cjs"),d=require("../primitives/utils/misc.cjs"),x=require("../primitives/atoms/cmdk/index.cjs"),v=require("../primitives/atoms/error-boundary.cjs"),u=require("react"),j=require("./widget-toggle.cjs"),k=require("./modal.cjs");function b(r){const{baseSettings:t,searchSettings:n}=r;return e.jsx(v.ErrorBoundary,{children:e.jsx(A.Shadow,{children:e.jsx(w.RootProvider,{config:{baseSettings:t,searchSettings:n},componentType:a.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(h,{...r})})})})}function I(r){const{children:t,onToggleView:n,isHidden:i,shouldAutoFocusInput:l=!n}=r;return e.jsx(s.Provider,{isHidden:i,shouldAutoFocusInput:l,children:t})}function h(r){return e.jsx(I,{...r,children:e.jsx(m,{...r})})}function m(r){const{searchSettings:{view:t}}=a.useInkeepConfig(),{onToggleView:n,shouldShowAskAICard:i=!!n&&t!=="dual-pane"}=r,l=p.useModal(),o=S.useWidget(),c=l&&!o?k.ModalContent:u.Fragment;return e.jsx(c,{children:e.jsx(s.Wrapper,{"data-show-ask-ai-card":d.dataAttr(i),"data-composite":d.dataAttr(!!n||l?.isOpen),children:e.jsxs(s.Root,{children:[e.jsx(P,{...r}),e.jsxs(s.Content,{children:[e.jsx(C,{askAICardLabel:r.askAICardLabel,askAILabel:r.askAILabel,onToggleView:r.onToggleView,shouldShowAskAICard:i}),e.jsx(L,{})]}),e.jsx(y,{})]})})})}function P(r){const{onToggleView:t,askAILabel:n,searchLabel:i}=r,l=x.useCommandState(c=>c.search),{loading:o}=T.useSearch();return e.jsxs(s.InputGroup,{children:[!o&&e.jsx(s.InputIcon,{}),e.jsx(s.Loading,{}),e.jsx(s.Input,{}),t&&e.jsx(j.WidgetToggle,{onToggleView:t,query:l,askAILabel:n,searchLabel:i,view:"search"}),e.jsx(R.Close,{})]})}function C(r){const{askAILabel:t,onToggleView:n,shouldShowAskAICard:i,askAICardLabel:l}=r,o=x.useCommandState(g=>g.search),{handleToggle:c}=j.useToggleView({onToggleView:n,query:o});return i?e.jsxs(s.AskAITrigger,{onSelect:()=>c("chat",!0),children:[e.jsx(s.AskAITriggerIcon,{}),e.jsxs(s.AskAITriggerLabel,{children:[l||t||"Ask AI",o&&e.jsx(s.AskAITriggerQuery,{children:`${o}`})]}),e.jsx(s.AskAITriggerIndicatorText,{children:"Start conversation"}),e.jsx(s.AskAITriggerIndicator,{})]}):null}function L(){return e.jsxs(s.Results,{children:[e.jsx(s.ResultsLoading,{}),e.jsx(s.ResultsTabList,{children:r=>r.map(t=>e.jsx(s.ResultsTab,{tab:t},t))}),e.jsx(s.ResultsEmpty,{}),e.jsxs(s.ResultsContent,{children:[e.jsx(q,{}),e.jsx(f,{})]})]})}function q(){return e.jsxs(s.ResultsScrollArea,{children:[e.jsx(s.ResultsScrollAreaViewport,{children:e.jsx(s.ResultsList,{children:r=>r.map(t=>e.jsxs(s.ResultsItem,{item:t,children:[e.jsx(s.ResultsItemBreadcrumbs,{children:n=>n.map((i,l)=>e.jsxs(u.Fragment,{children:[i,e.jsx(s.ResultsItemBreadcrumbIcon,{})]},`${i}-${l}`))}),e.jsx(s.ResultsItemIcon,{}),e.jsx(s.ResultsItemTitle,{}),e.jsx(s.ResultsItemTag,{}),e.jsx(s.ResultsItemDescription,{children:n=>n.map((i,l)=>e.jsx(s.ResultsItemDescriptionPart,{part:i},`part-${l}`))}),e.jsx(s.ResultsItemIndicator,{})]},t.id))})}),e.jsx(s.ResultsScrollAreaScrollbar,{children:e.jsx(s.ResultsScrollAreaThumb,{})}),e.jsx(s.ResultsScrollAreaCorner,{})]})}function f(){return e.jsxs(s.ResultsScrollArea,{children:[e.jsx(s.ResultsScrollAreaViewport,{children:e.jsxs(s.ResultsItemPreview,{children:[e.jsxs(s.ResultsItemPreviewHeader,{children:[e.jsxs(s.ResultsItemPreviewHeading,{children:[e.jsx(s.ResultsItemPreviewTitle,{}),e.jsx(s.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(s.ResultsItemPreviewBreadcrumbs,{children:r=>r.map((t,n)=>e.jsxs(u.Fragment,{children:[t,e.jsx(s.ResultsItemPreviewBreadcrumbIcon,{})]},`${t}-${n}`))})]}),e.jsx(s.ResultsItemPreviewBody,{}),e.jsxs(s.ResultsItemPreviewOutline,{children:[e.jsx(s.ResultsItemPreviewOutlineTitle,{}),e.jsx(s.ResultsItemPreviewOutlineList,{children:r=>r.map((t,n)=>e.jsxs(s.ResultsItemPreviewOutlineItem,{href:t.url??void 0,"data-is-match":d.dataAttr(t.isMatch),children:[e.jsx(s.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(s.ResultsItemPreviewOutlineItemText,{children:t.content}),t.url&&e.jsx(s.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${t.anchor}-${n}`))})]})]})}),e.jsx(s.ResultsScrollAreaScrollbar,{children:e.jsx(s.ResultsScrollAreaThumb,{})}),e.jsx(s.ResultsScrollAreaCorner,{})]})}function y(){return e.jsx(s.Footer,{children:e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{})]})})}exports.InkeepEmbeddedSearch=b;exports.InkeepEmbeddedSearchImpl=h;exports.InkeepEmbeddedSearchImplContent=m;exports.InkeepEmbeddedSearchProvider=I;
|