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