@inkeep/cxkit-primitives 0.5.63 → 0.5.65

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.
Files changed (31) hide show
  1. package/dist/atoms/dialog.cjs +1 -1
  2. package/dist/atoms/dialog.js +2 -1
  3. package/dist/components/embedded-chat/chat-provider.cjs +1 -1
  4. package/dist/components/embedded-chat/chat-provider.js +9 -9
  5. package/dist/components/embedded-chat.cjs +4 -4
  6. package/dist/components/embedded-chat.js +803 -806
  7. package/dist/components/embedded-search/search-provider.cjs +1 -1
  8. package/dist/components/embedded-search/search-provider.js +1 -1
  9. package/dist/components/embedded-search.cjs +1 -1
  10. package/dist/components/embedded-search.js +281 -284
  11. package/dist/components/intelligent-form/intelligent-form-provider.cjs +1 -1
  12. package/dist/components/intelligent-form/intelligent-form-provider.js +3 -3
  13. package/dist/components/modal/use-inkeep-modal.cjs +1 -1
  14. package/dist/components/modal/use-inkeep-modal.js +21 -11
  15. package/dist/components/modal/widget-auto-focus.cjs +1 -0
  16. package/dist/components/modal/widget-auto-focus.js +16 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +0 -4
  19. package/dist/index.d.ts +0 -4
  20. package/dist/index.js +132 -133
  21. package/dist/providers/base-events-provider.cjs +1 -1
  22. package/dist/providers/base-events-provider.js +29 -29
  23. package/dist/providers/chat-events-provider.cjs +1 -1
  24. package/dist/providers/chat-events-provider.js +48 -49
  25. package/dist/providers/index.cjs +1 -1
  26. package/dist/providers/index.js +52 -53
  27. package/dist/providers/root-provider.cjs +1 -1
  28. package/dist/providers/root-provider.js +8 -7
  29. package/dist/providers/search-events-provider.cjs +1 -1
  30. package/dist/providers/search-events-provider.js +10 -11
  31. 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, useEffect as A, useState as q, useCallback as N, useRef as H } from "react";
7
- import { useSearch as m } from "./embedded-search/search-provider.js";
8
- import { SearchProvider as ui } from "./embedded-search/search-provider.js";
9
- import z from "./tagline-logo-icon.js";
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 k from "@radix-ui/react-scroll-area";
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 J } from "../providers/search-events-provider.js";
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 X } from "../utils/highlight-emphasis.js";
19
- import { useScrollingFades as Y } from "../hooks/use-scrolling-fades.js";
20
- import { useColorModeValue as Z } from "@inkeep/cxkit-color-mode";
21
- import ee from "../atoms/avatars/ai.js";
22
- import { useModal as $ } from "./modal/modal-provider.js";
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 O } from "../utils/compose-event-handlers.js";
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
- const ne = r("div", {
31
+ import { useWidgetAutoFocus as ne } from "./modal/widget-auto-focus.js";
32
+ const ae = r("div", {
32
33
  _id: "aiSearchWrapper"
33
- }), ht = (e) => {
34
+ }), vt = (e) => {
34
35
  const {
35
36
  searchSettings: { view: t }
36
- } = p(), { isHidden: i, hasContent: s } = m(), n = F("(max-width: 768px)"), o = $();
37
+ } = p(), { isHidden: i, hasContent: s } = u(), n = F("(max-width: 768px)"), o = ee();
37
38
  return /* @__PURE__ */ a(
38
- ne,
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
- }, ae = r("div", {
50
+ }, oe = r("div", {
50
51
  _id: "aiSearchRoot"
51
- }), It = (e) => {
52
- const { isHidden: t } = m(), i = F("(max-width: 768px)");
53
- return /* @__PURE__ */ a(ae, { "data-hidden": I(t), "data-mobile": I(i), ...e });
54
- }, oe = r(f.List, {
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
- }), vt = L((e, t) => {
57
+ }), St = L((e, t) => {
57
58
  const i = P((s) => s.value);
58
59
  return /* @__PURE__ */ a(
59
- oe,
60
+ ce,
60
61
  {
61
62
  "aria-activedescendant": `aiSearchResults__Item-${i}`,
62
63
  ...e,
63
64
  ref: t
64
65
  }
65
66
  );
66
- }), _t = r("div", {
67
+ }), pt = r("div", {
67
68
  _id: "aiSearchInputGroup"
68
- }), St = r(g, {
69
+ }), bt = r(g, {
69
70
  _id: "aiSearchInputIcon",
70
71
  iconKey: "search"
71
- }), ce = r(f.Input, {
72
+ }), le = r(f.Input, {
72
73
  _id: "aiSearchInput"
73
- }), pt = L(({ onInput: e, ...t }, i) => {
74
- const { inputRef: s, shouldAutoFocusInput: n } = m(), o = P((u) => u.value), l = F("(max-width: 768px)"), { searchSettings: c } = p(), d = w(
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), h = $();
78
- return A(() => {
79
- requestAnimationFrame(() => {
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
- }), le = r(U, {
88
+ }), de = r(U, {
92
89
  _id: "aiSearchLoading",
93
90
  iconSettings: {
94
91
  builtIn: "LuLoaderCircle"
95
92
  }
96
- }), bt = (e) => {
97
- const { loading: t, resultsList: i } = m();
98
- return !t || i.length === 0 ? null : /* @__PURE__ */ a(le, { ...e });
99
- }, de = r(f.Item, {
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
- }), Rt = (e) => {
103
- const { results: t, tab: i } = m(), s = V(), n = t[i]?.[0]?.id ?? "NONE";
99
+ }), gt = (e) => {
100
+ const { results: t, tab: i } = u(), s = V(), n = t[i]?.[0]?.id ?? "NONE";
104
101
  return /* @__PURE__ */ a(
105
- de,
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
- }, ue = r("img", {
110
+ }, me = r("img", {
114
111
  _id: "aiAskAITrigger__Icon"
115
- }), Pt = (e) => {
116
- const { aiChatSettings: t } = p(), { aiAssistantAvatar: i } = t ?? {}, s = typeof i == "string" ? i : i?.light, n = (typeof i == "string" ? i : i?.dark) ?? s, o = Z(s, n), [l, c] = q(o);
117
- return A(() => {
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(ue, { asChild: !0, ...e, children: l ? (
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: O(() => {
124
+ onError: y(() => {
128
125
  c(null);
129
126
  }),
130
127
  ...e
131
128
  }
132
129
  )
133
- ) : /* @__PURE__ */ a(ee, { "data-type": "icon", ...e }) });
134
- }, gt = r("span", {
130
+ ) : /* @__PURE__ */ a(Z, { "data-type": "icon", ...e }) });
131
+ }, Tt = r("span", {
135
132
  _id: "aiAskAITrigger__Label"
136
- }), wt = r(g, {
133
+ }), ft = r(g, {
137
134
  _id: "aiAskAITrigger__Indicator",
138
135
  iconKey: "openLinkInSameTab"
139
- }), me = r(C.Root, {
136
+ }), he = r(C.Root, {
140
137
  _id: "aiSearchResults"
141
- }), Tt = (e) => {
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 } = m(), v = V(), h = N(
145
- (u) => {
146
- l(), s(u);
147
- const S = c[u][0] ? c[u][0]?.id : void 0;
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 A(() => {
153
- let u = i in c ? i : Object.keys(c)[0];
154
- if (!c[u]?.length) {
155
- const b = Object.keys(c).find((y) => c[y]?.length);
156
- b ? u = b : u = d;
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 (!u) return;
159
- s(u);
160
- const S = c[u]?.[0];
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
- me,
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
- }, he = r("div", {
169
+ }, Ie = r("div", {
173
170
  _id: "aiSearchResults__Loading"
174
- }), ft = (e) => {
175
- const { loading: t, resultsList: i } = m();
176
- return !t || i.length > 0 ? null : /* @__PURE__ */ a(he, { ...e });
177
- }, Ie = r(f.Empty, {
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
- }), Et = (e) => {
180
- const t = P((l) => l.search), { loading: i, results: s, tab: n } = m(), o = s[n]?.length;
181
- return i || !t || o ? null : /* @__PURE__ */ a(Ie, { children: "No results found.", ...e });
182
- }, ve = r(C.List, {
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
- }), Lt = (e) => {
181
+ }), kt = (e) => {
185
182
  const { children: t, ...i } = e, {
186
183
  searchSettings: { tabs: s }
187
- } = p(), { results: n, loading: o, resultsList: l } = m();
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(ve, { tabIndex: -1, children: E(t, c), ...i });
191
- }, _e = r(C.Trigger, {
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
- }), At = L((e, t) => {
194
- const i = H(null), s = x(t, i), { tab: n, onClick: o, ...l } = e, { results: c, tab: d, inputRef: v } = m(), h = c[n].length, u = n === d, S = () => {
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 A(() => {
198
- u && b?.shadowHost?.shadowRoot?.activeElement?.hasAttribute("ikp-tab") && i.current?.focus();
199
- }, [u]), /* @__PURE__ */ a(
200
- _e,
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: u ? 0 : -1,
201
+ tabIndex: m ? 0 : -1,
205
202
  value: n,
206
203
  children: `${n} (${h})`,
207
- onClick: O(o, S),
204
+ onClick: y(o, S),
208
205
  ...l
209
206
  }
210
207
  );
211
- }), kt = r("div", {
208
+ }), Ot = r("div", {
212
209
  _id: "aiSearchResults__Content"
213
- }), Se = r(k.Root, {
210
+ }), pe = r(A.Root, {
214
211
  _id: "aiSearchResults__ScrollArea"
215
- }), yt = (e) => {
216
- const { loading: t, resultsList: i } = m();
217
- return t && i.length === 0 ? null : /* @__PURE__ */ a(Se, { tabIndex: -1, ...e });
218
- }, pe = r(k.Viewport, {
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
- }), Ot = L(({ children: e, ...t }, i) => {
221
- const s = Y(), n = x(i, s), { tab: o } = m();
222
- return A(() => {
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
- pe,
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
- }), Ct = r(
237
- k.ScrollAreaScrollbar,
233
+ }), Bt = r(
234
+ A.ScrollAreaScrollbar,
238
235
  {
239
236
  _id: "aiSearchResults__ScrollAreaScrollbar"
240
237
  }
241
- ), xt = r(k.ScrollAreaThumb, {
238
+ ), Nt = r(A.ScrollAreaThumb, {
242
239
  _id: "aiSearchResults__ScrollAreaThumb"
243
- }), Bt = r(k.Corner, {
240
+ }), Ht = r(A.Corner, {
244
241
  _id: "aiSearchResults__ScrollAreaCorner"
245
- }), be = r(C.Content, {
242
+ }), Re = r(C.Content, {
246
243
  _id: "aiSearchResults__List"
247
- }), Nt = (e) => {
248
- const { children: t, ...i } = e, { results: s, tab: n } = m(), o = s[n] ?? [];
244
+ }), Mt = (e) => {
245
+ const { children: t, ...i } = e, { results: s, tab: n } = u(), o = s[n] ?? [];
249
246
  return /* @__PURE__ */ a(
250
- be,
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
- }, Re = r(f.Item, {
257
+ }, Pe = r(f.Item, {
261
258
  _id: "aiSearchResults__Item",
262
259
  asChild: !0
263
- }), Ht = L(({ item: e, onClick: t, onSelect: i, children: s, ...n }, o) => {
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 } = J(), h = P((R) => R.search), { transitionsDisabled: u } = m(), S = P((R) => R.value), b = H(null), y = x(o, b), D = N((R) => {
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
- }, []), G = N(() => {
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, Q = K || (S === "NONE" || S === T), j = w(() => ({
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
- Re,
285
+ Pe,
289
286
  {
290
- ref: y,
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(u),
291
+ "data-disable-transitions": I(m),
295
292
  "data-view": c,
296
- onSelect: O(i, D),
297
- onClick: O(t, G),
293
+ onSelect: y(i, D),
294
+ onClick: y(t, $),
298
295
  "data-selected": I(K),
299
- tabIndex: Q ? 0 : -1,
296
+ tabIndex: G ? 0 : -1,
300
297
  ...n,
301
- children: /* @__PURE__ */ a(M, { ...j })
298
+ children: /* @__PURE__ */ a(M, { ...Q })
302
299
  }
303
300
  ) });
304
- }), Pe = r("div", {
301
+ }), ge = r("div", {
305
302
  _id: "aiSearchResults__ItemBreadcrumbs"
306
- }), ge = (e) => {
307
- const { source: t } = _(), { tab: i } = m();
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
- Pe,
308
+ ge,
312
309
  {
313
310
  "aria-hidden": "true",
314
311
  children: E(s, l),
315
312
  ...n
316
313
  }
317
314
  );
318
- }, we = r(g, {
315
+ }, Te = r(g, {
319
316
  _id: "aiSearchResults__ItemBreadcrumbIcon",
320
317
  iconKey: "breadcrumbSeparator"
321
- }), Te = r(U, {
318
+ }), fe = r(U, {
322
319
  _id: "aiSearchResults__ItemIcon"
323
- }), Mt = (e) => {
320
+ }), Ft = (e) => {
324
321
  const { source: t } = _();
325
- return /* @__PURE__ */ a(Te, { iconSettings: t.icon, "data-type": t.type, ...e });
326
- }, fe = r("span", {
322
+ return /* @__PURE__ */ a(fe, { iconSettings: t.icon, "data-type": t.type, ...e });
323
+ }, Ee = r("span", {
327
324
  _id: "aiSearchResults__ItemTitle"
328
- }), Ut = (e) => {
325
+ }), Dt = (e) => {
329
326
  const { source: t } = _();
330
- return /* @__PURE__ */ a(fe, { "data-type": t.type, children: t.title, ...e });
331
- }, Ee = r("span", {
327
+ return /* @__PURE__ */ a(Ee, { "data-type": t.type, children: t.title, ...e });
328
+ }, Le = r("span", {
332
329
  _id: "aiSearchResults__ItemTag"
333
- }), Ft = (e) => {
330
+ }), Kt = (e) => {
334
331
  const { source: t } = _();
335
- return /* @__PURE__ */ a(Ee, { "data-type": t.type, children: t.tag, ...e });
336
- }, Le = r("span", {
332
+ return /* @__PURE__ */ a(Le, { "data-type": t.type, children: t.tag, ...e });
333
+ }, Ae = r("span", {
337
334
  _id: "aiSearchResults__ItemDescription"
338
- }), Dt = (e) => {
339
- const { source: t } = _(), { children: i, ...s } = e, n = w(() => t.description ? X(t.description) : [], [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
- Le,
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
- }, Ae = r("span", {
346
+ }, ke = r("span", {
350
347
  _id: "aiSearchResults__ItemDescriptionPart"
351
- }), Kt = (e) => {
348
+ }), Wt = (e) => {
352
349
  const { part: t, ...i } = e, { source: s } = _();
353
350
  return typeof t == "string" ? t : /* @__PURE__ */ a(
354
- Ae,
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
- }, ke = r(g, {
359
+ }, ye = r(g, {
363
360
  _id: "aiSearchResults__ItemIndicator"
364
- }), Vt = (e) => {
361
+ }), $t = (e) => {
365
362
  const { source: t } = _(), {
366
363
  searchSettings: { view: i }
367
364
  } = p();
368
365
  return /* @__PURE__ */ a(
369
- ke,
366
+ ye,
370
367
  {
371
368
  iconKey: t.isExternal ? "openLinkInNewTab" : "openLinkInSameTab",
372
369
  "data-view": i,
373
370
  ...e
374
371
  }
375
372
  );
376
- }, ye = r("div", {
373
+ }, Oe = r("div", {
377
374
  _id: "aiSearchResults__ItemPreview",
378
375
  "aria-hidden": !0
379
- }), Wt = (e) => {
376
+ }), Gt = (e) => {
380
377
  const {
381
378
  searchSettings: { view: t, shouldOpenLinksInNewTab: i }
382
- } = p(), { results: s, tab: n } = m(), o = P((h) => h.value), l = s[n] ?? [], c = H(null), d = w(() => {
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((u) => u.id === o);
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(ye, { ...e }) });
390
- }, $t = r("div", {
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
- }), Oe = r(M, {
389
+ }), Ce = r(M, {
393
390
  _id: "aiSearchResults__ItemPreview__Heading"
394
- }), Gt = (e) => {
391
+ }), jt = (e) => {
395
392
  const { source: t } = _();
396
393
  return /* @__PURE__ */ a(
397
- Oe,
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
- }, Ce = r("span", {
403
+ }, xe = r("span", {
407
404
  _id: "aiSearchResults__ItemPreview__Title"
408
- }), Qt = (e) => {
405
+ }), qt = (e) => {
409
406
  const { source: t } = _();
410
- return /* @__PURE__ */ a(Ce, { children: t.title, ...e });
411
- }, xe = r(g, {
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
- }), jt = (e) => {
411
+ }), zt = (e) => {
415
412
  const { source: t } = _();
416
413
  return /* @__PURE__ */ a(
417
- xe,
414
+ Be,
418
415
  {
419
416
  iconKey: t.isExternal ? "openLinkInNewTab" : "openLinkInSameTab",
420
417
  ...e
421
418
  }
422
419
  );
423
- }, qt = r(
424
- ge,
420
+ }, Jt = r(
421
+ we,
425
422
  {
426
423
  _id: "aiSearchResults__ItemPreview__Breadcrumbs"
427
424
  }
428
- ), zt = r(
429
- we,
425
+ ), Xt = r(
426
+ Te,
430
427
  {
431
428
  _id: "aiSearchResults__ItemPreview__BreadcrumbIcon"
432
429
  }
433
- ), Be = r(ie, {
430
+ ), Ne = r(ie, {
434
431
  _id: "aiSearchResults__ItemPreview__Body"
435
- }), Jt = (e) => {
436
- const { source: t } = _(), { resultsList: i } = m(), s = i.find((o) => o.id === t.id), {
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
- Be,
437
+ Ne,
441
438
  {
442
439
  shouldOpenLinksInNewTab: n,
443
440
  children: s.preview,
444
441
  ...e
445
442
  }
446
443
  ) : null;
447
- }, Ne = r("div", {
444
+ }, He = r("div", {
448
445
  _id: "aiSearchResults__ItemPreview__Outline"
449
- }), Xt = (e) => {
450
- const { source: t } = _(), { resultsList: i } = m();
451
- return i.find((o) => o.id === t.id)?.rootRecord.topLevelHeadings?.length ? /* @__PURE__ */ a(Ne, { ...e }) : null;
452
- }, Yt = r("span", {
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
- }), He = r("ul", {
452
+ }), Me = r("ul", {
456
453
  _id: "aiSearchResults__ItemPreview__Outline__List"
457
- }), Zt = (e) => {
458
- const { source: t } = _(), { resultsList: i } = m(), s = i.find((d) => d.id === t.id), n = s?.rootRecord.topLevelHeadings;
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(He, { children: E(l, o), ...c });
468
- }, Me = r(M, {
464
+ return /* @__PURE__ */ a(Me, { children: E(l, o), ...c });
465
+ }, Ue = r(M, {
469
466
  _id: "aiSearchResults__ItemPreview__Outline__Item"
470
- }), ei = (e) => {
467
+ }), ii = (e) => {
471
468
  const {
472
469
  searchSettings: { shouldOpenLinksInNewTab: t }
473
470
  } = p();
474
- return /* @__PURE__ */ a(Me, { isExternal: t, ...e });
475
- }, ti = r(g, {
471
+ return /* @__PURE__ */ a(Ue, { isExternal: t, ...e });
472
+ }, ri = r(g, {
476
473
  _id: "aiSearchResults__ItemPreview__Outline__ItemIcon",
477
474
  iconKey: "newLine"
478
- }), Ue = r("span", {
475
+ }), Fe = r("span", {
479
476
  _id: "aiSearchResults__ItemPreview__Outline__ItemText"
480
- }), ii = (e) => /* @__PURE__ */ a(Ue, { ...e }), ri = r(
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
- ), Fe = r("div", {
485
+ ), De = r("div", {
489
486
  _id: "aiSearchFooter"
490
- }), si = (e) => {
491
- const { hasContent: t } = m();
492
- return /* @__PURE__ */ a(Fe, { "data-has-results": I(t), ...e });
493
- }, ni = r("div", {
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
- }), ai = r("span", {
492
+ }), ci = r("span", {
496
493
  _id: "aiSearchTagline__Text",
497
494
  children: "Powered by"
498
- }), oi = r(z, {
495
+ }), li = r(q, {
499
496
  _id: "aiSearchTagline__Logo"
500
- }), ci = r("a", {
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
- Rt as AskAITrigger,
509
- Pt as AskAITriggerIcon,
510
- wt as AskAITriggerIndicator,
511
- gt as AskAITriggerLabel,
512
- vt as Content,
513
- St as EmbeddedSearchInputIcon,
514
- Rt as EmbeddedSearchPrimitiveAskAITrigger,
515
- Pt as EmbeddedSearchPrimitiveAskAITriggerIcon,
516
- wt as EmbeddedSearchPrimitiveAskAITriggerIndicator,
517
- gt as EmbeddedSearchPrimitiveAskAITriggerLabel,
518
- vt as EmbeddedSearchPrimitiveContent,
519
- si as EmbeddedSearchPrimitiveFooter,
520
- pt as EmbeddedSearchPrimitiveInput,
521
- _t as EmbeddedSearchPrimitiveInputGroup,
522
- bt as EmbeddedSearchPrimitiveLoading,
523
- Tt as EmbeddedSearchPrimitiveResults,
524
- kt as EmbeddedSearchPrimitiveResultsContent,
525
- Et as EmbeddedSearchPrimitiveResultsEmpty,
526
- Ht as EmbeddedSearchPrimitiveResultsItem,
527
- ge as EmbeddedSearchPrimitiveResultsItemBreadcrumbs,
528
- Dt as EmbeddedSearchPrimitiveResultsItemDescription,
529
- Kt as EmbeddedSearchPrimitiveResultsItemDescriptionPart,
530
- Mt as EmbeddedSearchPrimitiveResultsItemIcon,
531
- Vt as EmbeddedSearchPrimitiveResultsItemIndicator,
532
- Wt as EmbeddedSearchPrimitiveResultsItemPreview,
533
- Jt as EmbeddedSearchPrimitiveResultsItemPreviewBody,
534
- zt as EmbeddedSearchPrimitiveResultsItemPreviewBreadcrumbIcon,
535
- Gt as EmbeddedSearchPrimitiveResultsItemPreviewHeading,
536
- Xt as EmbeddedSearchPrimitiveResultsItemPreviewOutline,
537
- ei as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItem,
538
- ti as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemIcon,
539
- ri as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemLinkIcon,
540
- ii as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemText,
541
- Zt as EmbeddedSearchPrimitiveResultsItemPreviewOutlineList,
542
- Yt as EmbeddedSearchPrimitiveResultsItemPreviewOutlineTitle,
543
- Qt as EmbeddedSearchPrimitiveResultsItemPreviewTitle,
544
- jt as EmbeddedSearchPrimitiveResultsItemPreviewTitleLinkIcon,
545
- Ft as EmbeddedSearchPrimitiveResultsItemTag,
546
- Ut as EmbeddedSearchPrimitiveResultsItemTitle,
547
- Nt as EmbeddedSearchPrimitiveResultsList,
548
- ft as EmbeddedSearchPrimitiveResultsLoading,
549
- yt as EmbeddedSearchPrimitiveResultsScrollArea,
550
- Ot as EmbeddedSearchPrimitiveResultsScrollAreaViewport,
551
- At as EmbeddedSearchPrimitiveResultsTab,
552
- Lt as EmbeddedSearchPrimitiveResultsTabList,
553
- It as EmbeddedSearchPrimitiveRoot,
554
- ht as EmbeddedSearchPrimitiveWrapper,
555
- si as Footer,
556
- pt as Input,
557
- _t as InputGroup,
558
- St as InputIcon,
559
- bt as Loading,
560
- oe as PrimitiveContent,
561
- ui as Provider,
562
- Tt as Results,
563
- kt as ResultsContent,
564
- Et as ResultsEmpty,
565
- Ht as ResultsItem,
566
- we as ResultsItemBreadcrumbIcon,
567
- ge as ResultsItemBreadcrumbs,
568
- Dt as ResultsItemDescription,
569
- Kt as ResultsItemDescriptionPart,
570
- Mt as ResultsItemIcon,
571
- Vt as ResultsItemIndicator,
572
- Wt as ResultsItemPreview,
573
- Jt as ResultsItemPreviewBody,
574
- zt as ResultsItemPreviewBreadcrumbIcon,
575
- qt as ResultsItemPreviewBreadcrumbs,
576
- $t as ResultsItemPreviewHeader,
577
- Gt as ResultsItemPreviewHeading,
578
- Xt as ResultsItemPreviewOutline,
579
- ei as ResultsItemPreviewOutlineItem,
580
- ti as ResultsItemPreviewOutlineItemIcon,
581
- ri as ResultsItemPreviewOutlineItemLinkIcon,
582
- ii as ResultsItemPreviewOutlineItemText,
583
- Zt as ResultsItemPreviewOutlineList,
584
- Yt as ResultsItemPreviewOutlineTitle,
585
- Qt as ResultsItemPreviewTitle,
586
- jt as ResultsItemPreviewTitleLinkIcon,
587
- Ft as ResultsItemTag,
588
- Ut as ResultsItemTitle,
589
- Nt as ResultsList,
590
- ft as ResultsLoading,
591
- yt as ResultsScrollArea,
592
- Bt as ResultsScrollAreaCorner,
593
- Ct as ResultsScrollAreaScrollbar,
594
- xt as ResultsScrollAreaThumb,
595
- Ot as ResultsScrollAreaViewport,
596
- At as ResultsTab,
597
- Lt as ResultsTabList,
598
- It as Root,
599
- ci as TaglineBrandName,
600
- ni as TaglineContainer,
601
- oi as TaglineLogo,
602
- ai as TaglineText,
603
- ht as Wrapper
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
  };