@inkeep/agents-ui-cloud 0.0.0-rc-20260310051343
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/components/api/analytics/events.cjs +1 -0
- package/dist/components/api/analytics/events.js +34 -0
- package/dist/components/chat-button-modal.cjs +1 -0
- package/dist/components/chat-button-modal.js +20 -0
- package/dist/components/chat-button.cjs +1 -0
- package/dist/components/chat-button.js +15 -0
- package/dist/components/default-settings.cjs +1 -0
- package/dist/components/default-settings.js +24 -0
- package/dist/components/embedded-chat.cjs +1 -0
- package/dist/components/embedded-chat.js +15 -0
- package/dist/components/embedded-search-and-chat.cjs +1 -0
- package/dist/components/embedded-search-and-chat.js +20 -0
- package/dist/components/embedded-search.cjs +1 -0
- package/dist/components/embedded-search.js +18 -0
- package/dist/components/hooks/use-base-settings.cjs +1 -0
- package/dist/components/hooks/use-base-settings.js +42 -0
- package/dist/components/hooks/use-browser-storage.cjs +1 -0
- package/dist/components/hooks/use-browser-storage.js +91 -0
- package/dist/components/hooks/use-search-settings.cjs +1 -0
- package/dist/components/hooks/use-search-settings.js +23 -0
- package/dist/components/hooks/use-user-properties.cjs +1 -0
- package/dist/components/hooks/use-user-properties.js +27 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.js +28 -0
- package/dist/components/modal.chat.cjs +1 -0
- package/dist/components/modal.chat.js +20 -0
- package/dist/components/modal.cjs +1 -0
- package/dist/components/modal.js +23 -0
- package/dist/components/modal.search-and-chat.cjs +1 -0
- package/dist/components/modal.search-and-chat.js +20 -0
- package/dist/components/modal.search.cjs +1 -0
- package/dist/components/modal.search.js +20 -0
- package/dist/components/searchbar.cjs +1 -0
- package/dist/components/searchbar.js +20 -0
- package/dist/components/sidebar-chat.cjs +1 -0
- package/dist/components/sidebar-chat.js +15 -0
- package/dist/components/utils/generate-uid.cjs +1 -0
- package/dist/components/utils/generate-uid.js +8 -0
- package/dist/components/utils/index.cjs +1 -0
- package/dist/components/utils/index.js +6 -0
- package/dist/components/utils/search-implementation.cjs +89 -0
- package/dist/components/utils/search-implementation.js +143 -0
- package/dist/components/utils/search.cjs +1 -0
- package/dist/components/utils/search.js +50 -0
- package/dist/components/utils/transform-source/breadcrumbs.cjs +1 -0
- package/dist/components/utils/transform-source/breadcrumbs.js +31 -0
- package/dist/components/utils/transform-source/common-words/long.cjs +1 -0
- package/dist/components/utils/transform-source/common-words/long.js +69 -0
- package/dist/components/utils/transform-source/common-words/lowercase.cjs +1 -0
- package/dist/components/utils/transform-source/common-words/lowercase.js +48 -0
- package/dist/components/utils/transform-source/common-words/short.cjs +1 -0
- package/dist/components/utils/transform-source/common-words/short.js +141 -0
- package/dist/components/utils/transform-source/description.cjs +1 -0
- package/dist/components/utils/transform-source/description.js +10 -0
- package/dist/components/utils/transform-source/icon.cjs +1 -0
- package/dist/components/utils/transform-source/icon.js +9 -0
- package/dist/components/utils/transform-source/index.cjs +1 -0
- package/dist/components/utils/transform-source/index.js +20 -0
- package/dist/components/utils/transform-source/tabs.cjs +1 -0
- package/dist/components/utils/transform-source/tabs.js +36 -0
- package/dist/components/utils/transform-source/title.cjs +1 -0
- package/dist/components/utils/transform-source/title.js +12 -0
- package/dist/components/utils/transform-source/utils/description-without-title.cjs +1 -0
- package/dist/components/utils/transform-source/utils/description-without-title.js +12 -0
- package/dist/components/utils/transform-source/utils/index.cjs +1 -0
- package/dist/components/utils/transform-source/utils/index.js +16 -0
- package/dist/components/utils/transform-source/utils/misc.cjs +1 -0
- package/dist/components/utils/transform-source/utils/misc.js +15 -0
- package/dist/components/utils/transform-source/utils/standardize-common-words.cjs +1 -0
- package/dist/components/utils/transform-source/utils/standardize-common-words.js +26 -0
- package/dist/components/utils/transform-source/utils/standardize-organization-display-name.cjs +1 -0
- package/dist/components/utils/transform-source/utils/standardize-organization-display-name.js +10 -0
- package/dist/components/utils/transform-source/utils/standardize-suffixes.cjs +1 -0
- package/dist/components/utils/transform-source/utils/standardize-suffixes.js +16 -0
- package/dist/components/utils/transform-source/utils/strip-branding-keywords.cjs +1 -0
- package/dist/components/utils/transform-source/utils/strip-branding-keywords.js +14 -0
- package/dist/components/utils.cjs +1 -0
- package/dist/components/utils.js +20 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +235 -0
- package/dist/index.d.ts +235 -0
- package/dist/index.js +28 -0
- package/package.json +74 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isGitHubUrl as a } from "./utils/misc.js";
|
|
3
|
+
var l = /* @__PURE__ */ ((t) => (t.Publications = "Publications", t.PDFs = "PDFs", t.GitHub = "GitHub", t.Forums = "Forums", t.Discord = "Discord", t.Slack = "Slack", t.StackOverflow = "StackOverflow", t))(l || {});
|
|
4
|
+
const f = (t, n) => {
|
|
5
|
+
const s = [];
|
|
6
|
+
t.type === "documentation" && t.contentType === "book" ? s.push(
|
|
7
|
+
"Publications"
|
|
8
|
+
/* Publications */
|
|
9
|
+
) : t.type === "documentation" && t.contentType === "pdf" && s.push(
|
|
10
|
+
"PDFs"
|
|
11
|
+
/* PDFs */
|
|
12
|
+
), (t.type === "github_issue" || a(t.url)) && s.push(
|
|
13
|
+
"GitHub"
|
|
14
|
+
/* GitHub */
|
|
15
|
+
), t.type === "discourse" && s.push(
|
|
16
|
+
"Forums"
|
|
17
|
+
/* Forums */
|
|
18
|
+
), t.type === "discord" && s.push(
|
|
19
|
+
"Discord"
|
|
20
|
+
/* Discord */
|
|
21
|
+
), t.type === "slack_message" && s.push(
|
|
22
|
+
"Slack"
|
|
23
|
+
/* Slack */
|
|
24
|
+
), t.type === "stackoverflow" && s.push(
|
|
25
|
+
"StackOverflow"
|
|
26
|
+
/* StackOverflow */
|
|
27
|
+
);
|
|
28
|
+
const e = [], p = n?.tabs?.map((i) => typeof i == "string" ? i : i[0]);
|
|
29
|
+
for (const i of s)
|
|
30
|
+
p?.includes(i) && (i === t.breadcrumbs?.[0] ? e.push([i, { breadcrumbs: t.breadcrumbs?.slice(1) }]) : e.push(i));
|
|
31
|
+
return e;
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
l as SourceTab,
|
|
35
|
+
f as getTabs
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./utils/strip-branding-keywords.cjs"),s=require("./utils/standardize-suffixes.cjs"),a=(i,r)=>{let e=i.title;if(!e)return"";const t=r?.organizationDisplayName;return e=s.standardizeSuffixes(e),t&&(e=n.stripBrandingKeywords(e,t)),e};exports.getTitle=a;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { stripBrandingKeywords as n } from "./utils/strip-branding-keywords.js";
|
|
3
|
+
import { standardizeSuffixes as o } from "./utils/standardize-suffixes.js";
|
|
4
|
+
const f = (r, e) => {
|
|
5
|
+
let t = r.title;
|
|
6
|
+
if (!t) return "";
|
|
7
|
+
const i = e?.organizationDisplayName;
|
|
8
|
+
return t = o(t), i && (t = n(t, i)), t;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
f as getTitle
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(t,i){if(!t)return;if(!i)return t;const e=i.trim(),r=[e,`<em>${e}</em>`].find(n=>t.startsWith(n));return r?t.slice(r.length).trim():t}exports.descriptionWithoutTitle=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./misc.cjs"),e=require("./standardize-organization-display-name.cjs"),s=require("./strip-branding-keywords.cjs"),t=require("./description-without-title.cjs"),r=require("./standardize-suffixes.cjs"),a=require("./standardize-common-words.cjs");exports.isGitHubUrl=i.isGitHubUrl;exports.isTitleCase=i.isTitleCase;exports.standardizeOrganizationDisplayName=e.standardizeOrganizationDisplayName;exports.stripBrandingKeywords=s.stripBrandingKeywords;exports.descriptionWithoutTitle=t.descriptionWithoutTitle;exports.standardizeSuffixes=r.standardizeSuffixes;exports.suffixMap=r.suffixMap;exports.transformCommonWords=a.transformCommonWords;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isGitHubUrl as i, isTitleCase as t } from "./misc.js";
|
|
2
|
+
import { standardizeOrganizationDisplayName as s } from "./standardize-organization-display-name.js";
|
|
3
|
+
import { stripBrandingKeywords as f } from "./strip-branding-keywords.js";
|
|
4
|
+
import { descriptionWithoutTitle as p } from "./description-without-title.js";
|
|
5
|
+
import { standardizeSuffixes as d, suffixMap as x } from "./standardize-suffixes.js";
|
|
6
|
+
import { transformCommonWords as u } from "./standardize-common-words.js";
|
|
7
|
+
export {
|
|
8
|
+
p as descriptionWithoutTitle,
|
|
9
|
+
i as isGitHubUrl,
|
|
10
|
+
t as isTitleCase,
|
|
11
|
+
s as standardizeOrganizationDisplayName,
|
|
12
|
+
d as standardizeSuffixes,
|
|
13
|
+
f as stripBrandingKeywords,
|
|
14
|
+
x as suffixMap,
|
|
15
|
+
u as transformCommonWords
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(t){return t.toLowerCase().replace(/(^\w+:|^)\/\//,"").replace(/^www\./,"").replace(/\/$/,"").startsWith("github.com")}function s(t){const r=t.split(" ");for(const e of r)if(e[0]!==e[0].toUpperCase()||e.slice(1)!==e.slice(1).toLowerCase())return!1;return!0}exports.isGitHubUrl=i;exports.isTitleCase=s;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function o(r) {
|
|
3
|
+
return r.toLowerCase().replace(/(^\w+:|^)\/\//, "").replace(/^www\./, "").replace(/\/$/, "").startsWith("github.com");
|
|
4
|
+
}
|
|
5
|
+
function s(r) {
|
|
6
|
+
const t = r.split(" ");
|
|
7
|
+
for (const e of t)
|
|
8
|
+
if (e[0] !== e[0].toUpperCase() || e.slice(1) !== e.slice(1).toLowerCase())
|
|
9
|
+
return !1;
|
|
10
|
+
return !0;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
o as isGitHubUrl,
|
|
14
|
+
s as isTitleCase
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../common-words/short.cjs"),a=require("../common-words/lowercase.cjs"),i=require("../common-words/long.cjs");function c(n){return`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`}function s(n,e,t,r=!1){return r&&new RegExp(`^${t}\\b`,"i").test(n)?n:n.replace(new RegExp(t,"gi"),e)}function l(n){let e=n;return e=a.lowercase.reduce((t,r)=>{const o=c(r);return s(t,r,o,!0)},e),e=i.long.reduce((t,r)=>{const o=c(r);return s(t,r,o)},e),e=u.short.reduce((t,r)=>{const o=c(r);return s(t,r,o)},e),e}exports.transformCommonWords=l;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { short as i } from "../common-words/short.js";
|
|
3
|
+
import { lowercase as s } from "../common-words/lowercase.js";
|
|
4
|
+
import { long as a } from "../common-words/long.js";
|
|
5
|
+
function o(n) {
|
|
6
|
+
return `\\b${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`;
|
|
7
|
+
}
|
|
8
|
+
function u(n, r, t, e = !1) {
|
|
9
|
+
return e && new RegExp(`^${t}\\b`, "i").test(n) ? n : n.replace(new RegExp(t, "gi"), r);
|
|
10
|
+
}
|
|
11
|
+
function g(n) {
|
|
12
|
+
let r = n;
|
|
13
|
+
return r = s.reduce((t, e) => {
|
|
14
|
+
const c = o(e);
|
|
15
|
+
return u(t, e, c, !0);
|
|
16
|
+
}, r), r = a.reduce((t, e) => {
|
|
17
|
+
const c = o(e);
|
|
18
|
+
return u(t, e, c);
|
|
19
|
+
}, r), r = i.reduce((t, e) => {
|
|
20
|
+
const c = o(e);
|
|
21
|
+
return u(t, e, c);
|
|
22
|
+
}, r), r;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
g as transformCommonWords
|
|
26
|
+
};
|
package/dist/components/utils/transform-source/utils/standardize-organization-display-name.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./misc.cjs");function t(e,i){if(!s.isTitleCase(i))return e;const r=`(?<![@/])\\b${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`;return new RegExp(`^${r}\\b`,"i").test(e)?e:e.replace(new RegExp(r,"gi"),i)}exports.standardizeOrganizationDisplayName=t;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isTitleCase as s } from "./misc.js";
|
|
3
|
+
function p(e, r) {
|
|
4
|
+
if (!s(r)) return e;
|
|
5
|
+
const i = `(?<![@/])\\b${r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`;
|
|
6
|
+
return new RegExp(`^${i}\\b`, "i").test(e) ? e : e.replace(new RegExp(i, "gi"), r);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
p as standardizeOrganizationDisplayName
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={js:".js",db:"DB",sql:"SQL"};function a(t){return Object.entries(e).reduce((s,[n,r])=>{const i=new RegExp(`([a-zA-Z0-9])${n}(?!\\w)`,"g");return s.replace(i,(f,u)=>u+r)},t)}exports.standardizeSuffixes=a;exports.suffixMap=e;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const u = {
|
|
3
|
+
js: ".js",
|
|
4
|
+
db: "DB",
|
|
5
|
+
sql: "SQL"
|
|
6
|
+
};
|
|
7
|
+
function i(e) {
|
|
8
|
+
return Object.entries(u).reduce((t, [n, r]) => {
|
|
9
|
+
const s = new RegExp(`([a-zA-Z0-9])${n}(?!\\w)`, "g");
|
|
10
|
+
return t.replace(s, (a, c) => c + r);
|
|
11
|
+
}, e);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
i as standardizeSuffixes,
|
|
15
|
+
u as suffixMap
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(s,t){const e=["API","Docs","Documentation","Blogs",t],n=["\\|","-",":"],o=new RegExp(`^\\s*(${e.join("|")})(\\.\\w+)?\\s*(${n.join("|")})\\s*`,"gi"),r=new RegExp(`\\s*(${n.join("|")})\\s*(${e.join("|")})\\s*$`,"gi");return s.replace(o,"").replace(r,"").trim()}exports.stripBrandingKeywords=i;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function r(s, o) {
|
|
3
|
+
const e = ["API", "Docs", "Documentation", "Blogs", o], n = ["\\|", "-", ":"], t = new RegExp(
|
|
4
|
+
`^\\s*(${e.join("|")})(\\.\\w+)?\\s*(${n.join("|")})\\s*`,
|
|
5
|
+
"gi"
|
|
6
|
+
), i = new RegExp(
|
|
7
|
+
`\\s*(${n.join("|")})\\s*(${e.join("|")})\\s*$`,
|
|
8
|
+
"gi"
|
|
9
|
+
);
|
|
10
|
+
return s.replace(t, "").replace(i, "").trim();
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as stripBrandingKeywords
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function u(...e){return n=>{for(const t of e)s(t,n)}}function c(e,n,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e?.(o),t===!1||!o.defaultPrevented)return n?.(o)}}exports.composeEventHandlers=c;exports.composeRefs=u;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function f(n, e) {
|
|
3
|
+
typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
4
|
+
}
|
|
5
|
+
function c(...n) {
|
|
6
|
+
return (e) => {
|
|
7
|
+
for (const t of n)
|
|
8
|
+
f(t, e);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function i(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
12
|
+
return function(o) {
|
|
13
|
+
if (n?.(o), t === !1 || !o.defaultPrevented)
|
|
14
|
+
return e?.(o);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
i as composeEventHandlers,
|
|
19
|
+
c as composeRefs
|
|
20
|
+
};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/embedded-chat.cjs"),d=require("./components/sidebar-chat.cjs"),n=require("./components/embedded-search-and-chat.cjs"),r=require("./components/embedded-search.cjs"),o=require("./components/modal.chat.cjs"),c=require("./components/modal.search-and-chat.cjs"),h=require("./components/modal.search.cjs"),e=require("./components/modal.cjs"),p=require("./components/chat-button.cjs"),s=require("./components/chat-button-modal.cjs"),l=require("./components/searchbar.cjs"),a=require("./components/utils.cjs");exports.InkeepEmbeddedChat=t.InkeepEmbeddedChat;exports.InkeepSidebarChat=d.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=n.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearch=r.InkeepEmbeddedSearch;exports.InkeepModalChat=o.InkeepModalChat;exports.InkeepModalSearchAndChat=c.InkeepModalSearchAndChat;exports.InkeepModalSearch=h.InkeepModalSearch;exports.InkeepModal=e.InkeepModal;exports.ModalContent=e.ModalContent;exports.InkeepChatButton=p.InkeepChatButton;exports.InkeepChatButtonModal=s.InkeepChatButtonModal;exports.InkeepSearchBar=l.InkeepSearchBar;exports.composeEventHandlers=a.composeEventHandlers;exports.composeRefs=a.composeRefs;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { InkeepAIChatSettings } from '@inkeep/agents-ui/types';
|
|
2
|
+
import { InkeepBaseSettings } from '@inkeep/agents-ui/types';
|
|
3
|
+
import { InkeepChatButtonModalProps as InkeepChatButtonModalProps_2 } from '@inkeep/agents-ui';
|
|
4
|
+
import { InkeepChatButtonProps as InkeepChatButtonProps_2 } from '@inkeep/agents-ui';
|
|
5
|
+
import { InkeepEmbeddedChatProps as InkeepEmbeddedChatProps_2 } from '@inkeep/agents-ui';
|
|
6
|
+
import { InkeepEmbeddedSearchAndChatProps as InkeepEmbeddedSearchAndChatProps_2 } from '@inkeep/agents-ui';
|
|
7
|
+
import { InkeepEmbeddedSearchProps as InkeepEmbeddedSearchProps_2 } from '@inkeep/agents-ui';
|
|
8
|
+
import { InkeepModalSearchAndChatProps as InkeepModalSearchAndChatProps_2 } from '@inkeep/agents-ui';
|
|
9
|
+
import { InkeepSearchBarProps as InkeepSearchBarProps_2 } from '@inkeep/agents-ui';
|
|
10
|
+
import { InkeepSearchSettings } from '@inkeep/agents-ui/types';
|
|
11
|
+
import { InkeepSidebarChatProps as InkeepSidebarChatProps_2 } from '@inkeep/agents-ui';
|
|
12
|
+
import { JSX } from 'react/jsx-runtime';
|
|
13
|
+
import { OpenSettingsModal } from '@inkeep/agents-ui/types';
|
|
14
|
+
import { PropsWithChildren } from 'react';
|
|
15
|
+
import { RootProviderProps } from '@inkeep/agents-ui';
|
|
16
|
+
import { SearchAndChatFilters } from '@inkeep/agents-ui/types';
|
|
17
|
+
import { WebWidgetInteractionType } from '@inkeep/agents-ui';
|
|
18
|
+
|
|
19
|
+
export declare function composeEventHandlers<E>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
|
20
|
+
checkForDefaultPrevented?: boolean | undefined;
|
|
21
|
+
}): (event: E) => void;
|
|
22
|
+
|
|
23
|
+
export declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
24
|
+
|
|
25
|
+
declare enum GitHubIssueState {
|
|
26
|
+
Closed = "CLOSED",
|
|
27
|
+
Open = "OPEN"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Element;
|
|
31
|
+
|
|
32
|
+
export declare function InkeepChatButtonModal(props: InkeepChatButtonModalProps): JSX.Element;
|
|
33
|
+
|
|
34
|
+
export declare interface InkeepChatButtonModalProps extends InkeepChatButtonModalProps_2 {
|
|
35
|
+
baseSettings: InkeepChatButtonModalProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
36
|
+
aiChatSettings: InkeepChatButtonModalProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
37
|
+
searchSettings: InkeepChatButtonModalProps_2['searchSettings'] & InkeepClosedSearchSettings;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export declare interface InkeepChatButtonProps extends InkeepChatButtonProps_2 {
|
|
41
|
+
baseSettings: InkeepChatButtonProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
42
|
+
aiChatSettings: InkeepChatButtonProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare interface InkeepClosedAIChatSettings extends InkeepAIChatSettings {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare interface InkeepClosedBaseSettings extends InkeepBaseSettings {
|
|
49
|
+
/**
|
|
50
|
+
* Custom base URL for analytics API endpoints.
|
|
51
|
+
* Useful when routing analytics requests through a proxy.
|
|
52
|
+
* Should include protocol (e.g., 'https://analytics.your-proxy.com')
|
|
53
|
+
*/
|
|
54
|
+
analyticsApiBaseUrl?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Environment setting for the widget.
|
|
57
|
+
* Affects API endpoints and debug behaviors.
|
|
58
|
+
* @default 'production'
|
|
59
|
+
*/
|
|
60
|
+
env?: 'development' | 'production';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare interface InkeepClosedSearchSettings extends InkeepSearchSettings {
|
|
64
|
+
/**
|
|
65
|
+
* The API key to use for authenticating with Inkeep's services.
|
|
66
|
+
* Required for accessing Inkeep's API endpoints.
|
|
67
|
+
*/
|
|
68
|
+
apiKey?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Custom base URL for search API endpoints.
|
|
71
|
+
* Useful when routing API requests through a proxy.
|
|
72
|
+
* Should include protocol (e.g., 'https://api.your-proxy.com')
|
|
73
|
+
*/
|
|
74
|
+
url?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Search-specific filters to apply to search operations.
|
|
77
|
+
* These are merged with base filters from baseSettings.
|
|
78
|
+
*/
|
|
79
|
+
filters?: SearchAndChatFilters;
|
|
80
|
+
/**
|
|
81
|
+
* The maximum number of hits to return.
|
|
82
|
+
* @default 40
|
|
83
|
+
*/
|
|
84
|
+
maxResults?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Advanced search callback function that handles search with full filter support.
|
|
87
|
+
* This callback handles the complete search implementation with SearchInput.
|
|
88
|
+
* This is used internally by the closed implementation.
|
|
89
|
+
*
|
|
90
|
+
* @param searchInput - The search input containing query and filters
|
|
91
|
+
* @param abortSignal - Signal to abort the search request
|
|
92
|
+
* @returns Promise that resolves with search results
|
|
93
|
+
*/
|
|
94
|
+
onSearchWithFilters?: (searchInput: SearchInput, abortSignal: AbortSignal) => Promise<SearchHit[]>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare function InkeepEmbeddedChat(props: InkeepEmbeddedChatProps): JSX.Element;
|
|
98
|
+
|
|
99
|
+
export declare interface InkeepEmbeddedChatProps extends InkeepEmbeddedChatProps_2 {
|
|
100
|
+
baseSettings: InkeepEmbeddedChatProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
101
|
+
aiChatSettings: InkeepEmbeddedChatProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps): JSX.Element;
|
|
105
|
+
|
|
106
|
+
export declare function InkeepEmbeddedSearchAndChat(props: InkeepEmbeddedSearchAndChatProps): JSX.Element;
|
|
107
|
+
|
|
108
|
+
export declare interface InkeepEmbeddedSearchAndChatProps extends InkeepEmbeddedSearchAndChatProps_2 {
|
|
109
|
+
baseSettings: InkeepEmbeddedSearchAndChatProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
110
|
+
aiChatSettings: InkeepEmbeddedSearchAndChatProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
111
|
+
searchSettings: InkeepEmbeddedSearchAndChatProps_2['searchSettings'] & InkeepClosedSearchSettings;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export declare interface InkeepEmbeddedSearchProps extends InkeepEmbeddedSearchProps_2 {
|
|
115
|
+
baseSettings: InkeepEmbeddedSearchProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
116
|
+
searchSettings: InkeepEmbeddedSearchProps_2['searchSettings'] & InkeepClosedSearchSettings;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare function InkeepModal(props: InkeepModalProps): JSX.Element;
|
|
120
|
+
|
|
121
|
+
export declare function InkeepModalChat(props: InkeepModalChatProps): JSX.Element;
|
|
122
|
+
|
|
123
|
+
export declare interface InkeepModalChatProps extends InkeepEmbeddedChatProps_2 {
|
|
124
|
+
openSettings?: OpenSettingsModal;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export declare interface InkeepModalProps extends ModalConfig {
|
|
128
|
+
/**
|
|
129
|
+
* The content of the modal.
|
|
130
|
+
*/
|
|
131
|
+
children: React.ReactNode;
|
|
132
|
+
/**
|
|
133
|
+
* The interaction type for the modal widget.
|
|
134
|
+
*/
|
|
135
|
+
componentType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export declare function InkeepModalSearch(props: InkeepModalSearchProps): JSX.Element;
|
|
139
|
+
|
|
140
|
+
export declare function InkeepModalSearchAndChat(props: InkeepModalSearchAndChatProps): JSX.Element;
|
|
141
|
+
|
|
142
|
+
export declare interface InkeepModalSearchAndChatProps extends InkeepModalSearchAndChatProps_2 {
|
|
143
|
+
baseSettings: InkeepModalSearchAndChatProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
144
|
+
aiChatSettings: InkeepModalSearchAndChatProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
145
|
+
searchSettings: InkeepModalSearchAndChatProps_2['searchSettings'] & InkeepClosedSearchSettings;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearchProps_2, 'onToggleView'> {
|
|
149
|
+
openSettings?: OpenSettingsModal;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export declare function InkeepSearchBar(props: InkeepSearchBarProps): JSX.Element;
|
|
153
|
+
|
|
154
|
+
export declare interface InkeepSearchBarProps extends InkeepSearchBarProps_2 {
|
|
155
|
+
baseSettings: InkeepSearchBarProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
156
|
+
aiChatSettings: InkeepSearchBarProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
157
|
+
searchSettings: InkeepSearchBarProps_2['searchSettings'] & InkeepClosedSearchSettings;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): JSX.Element;
|
|
161
|
+
|
|
162
|
+
export declare interface InkeepSidebarChatProps extends InkeepSidebarChatProps_2 {
|
|
163
|
+
baseSettings: InkeepSidebarChatProps_2['baseSettings'] & InkeepClosedBaseSettings;
|
|
164
|
+
aiChatSettings: InkeepSidebarChatProps_2['aiChatSettings'] & InkeepClosedAIChatSettings;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare type InputMaybe<T> = T | null;
|
|
168
|
+
|
|
169
|
+
declare interface ModalConfig extends RootConfig {
|
|
170
|
+
/**
|
|
171
|
+
* The configuration for the modal.
|
|
172
|
+
*/
|
|
173
|
+
openSettings?: OpenSettingsModal;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export declare function ModalContent(props: PropsWithChildren): JSX.Element;
|
|
177
|
+
|
|
178
|
+
declare type PossibleRef<T> = React.Ref<T | null> | undefined;
|
|
179
|
+
|
|
180
|
+
declare type RecordTypes = 'DocumentationRecord' | 'GitHubIssueRecord' | 'StackOverflowRecord' | 'DiscordRecord' | 'SlackEntry' | 'DiscourseRecord';
|
|
181
|
+
|
|
182
|
+
declare type RootConfig = RootProviderProps['config'];
|
|
183
|
+
|
|
184
|
+
declare type SearchFiltersInput = {
|
|
185
|
+
limit: number;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
declare interface SearchHit {
|
|
189
|
+
hitOnRoot: boolean;
|
|
190
|
+
id: string;
|
|
191
|
+
rootRecord: SearchRootRecord;
|
|
192
|
+
title?: string;
|
|
193
|
+
url?: string;
|
|
194
|
+
preview?: string;
|
|
195
|
+
pathHeadings?: {
|
|
196
|
+
anchor?: string | null;
|
|
197
|
+
content: string;
|
|
198
|
+
}[];
|
|
199
|
+
content?: {
|
|
200
|
+
content: string;
|
|
201
|
+
anchor?: string | null;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare type SearchInput = {
|
|
206
|
+
filters?: InputMaybe<SearchFiltersInput>;
|
|
207
|
+
searchQuery: string;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
declare interface SearchRootRecord {
|
|
211
|
+
__typename: RecordTypes;
|
|
212
|
+
id: string;
|
|
213
|
+
title?: string;
|
|
214
|
+
url?: string;
|
|
215
|
+
preview?: string;
|
|
216
|
+
pathBreadcrumbs?: string[];
|
|
217
|
+
contentType?: string;
|
|
218
|
+
topLevelHeadings?: TopLevelHeading[];
|
|
219
|
+
body?: string;
|
|
220
|
+
state?: `${GitHubIssueState}`;
|
|
221
|
+
markedAsCorrectAnswer?: {
|
|
222
|
+
url: string;
|
|
223
|
+
score: number;
|
|
224
|
+
content: string;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare interface TopLevelHeading {
|
|
229
|
+
anchor?: string | null;
|
|
230
|
+
url?: string | null;
|
|
231
|
+
content: string;
|
|
232
|
+
isMatch?: boolean;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export { }
|