@inkeep/cxkit-primitives 0.5.110 → 0.5.112
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/components/embedded-chat/use-inkeep-chat.cjs +1 -1
- package/dist/components/embedded-chat/use-inkeep-chat.js +16 -16
- package/dist/hooks/use-scroll-to-bottom.cjs +1 -1
- package/dist/hooks/use-scroll-to-bottom.js +39 -32
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("openai"),t=require("react"),Oe=require("../../providers/config-provider.cjs"),De=require("../../providers/conversation-provider.cjs"),Fe=require("../../providers/chat-events-provider.cjs"),K=require("../../utils/get-message-metadata.cjs"),le=require("../../utils/reset-query-params.cjs"),Te=require("../../providers/chat-form-provider.cjs"),Ke=require("../../providers/widget-provider.cjs"),Qe=require("../../hooks/use-media-query.cjs"),We=require("./use-captcha.cjs"),Je=require("../modal/modal-provider.cjs"),d=require("../../utils/generate-uid.cjs"),ze=require("../../utils/tools/links-tool.cjs"),He=require("../../atoms/api/analytics/conversation.cjs"),je=require("../../utils/misc.cjs"),Ge=()=>{const{chatId:S,isSharedChat:ue,setConversation:ge,conversation:de,resetConversation:me}=De.useInkeepConversation(),{baseSettings:P,aiChatSettings:Q}=Oe.useInkeepConfig(),{aiApiBaseUrl:W,shouldBypassCaptcha:J,filters:z}=P,H=Je.useModal(),{getSolution:pe,prefetchSolution:E,invalidateSolution:j}=We.useCaptcha({fetchUrl:`${W}/v1/challenge`,shouldBypassCaptcha:J,shouldMakeInitialRequest:H?H.isOpen:!0}),fe=new ce({baseURL:`${W}/v1`,apiKey:P.apiKey??"",dangerouslyAllowBrowser:!0}),{onInputMessageChange:he,getTools:ve,prompts:ye,model:Se,filters:G,onToolCall:we}=Q,[w,x]=t.useState(""),V=t.useRef(null);t.useEffect(()=>{he?.(w)},[w]);const[m,l]=t.useState([]),[X,C]=t.useState(!1),[Ce,M]=t.useState(!1),[Me,Y]=t.useState(null),[B,Z]=t.useState(null),[I,b]=t.useState([]),Ie=e=>{b(s=>[...s,e])},[be,ee]=t.useState({}),o=t.useRef([]),k=t.useRef(null),{logEvent:_,getLatestConversation:te}=Fe.useChatEvents(),se=ye?.map((e,s)=>({id:`system-${Date.now().toString()}-${d.generateUid(4)}-${s}`,role:"system",content:e})),[ke,_e]=t.useState(!!S);t.useEffect(()=>{if(S){const{apiKey:e,analyticsApiBaseUrl:s}=P;He.getConversation(S,e,s).then(a=>{if(a){_({eventName:"shared_chat_loaded",properties:{conversation:a}}),_e(!1),ge({...a});const r=a.messages.map(p=>({...p,content:je.parseIfJson(p.content)}));l(r),o.current=r}})}},[S]);const $e=e=>{switch(e.code){case 400:return e.message;case 403:return`There seems to be a configuration error. Please contact ${P.organizationDisplayName??"Administrator"}`;default:return`Hmm..
|
|
2
2
|
|
|
3
|
-
It seems I might be having some issues right now. Please clear the chat and try again.`}},ne=e=>{Y(e),l(s=>{const a=[...s],r=a[a.length-1];return r&&(r.content=$e(e)),a}),C(!1),M(!1),j(),E()},R=!w.trim()&&!I.length||X,qe=e=>{e.key==="Enter"&&!e.shiftKey&&!R&&!e.nativeEvent.isComposing&&(e.preventDefault(),O())},Pe=e=>{const s=e.target.value;x(s)},O=async(e=w)=>{if(R&&(!e||e.trim().length===0))return;C(!0);const s=B?m.length===2:m.length===0,a=K.getMessageMetadata(B,I,s);let r;const p=K.serializeAttachments(I);I.length&&p?r=[{type:"text",text:p}]:r=e;const ae={id:`${Date.now().toString()}-${d.generateUid(4)}-1`,role:"user",content:r,metadata:a},f=[...m.length?[]:se,ae];if(ue&&S){le.resetQueryParams();const u=o.current.map((i,U)=>({id:`${i.id}-${d.generateUid(6)}-${U}`,role:i.role,...i.role==="assistant"?{links:i.links??[]}:{},content:i.content,metadata:i.metadata,tool_calls:i.tool_calls}));l([...u,...f]),o.current=[...u,...f]}else l(u=>[...u,...f]),o.current=[...o.current,...f];b([]),x(""),
|
|
3
|
+
It seems I might be having some issues right now. Please clear the chat and try again.`}},ne=e=>{Y(e),l(s=>{const a=[...s],r=a[a.length-1];return r&&(r.content=$e(e)),a}),C(!1),M(!1),j(),E()},R=!w.trim()&&!I.length||X,qe=e=>{e.key==="Enter"&&!e.shiftKey&&!R&&!e.nativeEvent.isComposing&&(e.preventDefault(),O())},Pe=e=>{const s=e.target.value;x(s)},O=async(e=w)=>{if(R&&(!e||e.trim().length===0))return;C(!0);const s=B?m.length===2:m.length===0,a=K.getMessageMetadata(B,I,s);let r;const p=K.serializeAttachments(I);I.length&&p?r=[{type:"text",text:p}]:r=e;const ae={id:`${Date.now().toString()}-${d.generateUid(4)}-1`,role:"user",content:r,metadata:a},f=[...m.length?[]:se,ae];if(ue&&S){le.resetQueryParams();const u=o.current.map((i,U)=>({id:`${i.id}-${d.generateUid(6)}-${U}`,role:i.role,...i.role==="assistant"?{links:i.links??[]}:{},content:i.content,metadata:i.metadata,tool_calls:i.tool_calls}));l([...u,...f]),o.current=[...u,...f]}else l(u=>[...u,...f]),o.current=[...o.current,...f];b([]),x(""),_({eventName:"user_message_submitted",properties:{}},o.current);const xe=te(),re=[ze.provideLinksTool,...ve?.({conversation:xe})||[]];try{const u={model:Se,messages:o.current,stream:!0,tools:re,tool_choice:"auto"},i=await pe(),U=i?btoa(JSON.stringify(i)):null,ie=z||G?JSON.stringify({...z,...G}):void 0,N={};!J&&U&&(N["X-INKEEP-CHALLENGE-SOLUTION"]=U),ie&&(N["inkeep-filters"]=ie);const h=fe.beta.chat.completions.stream(u,Object.keys(N).length>0?{headers:N}:void 0),n={id:`${Date.now().toString()}-${d.generateUid(4)}-2`,role:"assistant",content:"",links:[],tool_calls:[]};l(g=>[...g,n]),h.on("content",(g,$)=>{M(!0),n.content=$,l(A=>{const c=[...A],D=c.findIndex(q=>q.id===n.id);return D===-1?[...c,n]:(c[D]={...n},c)})}),h.on("tool_calls.function.arguments.done",async g=>{const{name:$,arguments:A}=g,c=re?.find(v=>v.function.name===$);if(!c)return;const q=("parse"in c.function?c.function.parse:JSON.parse)(A),Be=c.function.function?.(q,h);if($==="provideLinks")n.links=q.links??[];else{const v=c.renderMessageButtons?.({args:q,execution:Be})??[];v.length>0&&ee(y=>{const L=y[n.id]??[],F=new Set(L.map(T=>T.label)),Re=v.filter(T=>!F.has(T.label));return{...y,[n.id]:[...L,...Re]}})}n.tool_calls?.push({id:"call_"+d.generateUid(24),type:"function",function:{name:$,arguments:A}}),l(v=>{const y=[...v],L=y.findIndex(F=>F.id===n.id);return y[L]={...n},y}),we?.(g,{conversation:{...te(),messages:[...o.current,n]}})}),h.on("error",ne),h.finalChatCompletion().then(async()=>{o.current=[...o.current,n],k.current=null,C(!1),M(!1),E(),await _({eventName:"assistant_message_received",properties:{}},o.current),_({eventName:"assistant_answer_displayed",properties:{}})}).catch(g=>{g instanceof ce.APIUserAbortError||console.warn(g)}),k.current=h.controller}catch(u){ne(u),C(!1),M(!1)}},Ee=()=>{k.current&&(k.current.abort(),k.current=null),C(!1),M(!1),E()},oe=()=>{Y(null),l([]),o.current=[],me(),ee({}),b([]),le.resetQueryParams(),Z(null),j(),E(),_({eventName:"chat_clear_button_clicked",properties:{conversation:de}})},Ue=e=>{Z(e);const{initialReplyMessage:s,displayName:a}=e,r={id:m.length.toString()+d.generateUid(4),role:"user",content:a},p={id:(m.length+1).toString()+d.generateUid(4),role:"assistant",content:s,links:[]},f=[{id:`system-${Date.now().toString()}-${d.generateUid(4)}-${e.id}`,role:"system",content:`Company has asked user to follow this guided workflow:
|
|
4
4
|
${K.serializeWorkflow(e)}`},...se,r,p];l(f),b([])},{openForm:Ne}=Te.useChatForm(),Ae=Ke.useWidget();t.useImperativeHandle(Q.chatFunctionsRef,()=>({submitMessage:O,updateInputMessage(e){x(e)},clearChat:oe,openForm:e=>{Ae?.setView("chat"),Ne(e)},focusInput:()=>{V.current?.focus()}}));const Le=Qe.useMediaQuery("(max-width: 768px)");return{messages:m,input:w,isLoading:X,isStreaming:Ce,isLoadingConversation:ke,error:Me,isSubmitDisabled:R,handleInputChange:Pe,handleInputKeyDown:qe,handleSubmit:O,stop:Ee,clear:oe,handleWorkflow:Ue,selectedWorkflow:B,messageAttachments:I,setMessageAttachments:b,addAttachment:Ie,messageButtons:be,isEmpty:m.length===0,inputRef:V,isMobile:Le}};exports.useInkeepChat=Ge;
|
|
@@ -16,7 +16,7 @@ import { provideLinksTool as Ye } from "../../utils/tools/links-tool.js";
|
|
|
16
16
|
import { getConversation as Ze } from "../../atoms/api/analytics/conversation.js";
|
|
17
17
|
import { parseIfJson as et } from "../../utils/misc.js";
|
|
18
18
|
const yt = () => {
|
|
19
|
-
const { chatId:
|
|
19
|
+
const { chatId: w, isSharedChat: ue, setConversation: me, conversation: ge, resetConversation: pe } = We(), { baseSettings: N, aiChatSettings: J } = Te(), { aiApiBaseUrl: z, shouldBypassCaptcha: H, filters: Q } = N, j = Xe(), { getSolution: de, prefetchSolution: A, invalidateSolution: q } = Ve({
|
|
20
20
|
fetchUrl: `${z}/v1/challenge`,
|
|
21
21
|
shouldBypassCaptcha: H,
|
|
22
22
|
shouldMakeInitialRequest: j ? j.isOpen : !0
|
|
@@ -27,8 +27,8 @@ const yt = () => {
|
|
|
27
27
|
}), {
|
|
28
28
|
onInputMessageChange: he,
|
|
29
29
|
getTools: ye,
|
|
30
|
-
prompts:
|
|
31
|
-
model:
|
|
30
|
+
prompts: ve,
|
|
31
|
+
model: we,
|
|
32
32
|
filters: G,
|
|
33
33
|
onToolCall: Ce
|
|
34
34
|
} = J, [C, O] = l(""), V = W(null);
|
|
@@ -37,15 +37,15 @@ const yt = () => {
|
|
|
37
37
|
}, [C]);
|
|
38
38
|
const [p, c] = l([]), [X, I] = l(!1), [Ie, M] = l(!1), [Me, Y] = l(null), [P, Z] = l(null), [S, b] = l([]), Se = (e) => {
|
|
39
39
|
b((t) => [...t, e]);
|
|
40
|
-
}, [be, ee] = l({}), n = W([]), k = W(null), { logEvent: _, getLatestConversation: te } = Je(), se =
|
|
40
|
+
}, [be, ee] = l({}), n = W([]), k = W(null), { logEvent: _, getLatestConversation: te } = Je(), se = ve?.map((e, t) => ({
|
|
41
41
|
id: `system-${Date.now().toString()}-${g(4)}-${t}`,
|
|
42
42
|
role: "system",
|
|
43
43
|
content: e
|
|
44
|
-
})), [ke, _e] = l(!!
|
|
44
|
+
})), [ke, _e] = l(!!w);
|
|
45
45
|
ce(() => {
|
|
46
|
-
if (
|
|
46
|
+
if (w) {
|
|
47
47
|
const { apiKey: e, analyticsApiBaseUrl: t } = N;
|
|
48
|
-
Ze(
|
|
48
|
+
Ze(w, e, t).then((o) => {
|
|
49
49
|
if (o) {
|
|
50
50
|
_({
|
|
51
51
|
eventName: "shared_chat_loaded",
|
|
@@ -61,7 +61,7 @@ const yt = () => {
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
}, [
|
|
64
|
+
}, [w]);
|
|
65
65
|
const $e = (e) => {
|
|
66
66
|
switch (e.code) {
|
|
67
67
|
case 400:
|
|
@@ -96,7 +96,7 @@ It seems I might be having some issues right now. Please clear the chat and try
|
|
|
96
96
|
content: a,
|
|
97
97
|
metadata: o
|
|
98
98
|
}, f = [...p.length ? [] : se, ae];
|
|
99
|
-
if (ue &&
|
|
99
|
+
if (ue && w) {
|
|
100
100
|
le();
|
|
101
101
|
const u = n.current.map((r, x) => ({
|
|
102
102
|
id: `${r.id}-${g(6)}-${x}`,
|
|
@@ -109,7 +109,7 @@ It seems I might be having some issues right now. Please clear the chat and try
|
|
|
109
109
|
c([...u, ...f]), n.current = [...u, ...f];
|
|
110
110
|
} else
|
|
111
111
|
c((u) => [...u, ...f]), n.current = [...n.current, ...f];
|
|
112
|
-
b([]), O(""),
|
|
112
|
+
b([]), O(""), _(
|
|
113
113
|
{
|
|
114
114
|
eventName: "user_message_submitted",
|
|
115
115
|
properties: {}
|
|
@@ -119,7 +119,7 @@ It seems I might be having some issues right now. Please clear the chat and try
|
|
|
119
119
|
const Oe = te(), re = [Ye, ...ye?.({ conversation: Oe }) || []];
|
|
120
120
|
try {
|
|
121
121
|
const u = {
|
|
122
|
-
model:
|
|
122
|
+
model: we,
|
|
123
123
|
messages: n.current,
|
|
124
124
|
stream: !0,
|
|
125
125
|
tools: re,
|
|
@@ -152,10 +152,10 @@ It seems I might be having some issues right now. Please clear the chat and try
|
|
|
152
152
|
s.links = E.links ?? [];
|
|
153
153
|
else {
|
|
154
154
|
const y = i.renderMessageButtons?.({ args: E, execution: Pe }) ?? [];
|
|
155
|
-
y.length > 0 && ee((
|
|
156
|
-
const D =
|
|
155
|
+
y.length > 0 && ee((v) => {
|
|
156
|
+
const D = v[s.id] ?? [], K = new Set(D.map((T) => T.label)), Re = y.filter((T) => !K.has(T.label));
|
|
157
157
|
return {
|
|
158
|
-
...
|
|
158
|
+
...v,
|
|
159
159
|
[s.id]: [...D, ...Re]
|
|
160
160
|
};
|
|
161
161
|
});
|
|
@@ -168,8 +168,8 @@ It seems I might be having some issues right now. Please clear the chat and try
|
|
|
168
168
|
arguments: B
|
|
169
169
|
}
|
|
170
170
|
}), c((y) => {
|
|
171
|
-
const
|
|
172
|
-
return
|
|
171
|
+
const v = [...y], D = v.findIndex((K) => K.id === s.id);
|
|
172
|
+
return v[D] = { ...s }, v;
|
|
173
173
|
}), Ce?.(m, {
|
|
174
174
|
conversation: {
|
|
175
175
|
...te(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react");function
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react");function b(h={}){const{threshold:a=150,interactionTimeout:f=150}=h,o=r.useRef(null),l=r.useRef(!0),s=r.useRef(!1),i=r.useCallback(()=>{const e=o.current;return e?e.scrollHeight-e.clientHeight-e.scrollTop<a:!1},[a]),n=r.useCallback((e=!1)=>{const t=o.current;!t||s.current||t.scrollTo({top:t.scrollHeight,behavior:e?"smooth":"auto"})},[]);return r.useEffect(()=>{const e=o.current;if(!e)return;let t;const c=()=>{s.current=!0,l.current=i(),window.clearTimeout(t),t=window.setTimeout(()=>{s.current=!1},f)};return e.addEventListener("scroll",c,{passive:!0}),()=>{e.removeEventListener("scroll",c),window.clearTimeout(t)}},[i,f]),r.useEffect(()=>{const e=o.current;if(!e)return;const t=new MutationObserver(c=>{c.some(u=>u.type==="childList"||u.type==="characterData"||u.type==="attributes"&&u.attributeName==="style")&&l.current&&n(!0)});return t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"],characterData:!0}),()=>t.disconnect()},[n]),r.useEffect(()=>{o.current&&n()},[n]),r.useEffect(()=>{const e=o.current;if(!e)return;const t=new ResizeObserver(()=>{l.current&&(s.current=!1,n(!1))});return t.observe(e),()=>t.disconnect()},[n]),{containerRef:o,scrollToBottom:n,isNearBottom:i}}exports.useScrollToBottom=b;
|
|
@@ -1,52 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useRef as
|
|
3
|
-
function
|
|
4
|
-
const { threshold:
|
|
5
|
-
const t = r.current;
|
|
6
|
-
return t ? t.scrollHeight - t.clientHeight - t.scrollTop < a : !1;
|
|
7
|
-
}, [a]), o = d((t = !1) => {
|
|
2
|
+
import { useRef as a, useCallback as d, useEffect as u } from "react";
|
|
3
|
+
function T(b = {}) {
|
|
4
|
+
const { threshold: f = 150, interactionTimeout: h = 150 } = b, r = a(null), i = a(!0), o = a(!1), l = d(() => {
|
|
8
5
|
const e = r.current;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
return e ? e.scrollHeight - e.clientHeight - e.scrollTop < f : !1;
|
|
7
|
+
}, [f]), n = d((e = !1) => {
|
|
8
|
+
const t = r.current;
|
|
9
|
+
!t || o.current || t.scrollTo({
|
|
10
|
+
top: t.scrollHeight,
|
|
11
|
+
behavior: e ? "smooth" : "auto"
|
|
12
12
|
});
|
|
13
13
|
}, []);
|
|
14
|
-
return
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
14
|
+
return u(() => {
|
|
15
|
+
const e = r.current;
|
|
16
|
+
if (!e) return;
|
|
17
|
+
let t;
|
|
18
|
+
const s = () => {
|
|
19
|
+
o.current = !0, i.current = l(), window.clearTimeout(t), t = window.setTimeout(() => {
|
|
20
|
+
o.current = !1;
|
|
21
|
+
}, h);
|
|
22
22
|
};
|
|
23
|
-
return
|
|
24
|
-
|
|
23
|
+
return e.addEventListener("scroll", s, { passive: !0 }), () => {
|
|
24
|
+
e.removeEventListener("scroll", s), window.clearTimeout(t);
|
|
25
25
|
};
|
|
26
|
-
}, [l,
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
const
|
|
30
|
-
|
|
26
|
+
}, [l, h]), u(() => {
|
|
27
|
+
const e = r.current;
|
|
28
|
+
if (!e) return;
|
|
29
|
+
const t = new MutationObserver((s) => {
|
|
30
|
+
s.some(
|
|
31
31
|
(c) => c.type === "childList" || c.type === "characterData" || c.type === "attributes" && c.attributeName === "style"
|
|
32
|
-
) &&
|
|
32
|
+
) && i.current && n(!0);
|
|
33
33
|
});
|
|
34
|
-
return
|
|
34
|
+
return t.observe(e, {
|
|
35
35
|
childList: !0,
|
|
36
36
|
subtree: !0,
|
|
37
37
|
attributes: !0,
|
|
38
38
|
attributeFilter: ["style"],
|
|
39
39
|
// Only watch style changes
|
|
40
40
|
characterData: !0
|
|
41
|
-
}), () =>
|
|
42
|
-
}, [
|
|
43
|
-
r.current &&
|
|
44
|
-
}, [
|
|
41
|
+
}), () => t.disconnect();
|
|
42
|
+
}, [n]), u(() => {
|
|
43
|
+
r.current && n();
|
|
44
|
+
}, [n]), u(() => {
|
|
45
|
+
const e = r.current;
|
|
46
|
+
if (!e) return;
|
|
47
|
+
const t = new ResizeObserver(() => {
|
|
48
|
+
i.current && (o.current = !1, n(!1));
|
|
49
|
+
});
|
|
50
|
+
return t.observe(e), () => t.disconnect();
|
|
51
|
+
}, [n]), {
|
|
45
52
|
containerRef: r,
|
|
46
|
-
scrollToBottom:
|
|
53
|
+
scrollToBottom: n,
|
|
47
54
|
isNearBottom: l
|
|
48
55
|
};
|
|
49
56
|
}
|
|
50
57
|
export {
|
|
51
|
-
|
|
58
|
+
T as useScrollToBottom
|
|
52
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),t=require("react"),f=require("../atoms/api/analytics/events.cjs"),b=require("./config-provider.cjs"),x=require("./user-provider.cjs"),E=t.createContext(void 0),q=({children:e})=>{const{baseSettings:s,componentType:r}=b.useInkeepConfig(),{apiKey:i,analyticsApiBaseUrl:c,tags:a,privacyPreferences:m,env:g,analyticsProperties:v}=s,{userProperties:u}=x.useUser(),l=t.useMemo(()=>({widgetLibraryVersion:"0.5.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),t=require("react"),f=require("../atoms/api/analytics/events.cjs"),b=require("./config-provider.cjs"),x=require("./user-provider.cjs"),E=t.createContext(void 0),q=({children:e})=>{const{baseSettings:s,componentType:r}=b.useInkeepConfig(),{apiKey:i,analyticsApiBaseUrl:c,tags:a,privacyPreferences:m,env:g,analyticsProperties:v}=s,{userProperties:u}=x.useUser(),l=t.useMemo(()=>({widgetLibraryVersion:"0.5.112",componentType:r,tags:a}),[r,a]),d=!m.optOutAllAnalytics&&g!=="development",P={logEvent:t.useCallback(async n=>{const o={...l,...n.properties,...v},p={eventName:n.eventName,properties:o,userProperties:u},y=["modal_opened","modal_closed"].includes(n.eventName);if(d&&!y){if("conversation"in o&&!o.conversation?.id)return;f.logEvent(p,i,c)}s.onEvent?.(p)},[d,s,i,c,u,l,v])};return B.jsx(E.Provider,{value:P,children:e})},C=()=>{const e=t.useContext(E);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=q;exports.useBaseEvents=C;
|
|
@@ -7,7 +7,7 @@ import { useUser as A } from "./user-provider.js";
|
|
|
7
7
|
const u = B(void 0), $ = ({ children: e }) => {
|
|
8
8
|
const { baseSettings: t, componentType: s } = w(), { apiKey: r, analyticsApiBaseUrl: i, tags: a, privacyPreferences: d, env: E, analyticsProperties: c } = t, { userProperties: v } = A(), p = P(
|
|
9
9
|
() => ({
|
|
10
|
-
widgetLibraryVersion: "0.5.
|
|
10
|
+
widgetLibraryVersion: "0.5.112",
|
|
11
11
|
componentType: s,
|
|
12
12
|
tags: a
|
|
13
13
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-primitives",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.112",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"remark-gfm": "^4.0.1",
|
|
68
68
|
"unist-util-visit": "^5.0.0",
|
|
69
69
|
"use-sync-external-store": "^1.4.0",
|
|
70
|
-
"@inkeep/cxkit-color-mode": "^0.5.
|
|
71
|
-
"@inkeep/cxkit-theme": "0.5.
|
|
72
|
-
"@inkeep/cxkit-types": "0.5.
|
|
70
|
+
"@inkeep/cxkit-color-mode": "^0.5.112",
|
|
71
|
+
"@inkeep/cxkit-theme": "0.5.112",
|
|
72
|
+
"@inkeep/cxkit-types": "0.5.112"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@biomejs/biome": "1.9.4",
|