@inkeep/cxkit-primitives 0.5.69 → 0.5.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
- package/dist/components/embedded-chat/use-inkeep-chat.js +35 -35
- package/dist/components/embedded-search.cjs +1 -1
- package/dist/components/embedded-search.js +197 -189
- package/dist/components/intelligent-form/actions/qa-model-response.cjs +1 -1
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/utils/component-ids.cjs +1 -1
- package/dist/utils/component-ids.js +2 -0
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { Command as f, useCommandState as P, useCommandStore as
|
|
3
|
+
import { Command as f, useCommandState as P, useCommandStore as Q } from "../atoms/cmdk/index.js";
|
|
4
4
|
import { ikp as r } from "./factory.js";
|
|
5
5
|
import { dataAttr as I, maybeRender as E } from "../utils/misc.js";
|
|
6
|
-
import { forwardRef as
|
|
6
|
+
import { forwardRef as A, useMemo as T, useState as j, useEffect as O, useCallback as N, useRef as H } from "react";
|
|
7
7
|
import { useSearch as u } from "./embedded-search/search-provider.js";
|
|
8
|
-
import { SearchProvider as
|
|
8
|
+
import { SearchProvider as vi } from "./embedded-search/search-provider.js";
|
|
9
9
|
import q from "./tagline-logo-icon.js";
|
|
10
10
|
import { CustomIcon as g } from "../atoms/icons/custom-icon.js";
|
|
11
|
-
import * as
|
|
11
|
+
import * as L from "@radix-ui/react-scroll-area";
|
|
12
12
|
import * as C from "@radix-ui/react-tabs";
|
|
13
13
|
import { useInkeepConfig as p } from "../providers/config-provider.js";
|
|
14
14
|
import { useSearchEvents as z } from "../providers/search-events-provider.js";
|
|
15
15
|
import { LinkWithQueryParams as M } from "../atoms/link.js";
|
|
16
|
-
import { SourceItemProvider as
|
|
16
|
+
import { SourceItemProvider as V, useSourceItem as _ } from "../providers/source-item-provider.js";
|
|
17
17
|
import { BuiltInIconRenderer as U } from "../atoms/icons/built-in-icon-renderer.js";
|
|
18
18
|
import { highlightEmphasis as J } from "../utils/highlight-emphasis.js";
|
|
19
19
|
import { useScrollingFades as X } from "../hooks/use-scrolling-fades.js";
|
|
@@ -27,7 +27,7 @@ import { Markdown as ie } from "../atoms/markdown/index.js";
|
|
|
27
27
|
import { useMediaQuery as F } from "../hooks/use-media-query.js";
|
|
28
28
|
import { useSearchFetch as re } from "./embedded-search/use-search-filter.js";
|
|
29
29
|
import { getUrlWithQuery as se } from "./embedded-search/url-query.js";
|
|
30
|
-
import { ASK_AI_TRIGGER_VALUE as
|
|
30
|
+
import { ASK_AI_TRIGGER_VALUE as w } from "../constants/search.js";
|
|
31
31
|
import { useWidgetAutoFocus as ne } from "./modal/widget-auto-focus.js";
|
|
32
32
|
const ae = r("div", {
|
|
33
33
|
_id: "aiSearchWrapper"
|
|
@@ -54,7 +54,7 @@ const ae = r("div", {
|
|
|
54
54
|
return /* @__PURE__ */ a(oe, { "data-hidden": I(t), "data-mobile": I(i), ...e });
|
|
55
55
|
}, ce = r(f.List, {
|
|
56
56
|
_id: "aiSearchContent"
|
|
57
|
-
}), St =
|
|
57
|
+
}), St = A((e, t) => {
|
|
58
58
|
const i = P((s) => s.value);
|
|
59
59
|
return /* @__PURE__ */ a(
|
|
60
60
|
ce,
|
|
@@ -69,56 +69,56 @@ const ae = r("div", {
|
|
|
69
69
|
}), bt = r(g, {
|
|
70
70
|
_id: "aiSearchInputIcon",
|
|
71
71
|
iconKey: "search"
|
|
72
|
-
}),
|
|
72
|
+
}), de = r(f.Input, {
|
|
73
73
|
_id: "aiSearchInput"
|
|
74
|
-
}), Rt =
|
|
75
|
-
const { inputRef: s, shouldAutoFocusInput: n } = u(), o = P((h) => h.value),
|
|
76
|
-
() => c.placeholder || (
|
|
77
|
-
[c.placeholder,
|
|
74
|
+
}), Rt = A(({ onInput: e, ...t }, i) => {
|
|
75
|
+
const { inputRef: s, shouldAutoFocusInput: n } = u(), o = P((h) => h.value), d = F("(max-width: 768px)"), { searchSettings: c } = p(), l = T(
|
|
76
|
+
() => c.placeholder || (d ? "Search..." : "Search for anything..."),
|
|
77
|
+
[c.placeholder, d]
|
|
78
78
|
), v = x(i, s);
|
|
79
79
|
return ne("search", s, n), re(), /* @__PURE__ */ a(
|
|
80
|
-
|
|
80
|
+
de,
|
|
81
81
|
{
|
|
82
82
|
ref: v,
|
|
83
|
-
placeholder:
|
|
83
|
+
placeholder: l,
|
|
84
84
|
"aria-activedescendant": `aiSearchResults__Item-${o}`,
|
|
85
85
|
...t
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
|
-
}),
|
|
88
|
+
}), le = r(U, {
|
|
89
89
|
_id: "aiSearchLoading",
|
|
90
90
|
iconSettings: {
|
|
91
91
|
builtIn: "LuLoaderCircle"
|
|
92
92
|
}
|
|
93
93
|
}), Pt = (e) => {
|
|
94
94
|
const { loading: t, resultsList: i } = u();
|
|
95
|
-
return !t || i.length === 0 ? null : /* @__PURE__ */ a(
|
|
95
|
+
return !t || i.length === 0 ? null : /* @__PURE__ */ a(le, { ...e });
|
|
96
96
|
}, ue = r(f.Item, {
|
|
97
97
|
_id: "aiAskAITrigger",
|
|
98
|
-
value:
|
|
98
|
+
value: w
|
|
99
99
|
}), gt = (e) => {
|
|
100
|
-
const { results: t, tab: i } = u(), s =
|
|
100
|
+
const { results: t, tab: i } = u(), s = Q(), n = t[i]?.[0]?.id ?? "NONE";
|
|
101
101
|
return /* @__PURE__ */ a(
|
|
102
102
|
ue,
|
|
103
103
|
{
|
|
104
104
|
...e,
|
|
105
|
-
id: `aiSearchResults__Item-${
|
|
105
|
+
id: `aiSearchResults__Item-${w}`,
|
|
106
106
|
tabIndex: 0,
|
|
107
107
|
onPointerLeave: () => s.setState("value", n, !0)
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
}, me = r("img", {
|
|
111
111
|
_id: "aiAskAITrigger__Icon"
|
|
112
|
-
}),
|
|
113
|
-
const { aiChatSettings: t } = p(), { aiAssistantAvatar: i } = t ?? {}, s = typeof i == "string" ? i : i?.light, n = (typeof i == "string" ? i : i?.dark) ?? s, o = Y(s, n), [
|
|
112
|
+
}), Tt = (e) => {
|
|
113
|
+
const { aiChatSettings: t } = p(), { aiAssistantAvatar: i } = t ?? {}, s = typeof i == "string" ? i : i?.light, n = (typeof i == "string" ? i : i?.dark) ?? s, o = Y(s, n), [d, c] = j(o);
|
|
114
114
|
return O(() => {
|
|
115
115
|
c(o);
|
|
116
|
-
}, [o]), /* @__PURE__ */ a(me, { asChild: !0, ...e, children:
|
|
116
|
+
}, [o]), /* @__PURE__ */ a(me, { asChild: !0, ...e, children: d ? (
|
|
117
117
|
// biome-ignore lint/a11y/useAltText: <explanation>
|
|
118
118
|
/* @__PURE__ */ a(
|
|
119
119
|
"img",
|
|
120
120
|
{
|
|
121
|
-
src:
|
|
121
|
+
src: d,
|
|
122
122
|
alt: "AI Avatar",
|
|
123
123
|
"data-type": "image",
|
|
124
124
|
onError: y(() => {
|
|
@@ -128,29 +128,33 @@ const ae = r("div", {
|
|
|
128
128
|
}
|
|
129
129
|
)
|
|
130
130
|
) : /* @__PURE__ */ a(Z, { "data-type": "icon", ...e }) });
|
|
131
|
-
},
|
|
131
|
+
}, wt = r("span", {
|
|
132
132
|
_id: "aiAskAITrigger__Label"
|
|
133
|
-
}), ft = r(
|
|
133
|
+
}), ft = r("span", {
|
|
134
|
+
_id: "aiAskAITrigger__Query"
|
|
135
|
+
}), Et = r(g, {
|
|
134
136
|
_id: "aiAskAITrigger__Indicator",
|
|
135
137
|
iconKey: "openLinkInSameTab"
|
|
138
|
+
}), At = r("span", {
|
|
139
|
+
_id: "aiAskAITrigger__IndicatorText"
|
|
136
140
|
}), he = r(C.Root, {
|
|
137
141
|
_id: "aiSearchResults"
|
|
138
|
-
}),
|
|
142
|
+
}), Lt = (e) => {
|
|
139
143
|
const {
|
|
140
144
|
searchSettings: { view: t }
|
|
141
|
-
} = p(), { tab: i, setTab: s, hasContent: n, isHidden: o, disableTransition:
|
|
145
|
+
} = p(), { tab: i, setTab: s, hasContent: n, isHidden: o, disableTransition: d, results: c, defaultTab: l } = u(), v = Q(), h = N(
|
|
142
146
|
(m) => {
|
|
143
|
-
|
|
147
|
+
d(), s(m);
|
|
144
148
|
const S = c[m][0] ? c[m][0]?.id : void 0;
|
|
145
149
|
v.setState("value", S, !0);
|
|
146
150
|
},
|
|
147
|
-
[c,
|
|
151
|
+
[c, d]
|
|
148
152
|
);
|
|
149
153
|
return O(() => {
|
|
150
154
|
let m = i in c ? i : Object.keys(c)[0];
|
|
151
155
|
if (!c[m]?.length) {
|
|
152
156
|
const b = Object.keys(c).find((k) => c[k]?.length);
|
|
153
|
-
b ? m = b : m =
|
|
157
|
+
b ? m = b : m = l;
|
|
154
158
|
}
|
|
155
159
|
if (!m) return;
|
|
156
160
|
s(m);
|
|
@@ -168,27 +172,27 @@ const ae = r("div", {
|
|
|
168
172
|
);
|
|
169
173
|
}, Ie = r("div", {
|
|
170
174
|
_id: "aiSearchResults__Loading"
|
|
171
|
-
}),
|
|
175
|
+
}), kt = (e) => {
|
|
172
176
|
const { loading: t, resultsList: i } = u();
|
|
173
177
|
return !t || i.length > 0 ? null : /* @__PURE__ */ a(Ie, { ...e });
|
|
174
178
|
}, ve = r(f.Empty, {
|
|
175
179
|
_id: "aiSearchResults__Empty"
|
|
176
|
-
}),
|
|
177
|
-
const t = P((
|
|
180
|
+
}), yt = (e) => {
|
|
181
|
+
const t = P((d) => d.search), { loading: i, results: s, tab: n } = u(), o = s[n]?.length;
|
|
178
182
|
return i || !t || o ? null : /* @__PURE__ */ a(ve, { children: "No results found.", ...e });
|
|
179
183
|
}, _e = r(C.List, {
|
|
180
184
|
_id: "aiSearchResults__TabList"
|
|
181
|
-
}),
|
|
185
|
+
}), Ot = (e) => {
|
|
182
186
|
const { children: t, ...i } = e, {
|
|
183
187
|
searchSettings: { tabs: s }
|
|
184
|
-
} = p(), { results: n, loading: o, resultsList:
|
|
185
|
-
if (o &&
|
|
188
|
+
} = p(), { results: n, loading: o, resultsList: d } = u();
|
|
189
|
+
if (o && d.length === 0) return null;
|
|
186
190
|
const c = Object.keys(n);
|
|
187
191
|
return !s.length || !c.length ? null : /* @__PURE__ */ a(_e, { tabIndex: -1, children: E(t, c), ...i });
|
|
188
192
|
}, Se = r(C.Trigger, {
|
|
189
193
|
_id: "aiSearchResults__Tab"
|
|
190
|
-
}),
|
|
191
|
-
const i = H(null), s = x(t, i), { tab: n, onClick: o, ...
|
|
194
|
+
}), Ct = A((e, t) => {
|
|
195
|
+
const i = H(null), s = x(t, i), { tab: n, onClick: o, ...d } = e, { results: c, tab: l, inputRef: v } = u(), h = c[n].length, m = n === l, S = () => {
|
|
192
196
|
v.current?.focus();
|
|
193
197
|
}, b = te();
|
|
194
198
|
return O(() => {
|
|
@@ -202,19 +206,19 @@ const ae = r("div", {
|
|
|
202
206
|
value: n,
|
|
203
207
|
children: `${n} (${h})`,
|
|
204
208
|
onClick: y(o, S),
|
|
205
|
-
...
|
|
209
|
+
...d
|
|
206
210
|
}
|
|
207
211
|
);
|
|
208
|
-
}),
|
|
212
|
+
}), xt = r("div", {
|
|
209
213
|
_id: "aiSearchResults__Content"
|
|
210
|
-
}), pe = r(
|
|
214
|
+
}), pe = r(L.Root, {
|
|
211
215
|
_id: "aiSearchResults__ScrollArea"
|
|
212
|
-
}),
|
|
216
|
+
}), Bt = (e) => {
|
|
213
217
|
const { loading: t, resultsList: i } = u();
|
|
214
218
|
return t && i.length === 0 ? null : /* @__PURE__ */ a(pe, { tabIndex: -1, ...e });
|
|
215
|
-
}, be = r(
|
|
219
|
+
}, be = r(L.Viewport, {
|
|
216
220
|
_id: "aiSearchResults__ScrollAreaViewport"
|
|
217
|
-
}),
|
|
221
|
+
}), Nt = A(({ children: e, ...t }, i) => {
|
|
218
222
|
const s = X(), n = x(i, s), { tab: o } = u();
|
|
219
223
|
return O(() => {
|
|
220
224
|
o && s.current?.scrollTo({ top: 0, behavior: "auto" });
|
|
@@ -230,18 +234,18 @@ const ae = r("div", {
|
|
|
230
234
|
...t
|
|
231
235
|
}
|
|
232
236
|
);
|
|
233
|
-
}),
|
|
234
|
-
|
|
237
|
+
}), Ht = r(
|
|
238
|
+
L.ScrollAreaScrollbar,
|
|
235
239
|
{
|
|
236
240
|
_id: "aiSearchResults__ScrollAreaScrollbar"
|
|
237
241
|
}
|
|
238
|
-
),
|
|
242
|
+
), Mt = r(L.ScrollAreaThumb, {
|
|
239
243
|
_id: "aiSearchResults__ScrollAreaThumb"
|
|
240
|
-
}),
|
|
244
|
+
}), Ut = r(L.Corner, {
|
|
241
245
|
_id: "aiSearchResults__ScrollAreaCorner"
|
|
242
246
|
}), Re = r(C.Content, {
|
|
243
247
|
_id: "aiSearchResults__List"
|
|
244
|
-
}),
|
|
248
|
+
}), Ft = (e) => {
|
|
245
249
|
const { children: t, ...i } = e, { results: s, tab: n } = u(), o = s[n] ?? [];
|
|
246
250
|
return /* @__PURE__ */ a(
|
|
247
251
|
Re,
|
|
@@ -257,12 +261,12 @@ const ae = r("div", {
|
|
|
257
261
|
}, Pe = r(f.Item, {
|
|
258
262
|
_id: "aiSearchResults__Item",
|
|
259
263
|
asChild: !0
|
|
260
|
-
}),
|
|
264
|
+
}), Dt = A(({ item: e, onClick: t, onSelect: i, children: s, ...n }, o) => {
|
|
261
265
|
const {
|
|
262
|
-
searchSettings: { shouldOpenLinksInNewTab:
|
|
266
|
+
searchSettings: { shouldOpenLinksInNewTab: d, view: c, searchQueryParamKey: l }
|
|
263
267
|
} = p(), { logEvent: v } = z(), h = P((R) => R.search), { transitionsDisabled: m } = u(), S = P((R) => R.value), b = H(null), k = x(o, b), D = N((R) => {
|
|
264
268
|
R.trigger === "keyboard" && b.current?.click();
|
|
265
|
-
}, []),
|
|
269
|
+
}, []), W = N(() => {
|
|
266
270
|
v({
|
|
267
271
|
eventName: "search_result_clicked",
|
|
268
272
|
properties: {
|
|
@@ -271,17 +275,17 @@ const ae = r("div", {
|
|
|
271
275
|
url: e.url
|
|
272
276
|
}
|
|
273
277
|
});
|
|
274
|
-
}, [v, h, e.title, e.url]), B =
|
|
275
|
-
() => e.shouldOpenInNewTab !== void 0 ? e.shouldOpenInNewTab :
|
|
276
|
-
[e.shouldOpenInNewTab,
|
|
277
|
-
), K = S === e.id,
|
|
278
|
-
href:
|
|
278
|
+
}, [v, h, e.title, e.url]), B = T(
|
|
279
|
+
() => e.shouldOpenInNewTab !== void 0 ? e.shouldOpenInNewTab : d,
|
|
280
|
+
[e.shouldOpenInNewTab, d]
|
|
281
|
+
), K = S === e.id, $ = K || (S === "NONE" || S === w), G = T(() => ({
|
|
282
|
+
href: l ? se(e.url, h, l) : e.url,
|
|
279
283
|
isExternal: B,
|
|
280
284
|
appendToUrl: e.appendToUrl,
|
|
281
285
|
children: s,
|
|
282
286
|
id: `aiSearchResults__Item-${e.id}`
|
|
283
|
-
}), [e.url, B, e.appendToUrl, s, e.id,
|
|
284
|
-
return /* @__PURE__ */ a(
|
|
287
|
+
}), [e.url, B, e.appendToUrl, s, e.id, l, h]);
|
|
288
|
+
return /* @__PURE__ */ a(V, { source: { ...e, isExternal: B }, children: /* @__PURE__ */ a(
|
|
285
289
|
Pe,
|
|
286
290
|
{
|
|
287
291
|
ref: k,
|
|
@@ -291,51 +295,51 @@ const ae = r("div", {
|
|
|
291
295
|
"data-disable-transitions": I(m),
|
|
292
296
|
"data-view": c,
|
|
293
297
|
onSelect: y(i, D),
|
|
294
|
-
onClick: y(t,
|
|
298
|
+
onClick: y(t, W),
|
|
295
299
|
"data-selected": I(K),
|
|
296
|
-
tabIndex:
|
|
300
|
+
tabIndex: $ ? 0 : -1,
|
|
297
301
|
...n,
|
|
298
|
-
children: /* @__PURE__ */ a(M, { ...
|
|
302
|
+
children: /* @__PURE__ */ a(M, { ...G })
|
|
299
303
|
}
|
|
300
304
|
) });
|
|
301
305
|
}), ge = r("div", {
|
|
302
306
|
_id: "aiSearchResults__ItemBreadcrumbs"
|
|
303
|
-
}),
|
|
307
|
+
}), Te = (e) => {
|
|
304
308
|
const { source: t } = _(), { tab: i } = u();
|
|
305
309
|
if (!t.breadcrumbs?.length) return null;
|
|
306
|
-
const { children: s, ...n } = e,
|
|
310
|
+
const { children: s, ...n } = e, d = t.tabs?.find((c) => typeof c != "string" && c[0] === i)?.[1]?.breadcrumbs ?? t.breadcrumbs ?? [];
|
|
307
311
|
return /* @__PURE__ */ a(
|
|
308
312
|
ge,
|
|
309
313
|
{
|
|
310
314
|
"aria-hidden": "true",
|
|
311
|
-
children: E(s,
|
|
315
|
+
children: E(s, d),
|
|
312
316
|
...n
|
|
313
317
|
}
|
|
314
318
|
);
|
|
315
|
-
},
|
|
319
|
+
}, we = r(g, {
|
|
316
320
|
_id: "aiSearchResults__ItemBreadcrumbIcon",
|
|
317
321
|
iconKey: "breadcrumbSeparator"
|
|
318
322
|
}), fe = r(U, {
|
|
319
323
|
_id: "aiSearchResults__ItemIcon"
|
|
320
|
-
}),
|
|
324
|
+
}), Kt = (e) => {
|
|
321
325
|
const { source: t } = _();
|
|
322
326
|
return /* @__PURE__ */ a(fe, { iconSettings: t.icon, "data-type": t.type, ...e });
|
|
323
327
|
}, Ee = r("span", {
|
|
324
328
|
_id: "aiSearchResults__ItemTitle"
|
|
325
|
-
}),
|
|
329
|
+
}), Qt = (e) => {
|
|
326
330
|
const { source: t } = _();
|
|
327
331
|
return /* @__PURE__ */ a(Ee, { "data-type": t.type, children: t.title, ...e });
|
|
328
|
-
},
|
|
332
|
+
}, Ae = r("span", {
|
|
329
333
|
_id: "aiSearchResults__ItemTag"
|
|
330
|
-
}),
|
|
334
|
+
}), Vt = (e) => {
|
|
331
335
|
const { source: t } = _();
|
|
332
|
-
return /* @__PURE__ */ a(
|
|
333
|
-
},
|
|
336
|
+
return /* @__PURE__ */ a(Ae, { "data-type": t.type, children: t.tag, ...e });
|
|
337
|
+
}, Le = r("span", {
|
|
334
338
|
_id: "aiSearchResults__ItemDescription"
|
|
335
|
-
}),
|
|
336
|
-
const { source: t } = _(), { children: i, ...s } = e, n =
|
|
339
|
+
}), Wt = (e) => {
|
|
340
|
+
const { source: t } = _(), { children: i, ...s } = e, n = T(() => t.description ? J(t.description) : [], [t.description]);
|
|
337
341
|
return n.length ? /* @__PURE__ */ a(
|
|
338
|
-
|
|
342
|
+
Le,
|
|
339
343
|
{
|
|
340
344
|
"data-type": t.type,
|
|
341
345
|
"aria-hidden": "true",
|
|
@@ -345,7 +349,7 @@ const ae = r("div", {
|
|
|
345
349
|
) : null;
|
|
346
350
|
}, ke = r("span", {
|
|
347
351
|
_id: "aiSearchResults__ItemDescriptionPart"
|
|
348
|
-
}),
|
|
352
|
+
}), $t = (e) => {
|
|
349
353
|
const { part: t, ...i } = e, { source: s } = _();
|
|
350
354
|
return typeof t == "string" ? t : /* @__PURE__ */ a(
|
|
351
355
|
ke,
|
|
@@ -358,7 +362,7 @@ const ae = r("div", {
|
|
|
358
362
|
);
|
|
359
363
|
}, ye = r(g, {
|
|
360
364
|
_id: "aiSearchResults__ItemIndicator"
|
|
361
|
-
}),
|
|
365
|
+
}), Gt = (e) => {
|
|
362
366
|
const { source: t } = _(), {
|
|
363
367
|
searchSettings: { view: i }
|
|
364
368
|
} = p();
|
|
@@ -373,22 +377,22 @@ const ae = r("div", {
|
|
|
373
377
|
}, Oe = r("div", {
|
|
374
378
|
_id: "aiSearchResults__ItemPreview",
|
|
375
379
|
"aria-hidden": !0
|
|
376
|
-
}),
|
|
380
|
+
}), jt = (e) => {
|
|
377
381
|
const {
|
|
378
382
|
searchSettings: { view: t, shouldOpenLinksInNewTab: i }
|
|
379
|
-
} = p(), { results: s, tab: n } = u(), o = P((h) => h.value),
|
|
380
|
-
if (o ===
|
|
381
|
-
const h =
|
|
383
|
+
} = p(), { results: s, tab: n } = u(), o = P((h) => h.value), d = s[n] ?? [], c = H(null), l = T(() => {
|
|
384
|
+
if (o === w) return c.current;
|
|
385
|
+
const h = d.find((m) => m.id === o);
|
|
382
386
|
return c.current = h ?? null, h;
|
|
383
387
|
}, [o]);
|
|
384
|
-
if (t !== "dual-pane" || o ===
|
|
385
|
-
const v =
|
|
386
|
-
return /* @__PURE__ */ a(
|
|
387
|
-
},
|
|
388
|
+
if (t !== "dual-pane" || o === w || !l) return null;
|
|
389
|
+
const v = l.shouldOpenInNewTab !== void 0 ? l.shouldOpenInNewTab : i;
|
|
390
|
+
return /* @__PURE__ */ a(V, { source: { ...l, isExternal: v }, children: /* @__PURE__ */ a(Oe, { ...e }) });
|
|
391
|
+
}, qt = r("div", {
|
|
388
392
|
_id: "aiSearchResults__ItemPreview__Header"
|
|
389
393
|
}), Ce = r(M, {
|
|
390
394
|
_id: "aiSearchResults__ItemPreview__Heading"
|
|
391
|
-
}),
|
|
395
|
+
}), zt = (e) => {
|
|
392
396
|
const { source: t } = _();
|
|
393
397
|
return /* @__PURE__ */ a(
|
|
394
398
|
Ce,
|
|
@@ -402,13 +406,13 @@ const ae = r("div", {
|
|
|
402
406
|
);
|
|
403
407
|
}, xe = r("span", {
|
|
404
408
|
_id: "aiSearchResults__ItemPreview__Title"
|
|
405
|
-
}),
|
|
409
|
+
}), Jt = (e) => {
|
|
406
410
|
const { source: t } = _();
|
|
407
411
|
return /* @__PURE__ */ a(xe, { children: t.title, ...e });
|
|
408
412
|
}, Be = r(g, {
|
|
409
413
|
_id: "aiSearchResults__ItemPreview__Title__LinkIcon",
|
|
410
414
|
iconKey: "openLinkInNewTab"
|
|
411
|
-
}),
|
|
415
|
+
}), Xt = (e) => {
|
|
412
416
|
const { source: t } = _();
|
|
413
417
|
return /* @__PURE__ */ a(
|
|
414
418
|
Be,
|
|
@@ -417,19 +421,19 @@ const ae = r("div", {
|
|
|
417
421
|
...e
|
|
418
422
|
}
|
|
419
423
|
);
|
|
420
|
-
},
|
|
421
|
-
|
|
424
|
+
}, Yt = r(
|
|
425
|
+
Te,
|
|
422
426
|
{
|
|
423
427
|
_id: "aiSearchResults__ItemPreview__Breadcrumbs"
|
|
424
428
|
}
|
|
425
|
-
),
|
|
426
|
-
|
|
429
|
+
), Zt = r(
|
|
430
|
+
we,
|
|
427
431
|
{
|
|
428
432
|
_id: "aiSearchResults__ItemPreview__BreadcrumbIcon"
|
|
429
433
|
}
|
|
430
434
|
), Ne = r(ie, {
|
|
431
435
|
_id: "aiSearchResults__ItemPreview__Body"
|
|
432
|
-
}),
|
|
436
|
+
}), ei = (e) => {
|
|
433
437
|
const { source: t } = _(), { resultsList: i } = u(), s = i.find((o) => o.id === t.id), {
|
|
434
438
|
searchSettings: { shouldOpenLinksInNewTab: n }
|
|
435
439
|
} = p();
|
|
@@ -443,38 +447,38 @@ const ae = r("div", {
|
|
|
443
447
|
) : null;
|
|
444
448
|
}, He = r("div", {
|
|
445
449
|
_id: "aiSearchResults__ItemPreview__Outline"
|
|
446
|
-
}),
|
|
450
|
+
}), ti = (e) => {
|
|
447
451
|
const { source: t } = _(), { resultsList: i } = u();
|
|
448
452
|
return i.find((o) => o.id === t.id)?.rootRecord.topLevelHeadings?.length ? /* @__PURE__ */ a(He, { ...e }) : null;
|
|
449
|
-
},
|
|
453
|
+
}, ii = r("span", {
|
|
450
454
|
_id: "aiSearchResults__ItemPreview__Outline__Title",
|
|
451
455
|
children: "On this page"
|
|
452
456
|
}), Me = r("ul", {
|
|
453
457
|
_id: "aiSearchResults__ItemPreview__Outline__List"
|
|
454
|
-
}),
|
|
455
|
-
const { source: t } = _(), { resultsList: i } = u(), s = i.find((
|
|
458
|
+
}), ri = (e) => {
|
|
459
|
+
const { source: t } = _(), { resultsList: i } = u(), s = i.find((l) => l.id === t.id), n = s?.rootRecord.topLevelHeadings;
|
|
456
460
|
if (!n?.length) return null;
|
|
457
|
-
const o = n.map((
|
|
458
|
-
const v =
|
|
461
|
+
const o = n.map((l) => {
|
|
462
|
+
const v = l?.anchor && l?.anchor === s?.content?.anchor, h = l?.anchor === s?.pathHeadings?.[0]?.anchor;
|
|
459
463
|
return {
|
|
460
|
-
...
|
|
464
|
+
...l,
|
|
461
465
|
isMatch: v || h
|
|
462
466
|
};
|
|
463
|
-
}), { children:
|
|
464
|
-
return /* @__PURE__ */ a(Me, { children: E(
|
|
467
|
+
}), { children: d, ...c } = e;
|
|
468
|
+
return /* @__PURE__ */ a(Me, { children: E(d, o), ...c });
|
|
465
469
|
}, Ue = r(M, {
|
|
466
470
|
_id: "aiSearchResults__ItemPreview__Outline__Item"
|
|
467
|
-
}),
|
|
471
|
+
}), si = (e) => {
|
|
468
472
|
const {
|
|
469
473
|
searchSettings: { shouldOpenLinksInNewTab: t }
|
|
470
474
|
} = p();
|
|
471
475
|
return /* @__PURE__ */ a(Ue, { isExternal: t, ...e });
|
|
472
|
-
},
|
|
476
|
+
}, ni = r(g, {
|
|
473
477
|
_id: "aiSearchResults__ItemPreview__Outline__ItemIcon",
|
|
474
478
|
iconKey: "newLine"
|
|
475
479
|
}), Fe = r("span", {
|
|
476
480
|
_id: "aiSearchResults__ItemPreview__Outline__ItemText"
|
|
477
|
-
}),
|
|
481
|
+
}), ai = (e) => /* @__PURE__ */ a(Fe, { ...e }), oi = r(
|
|
478
482
|
U,
|
|
479
483
|
{
|
|
480
484
|
_id: "aiSearchResults__ItemPreview__Outline__ItemLinkIcon",
|
|
@@ -484,17 +488,17 @@ const ae = r("div", {
|
|
|
484
488
|
}
|
|
485
489
|
), De = r("div", {
|
|
486
490
|
_id: "aiSearchFooter"
|
|
487
|
-
}),
|
|
491
|
+
}), ci = (e) => {
|
|
488
492
|
const { hasContent: t } = u();
|
|
489
493
|
return /* @__PURE__ */ a(De, { "data-has-results": I(t), ...e });
|
|
490
|
-
},
|
|
494
|
+
}, di = r("div", {
|
|
491
495
|
_id: "aiSearchTagline__Container"
|
|
492
|
-
}),
|
|
496
|
+
}), li = r("span", {
|
|
493
497
|
_id: "aiSearchTagline__Text",
|
|
494
498
|
children: "Powered by"
|
|
495
|
-
}),
|
|
499
|
+
}), ui = r(q, {
|
|
496
500
|
_id: "aiSearchTagline__Logo"
|
|
497
|
-
}),
|
|
501
|
+
}), mi = r("a", {
|
|
498
502
|
_id: "aiSearchTagline__BrandName",
|
|
499
503
|
children: "inkeep",
|
|
500
504
|
href: "https://www.inkeep.com/",
|
|
@@ -503,99 +507,103 @@ const ae = r("div", {
|
|
|
503
507
|
});
|
|
504
508
|
export {
|
|
505
509
|
gt as AskAITrigger,
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
510
|
+
Tt as AskAITriggerIcon,
|
|
511
|
+
Et as AskAITriggerIndicator,
|
|
512
|
+
At as AskAITriggerIndicatorText,
|
|
513
|
+
wt as AskAITriggerLabel,
|
|
514
|
+
ft as AskAITriggerQuery,
|
|
509
515
|
St as Content,
|
|
510
516
|
bt as EmbeddedSearchInputIcon,
|
|
511
517
|
gt as EmbeddedSearchPrimitiveAskAITrigger,
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
518
|
+
Tt as EmbeddedSearchPrimitiveAskAITriggerIcon,
|
|
519
|
+
Et as EmbeddedSearchPrimitiveAskAITriggerIndicator,
|
|
520
|
+
At as EmbeddedSearchPrimitiveAskAITriggerIndicatorText,
|
|
521
|
+
wt as EmbeddedSearchPrimitiveAskAITriggerLabel,
|
|
522
|
+
ft as EmbeddedSearchPrimitiveAskAITriggerQuery,
|
|
515
523
|
St as EmbeddedSearchPrimitiveContent,
|
|
516
|
-
|
|
524
|
+
ci as EmbeddedSearchPrimitiveFooter,
|
|
517
525
|
Rt as EmbeddedSearchPrimitiveInput,
|
|
518
526
|
pt as EmbeddedSearchPrimitiveInputGroup,
|
|
519
527
|
Pt as EmbeddedSearchPrimitiveLoading,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
528
|
+
Lt as EmbeddedSearchPrimitiveResults,
|
|
529
|
+
xt as EmbeddedSearchPrimitiveResultsContent,
|
|
530
|
+
yt as EmbeddedSearchPrimitiveResultsEmpty,
|
|
531
|
+
Dt as EmbeddedSearchPrimitiveResultsItem,
|
|
532
|
+
Te as EmbeddedSearchPrimitiveResultsItemBreadcrumbs,
|
|
533
|
+
Wt as EmbeddedSearchPrimitiveResultsItemDescription,
|
|
534
|
+
$t as EmbeddedSearchPrimitiveResultsItemDescriptionPart,
|
|
535
|
+
Kt as EmbeddedSearchPrimitiveResultsItemIcon,
|
|
536
|
+
Gt as EmbeddedSearchPrimitiveResultsItemIndicator,
|
|
537
|
+
jt as EmbeddedSearchPrimitiveResultsItemPreview,
|
|
538
|
+
ei as EmbeddedSearchPrimitiveResultsItemPreviewBody,
|
|
539
|
+
Zt as EmbeddedSearchPrimitiveResultsItemPreviewBreadcrumbIcon,
|
|
540
|
+
zt as EmbeddedSearchPrimitiveResultsItemPreviewHeading,
|
|
541
|
+
ti as EmbeddedSearchPrimitiveResultsItemPreviewOutline,
|
|
542
|
+
si as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItem,
|
|
543
|
+
ni as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemIcon,
|
|
544
|
+
oi as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemLinkIcon,
|
|
545
|
+
ai as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemText,
|
|
546
|
+
ri as EmbeddedSearchPrimitiveResultsItemPreviewOutlineList,
|
|
547
|
+
ii as EmbeddedSearchPrimitiveResultsItemPreviewOutlineTitle,
|
|
548
|
+
Jt as EmbeddedSearchPrimitiveResultsItemPreviewTitle,
|
|
549
|
+
Xt as EmbeddedSearchPrimitiveResultsItemPreviewTitleLinkIcon,
|
|
550
|
+
Vt as EmbeddedSearchPrimitiveResultsItemTag,
|
|
551
|
+
Qt as EmbeddedSearchPrimitiveResultsItemTitle,
|
|
552
|
+
Ft as EmbeddedSearchPrimitiveResultsList,
|
|
553
|
+
kt as EmbeddedSearchPrimitiveResultsLoading,
|
|
554
|
+
Bt as EmbeddedSearchPrimitiveResultsScrollArea,
|
|
555
|
+
Nt as EmbeddedSearchPrimitiveResultsScrollAreaViewport,
|
|
556
|
+
Ct as EmbeddedSearchPrimitiveResultsTab,
|
|
557
|
+
Ot as EmbeddedSearchPrimitiveResultsTabList,
|
|
550
558
|
_t as EmbeddedSearchPrimitiveRoot,
|
|
551
559
|
vt as EmbeddedSearchPrimitiveWrapper,
|
|
552
|
-
|
|
560
|
+
ci as Footer,
|
|
553
561
|
Rt as Input,
|
|
554
562
|
pt as InputGroup,
|
|
555
563
|
bt as InputIcon,
|
|
556
564
|
Pt as Loading,
|
|
557
565
|
ce as PrimitiveContent,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
566
|
+
vi as Provider,
|
|
567
|
+
Lt as Results,
|
|
568
|
+
xt as ResultsContent,
|
|
569
|
+
yt as ResultsEmpty,
|
|
570
|
+
Dt as ResultsItem,
|
|
571
|
+
we as ResultsItemBreadcrumbIcon,
|
|
572
|
+
Te as ResultsItemBreadcrumbs,
|
|
573
|
+
Wt as ResultsItemDescription,
|
|
574
|
+
$t as ResultsItemDescriptionPart,
|
|
575
|
+
Kt as ResultsItemIcon,
|
|
576
|
+
Gt as ResultsItemIndicator,
|
|
577
|
+
jt as ResultsItemPreview,
|
|
578
|
+
ei as ResultsItemPreviewBody,
|
|
579
|
+
Zt as ResultsItemPreviewBreadcrumbIcon,
|
|
580
|
+
Yt as ResultsItemPreviewBreadcrumbs,
|
|
581
|
+
qt as ResultsItemPreviewHeader,
|
|
582
|
+
zt as ResultsItemPreviewHeading,
|
|
583
|
+
ti as ResultsItemPreviewOutline,
|
|
584
|
+
si as ResultsItemPreviewOutlineItem,
|
|
585
|
+
ni as ResultsItemPreviewOutlineItemIcon,
|
|
586
|
+
oi as ResultsItemPreviewOutlineItemLinkIcon,
|
|
587
|
+
ai as ResultsItemPreviewOutlineItemText,
|
|
588
|
+
ri as ResultsItemPreviewOutlineList,
|
|
589
|
+
ii as ResultsItemPreviewOutlineTitle,
|
|
590
|
+
Jt as ResultsItemPreviewTitle,
|
|
591
|
+
Xt as ResultsItemPreviewTitleLinkIcon,
|
|
592
|
+
Vt as ResultsItemTag,
|
|
593
|
+
Qt as ResultsItemTitle,
|
|
594
|
+
Ft as ResultsList,
|
|
595
|
+
kt as ResultsLoading,
|
|
596
|
+
Bt as ResultsScrollArea,
|
|
597
|
+
Ut as ResultsScrollAreaCorner,
|
|
598
|
+
Ht as ResultsScrollAreaScrollbar,
|
|
599
|
+
Mt as ResultsScrollAreaThumb,
|
|
600
|
+
Nt as ResultsScrollAreaViewport,
|
|
601
|
+
Ct as ResultsTab,
|
|
602
|
+
Ot as ResultsTabList,
|
|
595
603
|
_t as Root,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
604
|
+
mi as TaglineBrandName,
|
|
605
|
+
di as TaglineContainer,
|
|
606
|
+
ui as TaglineLogo,
|
|
607
|
+
li as TaglineText,
|
|
600
608
|
vt as Wrapper
|
|
601
609
|
};
|