@inkeep/cxkit-primitives 0.5.91 → 0.5.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/dialog.cjs +1 -1
- package/dist/atoms/dialog.js +78 -68
- package/dist/atoms/portal.cjs +1 -1
- package/dist/atoms/select.cjs +1 -0
- package/dist/atoms/select.js +787 -0
- package/dist/atoms/shadow/create.cjs +1 -1
- package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
- package/dist/components/embedded-chat/use-inkeep-chat.js +71 -71
- package/dist/components/embedded-chat.cjs +4 -4
- package/dist/components/embedded-chat.js +895 -895
- package/dist/components/intelligent-form.cjs +1 -1
- package/dist/components/intelligent-form.js +282 -282
- package/dist/index.d.cts +267 -3
- package/dist/index.d.ts +267 -3
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/providers/chat-events-provider.cjs +1 -1
- package/dist/providers/chat-events-provider.js +45 -43
- package/dist/providers/conversation-provider.cjs +1 -1
- package/dist/providers/conversation-provider.js +18 -17
- package/package.json +9 -5
|
@@ -3,26 +3,27 @@ import { jsx as f } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState as u, useEffect as m, useMemo as w, createContext as P, useContext as S } from "react";
|
|
4
4
|
import { useInkeepConfig as v } from "./config-provider.js";
|
|
5
5
|
const x = "conversationId", l = P(null), z = ({ children: n }) => {
|
|
6
|
-
const
|
|
6
|
+
const s = g(), { aiChatSettings: d } = v(), t = d.chatId || s, [r, o] = u(t);
|
|
7
7
|
m(() => {
|
|
8
8
|
o(t);
|
|
9
9
|
}, [t]);
|
|
10
|
-
const
|
|
10
|
+
const a = {
|
|
11
11
|
id: "",
|
|
12
12
|
messages: []
|
|
13
|
-
}, [e,
|
|
14
|
-
a
|
|
15
|
-
},
|
|
13
|
+
}, [e, i] = u(a), h = () => {
|
|
14
|
+
i(a), o(void 0);
|
|
15
|
+
}, c = w(
|
|
16
16
|
() => ({
|
|
17
17
|
conversation: e,
|
|
18
|
-
setConversation:
|
|
19
|
-
chatId:
|
|
18
|
+
setConversation: i,
|
|
19
|
+
chatId: r,
|
|
20
|
+
isSharedChat: !!s,
|
|
20
21
|
resetConversation: h,
|
|
21
22
|
setExternalChatId: o
|
|
22
23
|
}),
|
|
23
|
-
[e, s]
|
|
24
|
+
[e, r, s]
|
|
24
25
|
);
|
|
25
|
-
return /* @__PURE__ */ f(l.Provider, { value:
|
|
26
|
+
return /* @__PURE__ */ f(l.Provider, { value: c, children: n });
|
|
26
27
|
}, L = () => {
|
|
27
28
|
const n = S(l);
|
|
28
29
|
if (!n)
|
|
@@ -30,20 +31,20 @@ const x = "conversationId", l = P(null), z = ({ children: n }) => {
|
|
|
30
31
|
return n;
|
|
31
32
|
};
|
|
32
33
|
function g() {
|
|
33
|
-
const [n,
|
|
34
|
+
const [n, s] = u(void 0), { aiChatSettings: d } = v(), { shareChatUrlBasePath: t } = d;
|
|
34
35
|
return m(() => {
|
|
35
36
|
if (!t || typeof window > "u") return;
|
|
36
|
-
const
|
|
37
|
-
const { origin: e, pathname:
|
|
38
|
-
if (e ===
|
|
37
|
+
const r = (e) => e.endsWith("/") ? e.slice(0, -1) : e, o = () => {
|
|
38
|
+
const { origin: e, pathname: i, search: h } = window.location, c = new URL(t), I = r(i), p = r(c.pathname);
|
|
39
|
+
if (e === c.origin && I === p) {
|
|
39
40
|
const C = new URLSearchParams(h).get(x);
|
|
40
|
-
C &&
|
|
41
|
+
C && s(C);
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
o();
|
|
44
|
-
const
|
|
45
|
-
return window.addEventListener("popstate",
|
|
46
|
-
window.removeEventListener("popstate",
|
|
45
|
+
const a = () => o();
|
|
46
|
+
return window.addEventListener("popstate", a), () => {
|
|
47
|
+
window.removeEventListener("popstate", a);
|
|
47
48
|
};
|
|
48
49
|
}, [t]), n;
|
|
49
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-primitives",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.93",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -20,27 +20,31 @@
|
|
|
20
20
|
},
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@radix-ui/number": "^1.1.1",
|
|
23
24
|
"@radix-ui/primitive": "^1.1.1",
|
|
24
25
|
"@radix-ui/react-avatar": "1.1.2",
|
|
25
26
|
"@radix-ui/react-checkbox": "1.1.3",
|
|
27
|
+
"@radix-ui/react-collection": "^1.1.7",
|
|
26
28
|
"@radix-ui/react-compose-refs": "^1.1.1",
|
|
27
29
|
"@radix-ui/react-context": "^1.1.1",
|
|
30
|
+
"@radix-ui/react-direction": "^1.1.1",
|
|
28
31
|
"@radix-ui/react-dismissable-layer": "^1.1.5",
|
|
29
32
|
"@radix-ui/react-focus-guards": "^1.1.1",
|
|
30
33
|
"@radix-ui/react-focus-scope": "^1.1.2",
|
|
31
34
|
"@radix-ui/react-hover-card": "^1.1.6",
|
|
32
35
|
"@radix-ui/react-id": "^1.1.0",
|
|
33
36
|
"@radix-ui/react-popover": "1.1.6",
|
|
37
|
+
"@radix-ui/react-popper": "^1.2.7",
|
|
34
38
|
"@radix-ui/react-portal": "^1.1.4",
|
|
35
39
|
"@radix-ui/react-presence": "^1.1.2",
|
|
36
40
|
"@radix-ui/react-primitive": "^2.0.2",
|
|
37
41
|
"@radix-ui/react-scroll-area": "1.2.2",
|
|
38
|
-
"@radix-ui/react-select": "^2.1.7",
|
|
39
42
|
"@radix-ui/react-slot": "^1.2.0",
|
|
40
43
|
"@radix-ui/react-tabs": "^1.1.4",
|
|
41
44
|
"@radix-ui/react-tooltip": "1.1.6",
|
|
42
45
|
"@radix-ui/react-use-callback-ref": "^1.1.0",
|
|
43
46
|
"@radix-ui/react-use-controllable-state": "^1.1.0",
|
|
47
|
+
"@radix-ui/react-use-layout-effect": "^1.1.1",
|
|
44
48
|
"@zag-js/focus-trap": "^1.7.0",
|
|
45
49
|
"@zag-js/presence": "^1.13.1",
|
|
46
50
|
"@zag-js/react": "^1.13.1",
|
|
@@ -63,9 +67,9 @@
|
|
|
63
67
|
"remark-gfm": "^4.0.1",
|
|
64
68
|
"unist-util-visit": "^5.0.0",
|
|
65
69
|
"use-sync-external-store": "^1.4.0",
|
|
66
|
-
"@inkeep/cxkit-color-mode": "0.5.
|
|
67
|
-
"@inkeep/cxkit-theme": "0.5.
|
|
68
|
-
"@inkeep/cxkit-types": "0.5.
|
|
70
|
+
"@inkeep/cxkit-color-mode": "^0.5.93",
|
|
71
|
+
"@inkeep/cxkit-theme": "0.5.93",
|
|
72
|
+
"@inkeep/cxkit-types": "0.5.93"
|
|
69
73
|
},
|
|
70
74
|
"devDependencies": {
|
|
71
75
|
"@biomejs/biome": "1.9.4",
|