@inkeep/cxkit-primitives 0.5.2 → 0.5.4

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 (65) hide show
  1. package/dist/atoms/link.cjs +1 -1
  2. package/dist/atoms/link.js +5 -5
  3. package/dist/components/chat-button.cjs +1 -1
  4. package/dist/components/chat-button.js +21 -21
  5. package/dist/components/embedded-chat/use-captcha.cjs +1 -1
  6. package/dist/components/embedded-chat/use-captcha.d.cts +2 -2
  7. package/dist/components/embedded-chat/use-captcha.d.ts +2 -2
  8. package/dist/components/embedded-chat/use-captcha.js +1 -1
  9. package/dist/components/embedded-chat/use-chat-action.cjs +1 -1
  10. package/dist/components/embedded-chat/use-chat-action.js +9 -9
  11. package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
  12. package/dist/components/embedded-chat/use-inkeep-chat.js +39 -39
  13. package/dist/components/embedded-chat.cjs +4 -4
  14. package/dist/components/embedded-chat.d.cts +6 -6
  15. package/dist/components/embedded-chat.d.ts +6 -6
  16. package/dist/components/embedded-chat.js +707 -708
  17. package/dist/components/embedded-search/transform-results.cjs +1 -1
  18. package/dist/components/embedded-search/transform-results.js +3 -3
  19. package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
  20. package/dist/components/embedded-search/use-inkeep-search.js +36 -36
  21. package/dist/components/embedded-search.cjs +1 -1
  22. package/dist/components/embedded-search.js +60 -60
  23. package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -1
  24. package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +35 -35
  25. package/dist/components/intelligent-form.cjs +1 -1
  26. package/dist/components/intelligent-form.d.cts +3 -3
  27. package/dist/components/intelligent-form.d.ts +3 -3
  28. package/dist/components/intelligent-form.js +106 -106
  29. package/dist/components/modal/modal-provider.d.cts +1 -1
  30. package/dist/components/modal/modal-provider.d.ts +1 -1
  31. package/dist/components/modal/use-inkeep-modal.cjs +1 -1
  32. package/dist/components/modal/use-inkeep-modal.d.cts +1 -1
  33. package/dist/components/modal/use-inkeep-modal.d.ts +1 -1
  34. package/dist/components/modal/use-inkeep-modal.js +4 -4
  35. package/dist/components/modal.cjs +1 -1
  36. package/dist/components/modal.js +5 -5
  37. package/dist/hooks/use-browser-storage.cjs +1 -1
  38. package/dist/hooks/use-browser-storage.js +6 -6
  39. package/dist/providers/base-events-provider.cjs +1 -1
  40. package/dist/providers/base-events-provider.js +22 -22
  41. package/dist/providers/chat-events-provider.cjs +1 -1
  42. package/dist/providers/chat-events-provider.js +46 -39
  43. package/dist/providers/chat-form-provider.cjs +1 -1
  44. package/dist/providers/chat-form-provider.js +40 -40
  45. package/dist/providers/config-provider.cjs +1 -1
  46. package/dist/providers/config-provider.d.cts +7 -7
  47. package/dist/providers/config-provider.d.ts +7 -7
  48. package/dist/providers/config-provider.js +24 -24
  49. package/dist/providers/feedback-provider.cjs +1 -1
  50. package/dist/providers/feedback-provider.js +10 -10
  51. package/dist/providers/root-provider.cjs +1 -1
  52. package/dist/providers/root-provider.d.cts +1 -1
  53. package/dist/providers/root-provider.d.ts +1 -1
  54. package/dist/providers/root-provider.js +2 -2
  55. package/dist/providers/theme-provider.cjs +1 -1
  56. package/dist/providers/theme-provider.js +32 -30
  57. package/dist/providers/user-provider.cjs +1 -1
  58. package/dist/providers/user-provider.js +14 -14
  59. package/dist/utils/default-settings.cjs +1 -1
  60. package/dist/utils/default-settings.d.cts +20 -20
  61. package/dist/utils/default-settings.d.ts +20 -20
  62. package/dist/utils/default-settings.js +32 -31
  63. package/dist/utils/form.cjs +1 -1
  64. package/dist/utils/form.js +11 -11
  65. package/package.json +5 -5
@@ -1,59 +1,61 @@
1
1
  "use client";
2
- import { jsxs as A, Fragment as D, jsx as l } from "react/jsx-runtime";
2
+ import { jsxs as A, Fragment as D, jsx as d } from "react/jsx-runtime";
3
3
  import { createColorScheme as E, createCSSVariables as H } from "@inkeep/cxkit-theme";
4
4
  import { ColorModeProvider as N } from "@inkeep/cxkit-color-mode";
5
5
  import { useInkeepConfig as P } from "./config-provider.js";
6
6
  import { merge as R } from "merge-anything";
7
- import { useCustomStyles as T } from "../atoms/custom-styles.js";
7
+ import { useCustomStyles as q } from "../atoms/custom-styles.js";
8
8
  import { useState as B, useRef as L, useEffect as O } from "react";
9
- const Y = ({ children: d }) => {
10
- const { baseSettings: m } = P(), { theme: t, primaryBrandColor: u, shadowHost: f, rootElement: b, colorMode: h } = m, { primaryColors: C, varsClassName: g } = t, { fontFamily: M, fontSize: p, zIndex: y } = t, S = E(C, u), v = {
11
- colors: R(t.colors, S),
12
- fontFamily: M,
13
- fontSize: p,
14
- zIndex: y
15
- }, k = H(v), { customStyles: x, loaded: I } = T(), { sync: e, forcedColorMode: V, ...w } = h ?? {}, [F, n] = B(), j = L(null);
9
+ const Z = ({ children: u }) => {
10
+ const { baseSettings: m } = P(), { theme: r, primaryBrandColor: f, shadowHost: g, rootElement: b, colorMode: h } = m, { primaryColors: C, varsClassName: y } = r, { fontFamily: p, fontSize: M, zIndex: S } = r, v = E(C, f), k = {
11
+ colors: R(r.colors, v),
12
+ fontFamily: p,
13
+ fontSize: M,
14
+ zIndex: S
15
+ }, x = H(k), { customStyles: I, loaded: V } = q(), { sync: e, forcedColorMode: w, ...F } = h ?? {}, [T, c] = B(), j = L(null);
16
16
  return O(() => {
17
17
  if (!e?.target) return;
18
- function c(s, o) {
19
- return o.reduce(
20
- (z, a) => ({
18
+ const o = typeof e.target == "string" ? document.querySelector(e.target) : e.target;
19
+ if (!o) return;
20
+ function i(n, t) {
21
+ return t.reduce(
22
+ (z, l) => ({
21
23
  ...z,
22
- [a]: s.getAttribute(a)
24
+ [l]: n.getAttribute(l)
23
25
  }),
24
26
  {}
25
27
  );
26
28
  }
27
- const r = new MutationObserver(() => {
28
- const s = c(e.target, e.attributes), o = e.isDarkMode(s) ? "dark" : "light";
29
- e.onChange?.(o), n(o);
29
+ const s = new MutationObserver(() => {
30
+ const n = i(o, e.attributes), t = e.isDarkMode?.(n) ? "dark" : "light";
31
+ e.onChange?.(t), c(t);
30
32
  });
31
- r.observe(e.target, {
33
+ s.observe(o, {
32
34
  attributes: !0,
33
35
  attributeFilter: e.attributes,
34
36
  childList: !1,
35
37
  subtree: !1
36
- }), j.current = r;
37
- const i = e.isDarkMode(c(e.target, e?.attributes)) ? "dark" : "light";
38
- return e.onChange?.(i), n(i), () => r.disconnect();
38
+ }), j.current = s;
39
+ const a = e.isDarkMode?.(i(o, e?.attributes)) ? "dark" : "light";
40
+ return e.onChange?.(a), c(a), () => s.disconnect();
39
41
  }, [e]), /* @__PURE__ */ A(D, { children: [
40
- x,
41
- I && /* @__PURE__ */ l(
42
+ I,
43
+ V && /* @__PURE__ */ d(
42
44
  N,
43
45
  {
44
- forcedColorMode: V ?? F,
45
- ...w,
46
- shadowHostId: f?.id,
46
+ forcedColorMode: w ?? T,
47
+ ...F,
48
+ shadowHostId: g?.id,
47
49
  rootId: b?.id,
48
- children: /* @__PURE__ */ l(
50
+ children: /* @__PURE__ */ d(
49
51
  "div",
50
52
  {
51
- className: g,
53
+ className: y,
52
54
  style: {
53
55
  display: "contents",
54
- ...k
56
+ ...x
55
57
  },
56
- children: d
58
+ children: u
57
59
  }
58
60
  )
59
61
  }
@@ -61,5 +63,5 @@ const Y = ({ children: d }) => {
61
63
  ] });
62
64
  };
63
65
  export {
64
- Y as ThemeProvider
66
+ Z as ThemeProvider
65
67
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),r=require("react"),O=require("./config-provider.cjs"),d=require("../hooks/use-browser-storage.cjs"),m=require("../utils/generate-uid.cjs"),l=r.createContext(void 0),p=({children:t})=>{const{baseSettings:{userProperties:s,analytics:g}}=O.useInkeepConfig(),{optOutAllAnalytics:e,optOutAnalyticalCookies:n}=g,{browserStorage:u,setBrowserStorage:c}=d.useBrowserStorage(),a=r.useMemo(()=>d.passesBrowserStorageChecks(),[]),o=r.useMemo(()=>!e&&!n&&a,[e,n,a]),i=r.useMemo(()=>{const U=e?"ANONYMOUS":s.id?"ID_PROVIDED":o?"COOKIED":"ANONYMOUS",v=e?void 0:s.id||o&&u.userId||m.generateUid();return{identificationType:U,id:v,email:e?void 0:s.email,cohorts:e?void 0:s.cohorts}},[s,e,o,u.userId]);return r.useEffect(()=>{o?c("userId",i.id):c("userId",void 0)},[o,i.id]),S.jsx(l.Provider,{value:{userProperties:i},children:t})},w=()=>{const t=r.useContext(l);if(!t)throw new Error("useUser must be used within a UserProvider");return t};exports.UserProvider=p;exports.useUser=w;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),r=require("react"),p=require("./config-provider.cjs"),a=require("../hooks/use-browser-storage.cjs"),O=require("../utils/generate-uid.cjs"),g=r.createContext(void 0),P=({children:t})=>{const{baseSettings:{userProperties:s,privacyPreferences:l}}=p.useInkeepConfig(),{optOutAllAnalytics:e,optOutAnalyticalCookies:n}=l,{browserStorage:c,setBrowserStorage:u}=a.useBrowserStorage(),d=r.useMemo(()=>a.passesBrowserStorageChecks(),[]),o=r.useMemo(()=>!e&&!n&&d,[e,n,d]),i=r.useMemo(()=>{const v=e?"ANONYMOUS":s.id?"ID_PROVIDED":o?"COOKIED":"ANONYMOUS",U=e?void 0:s.id||o&&c.userId||O.generateUid();return{identificationType:v,id:U,email:e?void 0:s.email,cohorts:e?void 0:s.cohorts}},[s,e,o,c.userId]);return r.useEffect(()=>{o?u("userId",i.id):u("userId",void 0)},[o,i.id]),S.jsx(g.Provider,{value:{userProperties:i},children:t})},f=()=>{const t=r.useContext(g);if(!t)throw new Error("useUser must be used within a UserProvider");return t};exports.UserProvider=P;exports.useUser=f;
@@ -1,29 +1,29 @@
1
1
  "use client";
2
2
  import { jsx as l } from "react/jsx-runtime";
3
- import { useMemo as i, useEffect as U, createContext as v, useContext as C } from "react";
3
+ import { useMemo as i, useEffect as v, createContext as U, useContext as C } from "react";
4
4
  import { useInkeepConfig as O } from "./config-provider.js";
5
5
  import { useBrowserStorage as g, passesBrowserStorageChecks as w } from "../hooks/use-browser-storage.js";
6
6
  import { generateUid as I } from "../utils/generate-uid.js";
7
- const d = v(void 0), A = ({ children: s }) => {
7
+ const a = U(void 0), A = ({ children: s }) => {
8
8
  const {
9
- baseSettings: { userProperties: o, analytics: m }
10
- } = O(), { optOutAllAnalytics: e, optOutAnalyticalCookies: n } = m, { browserStorage: c, setBrowserStorage: u } = g(), a = i(() => w(), []), r = i(
11
- () => !e && !n && a,
12
- [e, n, a]
9
+ baseSettings: { userProperties: r, privacyPreferences: m }
10
+ } = O(), { optOutAllAnalytics: e, optOutAnalyticalCookies: n } = m, { browserStorage: c, setBrowserStorage: u } = g(), d = i(() => w(), []), o = i(
11
+ () => !e && !n && d,
12
+ [e, n, d]
13
13
  ), t = i(() => {
14
- const p = e ? "ANONYMOUS" : o.id ? "ID_PROVIDED" : r ? "COOKIED" : "ANONYMOUS", f = e ? void 0 : o.id || r && c.userId || I();
14
+ const p = e ? "ANONYMOUS" : r.id ? "ID_PROVIDED" : o ? "COOKIED" : "ANONYMOUS", f = e ? void 0 : r.id || o && c.userId || I();
15
15
  return {
16
16
  identificationType: p,
17
17
  id: f,
18
- email: e ? void 0 : o.email,
19
- cohorts: e ? void 0 : o.cohorts
18
+ email: e ? void 0 : r.email,
19
+ cohorts: e ? void 0 : r.cohorts
20
20
  };
21
- }, [o, e, r, c.userId]);
22
- return U(() => {
23
- r ? u("userId", t.id) : u("userId", void 0);
24
- }, [r, t.id]), /* @__PURE__ */ l(d.Provider, { value: { userProperties: t }, children: s });
21
+ }, [r, e, o, c.userId]);
22
+ return v(() => {
23
+ o ? u("userId", t.id) : u("userId", void 0);
24
+ }, [o, t.id]), /* @__PURE__ */ l(a.Provider, { value: { userProperties: t }, children: s });
25
25
  }, b = () => {
26
- const s = C(d);
26
+ const s = C(a);
27
27
  if (!s)
28
28
  throw new Error("useUser must be used within a UserProvider");
29
29
  return s;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@inkeep/cxkit-theme"),t=require("./transform-source/index.cjs"),a=require("./tools/links-schema.cjs"),s={model:"inkeep-qa-expert",placeholder:"How do I get started?",botName:void 0,shouldOpenLinksInNewTab:!0,disclaimerSettings:{enabled:!1,label:"Usage policy"},isChatSharingEnabled:!1,isViewOnly:!1,quickQuestionsLabel:"Example questions",quickQuestions:[],shouldHighlightFirstQuickQuestion:!0,shouldShowCopyChatButton:!1,getHelpCallToActions:[],workflowsHeader:"Workflows",workflows:[],actionButtonLabels:{clearButtonLabel:"Clear",shareButtonLabel:"Share",getHelpButtonLabel:"Get help",stopButtonLabel:"Stop",copyChatButtonLabel:"Copy"},prompts:[],tools:[{type:"function",function:{name:"provideLinks",description:"Provides links",parameters:a.linksSchema}}]},l={env:"PRODUCTION",apiKey:"",baseUrl:"https://api.inkeep.com",analyticsBaseUrl:"https://api.analytics.inkeep.com",bypassChallenge:!1,analytics:{optOutAnalyticalCookies:!1,optOutAllAnalytics:!1,optOutFunctionalCookies:!1},tags:[],userProperties:{},primaryBrandColor:e.DEFAULT_PRIMARY_BRAND_COLOR,theme:{varsClassName:"inkeep-widget-vars",...e.theme},transformSource:t.defaultTransformSource},o={shouldOpenLinksInNewTab:!1,maximumHitsLimit:40,defaultQuery:"",debounceTime:0,tabs:["All","Publications","PDFs","GitHub","Forums","Discord","Slack","StackOverflow"],searchQueryParamKey:"q",placeholder:"Search for anything..."};exports.defaultInkeepAIChatSettings=s;exports.defaultInkeepBaseSettings=l;exports.defaultInkeepSearchSettings=o;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@inkeep/cxkit-theme"),t=require("./transform-source/index.cjs"),s=require("./tools/links-schema.cjs"),a={model:"inkeep-qa-expert",placeholder:"How do I get started?",aiAssistantName:void 0,shouldOpenLinksInNewTab:!0,disclaimerSettings:{isEnabled:!1,label:"Usage policy"},isShareButtonVisible:!1,isViewOnly:!1,exampleQuestionsLabel:"Example questions",exampleQuestions:[],isFirstExampleQuestionHighlighted:!0,isCopyChatButtonVisible:!1,getHelpOptions:[],workflowsHeader:"Workflows",workflows:[],toolbarButtonLabels:{clear:"Clear",share:"Share",getHelp:"Get help",stop:"Stop",copyChat:"Copy"},prompts:[],tools:[{type:"function",function:{name:"provideLinks",description:"Provides links",parameters:s.linksSchema}}]},i={env:"production",apiKey:"",aiApiBaseUrl:"https://api.inkeep.com",analyticsApiBaseUrl:"https://api.analytics.inkeep.com",shouldBypassCaptcha:!1,privacyPreferences:{optOutAnalyticalCookies:!1,optOutAllAnalytics:!1,optOutFunctionalCookies:!1},tags:[],userProperties:{},primaryBrandColor:e.DEFAULT_PRIMARY_BRAND_COLOR,theme:{varsClassName:"inkeep-widget-vars",...e.theme},transformSource:t.defaultTransformSource},l={shouldOpenLinksInNewTab:!1,maxResults:40,defaultQuery:"",debounceTimeMs:0,tabs:["All","Publications","PDFs","GitHub","Forums","Discord","Slack","StackOverflow"],searchQueryParamKey:"q",placeholder:"Search for anything..."};exports.defaultInkeepAIChatSettings=a;exports.defaultInkeepBaseSettings=i;exports.defaultInkeepSearchSettings=l;
@@ -2,27 +2,27 @@ import { InkeepBaseSettings, TransformSource } from '@inkeep/cxkit-types';
2
2
  export declare const defaultInkeepAIChatSettings: {
3
3
  model: "inkeep-qa-expert";
4
4
  placeholder: string;
5
- botName: undefined;
5
+ aiAssistantName: undefined;
6
6
  shouldOpenLinksInNewTab: true;
7
7
  disclaimerSettings: {
8
- enabled: false;
8
+ isEnabled: false;
9
9
  label: string;
10
10
  };
11
- isChatSharingEnabled: false;
11
+ isShareButtonVisible: false;
12
12
  isViewOnly: false;
13
- quickQuestionsLabel: string;
14
- quickQuestions: never[];
15
- shouldHighlightFirstQuickQuestion: true;
16
- shouldShowCopyChatButton: false;
17
- getHelpCallToActions: never[];
13
+ exampleQuestionsLabel: string;
14
+ exampleQuestions: never[];
15
+ isFirstExampleQuestionHighlighted: true;
16
+ isCopyChatButtonVisible: false;
17
+ getHelpOptions: never[];
18
18
  workflowsHeader: string;
19
19
  workflows: never[];
20
- actionButtonLabels: {
21
- clearButtonLabel: string;
22
- shareButtonLabel: string;
23
- getHelpButtonLabel: string;
24
- stopButtonLabel: string;
25
- copyChatButtonLabel: string;
20
+ toolbarButtonLabels: {
21
+ clear: string;
22
+ share: string;
23
+ getHelp: string;
24
+ stop: string;
25
+ copyChat: string;
26
26
  };
27
27
  prompts: never[];
28
28
  tools: {
@@ -100,10 +100,10 @@ export declare const defaultInkeepAIChatSettings: {
100
100
  export declare const defaultInkeepBaseSettings: {
101
101
  env: InkeepBaseSettings["env"];
102
102
  apiKey: string;
103
- baseUrl: string;
104
- analyticsBaseUrl: string;
105
- bypassChallenge: false;
106
- analytics: {
103
+ aiApiBaseUrl: string;
104
+ analyticsApiBaseUrl: string;
105
+ shouldBypassCaptcha: false;
106
+ privacyPreferences: {
107
107
  optOutAnalyticalCookies: false;
108
108
  optOutAllAnalytics: false;
109
109
  optOutFunctionalCookies: false;
@@ -237,9 +237,9 @@ export declare const defaultInkeepBaseSettings: {
237
237
  };
238
238
  export declare const defaultInkeepSearchSettings: {
239
239
  shouldOpenLinksInNewTab: false;
240
- maximumHitsLimit: number;
240
+ maxResults: number;
241
241
  defaultQuery: string;
242
- debounceTime: number;
242
+ debounceTimeMs: number;
243
243
  tabs: string[];
244
244
  searchQueryParamKey: string;
245
245
  placeholder: string;
@@ -2,27 +2,27 @@ import { InkeepBaseSettings, TransformSource } from '@inkeep/cxkit-types';
2
2
  export declare const defaultInkeepAIChatSettings: {
3
3
  model: "inkeep-qa-expert";
4
4
  placeholder: string;
5
- botName: undefined;
5
+ aiAssistantName: undefined;
6
6
  shouldOpenLinksInNewTab: true;
7
7
  disclaimerSettings: {
8
- enabled: false;
8
+ isEnabled: false;
9
9
  label: string;
10
10
  };
11
- isChatSharingEnabled: false;
11
+ isShareButtonVisible: false;
12
12
  isViewOnly: false;
13
- quickQuestionsLabel: string;
14
- quickQuestions: never[];
15
- shouldHighlightFirstQuickQuestion: true;
16
- shouldShowCopyChatButton: false;
17
- getHelpCallToActions: never[];
13
+ exampleQuestionsLabel: string;
14
+ exampleQuestions: never[];
15
+ isFirstExampleQuestionHighlighted: true;
16
+ isCopyChatButtonVisible: false;
17
+ getHelpOptions: never[];
18
18
  workflowsHeader: string;
19
19
  workflows: never[];
20
- actionButtonLabels: {
21
- clearButtonLabel: string;
22
- shareButtonLabel: string;
23
- getHelpButtonLabel: string;
24
- stopButtonLabel: string;
25
- copyChatButtonLabel: string;
20
+ toolbarButtonLabels: {
21
+ clear: string;
22
+ share: string;
23
+ getHelp: string;
24
+ stop: string;
25
+ copyChat: string;
26
26
  };
27
27
  prompts: never[];
28
28
  tools: {
@@ -100,10 +100,10 @@ export declare const defaultInkeepAIChatSettings: {
100
100
  export declare const defaultInkeepBaseSettings: {
101
101
  env: InkeepBaseSettings["env"];
102
102
  apiKey: string;
103
- baseUrl: string;
104
- analyticsBaseUrl: string;
105
- bypassChallenge: false;
106
- analytics: {
103
+ aiApiBaseUrl: string;
104
+ analyticsApiBaseUrl: string;
105
+ shouldBypassCaptcha: false;
106
+ privacyPreferences: {
107
107
  optOutAnalyticalCookies: false;
108
108
  optOutAllAnalytics: false;
109
109
  optOutFunctionalCookies: false;
@@ -237,9 +237,9 @@ export declare const defaultInkeepBaseSettings: {
237
237
  };
238
238
  export declare const defaultInkeepSearchSettings: {
239
239
  shouldOpenLinksInNewTab: false;
240
- maximumHitsLimit: number;
240
+ maxResults: number;
241
241
  defaultQuery: string;
242
- debounceTime: number;
242
+ debounceTimeMs: number;
243
243
  tabs: string[];
244
244
  searchQueryParamKey: string;
245
245
  placeholder: string;
@@ -1,31 +1,31 @@
1
1
  "use client";
2
- import { theme as e, DEFAULT_PRIMARY_BRAND_COLOR as t } from "@inkeep/cxkit-theme";
3
- import { defaultTransformSource as a } from "./transform-source/index.js";
4
- import { linksSchema as s } from "./tools/links-schema.js";
5
- const n = {
2
+ import { theme as e, DEFAULT_PRIMARY_BRAND_COLOR as s } from "@inkeep/cxkit-theme";
3
+ import { defaultTransformSource as t } from "./transform-source/index.js";
4
+ import { linksSchema as a } from "./tools/links-schema.js";
5
+ const r = {
6
6
  model: "inkeep-qa-expert",
7
7
  placeholder: "How do I get started?",
8
- botName: void 0,
8
+ aiAssistantName: void 0,
9
9
  shouldOpenLinksInNewTab: !0,
10
10
  disclaimerSettings: {
11
- enabled: !1,
11
+ isEnabled: !1,
12
12
  label: "Usage policy"
13
13
  },
14
- isChatSharingEnabled: !1,
14
+ isShareButtonVisible: !1,
15
15
  isViewOnly: !1,
16
- quickQuestionsLabel: "Example questions",
17
- quickQuestions: [],
18
- shouldHighlightFirstQuickQuestion: !0,
19
- shouldShowCopyChatButton: !1,
20
- getHelpCallToActions: [],
16
+ exampleQuestionsLabel: "Example questions",
17
+ exampleQuestions: [],
18
+ isFirstExampleQuestionHighlighted: !0,
19
+ isCopyChatButtonVisible: !1,
20
+ getHelpOptions: [],
21
21
  workflowsHeader: "Workflows",
22
22
  workflows: [],
23
- actionButtonLabels: {
24
- clearButtonLabel: "Clear",
25
- shareButtonLabel: "Share",
26
- getHelpButtonLabel: "Get help",
27
- stopButtonLabel: "Stop",
28
- copyChatButtonLabel: "Copy"
23
+ toolbarButtonLabels: {
24
+ clear: "Clear",
25
+ share: "Share",
26
+ getHelp: "Get help",
27
+ stop: "Stop",
28
+ copyChat: "Copy"
29
29
  },
30
30
  prompts: [],
31
31
  tools: [
@@ -34,17 +34,18 @@ const n = {
34
34
  function: {
35
35
  name: "provideLinks",
36
36
  description: "Provides links",
37
- parameters: s
37
+ parameters: a
38
38
  }
39
39
  }
40
40
  ]
41
- }, r = {
42
- env: "PRODUCTION",
41
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
42
+ }, n = {
43
+ env: "production",
43
44
  apiKey: "",
44
- baseUrl: "https://api.inkeep.com",
45
- analyticsBaseUrl: "https://api.analytics.inkeep.com",
46
- bypassChallenge: !1,
47
- analytics: {
45
+ aiApiBaseUrl: "https://api.inkeep.com",
46
+ analyticsApiBaseUrl: "https://api.analytics.inkeep.com",
47
+ shouldBypassCaptcha: !1,
48
+ privacyPreferences: {
48
49
  optOutAnalyticalCookies: !1,
49
50
  // disable use of cookies for analytics. Default is false.
50
51
  optOutAllAnalytics: !1,
@@ -54,23 +55,23 @@ const n = {
54
55
  },
55
56
  tags: [],
56
57
  userProperties: {},
57
- primaryBrandColor: t,
58
+ primaryBrandColor: s,
58
59
  theme: {
59
60
  varsClassName: "inkeep-widget-vars",
60
61
  ...e
61
62
  },
62
- transformSource: a
63
+ transformSource: t
63
64
  }, p = {
64
65
  shouldOpenLinksInNewTab: !1,
65
- maximumHitsLimit: 40,
66
+ maxResults: 40,
66
67
  defaultQuery: "",
67
- debounceTime: 0,
68
+ debounceTimeMs: 0,
68
69
  tabs: ["All", "Publications", "PDFs", "GitHub", "Forums", "Discord", "Slack", "StackOverflow"],
69
70
  searchQueryParamKey: "q",
70
71
  placeholder: "Search for anything..."
71
72
  };
72
73
  export {
73
- n as defaultInkeepAIChatSettings,
74
- r as defaultInkeepBaseSettings,
74
+ r as defaultInkeepAIChatSettings,
75
+ n as defaultInkeepBaseSettings,
75
76
  p as defaultInkeepSearchSettings
76
77
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={TEXT:"",EMAIL:"",CHECKBOX:!1,TEXTAREA:"",FILE:void 0,SELECT:""};function n(t){return t?t?.reduce((u,e)=>("defaultValue"in e&&e.defaultValue?u[e.name]=e.defaultValue:e.inputType&&(u[e.name]=a[e.inputType]),u),{}):{}}exports.defaultInputValues=a;exports.getFormDefaultValues=n;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={text:"",email:"",checkbox:!1,textarea:"",file:void 0,select:""};function l(u){return u?u?.reduce((t,e)=>("defaultValue"in e&&e.defaultValue?t[e.name]=e.defaultValue:e.inputType&&(t[e.name]=a[e.inputType]),t),{}):{}}exports.defaultInputValues=a;exports.getFormDefaultValues=l;
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- const n = {
3
- TEXT: "",
4
- EMAIL: "",
5
- CHECKBOX: !1,
6
- TEXTAREA: "",
7
- FILE: void 0,
2
+ const a = {
3
+ text: "",
4
+ email: "",
5
+ checkbox: !1,
6
+ textarea: "",
7
+ file: void 0,
8
8
  // file inputs are always uncontrolled since their value can only be set by the user so it's ok to use undefined here
9
- SELECT: ""
9
+ select: ""
10
10
  };
11
- function a(t) {
12
- return t ? t?.reduce((u, e) => ("defaultValue" in e && e.defaultValue ? u[e.name] = e.defaultValue : e.inputType && (u[e.name] = n[e.inputType]), u), {}) : {};
11
+ function n(u) {
12
+ return u ? u?.reduce((t, e) => ("defaultValue" in e && e.defaultValue ? t[e.name] = e.defaultValue : e.inputType && (t[e.name] = a[e.inputType]), t), {}) : {};
13
13
  }
14
14
  export {
15
- n as defaultInputValues,
16
- a as getFormDefaultValues
15
+ a as defaultInputValues,
16
+ n as getFormDefaultValues
17
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-primitives",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -53,9 +53,9 @@
53
53
  "react-textarea-autosize": "8.5.7",
54
54
  "rehype-raw": "7.0.0",
55
55
  "unist-util-visit": "^5.0.0",
56
- "@inkeep/cxkit-color-mode": "0.5.2",
57
- "@inkeep/cxkit-theme": "0.5.2",
58
- "@inkeep/cxkit-types": "0.5.2"
56
+ "@inkeep/cxkit-color-mode": "0.5.4",
57
+ "@inkeep/cxkit-theme": "0.5.4",
58
+ "@inkeep/cxkit-types": "0.5.4"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@biomejs/biome": "1.9.4",
@@ -65,7 +65,7 @@
65
65
  "@testing-library/user-event": "14.5.2",
66
66
  "@types/humps": "2.0.6",
67
67
  "@types/jsdom": "21.1.7",
68
- "@types/react": "19.0.7",
68
+ "@types/react": "19.0.10",
69
69
  "@types/react-dom": "19.0.3",
70
70
  "@vitejs/plugin-react": "4.3.4",
71
71
  "clean-package": "2.2.0",