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